Przeglądaj źródła

Merge branch 'mmidocument-situation-retained-warranty-cumulated' into 16.0-mmi

Mathieu Moulin 1 rok temu
rodzic
commit
522b74cbd7

+ 10 - 1
htdocs/core/modules/facture/doc/pdf_sponge.modules.php

@@ -1860,7 +1860,16 @@ class pdf_sponge extends ModelePDFFactures
 						$index++;
 						$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
 
-						$retainedWarrantyToPayOn = $outputlangs->transnoentities("RetainedWarrantyCumulated");
+						$retainedWarrantyToPayOn = $outputlangs->transnoentities("RetainedWarrantyCumulated").(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transnoentities("RetainedWarrantyCumulated") : '');
+						//var_dump($object); die();
+						if (!empty($object->retained_warranty_fk_cond_reglement)) {
+							global $db;
+							$sql = 'SELECT code, libelle FROM '.MAIN_DB_PREFIX.'c_payment_term WHERE rowid='.$object->retained_warranty_fk_cond_reglement;
+							$resql = $this->db->query($sql);
+							if ($resql && ($obj = $this->db->fetch_object($resql)) && $obj->code=='1AN') {
+								$retainedWarrantyToPayOn .= ' : '.$outputlangs->transnoentities('ToPay').' '.$outputlangs->transnoentities($obj->libelle);
+							}
+						}
 
 						$pdf->MultiCell($col2x - $col1x, $tab2_hl, $retainedWarrantyToPayOn, $useborder, 'L', 1);
 						$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);

+ 1 - 1
htdocs/custom/mmidocuments

@@ -1 +1 @@
-Subproject commit b1d667b09d359085103e7cd0ddc80f9a271b38c1
+Subproject commit 893570973670332bc9d1d726ed003562b0eebeec