Skip to content

Commit

Permalink
FIX change date_delivery by date_creation DA022055
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-quentin committed Oct 14, 2022
1 parent 0108564 commit c5f06f0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions admin/ship2bill_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,19 @@
print '</form>';
print '</td></tr>';

$var = ! $var;
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans('SHIP2BILL_DISPLAY_SHIPMENT_REAL_DATE').'</td>';
print '<td align="center" width="20">&nbsp;</td>';
print '<td align="right" width="300">';
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$newToken.'">';
print '<input type="hidden" name="action" value="set_SHIP2BILL_DISPLAY_SHIPMENT_REAL_DATE">';
print $form->selectyesno('SHIP2BILL_DISPLAY_SHIPMENT_REAL_DATE', ! empty($conf->global->SHIP2BILL_DISPLAY_SHIPMENT_REAL_DATE) ? $conf->global->SHIP2BILL_DISPLAY_SHIPMENT_REAL_DATE : '', 1);
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
print '</form>';
print '</td></tr>';

print '</table>';

// Footer
Expand Down
4 changes: 2 additions & 2 deletions class/ship2bill.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,9 @@ function facture_add_title (&$f, &$exp, &$sub) {
if(!empty($ord->ref_client)) $title.= ' / '.$ord->ref_client;
if(!empty($ord->date_commande)) $title.= ' ('.dol_print_date($ord->date_commande,'day').')';
}

$title2 = $langs->transnoentities('Shipment').' '.$exp->ref;
if(!empty($exp->date_delivery)) $title2.= ' ('.dol_print_date($exp->date_delivery,'day').')';
if(!empty($exp->date_delivery) && empty($conf->global->SHIP2BILL_DISPLAY_SHIPMENT_REAL_DATE)) $title2.= ' ('.dol_print_date($exp->date_delivery,'day').')';
else if(!empty($conf->global->SHIP2BILL_DISPLAY_SHIPMENT_REAL_DATE) && !empty($exp->date_creation))$title2.= ' ('.dol_print_date($exp->date_creation,'day').')';

// Utilisation du sous-module livraison activable dans expedition (note: en v13+, renommé en `delivery_note`)
if(!empty($conf->livraison_bon->enabled) || !empty($conf->delivery_note->enabled)) {
Expand Down
1 change: 1 addition & 0 deletions langs/fr_FR/ship2bill.lang
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ OneBillByThirdparty=Une facture par tiers
OneBillByShipment=Une facture par expédition
OneBillByOrder=Une facture par commande
BillingManagement=Gestion de la facturation
SHIP2BILL_DISPLAY_SHIPMENT_REAL_DATE=Afficher la date réel de l'expédition plutôt que la date de livraison dans les titres

0 comments on commit c5f06f0

Please sign in to comment.