diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php
index 297f0dd91d4..d7951233f7b 100644
--- a/htdocs/compta/bank/bankentries_list.php
+++ b/htdocs/compta/bank/bankentries_list.php
@@ -1157,14 +1157,14 @@ if ($resql)
} else {
$color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR1;
}
- $backgroundcolor = 'style="background-color: '.$color.';"';
+ $backgroundcolor = 'style="background: '.$color.';"';
} else {
if (empty($conf->global->BANK_COLORIZE_MOVEMENT_COLOR2)) {
$color = '#7fdb86';
} else {
$color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR2;
}
- $backgroundcolor = 'style="background-color: '.$color.';"';
+ $backgroundcolor = 'style="background: '.$color.';"';
}
}
print '
';
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 611d7d791ec..e75a8d35d7c 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -1699,7 +1699,17 @@ if (empty($reshook))
$object->fk_facture_source = $_POST['situations'];
$object->type = Facture::TYPE_SITUATION;
- if (!empty($origin) && !empty($originid))
+
+ $object->retained_warranty = GETPOST('retained_warranty', 'int');
+ $object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
+
+ $retained_warranty_date_limit = GETPOST('retained_warranty_date_limit');
+ if (!empty($retained_warranty_date_limit) && $db->jdate($retained_warranty_date_limit)) {
+ $object->retained_warranty_date_limit = $db->jdate($retained_warranty_date_limit);
+ }
+ $object->retained_warranty_date_limit = !empty($object->retained_warranty_date_limit) ? $object->retained_warranty_date_limit : $object->calculate_date_lim_reglement($object->retained_warranty_fk_cond_reglement);
+
+ if (!empty($origin) && !empty($originid))
{
$object->origin = $origin;
$object->origin_id = $originid;
@@ -3017,7 +3027,7 @@ if ($action == 'create')
// First situation invoice
print '';
@@ -3304,14 +3314,28 @@ if ($action == 'create')
}
$retained_warranty = GETPOST('retained_warranty', 'int');
- $retained_warranty = !empty($retained_warranty) ? $retained_warranty : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
+ if(empty($retained_warranty)){
+ if(!empty($objectsrc->retained_warranty)){ // use previous situation value
+ $retained_warranty = $objectsrc->retained_warranty;
+ }else{
+ $retained_warranty = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT;
+ }
+ }
+
print '
| '.$langs->trans('RetainedWarranty').' | ';
print '%';
// Retained warranty payment term
print ' |
| '.$langs->trans('PaymentConditionsShortRetainedWarranty').' | ';
$retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int');
- $retained_warranty_fk_cond_reglement = !empty($retained_warranty_fk_cond_reglement) ? $retained_warranty_fk_cond_reglement : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
+ if(empty($retained_warranty_fk_cond_reglement)){
+ $retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
+ if(!empty($objectsrc->retained_warranty_fk_cond_reglement)){ // use previous situation value
+ $retained_warranty_fk_cond_reglement = $objectsrc->retained_warranty_fk_cond_reglement;
+ }else{
+ $retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID;
+ }
+ }
$form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1);
print ' |
';
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 8c198b58a3e..c2c82424b77 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1052,6 +1052,11 @@ class Facture extends CommonInvoice
$facture->situation_cycle_ref = $this->situation_cycle_ref;
$facture->situation_final = $this->situation_final;
+ $facture->retained_warranty = $this->retained_warranty;
+ $facture->retained_warranty_fk_cond_reglement = $this->retained_warranty_fk_cond_reglement;
+ $facture->retained_warranty_date_limit = $this->retained_warranty_date_limit;
+
+
// Loop on each line of new invoice
foreach ($facture->lines as $i => $tmpline)
{
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 1ed1327684c..318e6dec614 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -1559,7 +1559,7 @@ else
// Other attributes
$parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
- include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_create.tpl.php';
+ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
// Assign a sale representative
print '';