Qual: Removed deprecated code
This commit is contained in:
parent
8aafb970c2
commit
8126b0cd6f
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Andre Cianfarani <acianfa@free.fr>
|
||||
@ -411,8 +411,9 @@ print "<td> </td>\n";
|
||||
print "</tr>\n";
|
||||
$var=true;
|
||||
|
||||
// Valider la commande apr<EFBFBD>s cloture de la propale
|
||||
// Valider la commande apres cloture de la propale
|
||||
// permet de na pas passer par l'option commande provisoire
|
||||
/*
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="action" value="setvalidorder">';
|
||||
@ -422,8 +423,10 @@ print '<td width="60" align="center">'.$html->selectyesno("validorder",$conf->gl
|
||||
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
*/
|
||||
|
||||
// Ajouter une ligne de frais port indiquant le poids de la commande
|
||||
/*
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="action" value="deliverycostline">';
|
||||
@ -433,6 +436,7 @@ print '<td width="60" align="center">'.$html->selectyesno("addline",$conf->globa
|
||||
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
*/
|
||||
|
||||
// Utiliser le contact de la commande dans le document
|
||||
$var=! $var;
|
||||
|
||||
@ -108,15 +108,12 @@ if ($_POST["action"] == 'setdefaultduration')
|
||||
dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION",$_POST["value"]);
|
||||
}
|
||||
|
||||
if ($_POST["action"] == 'setaddshippingdate')
|
||||
{
|
||||
dolibarr_set_const($db, "PROPALE_ADD_SHIPPING_DATE",$_POST["value"]);
|
||||
}
|
||||
|
||||
/*
|
||||
if ($_POST["action"] == 'setadddeliveryaddress')
|
||||
{
|
||||
dolibarr_set_const($db, "PROPALE_ADD_DELIVERY_ADDRESS",$_POST["value"]);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
if ($_POST["action"] == 'setuseoptionline')
|
||||
@ -446,16 +443,7 @@ print '<td align="right"><input type="submit" class="button" value="'.$langs->tr
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
$var=!$var;
|
||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"setaddshippingdate\">";
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$langs->trans("AddShippingDateAbility").'</td>';
|
||||
print '<td width="60" align="center">'.$html->selectyesno('value',$conf->global->PROPALE_ADD_SHIPPING_DATE,1).'</td>';
|
||||
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
/*
|
||||
$var=!$var;
|
||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
print "<input type=\"hidden\" name=\"action\" value=\"setadddeliveryaddress\">";
|
||||
@ -465,6 +453,7 @@ print '<td width="60" align="center">'.$html->selectyesno('value',$conf->global-
|
||||
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
*/
|
||||
|
||||
$var=! $var;
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
|
||||
@ -53,7 +53,7 @@ print_titre($langs->trans("NewProp"));
|
||||
|
||||
$html=new Form($db);
|
||||
|
||||
// Récupération de l'id de projet
|
||||
// R<EFBFBD>cup<EFBFBD>ration de l'id de projet
|
||||
$projetid = 0;
|
||||
if ($_GET["projetid"])
|
||||
{
|
||||
@ -141,51 +141,45 @@ if ($_GET["action"] == 'create')
|
||||
|
||||
print '<tr><td>'.$langs->trans("ValidityDuration").'</td><td colspan="2"><input name="duree_validite" size="5" value="'.$conf->global->PROPALE_VALIDITY_DURATION.'"> '.$langs->trans("days").'</td></tr>';
|
||||
|
||||
// Conditions de règlement
|
||||
// Conditions de r<EFBFBD>glement
|
||||
print '<tr><td nowrap>'.$langs->trans('PaymentConditionsShort').'</td><td colspan="2">';
|
||||
$html->select_conditions_paiements($soc->cond_reglement,'cond_reglement_id');
|
||||
print '</td></tr>';
|
||||
|
||||
// Mode de règlement
|
||||
// Mode de r<EFBFBD>glement
|
||||
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
|
||||
$html->select_types_paiements($soc->mode_reglement,'mode_reglement_id');
|
||||
print '</td></tr>';
|
||||
|
||||
// Date de livraison (ou de fabrication)
|
||||
if ($conf->expedition->enabled)
|
||||
print '<tr><td>'.$langs->trans("DeliveryDate").'</td>';
|
||||
print '<td colspan="2">';
|
||||
if ($conf->global->DATE_LIVRAISON_WEEK_DELAY != "")
|
||||
{
|
||||
if ($conf->global->PROPALE_ADD_SHIPPING_DATE)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("DeliveryDate").'</td>';
|
||||
print '<td colspan="2">';
|
||||
if ($conf->global->DATE_LIVRAISON_WEEK_DELAY != "")
|
||||
{
|
||||
$tmpdte = time() + ((7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
|
||||
$syear = date("Y", $tmpdte);
|
||||
$smonth = date("m", $tmpdte);
|
||||
$sday = date("d", $tmpdte);
|
||||
$html->select_date($syear."-".$smonth."-".$sday,'liv_','','','',"addprop");
|
||||
}
|
||||
else
|
||||
{
|
||||
$datepropal=empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
|
||||
$html->select_date($datepropal,'liv_','','','',"addprop");
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
$tmpdte = time() + ((7 * $conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
|
||||
$syear = date("Y", $tmpdte);
|
||||
$smonth = date("m", $tmpdte);
|
||||
$sday = date("d", $tmpdte);
|
||||
$html->select_date($syear."-".$smonth."-".$sday,'liv_','','','',"addprop");
|
||||
}
|
||||
else
|
||||
{
|
||||
$datepropal=empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
|
||||
$html->select_date($datepropal,'liv_','','','',"addprop");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Adresse de livraison
|
||||
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS)
|
||||
// Adresse de livraison
|
||||
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('DeliveryAddress').'</td>';
|
||||
print '<td colspan="3">';
|
||||
$numaddress = $html->select_adresse_livraison($soc->adresse_livraison_id, $_GET['socid'],'adresse_livraison_id',1);
|
||||
if ($numaddress==0)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans('DeliveryAddress').'</td>';
|
||||
print '<td colspan="3">';
|
||||
$numaddress = $html->select_adresse_livraison($soc->adresse_livraison_id, $_GET['socid'],'adresse_livraison_id',1);
|
||||
if ($numaddress==0)
|
||||
{
|
||||
print ' <a href=../comm/adresse_livraison.php?socid='.$soc->id.'&action=create>'.$langs->trans("AddAddress").'</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
print ' <a href=../comm/adresse_livraison.php?socid='.$soc->id.'&action=create>'.$langs->trans("AddAddress").'</a>';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Model
|
||||
|
||||
@ -972,7 +972,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
$rowspan=8;
|
||||
$rowspan=9;
|
||||
|
||||
// Societe
|
||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="5">'.$societe->getNomUrl(1).'</td>';
|
||||
@ -1012,11 +1012,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
|
||||
if ($conf->projet->enabled) $rowspan++;
|
||||
if ($conf->expedition_bon->enabled || $conf->livraison_bon->enabled)
|
||||
{
|
||||
if ($conf->global->PROPALE_ADD_SHIPPING_DATE || !$conf->commande->enabled) $rowspan++;
|
||||
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS || !$conf->commande->enabled) $rowspan++;
|
||||
}
|
||||
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS) $rowspan++;
|
||||
|
||||
// Notes
|
||||
print '<td valign="top" colspan="2" width="50%" rowspan="'.$rowspan.'">'.$langs->trans('NotePublic').' :<br>'. nl2br($propal->note_public).'</td>';
|
||||
@ -1055,58 +1051,50 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// date de livraison (conditionne sur PROPALE_ADD_SHIPPING_DATE car carac a
|
||||
// gerer par les commandes et non les propales
|
||||
if ($conf->expedition_bon->enabled || $conf->livraison_bon->enabled)
|
||||
$langs->load('deliveries');
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DeliveryDate');
|
||||
print '</td>';
|
||||
if ($_GET['action'] != 'editdate_livraison' && $propal->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&propalid='.$propal->id.'">'.img_edit($langs->trans('SetDeliveryDate'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($_GET['action'] == 'editdate_livraison')
|
||||
{
|
||||
if ($conf->global->PROPALE_ADD_SHIPPING_DATE || !$conf->commande->enabled)
|
||||
print '<form name="editdate_livraison" action="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'" method="post">';
|
||||
print '<input type="hidden" name="action" value="setdate_livraison">';
|
||||
$html->select_date($propal->date_livraison,'liv_','','','',"editdate_livraison");
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print dolibarr_print_date($propal->date_livraison,'daytext');
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// adresse de livraison
|
||||
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS)
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DeliveryAddress');
|
||||
print '</td>';
|
||||
|
||||
if ($_GET['action'] != 'editdelivery_adress' && $propal->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_adress&socid='.$propal->socid.'&propalid='.$propal->id.'">'.img_edit($langs->trans('SetDeliveryAddress'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
|
||||
if ($_GET['action'] == 'editdelivery_adress')
|
||||
{
|
||||
$langs->load('deliveries');
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DeliveryDate');
|
||||
print '</td>';
|
||||
if ($_GET['action'] != 'editdate_livraison' && $propal->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdate_livraison&propalid='.$propal->id.'">'.img_edit($langs->trans('SetDeliveryDate'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($_GET['action'] == 'editdate_livraison')
|
||||
{
|
||||
print '<form name="editdate_livraison" action="'.$_SERVER["PHP_SELF"].'?propalid='.$propal->id.'" method="post">';
|
||||
print '<input type="hidden" name="action" value="setdate_livraison">';
|
||||
$html->select_date($propal->date_livraison,'liv_','','','',"editdate_livraison");
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print dolibarr_print_date($propal->date_livraison,'daytext');
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','propal',$propal->id);
|
||||
}
|
||||
|
||||
// adresse de livraison
|
||||
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS || !$conf->commande->enabled)
|
||||
else
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('DeliveryAddress');
|
||||
print '</td>';
|
||||
|
||||
if ($_GET['action'] != 'editdelivery_adress' && $propal->brouillon) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editdelivery_adress&socid='.$propal->socid.'&propalid='.$propal->id.'">'.img_edit($langs->trans('SetDeliveryAddress'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
|
||||
if ($_GET['action'] == 'editdelivery_adress')
|
||||
{
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'adresse_livraison_id','propal',$propal->id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'none','propal',$propal->id);
|
||||
}
|
||||
print '</td></tr>';
|
||||
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?propalid='.$propal->id,$propal->adresse_livraison_id,$_GET['socid'],'none','propal',$propal->id);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Conditions et modes de reglement
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2008 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -20,10 +20,10 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/fourn/fiche.php
|
||||
\ingroup fournisseur, facture
|
||||
\brief Page de fiche fournisseur
|
||||
\version $Id$
|
||||
* \file htdocs/fourn/fiche.php
|
||||
* \ingroup fournisseur, facture
|
||||
* \brief Page de fiche fournisseur
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
require('./pre.inc.php');
|
||||
@ -47,6 +47,7 @@ $result = restrictedArea($user, 'societe',$socid,'');
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$societe = new Fournisseur($db);
|
||||
$contactstatic = new Contact($db);
|
||||
$form = new Form($db);
|
||||
@ -94,8 +95,16 @@ if ( $societe->fetch($socid) )
|
||||
else print $societe->pays;
|
||||
print '</td></tr>';
|
||||
|
||||
// Phone
|
||||
print '<tr><td>'.$langs->trans("Phone").'</td><td>'.dol_print_phone($societe->tel,$societe->pays_code,0,$societe->id,'AC_TEL').'</td>';
|
||||
|
||||
// Fax
|
||||
print '<td>'.$langs->trans("Fax").'</td><td>'.dol_print_phone($societe->fax,$societe->pays_code,0,$societe->id,'AC_FAX').'</td></tr>';
|
||||
|
||||
// EMail
|
||||
print '<td>'.$langs->trans('EMail').'</td><td colspan="3">'.dol_print_email($societe->email,0,$societe->id,'AC_EMAIL').'</td></tr>';
|
||||
|
||||
// Web
|
||||
print '<tr><td>'.$langs->trans("Web")."</td><td colspan=\"3\"><a href=\"http://$societe->url\">$societe->url</a> </td></tr>";
|
||||
|
||||
// Assujetti a TVA ou pas
|
||||
|
||||
@ -41,8 +41,8 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
|
||||
|
||||
/**
|
||||
\brief Constructeur
|
||||
\param db Handler acc<EFBFBD>s base de donn<EFBFBD>e
|
||||
* \brief Constructor
|
||||
* \param db Database handler
|
||||
*/
|
||||
function pdf_expedition_merou($db=0)
|
||||
{
|
||||
@ -50,13 +50,10 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "Merou";
|
||||
$this->description = "Modele Merou 2xA5 \n
|
||||
Attention !! Il est necessaire de creer 4 nouveaux types de contact : \n
|
||||
$this->description = "Modele Merou 2*A5\n
|
||||
Attention !! Il est possible de creer 2 nouveaux types de contact : \n
|
||||
|element->commande,source->internal,code->LIVREUR \n
|
||||
|element->commande,source->external,code->LIVREUR \n
|
||||
|element->commande,source->external,code->EXPEDITEUR \n
|
||||
|element->commande,source->external,code->DESTINATAIRE \n
|
||||
";
|
||||
|element->commande,source->external,code->EXPEDITEUR";
|
||||
|
||||
$this->type = 'pdf';
|
||||
$this->page_largeur = 148.5;
|
||||
@ -67,7 +64,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
|
||||
// Recupere emmetteur
|
||||
$this->emetteur=$mysoc;
|
||||
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'<EFBFBD>tait pas d<>fini
|
||||
if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'etait pas defini
|
||||
}
|
||||
|
||||
|
||||
@ -106,12 +103,13 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$soc->fetch($this->expe->commande->socid);
|
||||
|
||||
//Creation de l expediteur
|
||||
$this->expediteur = $soc;
|
||||
$this->expediteur = $mysoc;
|
||||
|
||||
//Creation du destinataire
|
||||
$this->destinataire = new Contact($this->db);
|
||||
// $pdf->expe->commande->fetch($pdf->commande->id);
|
||||
//print_r($pdf->expe);
|
||||
$idcontact = $this->expe->commande->getIdContact('external','DESTINATAIRE');
|
||||
$idcontact = $this->expe->commande->getIdContact('external','SHIPPING');
|
||||
$this->destinataire->fetch($idcontact[0]);
|
||||
|
||||
//Creation du livreur
|
||||
@ -120,7 +118,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
if ($idcontact[0]) $this->livreur->fetch();
|
||||
|
||||
|
||||
// D<EFBFBD>finition de $dir et $file
|
||||
// Definition de $dir et $file
|
||||
if ($this->expe->specimen)
|
||||
{
|
||||
$dir = $conf->expedition_bon->dir_output;
|
||||
@ -321,19 +319,27 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
}
|
||||
|
||||
|
||||
//********************************
|
||||
// Generation de l entete
|
||||
//********************************
|
||||
function _pagehead(&$pdf, $exp, $outputlangs)
|
||||
/**
|
||||
* \brief Show header of page
|
||||
* \param pdf Object PDF
|
||||
* \param object Object invoice
|
||||
* \param showadress 0=no, 1=yes
|
||||
* \param outputlang Object lang for output
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $outputlangs)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$Xoff = 90;
|
||||
$Yoff = 0;
|
||||
|
||||
$tab4_top = 60;
|
||||
$tab4_hl = 6;
|
||||
$tab4_sl = 4;
|
||||
$ligne = 2;
|
||||
|
||||
//*********************LOGO****************************
|
||||
$pdf->SetXY(11,7);
|
||||
$logo=$conf->societe->dir_logos.'/'.$this->emetteur->logo;
|
||||
if ($this->emetteur->logo)
|
||||
{
|
||||
@ -353,8 +359,6 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
|
||||
//*********************Entete****************************
|
||||
//Nom du Document
|
||||
$Xoff = 90;
|
||||
$Yoff = 0;
|
||||
$pdf->SetXY($Xoff,7);
|
||||
$pdf->SetFont('Arial','B',12);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@ -366,7 +370,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$pdf->SetXY($Xoff,$Yoff);
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->MultiCell(0, 3, $outputlangs->transnoentities("RefSending").': '.$outputlangs->convToOutputCharset($exp->ref), '' , 'L');
|
||||
$pdf->MultiCell(0, 3, $outputlangs->transnoentities("RefSending").': '.$outputlangs->convToOutputCharset($object->ref), '' , 'L');
|
||||
//$this->Code39($Xoff+43, $Yoff+1, $this->expe->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
||||
//Num Commande
|
||||
$Yoff = $Yoff+4;
|
||||
@ -374,17 +378,22 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$pdf->SetXY($Xoff,$Yoff);
|
||||
$pdf->SetFont('Arial','',8);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->MultiCell(0, 3, $outputlangs->transnoentities("RefOrder").': '.$outputlangs->convToOutputCharset($exp->commande->ref), '' , 'L');
|
||||
$pdf->MultiCell(0, 3, $outputlangs->transnoentities("RefOrder").': '.$outputlangs->convToOutputCharset($object->commande->ref), '' , 'L');
|
||||
|
||||
//$this->Code39($Xoff+43, $Yoff+1, $exp->commande->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
||||
//$this->Code39($Xoff+43, $Yoff+1, $object->commande->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
||||
//Definition Emplacement du bloc Societe
|
||||
$Xoff = 115;
|
||||
$Xoff = 110;
|
||||
$blSocX=11;
|
||||
$blSocY=25;
|
||||
$blSocY=21;
|
||||
$blSocW=50;
|
||||
$blSocX2=$blSocW+$blSocXs;
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
// Nom emetteur
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetXY($blSocX,$blSocY);
|
||||
$pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->nom), 0, 'L');
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
// Caracteristiques emetteur
|
||||
$carac_emetteur = '';
|
||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||
@ -405,12 +414,12 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
|
||||
//Date Expedition
|
||||
$Yoff = $Yoff+7;
|
||||
$pdf->SetXY($blSocX,$blSocY+20);
|
||||
$pdf->SetXY($blSocX,$blSocY+24);
|
||||
$pdf->SetFont('Arial','B',8);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->MultiCell(50, 8, $outputlangs->transnoentities("Date")." : " . dol_print_date($exp->date,'day',false,$outputlangs,true), '' , 'L');
|
||||
$pdf->MultiCell(50, 8, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,'day',false,$outputlangs,true), '' , 'L');
|
||||
//Date Expedition
|
||||
$pdf->SetXY($blSocX2,$blSocY+20);
|
||||
$pdf->SetXY($blSocX2,$blSocY+24);
|
||||
$pdf->SetFont('Arial','B',8);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->MultiCell(50, 8, $outputlangs->transnoentities("Deliverer")." ".$outputlangs->convToOutputCharset($livreur->fullname), '' , 'L');
|
||||
@ -447,44 +456,101 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||
$pdf->MultiCell($blW,5, $outputlangs->convToOutputCharset($this->expediteur->cp) . " " . $outputlangs->convToOutputCharset($this->expediteur->ville), 0, 'L');
|
||||
$blSocY+=4;
|
||||
//Tel Client
|
||||
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||
$pdf->SetFont('Arial','',7);
|
||||
$pdf->MultiCell($blW,3, $outputlangs->transnoentities("Tel")." : ".$outputlangs->convToOutputCharset($this->expediteur->tel), 0, 'L');
|
||||
//Tel
|
||||
if ($this->expediteur->tel)
|
||||
{
|
||||
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||
$pdf->SetFont('Arial','',7);
|
||||
$pdf->MultiCell($blW,3, $outputlangs->transnoentities("Tel")." : ".$outputlangs->convToOutputCharset($this->expediteur->tel), 0, 'L');
|
||||
}
|
||||
|
||||
|
||||
$object->fetch_client();
|
||||
|
||||
/**********************************/
|
||||
//Emplacement Informations Destinataire
|
||||
/**********************************/
|
||||
$usecontact=false;
|
||||
//if ($conf->global->FACTURE_USE_BILL_CONTACT_AS_RECIPIENT)
|
||||
//{
|
||||
$arrayidcontact=$object->commande->getIdContact('external','SHIPPING');
|
||||
if (sizeof($arrayidcontact) > 0)
|
||||
{
|
||||
$usecontact=true;
|
||||
$result=$object->fetch_contact($arrayidcontact[0]);
|
||||
}
|
||||
//}
|
||||
if ($usecontact)
|
||||
{
|
||||
// On peut utiliser le nom de la societe du contact
|
||||
//if ($conf->global->FACTURE_USE_COMPANY_NAME_OF_BILL_CONTACT) $socname = $object->contact->socname;
|
||||
//else
|
||||
$socname = $object->client->nom;
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($socname);
|
||||
|
||||
/**********************************/
|
||||
//Emplacement Informations Destinataire (Contact livraison)
|
||||
/**********************************/
|
||||
// Customer name
|
||||
$carac_client = $object->contact->getFullName($outputlangs,1,1);
|
||||
|
||||
// Customer properties
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->contact->address);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->contact->cp) . " " . $outputlangs->convToOutputCharset($object->contact->ville)."\n";
|
||||
//Pays si different de l'emetteur
|
||||
if ($this->emetteur->pays_code != $object->contact->pays_code)
|
||||
{
|
||||
$carac_client.=$outputlangs->convToOutputCharset($object->contact->pays)."\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nom client
|
||||
$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
|
||||
|
||||
// Nom du contact facturation si c'est une societe
|
||||
$arrayidcontact = $object->getIdContact('external','SHIPPING');
|
||||
if (sizeof($arrayidcontact) > 0)
|
||||
{
|
||||
$object->fetch_contact($arrayidcontact[0]);
|
||||
// On verifie si c'est une societe ou un particulier
|
||||
if( !preg_match('#'.$object->contact->getFullName($outputlangs,1).'#isU',$object->client->nom) )
|
||||
{
|
||||
$carac_client .= "\n".$object->contact->getFullName($outputlangs,1,1);
|
||||
}
|
||||
}
|
||||
|
||||
// Caracteristiques client
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->adresse);
|
||||
$carac_client.="\n".$outputlangs->convToOutputCharset($object->client->cp) . " " . $outputlangs->convToOutputCharset($object->client->ville)."\n";
|
||||
|
||||
//Pays si different de l'emetteur
|
||||
if ($this->emetteur->pays_code != $object->client->pays_code)
|
||||
{
|
||||
$carac_client.=$outputlangs->convToOutputCharset($object->client->pays)."\n";
|
||||
}
|
||||
}
|
||||
// Numero TVA intracom
|
||||
if ($object->client->tva_intra) $carac_client.="\n".$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($object->client->tva_intra);
|
||||
|
||||
|
||||
$blDestX=$blExpX+55;
|
||||
$blW=50;
|
||||
$Yoff = $Ydef;
|
||||
$blSocY = 1;
|
||||
$Yoff = $Ydef +1;
|
||||
|
||||
$pdf->Rect($blDestX, $Yoff-1, $blW, 20);
|
||||
|
||||
//Titre
|
||||
$pdf->SetXY($blDestX,$Yoff-3);
|
||||
$pdf->SetFont('Arial','B',7);
|
||||
$pdf->SetXY($blDestX,$Yoff-4);
|
||||
$pdf->MultiCell($blW,3, $outputlangs->transnoentities("Recipient"), 0, 'L');
|
||||
$pdf->Rect($blDestX, $Yoff, $blW, 20);
|
||||
//Nom Client
|
||||
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||
|
||||
// Show customer/recipient
|
||||
$pdf->SetFont('Arial','B',7);
|
||||
$pdf->MultiCell($blW,3, $outputlangs->convToOutputCharset($this->destinataire->fullname), 0, 'C');
|
||||
$pdf->SetXY($blDestX,$Yoff);
|
||||
$pdf->MultiCell($blW,3, $carac_client_name, 0, 'L');
|
||||
|
||||
$pdf->SetFont('Arial','',7);
|
||||
$blSocY+=3;
|
||||
//Adresse Client
|
||||
//Gestion des Retours chariots
|
||||
$Out=split("\n",$outputlangs->convToOutputCharset($this->destinataire->address));
|
||||
for ($i=0;$i<count($Out);$i++) {
|
||||
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||
$pdf->MultiCell($blW,5,urldecode($Out[$i]), 0, 'L');
|
||||
$blSocY+=3;
|
||||
}
|
||||
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||
$pdf->MultiCell($blW,5, $outputlangs->convToOutputCharset($this->destinataire->cp) . " " . $outputlangs->convToOutputCharset($this->destinataire->ville), 0, 'L');
|
||||
$blSocY+=4;
|
||||
//Tel Client
|
||||
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||
$pdf->SetFont('Arial','',7);
|
||||
$pdf->MultiCell($blW,3, $outputlangs->transnoentities("Tel")." : ".$this->destinataire->phone_pro, 0, 'L');
|
||||
//$posy=$pdf->GetY(); //Auto Y coord readjust for multiline name
|
||||
$pdf->SetXY($blDestX,$Yoff+3);
|
||||
$pdf->MultiCell($blW,3, $carac_client);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -12,6 +12,7 @@ insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) v
|
||||
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (143,'order_supplier','external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1);
|
||||
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (145,'order_supplier','external', 'SHIPPING', 'Contact fournisseur livraison commande', 1);
|
||||
|
||||
update llx_const set visible = 1 where name = 'PROPALE_ADD_DELIVERY_ADDRESS';
|
||||
|
||||
alter table llx_expedition_methode change statut active tinyint DEFAULT 1;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user