Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git into develop

This commit is contained in:
Regis Houssin 2012-10-03 12:41:02 +02:00
commit 4ed05b5b2e
7 changed files with 36 additions and 21 deletions

View File

@ -49,9 +49,9 @@ For users:
- New: Add a selection module for emailing to enter a recipient from gui.
- New: Allow to search thirds and products from barcodes directly from the permanent mini search left box.
- New: Allow to search product from barcodes directly from invoices, proposals... through AJAX.
- New: Can make one invoice for several orders.
New experimental modules:
- New: Add margin and commissions management module.
- New: Add holiday module.
- Fix: [ bug #499 ]: Supplier order input method not translated
- Fix: No images into product description lines as PDF generation does

View File

@ -2529,10 +2529,10 @@ class Commande extends CommonOrder
* Return clicable link of object (with eventually picto)
*
* @param int $withpicto Add picto into link
* @param int $option Where point the link
* @param int $option Where point the link (0=> main card, 1,2 => shipment)
* @param int $max Max length to show
* @param int $short Use short labels
* @return string String with URL
* @return string String with URL
*/
function getNomUrl($withpicto=0,$option=0,$max=0,$short=0)
{

View File

@ -126,7 +126,7 @@ if ($sall)
}
if ($viewstatut <> '')
{
if ($viewstatut < 4 && $viewstatut > -2)
if ($viewstatut < 4 && $viewstatut > -3)
{
$sql.= ' AND c.fk_statut ='.$viewstatut; // brouillon, validee, en cours, annulee
if ($viewstatut == 3)
@ -143,6 +143,11 @@ if ($viewstatut <> '')
//$sql.= ' AND c.fk_statut IN (1,2,3) AND c.facture = 0';
$sql.= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; // If status is 2 and facture=1, it must be selected
}
if ($viewstatut == -3) // To bill
{
$sql.= ' AND c.fk_statut in (1,2,3)';
$sql.= ' AND c.facture = 0'; // invoice not created
}
}
if ($ordermonth > 0)
{
@ -215,6 +220,8 @@ if ($resql)
$title.=' - '.$langs->trans('StatusOrderCanceledShort');
if ($viewstatut == -2)
$title.=' - '.$langs->trans('StatusOrderToProcessShort');
if ($viewstatut == -3)
$title.=' - '.$langs->trans('StatusOrderValidated').', '.$langs->trans("StatusOrderSent").', '.$langs->trans('StatusOrderToBill');
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
if ($ordermonth) $param.='&ordermonth='.$ordermonth;
@ -233,6 +240,7 @@ if ($resql)
// Lignes des champs de filtre
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
print '<table class="noborder" width="100%">';
@ -297,7 +305,7 @@ if ($resql)
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td class="nobordernopadding" nowrap="nowrap">';
print $generic_commande->getNomUrl(1,$objp->fk_statut);
print $generic_commande->getNomUrl(1,($viewstatut != 2?0:$objp->fk_statut));
print '</td>';
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';

View File

@ -152,7 +152,7 @@ if (($action == 'create' || $action == 'add') && empty($mesgs))
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
if (empty($datefacture))
{
$datefacture = dol_mktime(12, 0, 0, date("m"), date("d"), date("Y"));
$datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y"));
}
if (! $error)
{
@ -388,16 +388,21 @@ if ($action == 'create')
print '<input type="hidden" name="originid" value="'.GETPOST('originid').'">';
print '<input type="hidden" name="autocloseorders" value="'.GETPOST('autocloseorders').'">';
print '<table class="border" width="100%">';
// Ref
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans('Draft').'</td></tr>';
// Tiers
// Third party
print '<tr><td class="fieldrequired">'.$langs->trans('Customer').'</td><td colspan="2">';
print $soc->getNomUrl(1);
print '<input type="hidden" name="socid" value="'.$soc->id.'">';
print '</td>';
print '</tr>'."\n";
// Type
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('Type').'</td><td colspan="2">';
print '<table class="nobordernopadding">'."\n";
// Standard invoice
print '<tr height="18"><td width="16px" valign="middle">';
print '<input type="radio" name="type" value="0"'.(GETPOST('type')==0?' checked="true"':'').'>';
@ -443,16 +448,16 @@ if ($action == 'create')
dol_include_once('/commande/class/commande.class.php');
$srcobject = new Commande($db);
$commandes = $langs->trans("Orders").": ";
$listoforders = '';
foreach ($selected as $sel)
{
$result=$srcobject->fetch($sel);
if ($result > 0)
{
$commandes.= $srcobject->ref.", ";
$listoforders .= ($listoforders?', ':'').$srcobject->ref;
}
}
print $commandes;
print $langs->trans("Orders").": ".$listoforders;
print '</textarea></td></tr>';
// Private note
@ -540,12 +545,8 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
{
$soc = new Societe($db);
$soc->fetch($socid);
$title = $langs->trans('ListOfOrders');
}
else
{
$title = $langs->trans('ListOfOrders');
}
$title = $langs->trans('ListOfOrders');
$title.=' - '.$langs->trans('StatusOrderValidated').', '.$langs->trans("StatusOrderSent").', '.$langs->trans('StatusOrderToBill');
$num = $db->num_rows($resql);
print_fiche_titre($title);
@ -667,13 +668,13 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
/*
* Boutons actions
*/
print '<center><br><input type="checkbox" checked="checked" name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
print '<div align="right">';
print '<input type="hidden" name="socid" value="'.$socid.'">';
print '<input type="hidden" name="action" value="create">';
print '<input type="hidden" name="origin" value="commande"><br>';
print '<a class="butAction" href="index.php">'.$langs->trans("GoBack").'</a>';
print '<input type="submit" class="butAction" value='.$langs->trans("GenerateBill").'>';
print '<center><br><input type="checkbox" checked="checked" name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
//print '<a class="butAction" href="index.php">'.$langs->trans("GoBack").'</a>';
print '<input type="submit" class="butAction" value="'.$langs->trans("GenerateBill").'">';
print '</div>';
print '</form>';
$db->free($resql);

View File

@ -951,10 +951,10 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
if (! empty($conf->commande->enabled))
{
$langs->load("orders");
if (! empty($conf->facture->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&amp;viewstatut=3", $langs->trans("MenuOrdersToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
if (! empty($conf->facture->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&amp;viewstatut=-3", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
// if ($leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire);
if ($leftmenu=="orders") $newmenu->add("/commande/customer.php", $langs->trans("GenerateBill"), 1, $user->rights->commande->lire);
// Does this link is required now we have link into "Orders to bill" list ?
//if ($leftmenu=="orders") $newmenu->add("/commande/customer.php", $langs->trans("GenerateBill"), 1, $user->rights->commande->lire);
}
// Donations

View File

@ -33,6 +33,7 @@ StatusOrderSent=Shipment in process
StatusOrderOnProcessShort=Reception
StatusOrderProcessedShort=Processed
StatusOrderToBillShort=Delivered
StatusOrderToBill2Short=To bill
StatusOrderApprovedShort=Approved
StatusOrderRefusedShort=Refused
StatusOrderToProcessShort=To process
@ -44,6 +45,7 @@ StatusOrderValidated=Validated
StatusOrderOnProcess=Waiting to receive
StatusOrderProcessed=Processed
StatusOrderToBill=Delivered
StatusOrderToBill2=To bill
StatusOrderApproved=Approved
StatusOrderRefused=Refused
StatusOrderReceivedPartially=Partially received
@ -52,6 +54,7 @@ ShippingExist=A shipment exists
DraftOrWaitingApproved=Draft or approved not yet ordered
DraftOrWaitingShipped=Draft or validated not yet shipped
MenuOrdersToBill=Orders delivered
MenuOrdersToBill2=Orders to bill
SearchOrder=Search order
Sending=Sending
Sendings=Sendings

View File

@ -33,6 +33,7 @@ StatusOrderSentShort=Envoi en cours
StatusOrderSent=Envoi en cours
StatusOrderProcessedShort=Traitée
StatusOrderToBillShort=Délivrée
StatusOrderToBill2Short=A facturer
StatusOrderApprovedShort=Approuvée
StatusOrderRefusedShort=Refusée
StatusOrderToProcessShort=A traiter
@ -44,6 +45,7 @@ StatusOrderValidated=Validée
StatusOrderOnProcess=Attente réception
StatusOrderProcessed=Traitée
StatusOrderToBill=Délivrée
StatusOrderToBill2=A facturer
StatusOrderApproved=Approuvée
StatusOrderRefused=Refusée
StatusOrderReceivedPartially=Reçu partiellement
@ -53,6 +55,7 @@ DraftOrWaitingApproved=Brouillon ou approuvée pas encore commandée
DraftOrWaitingShipped=Brouillon ou validée pas encore expédiée
SearchOrder=Rechercher une commande
MenuOrdersToBill=Commandes délivrées
MenuOrdersToBill2=Commandes à facturer
Sending=Expédition
Sendings=Expéditions
ShipProduct=Expédier produit