mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
NEW: Show delivery mode on PDF for proposals
This commit is contained in:
parent
6aefc9edfc
commit
a90d509d06
|
|
@ -164,6 +164,7 @@ NEW: The purge of files can purge only if older than a number of seconds
|
|||
NEW: Update ActionComm type_code on email message ticket
|
||||
NEW: VAT - Admin - Add information on deadline day for submission of VAT declaration
|
||||
NEW: expand/collapse permissions on user permission page
|
||||
NEW: Show delivery mode on PDF for proposals
|
||||
|
||||
|
||||
For developers or integrators:
|
||||
|
|
|
|||
|
|
@ -961,8 +961,33 @@ class pdf_azur extends ModelePDFPropales
|
|||
$posy = $pdf->GetY() + 1;
|
||||
}
|
||||
|
||||
// Show delivery mode
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_DELIVERYMODE) && $object->shipping_method_id > 0) {
|
||||
$outputlangs->load("sendings");
|
||||
|
||||
$shipping_method_id = $object->shipping_method_id;
|
||||
if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD) && !empty($this->emetteur->shipping_method_id)) {
|
||||
$shipping_method_id = $this->emetteur->shipping_method_id;
|
||||
}
|
||||
$shipping_method_code = dol_getIdFromCode($this->db, $shipping_method_id, 'c_shipment_mode', 'rowid', 'code');
|
||||
$shipping_method_label = dol_getIdFromCode($this->db, $shipping_method_id, 'c_shipment_mode', 'rowid', 'libelle');
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$titre = $outputlangs->transnoentities("SendingMethod").':';
|
||||
$pdf->MultiCell(43, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = ($outputlangs->transnoentities("SendingMethod".strtoupper($shipping_method_code)) != "SendingMethod".strtoupper($shipping_method_code)) ? $outputlangs->trans("SendingMethod".strtoupper($shipping_method_code)) : $shipping_method_label;
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
$posy = $pdf->GetY() + 1;
|
||||
}
|
||||
|
||||
// Show payments conditions
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && ($object->cond_reglement_code || $object->cond_reglement)) {
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && $object->cond_reglement_code) {
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$titre = $outputlangs->transnoentities("PaymentConditions").':';
|
||||
|
|
@ -981,22 +1006,6 @@ class pdf_azur extends ModelePDFPropales
|
|||
}
|
||||
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE)) {
|
||||
// Check a payment mode is defined
|
||||
/* Not required on a proposal
|
||||
if (empty($object->mode_reglement_code)
|
||||
&& ! $conf->global->FACTURE_CHQ_NUMBER
|
||||
&& ! $conf->global->FACTURE_RIB_NUMBER)
|
||||
{
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetTextColor(200,0,0);
|
||||
$pdf->SetFont('','B', $default_font_size - 2);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
$posy=$pdf->GetY()+1;
|
||||
}
|
||||
*/
|
||||
|
||||
// Show payment mode
|
||||
if ($object->mode_reglement_code
|
||||
&& $object->mode_reglement_code != 'CHQ'
|
||||
|
|
|
|||
|
|
@ -1080,8 +1080,33 @@ class pdf_cyan extends ModelePDFPropales
|
|||
$posy = $pdf->GetY() + 1;
|
||||
}
|
||||
|
||||
// Show delivery mode
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_DELIVERYMODE) && $object->shipping_method_id > 0) {
|
||||
$outputlangs->load("sendings");
|
||||
|
||||
$shipping_method_id = $object->shipping_method_id;
|
||||
if (!empty($conf->global->SOCIETE_ASK_FOR_SHIPPING_METHOD) && !empty($this->emetteur->shipping_method_id)) {
|
||||
$shipping_method_id = $this->emetteur->shipping_method_id;
|
||||
}
|
||||
$shipping_method_code = dol_getIdFromCode($this->db, $shipping_method_id, 'c_shipment_mode', 'rowid', 'code');
|
||||
$shipping_method_label = dol_getIdFromCode($this->db, $shipping_method_id, 'c_shipment_mode', 'rowid', 'libelle');
|
||||
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$titre = $outputlangs->transnoentities("SendingMethod").':';
|
||||
$pdf->MultiCell(43, 4, $titre, 0, 'L');
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 2);
|
||||
$pdf->SetXY($posxval, $posy);
|
||||
$lib_condition_paiement = ($outputlangs->transnoentities("SendingMethod".strtoupper($shipping_method_code)) != "SendingMethod".strtoupper($shipping_method_code)) ? $outputlangs->trans("SendingMethod".strtoupper($shipping_method_code)) : $shipping_method_label;
|
||||
$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
|
||||
$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
|
||||
|
||||
$posy = $pdf->GetY() + 1;
|
||||
}
|
||||
|
||||
// Show payments conditions
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && ($object->cond_reglement_code || $object->cond_reglement)) {
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTTERM) && $object->cond_reglement_code) {
|
||||
$pdf->SetFont('', 'B', $default_font_size - 2);
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$titre = $outputlangs->transnoentities("PaymentConditions").':';
|
||||
|
|
@ -1100,22 +1125,6 @@ class pdf_cyan extends ModelePDFPropales
|
|||
}
|
||||
|
||||
if (empty($conf->global->PROPOSAL_PDF_HIDE_PAYMENTMODE)) {
|
||||
// Check a payment mode is defined
|
||||
/* Not required on a proposal
|
||||
if (empty($object->mode_reglement_code)
|
||||
&& ! $conf->global->FACTURE_CHQ_NUMBER
|
||||
&& ! $conf->global->FACTURE_RIB_NUMBER)
|
||||
{
|
||||
$pdf->SetXY($this->marge_gauche, $posy);
|
||||
$pdf->SetTextColor(200,0,0);
|
||||
$pdf->SetFont('','B', $default_font_size - 2);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
$posy=$pdf->GetY()+1;
|
||||
}
|
||||
*/
|
||||
|
||||
// Show payment mode
|
||||
if ($object->mode_reglement_code
|
||||
&& $object->mode_reglement_code != 'CHQ'
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user