Clean
This commit is contained in:
parent
b272877fe2
commit
d25cc6e832
@ -2030,25 +2030,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$mode = 'target';
|
$mode = 'target';
|
||||||
$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object);
|
$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object);
|
||||||
|
|
||||||
$titelrecipient = $outputlangs->transnoentities("BillTo");
|
|
||||||
|
|
||||||
if (getDolGlobalInt('INVOICE_SHOW_SHIPPING_ADDRESS') || $this->emetteur->country_code == 'FR') {
|
|
||||||
$idaddressshipping = $object->getIdContact('external', 'SHIPPING');
|
|
||||||
|
|
||||||
if (!empty($idaddressshipping)) {
|
|
||||||
$contactshipping = $object->fetch_Contact($idaddressshipping[0]);
|
|
||||||
$object->fetch_thirdparty($object->contact->fk_soc);
|
|
||||||
$carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs);
|
|
||||||
$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, $usecontact, 'target', $object);
|
|
||||||
} else {
|
|
||||||
$carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
|
|
||||||
$carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);;
|
|
||||||
}
|
|
||||||
if ((isset($object->contact->socid) && $object->contact->socid == $object->socid) || !isset($object->contact->socid)) {
|
|
||||||
$titelrecipient = $outputlangs->transnoentities("BillShippTo");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show recipient
|
// Show recipient
|
||||||
$widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100;
|
$widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100;
|
||||||
if ($this->page_largeur < 210) {
|
if ($this->page_largeur < 210) {
|
||||||
@ -2066,7 +2047,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posx + 2, $posy - 5);
|
$pdf->SetXY($posx + 2, $posy - 5);
|
||||||
$pdf->MultiCell($widthrecbox - 2, 5, $titelrecipient, 0, $ltrdirection);
|
$pdf->MultiCell($widthrecbox - 2, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
|
||||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2084,6 +2065,17 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
// Show shipping address
|
// Show shipping address
|
||||||
if (getDolGlobalInt('INVOICE_SHOW_SHIPPING_ADDRESS') || $this->emetteur->country_code == 'FR') {
|
if (getDolGlobalInt('INVOICE_SHOW_SHIPPING_ADDRESS') || $this->emetteur->country_code == 'FR') {
|
||||||
|
$idaddressshipping = $object->getIdContact('external', 'SHIPPING');
|
||||||
|
|
||||||
|
if (!empty($idaddressshipping)) {
|
||||||
|
$contactshipping = $object->fetch_Contact($idaddressshipping[0]);
|
||||||
|
$object->fetch_thirdparty($object->contact->fk_soc);
|
||||||
|
$carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs);
|
||||||
|
$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, $usecontact, 'target', $object);
|
||||||
|
} else {
|
||||||
|
$carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
|
||||||
|
$carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);;
|
||||||
|
}
|
||||||
if (!empty($carac_client_shipping) && (isset($object->contact->socid) && $object->contact->socid != $object->socid)) {
|
if (!empty($carac_client_shipping) && (isset($object->contact->socid) && $object->contact->socid != $object->socid)) {
|
||||||
$posy += $hautcadre;
|
$posy += $hautcadre;
|
||||||
|
|
||||||
|
|||||||
@ -2292,25 +2292,6 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$mode = 'target';
|
$mode = 'target';
|
||||||
$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object);
|
$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object);
|
||||||
|
|
||||||
$titelrecipient = $outputlangs->transnoentities("BillTo");
|
|
||||||
|
|
||||||
if (getDolGlobalInt('INVOICE_SHOW_SHIPPING_ADDRESS') || $this->emetteur->country_code == 'FR') {
|
|
||||||
$idaddressshipping = $object->getIdContact('external', 'SHIPPING');
|
|
||||||
|
|
||||||
if (!empty($idaddressshipping)) {
|
|
||||||
$contactshipping = $object->fetch_Contact($idaddressshipping[0]);
|
|
||||||
$object->fetch_thirdparty($object->contact->fk_soc);
|
|
||||||
$carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs);
|
|
||||||
$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, $usecontact, 'target', $object);
|
|
||||||
} else {
|
|
||||||
$carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
|
|
||||||
$carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);;
|
|
||||||
}
|
|
||||||
if ((isset($object->contact->socid) && $object->contact->socid == $object->socid) || !isset($object->contact->socid)) {
|
|
||||||
$titelrecipient = $outputlangs->transnoentities("BillShippTo");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show recipient
|
// Show recipient
|
||||||
$widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100;
|
$widthrecbox = !empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100;
|
||||||
if ($this->page_largeur < 210) {
|
if ($this->page_largeur < 210) {
|
||||||
@ -2328,7 +2309,7 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
$pdf->SetTextColor(0, 0, 0);
|
$pdf->SetTextColor(0, 0, 0);
|
||||||
$pdf->SetFont('', '', $default_font_size - 2);
|
$pdf->SetFont('', '', $default_font_size - 2);
|
||||||
$pdf->SetXY($posx + 2, $posy - 5);
|
$pdf->SetXY($posx + 2, $posy - 5);
|
||||||
$pdf->MultiCell($widthrecbox - 2, 5, $titelrecipient, 0, $ltrdirection);
|
$pdf->MultiCell($widthrecbox - 2, 5, $outputlangs->transnoentities("BillTo"), 0, $ltrdirection);
|
||||||
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
$pdf->Rect($posx, $posy, $widthrecbox, $hautcadre);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2346,6 +2327,17 @@ class pdf_sponge extends ModelePDFFactures
|
|||||||
|
|
||||||
// Show shipping address
|
// Show shipping address
|
||||||
if (getDolGlobalInt('INVOICE_SHOW_SHIPPING_ADDRESS') || $this->emetteur->country_code == 'FR') {
|
if (getDolGlobalInt('INVOICE_SHOW_SHIPPING_ADDRESS') || $this->emetteur->country_code == 'FR') {
|
||||||
|
$idaddressshipping = $object->getIdContact('external', 'SHIPPING');
|
||||||
|
|
||||||
|
if (!empty($idaddressshipping)) {
|
||||||
|
$contactshipping = $object->fetch_Contact($idaddressshipping[0]);
|
||||||
|
$object->fetch_thirdparty($object->contact->fk_soc);
|
||||||
|
$carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs);
|
||||||
|
$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, $object->contact, $usecontact, 'target', $object);
|
||||||
|
} else {
|
||||||
|
$carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
|
||||||
|
$carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);;
|
||||||
|
}
|
||||||
if (!empty($carac_client_shipping) && (isset($object->contact->socid) && $object->contact->socid != $object->socid)) {
|
if (!empty($carac_client_shipping) && (isset($object->contact->socid) && $object->contact->socid != $object->socid)) {
|
||||||
$posy += $hautcadre;
|
$posy += $hautcadre;
|
||||||
|
|
||||||
|
|||||||
@ -161,8 +161,7 @@ ErrorCantCancelIfReplacementInvoiceNotValidated=Error, can't cancel an invoice t
|
|||||||
ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or another is already used so discount series cannot be removed.
|
ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or another is already used so discount series cannot be removed.
|
||||||
ErrorInvoiceIsNotLastOfSameType=Error: The date of invoice %s is %s. It must be posterior or equal to last date for same type invoices (%s). Please change the invoice date.
|
ErrorInvoiceIsNotLastOfSameType=Error: The date of invoice %s is %s. It must be posterior or equal to last date for same type invoices (%s). Please change the invoice date.
|
||||||
BillFrom=From
|
BillFrom=From
|
||||||
BillTo=Address to
|
BillTo=To
|
||||||
BillShippTo=Address and shipping to
|
|
||||||
ShippingTo=Shipping to
|
ShippingTo=Shipping to
|
||||||
ActionsOnBill=Actions on invoice
|
ActionsOnBill=Actions on invoice
|
||||||
RecurringInvoiceTemplate=Template / Recurring invoice
|
RecurringInvoiceTemplate=Template / Recurring invoice
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user