Browse Source

MMIDocuments : conditions de réglement garantie situation

Mathieu Moulin 1 năm trước cách đây
mục cha
commit
70dabd5210

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

@@ -1856,7 +1856,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