Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
4ed05b5b2e
@ -49,9 +49,9 @@ For users:
|
|||||||
- New: Add a selection module for emailing to enter a recipient from gui.
|
- 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 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: Allow to search product from barcodes directly from invoices, proposals... through AJAX.
|
||||||
|
- New: Can make one invoice for several orders.
|
||||||
New experimental modules:
|
New experimental modules:
|
||||||
- New: Add margin and commissions management module.
|
- New: Add margin and commissions management module.
|
||||||
- New: Add holiday module.
|
|
||||||
|
|
||||||
- Fix: [ bug #499 ]: Supplier order input method not translated
|
- Fix: [ bug #499 ]: Supplier order input method not translated
|
||||||
- Fix: No images into product description lines as PDF generation does
|
- Fix: No images into product description lines as PDF generation does
|
||||||
|
|||||||
@ -2529,7 +2529,7 @@ class Commande extends CommonOrder
|
|||||||
* Return clicable link of object (with eventually picto)
|
* Return clicable link of object (with eventually picto)
|
||||||
*
|
*
|
||||||
* @param int $withpicto Add picto into link
|
* @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 $max Max length to show
|
||||||
* @param int $short Use short labels
|
* @param int $short Use short labels
|
||||||
* @return string String with URL
|
* @return string String with URL
|
||||||
|
|||||||
@ -126,7 +126,7 @@ if ($sall)
|
|||||||
}
|
}
|
||||||
if ($viewstatut <> '')
|
if ($viewstatut <> '')
|
||||||
{
|
{
|
||||||
if ($viewstatut < 4 && $viewstatut > -2)
|
if ($viewstatut < 4 && $viewstatut > -3)
|
||||||
{
|
{
|
||||||
$sql.= ' AND c.fk_statut ='.$viewstatut; // brouillon, validee, en cours, annulee
|
$sql.= ' AND c.fk_statut ='.$viewstatut; // brouillon, validee, en cours, annulee
|
||||||
if ($viewstatut == 3)
|
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,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
|
$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)
|
if ($ordermonth > 0)
|
||||||
{
|
{
|
||||||
@ -215,6 +220,8 @@ if ($resql)
|
|||||||
$title.=' - '.$langs->trans('StatusOrderCanceledShort');
|
$title.=' - '.$langs->trans('StatusOrderCanceledShort');
|
||||||
if ($viewstatut == -2)
|
if ($viewstatut == -2)
|
||||||
$title.=' - '.$langs->trans('StatusOrderToProcessShort');
|
$title.=' - '.$langs->trans('StatusOrderToProcessShort');
|
||||||
|
if ($viewstatut == -3)
|
||||||
|
$title.=' - '.$langs->trans('StatusOrderValidated').', '.$langs->trans("StatusOrderSent").', '.$langs->trans('StatusOrderToBill');
|
||||||
|
|
||||||
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
|
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
|
||||||
if ($ordermonth) $param.='&ordermonth='.$ordermonth;
|
if ($ordermonth) $param.='&ordermonth='.$ordermonth;
|
||||||
@ -233,6 +240,7 @@ if ($resql)
|
|||||||
|
|
||||||
// Lignes des champs de filtre
|
// Lignes des champs de filtre
|
||||||
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
@ -297,7 +305,7 @@ if ($resql)
|
|||||||
|
|
||||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||||
print '<td class="nobordernopadding" nowrap="nowrap">';
|
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>';
|
||||||
|
|
||||||
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
||||||
|
|||||||
@ -152,7 +152,7 @@ if (($action == 'create' || $action == 'add') && empty($mesgs))
|
|||||||
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
$datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
|
||||||
if (empty($datefacture))
|
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)
|
if (! $error)
|
||||||
{
|
{
|
||||||
@ -388,16 +388,21 @@ if ($action == 'create')
|
|||||||
print '<input type="hidden" name="originid" value="'.GETPOST('originid').'">';
|
print '<input type="hidden" name="originid" value="'.GETPOST('originid').'">';
|
||||||
print '<input type="hidden" name="autocloseorders" value="'.GETPOST('autocloseorders').'">';
|
print '<input type="hidden" name="autocloseorders" value="'.GETPOST('autocloseorders').'">';
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td class="fieldrequired">'.$langs->trans('Ref').'</td><td colspan="2">'.$langs->trans('Draft').'</td></tr>';
|
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 '<tr><td class="fieldrequired">'.$langs->trans('Customer').'</td><td colspan="2">';
|
||||||
print $soc->getNomUrl(1);
|
print $soc->getNomUrl(1);
|
||||||
print '<input type="hidden" name="socid" value="'.$soc->id.'">';
|
print '<input type="hidden" name="socid" value="'.$soc->id.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
// Type
|
||||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('Type').'</td><td colspan="2">';
|
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans('Type').'</td><td colspan="2">';
|
||||||
print '<table class="nobordernopadding">'."\n";
|
print '<table class="nobordernopadding">'."\n";
|
||||||
|
|
||||||
// Standard invoice
|
// Standard invoice
|
||||||
print '<tr height="18"><td width="16px" valign="middle">';
|
print '<tr height="18"><td width="16px" valign="middle">';
|
||||||
print '<input type="radio" name="type" value="0"'.(GETPOST('type')==0?' checked="true"':'').'>';
|
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');
|
dol_include_once('/commande/class/commande.class.php');
|
||||||
$srcobject = new Commande($db);
|
$srcobject = new Commande($db);
|
||||||
$commandes = $langs->trans("Orders").": ";
|
$listoforders = '';
|
||||||
foreach ($selected as $sel)
|
foreach ($selected as $sel)
|
||||||
{
|
{
|
||||||
$result=$srcobject->fetch($sel);
|
$result=$srcobject->fetch($sel);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$commandes.= $srcobject->ref.", ";
|
$listoforders .= ($listoforders?', ':'').$srcobject->ref;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print $commandes;
|
print $langs->trans("Orders").": ".$listoforders;
|
||||||
|
|
||||||
print '</textarea></td></tr>';
|
print '</textarea></td></tr>';
|
||||||
// Private note
|
// Private note
|
||||||
@ -540,12 +545,8 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
|||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($socid);
|
$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');
|
$title.=' - '.$langs->trans('StatusOrderValidated').', '.$langs->trans("StatusOrderSent").', '.$langs->trans('StatusOrderToBill');
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
print_fiche_titre($title);
|
print_fiche_titre($title);
|
||||||
@ -667,13 +668,13 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
|||||||
/*
|
/*
|
||||||
* Boutons actions
|
* Boutons actions
|
||||||
*/
|
*/
|
||||||
|
print '<center><br><input type="checkbox" checked="checked" name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
|
||||||
print '<div align="right">';
|
print '<div align="right">';
|
||||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||||
print '<input type="hidden" name="action" value="create">';
|
print '<input type="hidden" name="action" value="create">';
|
||||||
print '<input type="hidden" name="origin" value="commande"><br>';
|
print '<input type="hidden" name="origin" value="commande"><br>';
|
||||||
print '<a class="butAction" href="index.php">'.$langs->trans("GoBack").'</a>';
|
//print '<a class="butAction" href="index.php">'.$langs->trans("GoBack").'</a>';
|
||||||
print '<input type="submit" class="butAction" value='.$langs->trans("GenerateBill").'>';
|
print '<input type="submit" class="butAction" value="'.$langs->trans("GenerateBill").'">';
|
||||||
print '<center><br><input type="checkbox" checked="checked" name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically");
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
|
|||||||
@ -951,10 +951,10 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
|||||||
if (! empty($conf->commande->enabled))
|
if (! empty($conf->commande->enabled))
|
||||||
{
|
{
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
if (! empty($conf->facture->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=3", $langs->trans("MenuOrdersToBill"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders');
|
if (! empty($conf->facture->enabled)) $newmenu->add("/commande/liste.php?leftmenu=orders&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/", $langs->trans("StatusOrderToBill"), 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);
|
//if ($leftmenu=="orders") $newmenu->add("/commande/customer.php", $langs->trans("GenerateBill"), 1, $user->rights->commande->lire);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Donations
|
// Donations
|
||||||
|
|||||||
@ -33,6 +33,7 @@ StatusOrderSent=Shipment in process
|
|||||||
StatusOrderOnProcessShort=Reception
|
StatusOrderOnProcessShort=Reception
|
||||||
StatusOrderProcessedShort=Processed
|
StatusOrderProcessedShort=Processed
|
||||||
StatusOrderToBillShort=Delivered
|
StatusOrderToBillShort=Delivered
|
||||||
|
StatusOrderToBill2Short=To bill
|
||||||
StatusOrderApprovedShort=Approved
|
StatusOrderApprovedShort=Approved
|
||||||
StatusOrderRefusedShort=Refused
|
StatusOrderRefusedShort=Refused
|
||||||
StatusOrderToProcessShort=To process
|
StatusOrderToProcessShort=To process
|
||||||
@ -44,6 +45,7 @@ StatusOrderValidated=Validated
|
|||||||
StatusOrderOnProcess=Waiting to receive
|
StatusOrderOnProcess=Waiting to receive
|
||||||
StatusOrderProcessed=Processed
|
StatusOrderProcessed=Processed
|
||||||
StatusOrderToBill=Delivered
|
StatusOrderToBill=Delivered
|
||||||
|
StatusOrderToBill2=To bill
|
||||||
StatusOrderApproved=Approved
|
StatusOrderApproved=Approved
|
||||||
StatusOrderRefused=Refused
|
StatusOrderRefused=Refused
|
||||||
StatusOrderReceivedPartially=Partially received
|
StatusOrderReceivedPartially=Partially received
|
||||||
@ -52,6 +54,7 @@ ShippingExist=A shipment exists
|
|||||||
DraftOrWaitingApproved=Draft or approved not yet ordered
|
DraftOrWaitingApproved=Draft or approved not yet ordered
|
||||||
DraftOrWaitingShipped=Draft or validated not yet shipped
|
DraftOrWaitingShipped=Draft or validated not yet shipped
|
||||||
MenuOrdersToBill=Orders delivered
|
MenuOrdersToBill=Orders delivered
|
||||||
|
MenuOrdersToBill2=Orders to bill
|
||||||
SearchOrder=Search order
|
SearchOrder=Search order
|
||||||
Sending=Sending
|
Sending=Sending
|
||||||
Sendings=Sendings
|
Sendings=Sendings
|
||||||
|
|||||||
@ -33,6 +33,7 @@ StatusOrderSentShort=Envoi en cours
|
|||||||
StatusOrderSent=Envoi en cours
|
StatusOrderSent=Envoi en cours
|
||||||
StatusOrderProcessedShort=Traitée
|
StatusOrderProcessedShort=Traitée
|
||||||
StatusOrderToBillShort=Délivrée
|
StatusOrderToBillShort=Délivrée
|
||||||
|
StatusOrderToBill2Short=A facturer
|
||||||
StatusOrderApprovedShort=Approuvée
|
StatusOrderApprovedShort=Approuvée
|
||||||
StatusOrderRefusedShort=Refusée
|
StatusOrderRefusedShort=Refusée
|
||||||
StatusOrderToProcessShort=A traiter
|
StatusOrderToProcessShort=A traiter
|
||||||
@ -44,6 +45,7 @@ StatusOrderValidated=Validée
|
|||||||
StatusOrderOnProcess=Attente réception
|
StatusOrderOnProcess=Attente réception
|
||||||
StatusOrderProcessed=Traitée
|
StatusOrderProcessed=Traitée
|
||||||
StatusOrderToBill=Délivrée
|
StatusOrderToBill=Délivrée
|
||||||
|
StatusOrderToBill2=A facturer
|
||||||
StatusOrderApproved=Approuvée
|
StatusOrderApproved=Approuvée
|
||||||
StatusOrderRefused=Refusée
|
StatusOrderRefused=Refusée
|
||||||
StatusOrderReceivedPartially=Reçu partiellement
|
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
|
DraftOrWaitingShipped=Brouillon ou validée pas encore expédiée
|
||||||
SearchOrder=Rechercher une commande
|
SearchOrder=Rechercher une commande
|
||||||
MenuOrdersToBill=Commandes délivrées
|
MenuOrdersToBill=Commandes délivrées
|
||||||
|
MenuOrdersToBill2=Commandes à facturer
|
||||||
Sending=Expédition
|
Sending=Expédition
|
||||||
Sendings=Expéditions
|
Sendings=Expéditions
|
||||||
ShipProduct=Expédier produit
|
ShipProduct=Expédier produit
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user