@@ -118,7 +118,9 @@ |
||
118 | 118 | |
119 | 119 | if ($year) { |
120 | 120 | if (is_dir($dir.'/'.$year)) { |
121 | - if (!empty($year_dirs)) print '<br>'; |
|
121 | + if (!empty($year_dirs)) { |
|
122 | + print '<br>'; |
|
123 | + } |
|
122 | 124 | print '<br>'; |
123 | 125 | print '<table width="100%" class="noborder">'; |
124 | 126 | print '<tr class="liste_titre">'; |
@@ -1623,9 +1623,13 @@ |
||
1623 | 1623 | |
1624 | 1624 | $parameters = array(); |
1625 | 1625 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
1626 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
1627 | - if (empty($reshook)) |
|
1628 | - $object->formAddObjectLine(0, $mysoc, $object->thirdparty); // No date selector for template invoice |
|
1626 | + if ($reshook < 0) { |
|
1627 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
1628 | + } |
|
1629 | + if (empty($reshook)) { |
|
1630 | + $object->formAddObjectLine(0, $mysoc, $object->thirdparty); |
|
1631 | + } |
|
1632 | + // No date selector for template invoice |
|
1629 | 1633 | } |
1630 | 1634 | } |
1631 | 1635 |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | // Define special_code for special lines |
769 | 769 | $special_code = GETPOST('special_code', 'int'); |
770 | 770 | if ($special_code == 3) { |
771 | - $special_code = 0; // Options should not exists on invoices |
|
771 | + $special_code = 0; // Options should not exists on invoices |
|
772 | 772 | } |
773 | 773 | |
774 | 774 | /*$line = new FactureLigne($db); |
@@ -1620,10 +1620,10 @@ discard block |
||
1620 | 1620 | |
1621 | 1621 | // Lines |
1622 | 1622 | print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#add' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">'; |
1623 | - print '<input type="hidden" name="token" value="' . newToken().'">'; |
|
1624 | - print '<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">'; |
|
1623 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
1624 | + print '<input type="hidden" name="action" value="'.(($action != 'editline') ? 'addline' : 'updateline').'">'; |
|
1625 | 1625 | print '<input type="hidden" name="mode" value="">'; |
1626 | - print '<input type="hidden" name="id" value="' . $object->id.'">'; |
|
1626 | + print '<input type="hidden" name="id" value="'.$object->id.'">'; |
|
1627 | 1627 | print '<input type="hidden" name="page_y" value="">'; |
1628 | 1628 | |
1629 | 1629 | if (!empty($conf->use_javascript_ajax) && $object->statut == 0) { |
@@ -1675,16 +1675,16 @@ discard block |
||
1675 | 1675 | if (empty($object->suspended)) { |
1676 | 1676 | if ($user->rights->facture->creer) { |
1677 | 1677 | if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) { |
1678 | - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("MaxGenerationReached")) . '">' . $langs->trans("CreateBill") . '</a></div>'; |
|
1678 | + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("MaxGenerationReached")).'">'.$langs->trans("CreateBill").'</a></div>'; |
|
1679 | 1679 | } else { |
1680 | 1680 | if (empty($object->frequency) || $object->date_when <= $nowlasthour) { |
1681 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/compta/facture/card.php?action=create&socid=' . $object->thirdparty->id . '&fac_rec=' . $object->id . '">' . $langs->trans("CreateBill") . '</a></div>'; |
|
1681 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&socid='.$object->thirdparty->id.'&fac_rec='.$object->id.'">'.$langs->trans("CreateBill").'</a></div>'; |
|
1682 | 1682 | } else { |
1683 | - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("DateIsNotEnough")) . '">' . $langs->trans("CreateBill") . '</a></div>'; |
|
1683 | + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("DateIsNotEnough")).'">'.$langs->trans("CreateBill").'</a></div>'; |
|
1684 | 1684 | } |
1685 | 1685 | } |
1686 | 1686 | } else { |
1687 | - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">' . $langs->trans("CreateBill") . '</a></div>'; |
|
1687 | + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans("CreateBill").'</a></div>'; |
|
1688 | 1688 | } |
1689 | 1689 | } |
1690 | 1690 | |
@@ -1697,7 +1697,7 @@ discard block |
||
1697 | 1697 | } |
1698 | 1698 | |
1699 | 1699 | // Delete |
1700 | - print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&token=' . newToken(), 'delete', $user->rights->facture->supprimer); |
|
1700 | + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $user->rights->facture->supprimer); |
|
1701 | 1701 | } |
1702 | 1702 | print '</div>'; |
1703 | 1703 |
@@ -1776,9 +1776,12 @@ |
||
1776 | 1776 | |
1777 | 1777 | $parameters = array(); |
1778 | 1778 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
1779 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
1780 | - if (empty($reshook)) |
|
1781 | - $object->formAddObjectLine($dateSelector, $soc, $mysoc); |
|
1779 | + if ($reshook < 0) { |
|
1780 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
1781 | + } |
|
1782 | + if (empty($reshook)) { |
|
1783 | + $object->formAddObjectLine($dateSelector, $soc, $mysoc); |
|
1784 | + } |
|
1782 | 1785 | } |
1783 | 1786 | } |
1784 | 1787 |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | $tva_tx = ''; |
598 | 598 | } |
599 | 599 | |
600 | - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
600 | + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
601 | 601 | |
602 | 602 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
603 | 603 | $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); |
@@ -706,7 +706,7 @@ discard block |
||
706 | 706 | |
707 | 707 | //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time |
708 | 708 | if (trim($product_desc) == trim($desc) && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
709 | - $product_desc=''; |
|
709 | + $product_desc = ''; |
|
710 | 710 | } |
711 | 711 | |
712 | 712 | if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { |
@@ -598,9 +598,12 @@ |
||
598 | 598 | |
599 | 599 | $parameters = array(); |
600 | 600 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
601 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
602 | - if (empty($reshook)) |
|
603 | - $object->formAddObjectLine(1, $mysoc, $soc); |
|
601 | + if ($reshook < 0) { |
|
602 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
603 | + } |
|
604 | + if (empty($reshook)) { |
|
605 | + $object->formAddObjectLine(1, $mysoc, $soc); |
|
606 | + } |
|
604 | 607 | } |
605 | 608 | } |
606 | 609 |
@@ -85,14 +85,14 @@ discard block |
||
85 | 85 | // Get parameters |
86 | 86 | $id = GETPOST('id', 'int'); |
87 | 87 | $ref = GETPOST('ref', 'alpha'); |
88 | -$lineid = GETPOST('lineid', 'int'); |
|
88 | +$lineid = GETPOST('lineid', 'int'); |
|
89 | 89 | |
90 | 90 | $action = GETPOST('action', 'aZ09'); |
91 | 91 | $confirm = GETPOST('confirm', 'alpha'); |
92 | 92 | $cancel = GETPOST('cancel', 'aZ09'); |
93 | 93 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search |
94 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
95 | -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
94 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
95 | +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
96 | 96 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
97 | 97 | $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); |
98 | 98 | |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | |
544 | 544 | // Clone |
545 | 545 | if ($permissiontoadd) { |
546 | - print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid)?'&socid='.$object->socid:'').'&action=clone&token='.newToken(), '', $permissiontoadd); |
|
546 | + print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid) ? '&socid='.$object->socid : '').'&action=clone&token='.newToken(), '', $permissiontoadd); |
|
547 | 547 | } |
548 | 548 | |
549 | 549 | /* |
@@ -1615,7 +1615,9 @@ |
||
1615 | 1615 | global $conf, $langs; |
1616 | 1616 | |
1617 | 1617 | $ltrdirection = 'L'; |
1618 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
1618 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
1619 | + $ltrdirection = 'R'; |
|
1620 | + } |
|
1619 | 1621 | |
1620 | 1622 | // Load traductions files required by page |
1621 | 1623 | $outputlangs->loadLangs(array("main", "bills", "propal", "companies")); |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | // $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher |
449 | 449 | |
450 | 450 | // $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
451 | - $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
451 | + $tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
452 | 452 | $tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
453 | 453 | |
454 | 454 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | if (!isset($this->tva[$vatrate])) { |
775 | 775 | $this->tva[$vatrate] = 0; |
776 | 776 | } |
777 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete |
|
777 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete |
|
778 | 778 | $vatcode = $object->lines[$i]->vat_src_code; |
779 | 779 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { |
780 | 780 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; |
@@ -1142,7 +1142,7 @@ discard block |
||
1142 | 1142 | $lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement); |
1143 | 1143 | $pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L'); |
1144 | 1144 | |
1145 | - $posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions |
|
1145 | + $posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions |
|
1146 | 1146 | } |
1147 | 1147 | |
1148 | 1148 | if ($object->type != 2) { |
@@ -1183,7 +1183,7 @@ discard block |
||
1183 | 1183 | require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; |
1184 | 1184 | $bac = new CompanyBankAccount($this->db); |
1185 | 1185 | $bac->fetch(0, $object->thirdparty->id); |
1186 | - $iban= $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic; |
|
1186 | + $iban = $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic; |
|
1187 | 1187 | $lib_mode_reg .= $outputlangs->trans("PaymentTypePREdetails", dol_trunc($iban, 6, 'right', 'UTF-8', 1)); |
1188 | 1188 | } |
1189 | 1189 | $pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L'); |
@@ -2036,7 +2036,7 @@ discard block |
||
2036 | 2036 | |
2037 | 2037 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
2038 | 2038 | |
2039 | - $mode = 'target'; |
|
2039 | + $mode = 'target'; |
|
2040 | 2040 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); |
2041 | 2041 | |
2042 | 2042 | // Show recipient |
@@ -2079,11 +2079,11 @@ discard block |
||
2079 | 2079 | if (!empty($idaddressshipping)) { |
2080 | 2080 | $contactshipping = $object->fetch_Contact($idaddressshipping[0]); |
2081 | 2081 | $object->fetch_thirdparty($object->contact->fk_soc); |
2082 | - $carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs); |
|
2082 | + $carac_client_name_shipping = pdfBuildThirdpartyName($object->contact, $outputlangs); |
|
2083 | 2083 | $carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, $usecontact, 'target', $object); |
2084 | 2084 | } else { |
2085 | - $carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs); |
|
2086 | - $carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);; |
|
2085 | + $carac_client_name_shipping = pdfBuildThirdpartyName($object->thirdparty, $outputlangs); |
|
2086 | + $carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object); ; |
|
2087 | 2087 | } |
2088 | 2088 | if (!empty($carac_client_shipping) && (isset($object->contact->socid) && $object->contact->socid != $object->socid)) { |
2089 | 2089 | $posy += $hautcadre; |
@@ -2102,7 +2102,7 @@ discard block |
||
2102 | 2102 | $posy = $pdf->getY(); |
2103 | 2103 | |
2104 | 2104 | // Show shipping information |
2105 | - $pdf->SetXY($posx+2, $posy); |
|
2105 | + $pdf->SetXY($posx + 2, $posy); |
|
2106 | 2106 | $pdf->SetFont('', '', $default_font_size - 1); |
2107 | 2107 | $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L'); |
2108 | 2108 | $top_shift += $hautcadre; |
@@ -469,7 +469,7 @@ |
||
469 | 469 | $object->fetch($obj->rowid); |
470 | 470 | $object->id = $obj->rowid; |
471 | 471 | |
472 | - $action = 'anonymize'; // TODO Offer also action "delete" in setup of module |
|
472 | + $action = 'anonymize'; // TODO Offer also action "delete" in setup of module |
|
473 | 473 | |
474 | 474 | if ($action == 'anonymize') { |
475 | 475 | if ($object->isObjectUsed($obj->rowid) == 0) { // If object to clean is used |
@@ -1615,7 +1615,9 @@ |
||
1615 | 1615 | global $conf, $langs; |
1616 | 1616 | |
1617 | 1617 | $ltrdirection = 'L'; |
1618 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
1618 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
1619 | + $ltrdirection = 'R'; |
|
1620 | + } |
|
1619 | 1621 | |
1620 | 1622 | // Load traductions files required by page |
1621 | 1623 | $outputlangs->loadLangs(array("main", "bills", "propal", "companies")); |
@@ -488,7 +488,7 @@ discard block |
||
488 | 488 | // $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher |
489 | 489 | |
490 | 490 | // $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks) |
491 | - $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
491 | + $this->tab_top = 90 + $top_shift + $shipp_shift; // top_shift is an addition for linked objects or addons (0 in most cases) |
|
492 | 492 | $this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10); |
493 | 493 | |
494 | 494 | // You can add more thing under header here, if you increase $extra_under_address_shift too. |
@@ -959,7 +959,7 @@ discard block |
||
959 | 959 | if (!isset($this->tva[$vatrate])) { |
960 | 960 | $this->tva[$vatrate] = 0; |
961 | 961 | } |
962 | - $this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete |
|
962 | + $this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete |
|
963 | 963 | $vatcode = $object->lines[$i]->vat_src_code; |
964 | 964 | if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) { |
965 | 965 | $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0; |
@@ -1248,8 +1248,8 @@ discard block |
||
1248 | 1248 | $posy = $pdf->GetY() + 4; |
1249 | 1249 | } |
1250 | 1250 | |
1251 | - $posxval = 52; // Position of values of properties shown on left side |
|
1252 | - $posxend = 110; // End of x for text on left side |
|
1251 | + $posxval = 52; // Position of values of properties shown on left side |
|
1252 | + $posxend = 110; // End of x for text on left side |
|
1253 | 1253 | if ($this->page_largeur < 210) { // To work with US executive format |
1254 | 1254 | $posxend -= 10; |
1255 | 1255 | } |
@@ -1279,7 +1279,7 @@ discard block |
||
1279 | 1279 | |
1280 | 1280 | $pdf->SetFont('', '', $default_font_size - 2); |
1281 | 1281 | $pdf->SetXY($posxval, $posy); |
1282 | - $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
1282 | + $categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
1283 | 1283 | $pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L'); |
1284 | 1284 | |
1285 | 1285 | $posy = $pdf->GetY() + 3; // for 2 lines |
@@ -1324,7 +1324,7 @@ discard block |
||
1324 | 1324 | require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; |
1325 | 1325 | $bac = new CompanyBankAccount($this->db); |
1326 | 1326 | $bac->fetch(0, $object->thirdparty->id); |
1327 | - $iban= $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic; |
|
1327 | + $iban = $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic; |
|
1328 | 1328 | $lib_mode_reg .= $outputlangs->trans("PaymentTypePREdetails", dol_trunc($iban, 6, 'right', 'UTF-8', 1)); |
1329 | 1329 | } |
1330 | 1330 | |
@@ -2013,7 +2013,7 @@ discard block |
||
2013 | 2013 | if (empty($hidetop)) { |
2014 | 2014 | // Show category of operations |
2015 | 2015 | if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) { |
2016 | - $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation); |
|
2016 | + $categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation); |
|
2017 | 2017 | $pdf->SetXY($this->marge_gauche, $tab_top - 4); |
2018 | 2018 | $pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations); |
2019 | 2019 | } |
@@ -2384,11 +2384,11 @@ discard block |
||
2384 | 2384 | if (!empty($idaddressshipping)) { |
2385 | 2385 | $contactshipping = $object->fetch_Contact($idaddressshipping[0]); |
2386 | 2386 | $object->fetch_thirdparty($object->contact->fk_soc); |
2387 | - $carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs); |
|
2387 | + $carac_client_name_shipping = pdfBuildThirdpartyName($object->contact, $outputlangs); |
|
2388 | 2388 | $carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, $usecontact, 'target', $object); |
2389 | 2389 | } else { |
2390 | - $carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs); |
|
2391 | - $carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);; |
|
2390 | + $carac_client_name_shipping = pdfBuildThirdpartyName($object->thirdparty, $outputlangs); |
|
2391 | + $carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object); ; |
|
2392 | 2392 | } |
2393 | 2393 | if (!empty($carac_client_shipping) && (isset($object->contact->socid) && $object->contact->socid != $object->socid)) { |
2394 | 2394 | $posy += $hautcadre; |
@@ -2407,7 +2407,7 @@ discard block |
||
2407 | 2407 | $posy = $pdf->getY(); |
2408 | 2408 | |
2409 | 2409 | // Show shipping information |
2410 | - $pdf->SetXY($posx+2, $posy); |
|
2410 | + $pdf->SetXY($posx + 2, $posy); |
|
2411 | 2411 | $pdf->SetFont('', '', $default_font_size - 1); |
2412 | 2412 | $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L'); |
2413 | 2413 | $shipp_shift += $hautcadre; |
@@ -129,11 +129,11 @@ |
||
129 | 129 | unset($object->barcode_type_code); |
130 | 130 | unset($object->barcode_type_label); |
131 | 131 | |
132 | - unset($object->mode_reglement); // We use mode_reglement_id now |
|
133 | - unset($object->cond_reglement); // We use cond_reglement_id now |
|
134 | - unset($object->note); // We use note_public or note_private now |
|
135 | - unset($object->contact); // We use contact_id now |
|
136 | - unset($object->thirdparty); // We use thirdparty_id or fk_soc or socid now |
|
132 | + unset($object->mode_reglement); // We use mode_reglement_id now |
|
133 | + unset($object->cond_reglement); // We use cond_reglement_id now |
|
134 | + unset($object->note); // We use note_public or note_private now |
|
135 | + unset($object->contact); // We use contact_id now |
|
136 | + unset($object->thirdparty); // We use thirdparty_id or fk_soc or socid now |
|
137 | 137 | |
138 | 138 | unset($object->projet); // Should be fk_project |
139 | 139 | unset($object->project); // Should be fk_project |
@@ -193,7 +193,7 @@ |
||
193 | 193 | $facavoir->fetch($facid); |
194 | 194 | $invoicecredits[] = $facavoir->getNomUrl(1); |
195 | 195 | } |
196 | - print ' ('.$langs->transnoentities("InvoiceHasAvoir") . (count($invoicecredits) ? ' ' : '') . implode(',', $invoicecredits) . ')'; |
|
196 | + print ' ('.$langs->transnoentities("InvoiceHasAvoir").(count($invoicecredits) ? ' ' : '').implode(',', $invoicecredits).')'; |
|
197 | 197 | } |
198 | 198 | /* |
199 | 199 | if ($facidnext > 0) { |