diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 9f63b1e5489..818a38c28df 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -218,10 +218,10 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); $linkback = ''.$langs->trans("BackToList").''; - + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', '', '', 0, '', '', 0); - print '
'; + print ''; print '| ';
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 1d1f59a596e..d756bc2b72a 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -321,9 +321,20 @@ if (empty($reshook))
if (empty($conf->global->INVOICE_MAX_OFFSET_IN_FUTURE)) setEventMessages($langs->trans("WarningInvoiceDateInFuture"), null, 'warnings');
else setEventMessages($langs->trans("WarningInvoiceDateTooFarInFuture"), null, 'warnings');
}
+
$object->fetch($id);
+
$object->date=$newdate;
- if ($object->date_echeance && $object->date_echeance < $object->date) $object->date_echeance=$object->date;
+ $date_echence_calc=$object->calculate_date_lim_reglement();
+ if (!empty($object->date_echeance) && $object->date_echeance < $date_echence_calc)
+ {
+ $object->date_echeance = $date_echence_calc;
+ }
+ if ($object->date_echeance && $object->date_echeance < $object->date)
+ {
+ $object->date_echeance=$object->date;
+ }
+
$result=$object->update($user);
if ($result < 0) dol_print_error($db,$object->error);
}
@@ -1001,7 +1012,7 @@ if (empty($reshook))
}
$price_base_type = 'HT';
$pu_ht_devise = price2num($price_ht_devise, 'MU');
-
+
$result=$object->addline($product_desc, $pu_ht, $tva_tx, $localtax1_tx, $localtax2_tx, $qty, 0, $remise_percent, $date_start, $date_end, 0, $tva_npr, $price_base_type, $type, -1, 0, $array_options, $fk_unit, 0, $pu_ht_devise);
}
@@ -1500,7 +1511,7 @@ if ($action == 'create')
if ((empty($origin)) || ((($origin == 'propal') || ($origin == 'commande')) && (! empty($originid))))
{
// Deposit
- if (empty($conf->global->INVOICE_DISABLE_DEPOSIT))
+ if (empty($conf->global->INVOICE_DISABLE_DEPOSIT))
{
print ' ';
$tmp=' ';
@@ -1530,12 +1541,12 @@ if ($action == 'create')
}
}
*/
-
+
/* Not yet supporter for supplier
if ($societe->id > 0)
{
// Replacement
- if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT))
+ if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT))
{
print '';
print ' ';
@@ -1585,7 +1596,7 @@ if ($action == 'create')
if ($societe->id > 0)
{
// Credit note
- if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE))
+ if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE))
{
print ' ';
$tmp='textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
print $desc;
-
+
print ' ';
print ' 0 ? 'checked':'').' /> ";
print ' ';
-
+
print '0 ? 'checked':'').' /> "; print ' ';
print ' ';
@@ -2183,7 +2194,7 @@ else
}
print " | ";
print '