Fix: Space before opening parenthesis of function call prohibited
This commit is contained in:
parent
e8cd289ac0
commit
6c4acefd93
@ -28,7 +28,7 @@ require_once('class/Facturation.class.php');
|
||||
if ( $_GET['id'] == 'NOUV' )
|
||||
{
|
||||
unset($_SESSION['serObjFacturation']);
|
||||
$db->query ('DELETE FROM '.MAIN_DB_PREFIX.'pos_tmp');
|
||||
$db->query('DELETE FROM '.MAIN_DB_PREFIX.'pos_tmp');
|
||||
}
|
||||
|
||||
// Recuperation, s'il existe, de l'objet contenant les infos de la vente en cours ...
|
||||
|
||||
@ -123,7 +123,7 @@ class Facturation {
|
||||
$remise_percent = 0;
|
||||
}
|
||||
$montant_remise_ht = ($resultarray[6] - $resultarray[0]);
|
||||
$this->montant_remise ($montant_remise_ht);
|
||||
$this->montant_remise($montant_remise_ht);
|
||||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."pos_tmp (";
|
||||
$sql.= "fk_article";
|
||||
@ -178,7 +178,7 @@ class Facturation {
|
||||
{
|
||||
global $db;
|
||||
|
||||
$res = $db->query ('SELECT remise, total_ht, total_ttc, taux FROM '.MAIN_DB_PREFIX.'pos_tmp as c
|
||||
$res = $db->query('SELECT remise, total_ht, total_ttc, taux FROM '.MAIN_DB_PREFIX.'pos_tmp as c
|
||||
LEFT JOIN '.MAIN_DB_PREFIX.'c_tva as t ON c.fk_tva = t.rowid
|
||||
ORDER BY id');
|
||||
|
||||
@ -225,8 +225,8 @@ class Facturation {
|
||||
$this->ref('RESET');
|
||||
$this->qte('RESET');
|
||||
$this->stock('RESET');
|
||||
$this->remise_percent ('RESET');
|
||||
$this->montant_remise ('RESET');
|
||||
$this->remise_percent('RESET');
|
||||
$this->montant_remise('RESET');
|
||||
$this->prix('RESET');
|
||||
$this->tva('RESET');
|
||||
|
||||
@ -237,15 +237,15 @@ class Facturation {
|
||||
*/
|
||||
public function raz_pers ()
|
||||
{
|
||||
$this->num_facture ('RESET');
|
||||
$this->mode_reglement ('RESET');
|
||||
$this->montant_encaisse ('RESET');
|
||||
$this->montant_rendu ('RESET');
|
||||
$this->paiement_le ('RESET');
|
||||
$this->num_facture('RESET');
|
||||
$this->mode_reglement('RESET');
|
||||
$this->montant_encaisse('RESET');
|
||||
$this->montant_rendu('RESET');
|
||||
$this->paiement_le('RESET');
|
||||
|
||||
$this->prix_total_ht ('RESET');
|
||||
$this->montant_tva ('RESET');
|
||||
$this->prix_total_ttc ('RESET');
|
||||
$this->prix_total_ht('RESET');
|
||||
$this->montant_tva('RESET');
|
||||
$this->prix_total_ttc('RESET');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ if ( $_GET['filtre'] ) {
|
||||
$sql.= " ORDER BY label";
|
||||
|
||||
dol_syslog("facturation.php sql=".$sql);
|
||||
$resql=$db->query ($sql);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
while ( $tab = $db->fetch_array($resql) )
|
||||
@ -74,7 +74,7 @@ if ( $_GET['filtre'] ) {
|
||||
$sql.= " ORDER BY p.label";
|
||||
|
||||
dol_syslog($sql);
|
||||
$resql=$db->query ($sql);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
while ( $tab = $db->fetch_array($resql) )
|
||||
|
||||
@ -54,7 +54,7 @@ switch ( $_GET['action'] )
|
||||
if ($result)
|
||||
{
|
||||
// ... et enregistrement dans l'objet
|
||||
if ( $db->num_rows ($result) )
|
||||
if ( $db->num_rows($result) )
|
||||
{
|
||||
$ret=array();
|
||||
$tab = $db->fetch_array($result);
|
||||
|
||||
@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON c.fk_article = p.rowid
|
||||
ORDER BY id';
|
||||
dol_syslog($request);
|
||||
$res = $db->query ($request);
|
||||
$res = $db->query($request);
|
||||
if (! $res)
|
||||
{
|
||||
dol_print_error($db);
|
||||
|
||||
@ -114,7 +114,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
<?php
|
||||
|
||||
// Variables
|
||||
$res = $db->query (
|
||||
$res = $db->query(
|
||||
'SELECT id, ref, label, qte, price, remise_percent, remise, total_ht, total_ttc, tva_tx FROM '.MAIN_DB_PREFIX.'pos_tmp as c
|
||||
LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON c.fk_article = p.rowid
|
||||
ORDER BY id');
|
||||
|
||||
@ -145,7 +145,7 @@ switch ($action)
|
||||
$invoice=new Facture($db);
|
||||
|
||||
// Recuperation de la liste des articles du panier
|
||||
$res=$db->query ('SELECT fk_article, qte, fk_tva, remise_percent, remise, total_ht, total_ttc
|
||||
$res=$db->query('SELECT fk_article, qte, fk_tva, remise_percent, remise, total_ht, total_ttc
|
||||
FROM '.MAIN_DB_PREFIX.'pos_tmp
|
||||
WHERE 1');
|
||||
$ret=array(); $i=0;
|
||||
@ -163,7 +163,7 @@ switch ($action)
|
||||
for($i=0;$i < $tab_liste_size;$i++)
|
||||
{
|
||||
// Recuperation de l'article
|
||||
$res = $db->query (
|
||||
$res = $db->query(
|
||||
'SELECT label, tva_tx, price
|
||||
FROM '.MAIN_DB_PREFIX.'product
|
||||
WHERE rowid = '.$tab_liste[$i]['fk_article']);
|
||||
@ -175,7 +175,7 @@ switch ($action)
|
||||
}
|
||||
$tab_article = $ret;
|
||||
|
||||
$res = $db->query (
|
||||
$res = $db->query(
|
||||
'SELECT taux
|
||||
FROM '.MAIN_DB_PREFIX.'c_tva
|
||||
WHERE rowid = '.$tab_liste[$i]['fk_tva']);
|
||||
|
||||
@ -163,7 +163,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes')
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -345,7 +345,7 @@ if ($_POST['action'] == 'add' && $user->rights->propale->creer)
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -873,7 +873,7 @@ if ($action == 'builddoc' && $user->rights->propale->creer)
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -953,7 +953,7 @@ if ($action == 'up' && $user->rights->propale->creer)
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.GETPOST('rowid'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.GETPOST('rowid'));
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -975,7 +975,7 @@ if ($action == 'down' && $user->rights->propale->creer)
|
||||
}
|
||||
propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.GETPOST('rowid'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.GETPOST('rowid'));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -821,7 +821,7 @@ if ($action == 'up' && $user->rights->commande->creer)
|
||||
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -843,7 +843,7 @@ if ($action == 'down' && $user->rights->commande->creer)
|
||||
}
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -881,7 +881,7 @@ if ($action == 'builddoc') // In get or post
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ if ($_POST["action"] == 'add' && $user->rights->deplacement->creer)
|
||||
|
||||
if ($id > 0)
|
||||
{
|
||||
Header ("Location: fiche.php?id=".$id);
|
||||
Header("Location: fiche.php?id=".$id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -117,7 +117,7 @@ if ($_POST["action"] == 'add' && $user->rights->deplacement->creer)
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ("Location: index.php");
|
||||
Header("Location: index.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ if ($_REQUEST['action'] == 'builddoc')
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?rowid='.$donation->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?rowid='.$donation->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1146,7 +1146,7 @@ if ($action == 'up' && $user->rights->facture->creer)
|
||||
}
|
||||
facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'#'.$_GET['rowid']);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'#'.$_GET['rowid']);
|
||||
exit;
|
||||
}
|
||||
// Modify line position (down)
|
||||
@ -1168,7 +1168,7 @@ if ($action == 'down' && $user->rights->facture->creer)
|
||||
}
|
||||
facture_pdf_create($db, $object, '', $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'), $hookmanager);
|
||||
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'#'.$_GET['rowid']);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'#'.$_GET['rowid']);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -1407,7 +1407,7 @@ if (GETPOST('action') == 'builddoc') // En get ou en post
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ if ($action == 'builddoc' && $user->rights->banque->cheque)
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$remisecheque->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$remisecheque->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1165,7 +1165,7 @@ class BonPrelevement extends CommonObject
|
||||
|
||||
dol_syslog("BonPrelevement::Generate build file ".$this->filename);
|
||||
|
||||
$this->file = fopen ($this->filename,"w");
|
||||
$this->file = fopen($this->filename,"w");
|
||||
|
||||
//Build file for Spain
|
||||
if ($mysoc->pays_code=='ES')
|
||||
@ -1219,7 +1219,7 @@ class BonPrelevement extends CommonObject
|
||||
$result = -2;
|
||||
}
|
||||
|
||||
fputs ($this->file, $esaeb19->generaRemesa());
|
||||
fputs($this->file, $esaeb19->generaRemesa());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1252,7 +1252,7 @@ class BonPrelevement extends CommonObject
|
||||
$result = -2;
|
||||
}
|
||||
$langs->load('withdrawals');
|
||||
fputs ($this->file, $langs->trans('WithdrawalFileNotCapable'));
|
||||
fputs($this->file, $langs->trans('WithdrawalFileNotCapable'));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1349,7 +1349,7 @@ class BonPrelevement extends CommonObject
|
||||
$result = -2;
|
||||
}
|
||||
$langs->load('withdrawals');
|
||||
fputs ($this->file, $langs->trans('WithdrawalFileNotCapable'));
|
||||
fputs($this->file, $langs->trans('WithdrawalFileNotCapable'));
|
||||
}
|
||||
|
||||
fclose($this->file);
|
||||
@ -1373,59 +1373,59 @@ class BonPrelevement extends CommonObject
|
||||
*/
|
||||
function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $facnumber, $facid)
|
||||
{
|
||||
fputs ($this->file, "06");
|
||||
fputs ($this->file, "08"); // Prelevement ordinaire
|
||||
fputs($this->file, "06");
|
||||
fputs($this->file, "08"); // Prelevement ordinaire
|
||||
|
||||
fputs ($this->file, " "); // Zone Reservee B2
|
||||
fputs($this->file, " "); // Zone Reservee B2
|
||||
|
||||
fputs ($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
||||
fputs($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
||||
|
||||
// Date d'echeance C1
|
||||
|
||||
fputs ($this->file, " ");
|
||||
fputs ($this->file, strftime("%d%m", $this->date_echeance));
|
||||
fputs ($this->file, substr(strftime("%y", $this->date_echeance),1));
|
||||
fputs($this->file, " ");
|
||||
fputs($this->file, strftime("%d%m", $this->date_echeance));
|
||||
fputs($this->file, substr(strftime("%y", $this->date_echeance),1));
|
||||
|
||||
// Raison Sociale Destinataire C2
|
||||
|
||||
fputs ($this->file, substr($client->nom. " ",0,24));
|
||||
fputs($this->file, substr($client->nom. " ",0,24));
|
||||
|
||||
// Domiciliation facultative D1
|
||||
|
||||
fputs ($this->file, substr(" ",0,24));
|
||||
fputs($this->file, substr(" ",0,24));
|
||||
|
||||
// Zone Reservee D2
|
||||
|
||||
fputs ($this->file, substr(" ",0,8));
|
||||
fputs($this->file, substr(" ",0,8));
|
||||
|
||||
// Code Guichet D3
|
||||
|
||||
fputs ($this->file, $rib_guichet);
|
||||
fputs($this->file, $rib_guichet);
|
||||
|
||||
// Numero de compte D4
|
||||
|
||||
fputs ($this->file, substr("000000000000000".$rib_number, -11));
|
||||
fputs($this->file, substr("000000000000000".$rib_number, -11));
|
||||
|
||||
// Zone E Montant
|
||||
|
||||
$montant = (round($amount,2) * 100);
|
||||
|
||||
fputs ($this->file, substr("000000000000000".$montant, -16));
|
||||
fputs($this->file, substr("000000000000000".$montant, -16));
|
||||
|
||||
// Libelle F
|
||||
|
||||
fputs ($this->file, substr("*".$this->ref.$rowid." ",0,13));
|
||||
fputs ($this->file, substr(" ",0,18));
|
||||
fputs($this->file, substr("*".$this->ref.$rowid." ",0,13));
|
||||
fputs($this->file, substr(" ",0,18));
|
||||
|
||||
// Code etablissement G1
|
||||
|
||||
fputs ($this->file, $rib_banque);
|
||||
fputs($this->file, $rib_banque);
|
||||
|
||||
// Zone Reservee G2
|
||||
|
||||
fputs ($this->file, substr(" ",0,5));
|
||||
fputs($this->file, substr(" ",0,5));
|
||||
|
||||
fputs ($this->file, "\n");
|
||||
fputs($this->file, "\n");
|
||||
}
|
||||
|
||||
|
||||
@ -1434,62 +1434,62 @@ class BonPrelevement extends CommonObject
|
||||
*/
|
||||
function EnregEmetteur()
|
||||
{
|
||||
fputs ($this->file, "03");
|
||||
fputs ($this->file, "08"); // Prelevement ordinaire
|
||||
fputs($this->file, "03");
|
||||
fputs($this->file, "08"); // Prelevement ordinaire
|
||||
|
||||
fputs ($this->file, " "); // Zone Reservee B2
|
||||
fputs($this->file, " "); // Zone Reservee B2
|
||||
|
||||
fputs ($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
||||
fputs($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
||||
|
||||
// Date d'echeance C1
|
||||
|
||||
fputs ($this->file, " ");
|
||||
fputs ($this->file, strftime("%d%m", $this->date_echeance));
|
||||
fputs ($this->file, substr(strftime("%y", $this->date_echeance),1));
|
||||
fputs($this->file, " ");
|
||||
fputs($this->file, strftime("%d%m", $this->date_echeance));
|
||||
fputs($this->file, substr(strftime("%y", $this->date_echeance),1));
|
||||
|
||||
// Raison Sociale C2
|
||||
|
||||
fputs ($this->file, substr($this->raison_sociale. " ",0,24));
|
||||
fputs($this->file, substr($this->raison_sociale. " ",0,24));
|
||||
|
||||
// Reference de la remise creancier D1 sur 7 caracteres
|
||||
|
||||
fputs ($this->file, substr($this->reference_remise. " ",0,7));
|
||||
fputs($this->file, substr($this->reference_remise. " ",0,7));
|
||||
|
||||
// Zone Reservee D1-2
|
||||
|
||||
fputs ($this->file, substr(" ",0,17));
|
||||
fputs($this->file, substr(" ",0,17));
|
||||
|
||||
// Zone Reservee D2
|
||||
|
||||
fputs ($this->file, substr(" ",0,2));
|
||||
fputs ($this->file, "E");
|
||||
fputs ($this->file, substr(" ",0,5));
|
||||
fputs($this->file, substr(" ",0,2));
|
||||
fputs($this->file, "E");
|
||||
fputs($this->file, substr(" ",0,5));
|
||||
|
||||
// Code Guichet D3
|
||||
|
||||
fputs ($this->file, $this->emetteur_code_guichet);
|
||||
fputs($this->file, $this->emetteur_code_guichet);
|
||||
|
||||
// Numero de compte D4
|
||||
|
||||
fputs ($this->file, substr("000000000000000".$this->emetteur_numero_compte, -11));
|
||||
fputs($this->file, substr("000000000000000".$this->emetteur_numero_compte, -11));
|
||||
|
||||
// Zone Reservee E
|
||||
|
||||
fputs ($this->file, substr(" ",0,16));
|
||||
fputs($this->file, substr(" ",0,16));
|
||||
|
||||
// Zone Reservee F
|
||||
|
||||
fputs ($this->file, substr(" ",0,31));
|
||||
fputs($this->file, substr(" ",0,31));
|
||||
|
||||
// Code etablissement
|
||||
|
||||
fputs ($this->file, $this->emetteur_code_banque);
|
||||
fputs($this->file, $this->emetteur_code_banque);
|
||||
|
||||
// Zone Reservee G
|
||||
|
||||
fputs ($this->file, substr(" ",0,5));
|
||||
fputs($this->file, substr(" ",0,5));
|
||||
|
||||
fputs ($this->file, "\n");
|
||||
fputs($this->file, "\n");
|
||||
|
||||
}
|
||||
|
||||
@ -1499,57 +1499,57 @@ class BonPrelevement extends CommonObject
|
||||
*/
|
||||
function EnregTotal($total)
|
||||
{
|
||||
fputs ($this->file, "08");
|
||||
fputs ($this->file, "08"); // Prelevement ordinaire
|
||||
fputs($this->file, "08");
|
||||
fputs($this->file, "08"); // Prelevement ordinaire
|
||||
|
||||
fputs ($this->file, " "); // Zone Reservee B2
|
||||
fputs($this->file, " "); // Zone Reservee B2
|
||||
|
||||
fputs ($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
||||
fputs($this->file, $this->numero_national_emetteur); // Numero National d'emmetteur B3
|
||||
|
||||
// Reserve C1
|
||||
|
||||
fputs ($this->file, substr(" ",0,12));
|
||||
fputs($this->file, substr(" ",0,12));
|
||||
|
||||
|
||||
// Raison Sociale C2
|
||||
|
||||
fputs ($this->file, substr(" ",0,24));
|
||||
fputs($this->file, substr(" ",0,24));
|
||||
|
||||
// D1
|
||||
|
||||
fputs ($this->file, substr(" ",0,24));
|
||||
fputs($this->file, substr(" ",0,24));
|
||||
|
||||
// Zone Reservee D2
|
||||
|
||||
fputs ($this->file, substr(" ",0,8));
|
||||
fputs($this->file, substr(" ",0,8));
|
||||
|
||||
// Code Guichet D3
|
||||
|
||||
fputs ($this->file, substr(" ",0,5));
|
||||
fputs($this->file, substr(" ",0,5));
|
||||
|
||||
// Numero de compte D4
|
||||
|
||||
fputs ($this->file, substr(" ",0,11));
|
||||
fputs($this->file, substr(" ",0,11));
|
||||
|
||||
// Zone E Montant
|
||||
|
||||
$montant = ($total * 100);
|
||||
|
||||
fputs ($this->file, substr("000000000000000".$montant, -16));
|
||||
fputs($this->file, substr("000000000000000".$montant, -16));
|
||||
|
||||
// Zone Reservee F
|
||||
|
||||
fputs ($this->file, substr(" ",0,31));
|
||||
fputs($this->file, substr(" ",0,31));
|
||||
|
||||
// Code etablissement
|
||||
|
||||
fputs ($this->file, substr(" ",0,5));
|
||||
fputs($this->file, substr(" ",0,5));
|
||||
|
||||
// Zone Reservee F
|
||||
|
||||
fputs ($this->file, substr(" ",0,5));
|
||||
fputs($this->file, substr(" ",0,5));
|
||||
|
||||
fputs ($this->file, "\n");
|
||||
fputs($this->file, "\n");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -64,7 +64,7 @@ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
|
||||
if ($ret > 0)
|
||||
{
|
||||
$db->commit();
|
||||
Header ("Location: reglement.php");
|
||||
Header("Location: reglement.php");
|
||||
exit;
|
||||
}
|
||||
else
|
||||
|
||||
@ -299,7 +299,7 @@ class SMTPs
|
||||
|
||||
if ( (! is_ip($host)) && ((gethostbyname ( $host )) == $host) )
|
||||
{
|
||||
$this->_setErr (99, $host . ' is either offline or is an invalid host name.');
|
||||
$this->_setErr(99, $host . ' is either offline or is an invalid host name.');
|
||||
$_retVal = false;
|
||||
}
|
||||
else
|
||||
@ -326,7 +326,7 @@ class SMTPs
|
||||
{
|
||||
// DOL_CHANGE LDR
|
||||
if (empty($this->errstr)) $this->errstr='Failed to connect with fsockopen host='.$this->getHost().' port='.$this->getPort();
|
||||
$this->_setErr ($this->errno, $this->errstr);
|
||||
$this->_setErr($this->errno, $this->errstr);
|
||||
$_retVal = false;
|
||||
}
|
||||
}
|
||||
@ -359,11 +359,11 @@ class SMTPs
|
||||
// The error here just means the ID/password combo doesn't work.
|
||||
// There is not a method to determine which is the problem, ID or password
|
||||
if ( ! $_retVal = $this->socket_send_str(base64_encode($this->_smtpsPW), '235') )
|
||||
$this->_setErr (130, 'Invalid Authentication Credentials.');
|
||||
$this->_setErr(130, 'Invalid Authentication Credentials.');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_setErr (126, '"' . $host . '" does not support authenticated connections.');
|
||||
$this->_setErr(126, '"' . $host . '" does not support authenticated connections.');
|
||||
}
|
||||
|
||||
return $_retVal;
|
||||
@ -491,7 +491,7 @@ class SMTPs
|
||||
// it will simply return FALSE.
|
||||
if ( ! @include ( $_strConfigPath ) )
|
||||
{
|
||||
$this->_setErr (110, '"' . $_strConfigPath . '" is not a valid path.');
|
||||
$this->_setErr(110, '"' . $_strConfigPath . '" is not a valid path.');
|
||||
$_retVal = false;
|
||||
}
|
||||
}
|
||||
@ -751,7 +751,7 @@ class SMTPs
|
||||
function setFrom($_strFrom)
|
||||
{
|
||||
if ( $_strFrom )
|
||||
$this->_msgFrom = $this->_strip_email ($_strFrom);
|
||||
$this->_msgFrom = $this->_strip_email($_strFrom);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -961,13 +961,13 @@ class SMTPs
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_setErr (101, 'No eMail Address for message to be sent to.');
|
||||
$this->_setErr(101, 'No eMail Address for message to be sent to.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->_setErr (102, 'eMail type not defined.');
|
||||
$this->_setErr(102, 'eMail type not defined.');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1486,14 +1486,14 @@ class SMTPs
|
||||
{
|
||||
if( !( $server_response = fgets($socket, 256) ) )
|
||||
{
|
||||
$this->_setErr (121, "Couldn't get mail server response codes");
|
||||
$this->_setErr(121, "Couldn't get mail server response codes");
|
||||
$_retVal = false;
|
||||
}
|
||||
}
|
||||
|
||||
if( !( substr($server_response, 0, 3) == $response ) )
|
||||
{
|
||||
$this->_setErr (120, "Ran into problems sending Mail.\r\nResponse: $server_response");
|
||||
$this->_setErr(120, "Ran into problems sending Mail.\r\nResponse: $server_response");
|
||||
$_retVal = false;
|
||||
}
|
||||
|
||||
|
||||
@ -540,7 +540,7 @@ class EcmDirectory // extends CommonObject
|
||||
$sql.= " ORDER BY c.label, c.rowid";
|
||||
|
||||
dol_syslog("EcmDirectory::get_full_arbo sql=".$sql);
|
||||
$resql = $this->db->query ($sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$this->cats = array();
|
||||
|
||||
@ -97,7 +97,7 @@ if ($action == 'confirm_validate' && $_REQUEST['confirm'] == 'yes')
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=fichinter_create($db, $object, $_REQUEST['model'], $outputlangs);
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -126,7 +126,7 @@ if ($action == 'confirm_modify' && $_REQUEST['confirm'] == 'yes')
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
$result=fichinter_create($db, $object, (empty($_REQUEST['model'])?$object->model:$_REQUEST['model']), $outputlangs);
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -277,7 +277,7 @@ if ($action == "addline" && $user->rights->ficheinter->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@ -290,7 +290,7 @@ if ($action == 'classifybilled')
|
||||
$result=$object->setBilled();
|
||||
if ($result > 0)
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@ -353,7 +353,7 @@ if ($action == 'updateligne' && $user->rights->ficheinter->creer && $_POST["save
|
||||
unset($_POST['durationhour']);
|
||||
unset($_POST['durationmin']);
|
||||
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$_POST['fichinterid']);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -416,7 +416,7 @@ if ($action == 'up' && $user->rights->ficheinter->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -438,7 +438,7 @@ if ($action == 'down' && $user->rights->ficheinter->creer)
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
}
|
||||
fichinter_create($db, $object, $object->modelpdf, $outputlangs);
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.'#'.$_GET['rowid']);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -489,7 +489,7 @@ class ProductFournisseur extends Product
|
||||
{
|
||||
$prod_fourn = array();
|
||||
|
||||
while ($record = $this->db->fetch_array ($resql))
|
||||
while ($record = $this->db->fetch_array($resql))
|
||||
{
|
||||
//define base attribute
|
||||
$prodfourn = new ProductFournisseur($this->db);
|
||||
@ -571,7 +571,7 @@ class ProductFournisseur extends Product
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$record = $this->db->fetch_array ($resql);
|
||||
$record = $this->db->fetch_array($resql);
|
||||
$this->product_fourn_price_id = $record["product_fourn_pri_id"];
|
||||
$this->product_fourn_id = $record["product_fourn_id"];
|
||||
$this->fourn_ref = $record["ref_fourn"];
|
||||
|
||||
@ -469,7 +469,7 @@ if ($action == 'up' && $user->rights->fournisseur->commande->creer)
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
}
|
||||
supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'));
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid']));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid']));
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -485,7 +485,7 @@ if ($action == 'down' && $user->rights->fournisseur->commande->creer)
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
}
|
||||
supplier_order_pdf_create($db, $object, $object->modelpdf, $outputlangs, GETPOST('hidedetails'), GETPOST('hidedesc'), GETPOST('hideref'));
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid']));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#'.$_GET['rowid']));
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -515,7 +515,7 @@ if ($action == 'builddoc') // En get ou en post
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ if ($_REQUEST['action'] == 'builddoc')
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?facid='.$facture->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$facture->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,24 +249,24 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
$pdf->MultiCell(40, 2, $langs->trans("Total"));
|
||||
|
||||
$pdf->SetFont('','B', $default_font_size);
|
||||
$pdf->SetXY (170, $posy+1);
|
||||
$pdf->SetXY(170, $posy+1);
|
||||
$pdf->MultiCell(31, 2, price($this->amount), 0, 'C', 0);
|
||||
|
||||
// Tableau
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY (11, $this->tab_top+2);
|
||||
$pdf->SetXY(11, $this->tab_top+2);
|
||||
$pdf->MultiCell(40,2,$outputlangs->transnoentities("Num"), 0, 'L');
|
||||
$pdf->line(40, $this->tab_top, 40, $this->tab_top + $this->tab_height + 10);
|
||||
|
||||
$pdf->SetXY (41, $this->tab_top+2);
|
||||
$pdf->SetXY(41, $this->tab_top+2);
|
||||
$pdf->MultiCell(40,2,$outputlangs->transnoentities("Bank"), 0, 'L');
|
||||
$pdf->line(100, $this->tab_top, 100, $this->tab_top + $this->tab_height + 10);
|
||||
|
||||
$pdf->SetXY (101, $this->tab_top+2);
|
||||
$pdf->SetXY(101, $this->tab_top+2);
|
||||
$pdf->MultiCell(40,2,$outputlangs->transnoentities("CheckTransmitter"), 0, 'L');
|
||||
$pdf->line(180, $this->tab_top, 180, $this->tab_top + $this->tab_height + 10);
|
||||
|
||||
$pdf->SetXY (180, $this->tab_top+2);
|
||||
$pdf->SetXY(180, $this->tab_top+2);
|
||||
$pdf->MultiCell(20,2,$outputlangs->transnoentities("Amount"), 0, 'R');
|
||||
$pdf->line(9, $this->tab_top + 8, 201, $this->tab_top + 8);
|
||||
|
||||
@ -293,19 +293,19 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
{
|
||||
$lineinpage++;
|
||||
|
||||
$pdf->SetXY (1, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(1, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(8, $this->line_height, $j+1, 0, 'R', 0);
|
||||
|
||||
$pdf->SetXY (10, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(10, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(30, $this->line_height, $this->lines[$j]->num_chq?$this->lines[$j]->num_chq:'', 0, 'L', 0);
|
||||
|
||||
$pdf->SetXY (40, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(40, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(70, $this->line_height, dol_trunc($outputlangs->convToOutputCharset($this->lines[$j]->bank_chq),44), 0, 'L', 0);
|
||||
|
||||
$pdf->SetXY (100, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(100, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(80, $this->line_height, dol_trunc($outputlangs->convToOutputCharset($this->lines[$j]->emetteur_chq),50), 0, 'L', 0);
|
||||
|
||||
$pdf->SetXY (180, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(180, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(20, $this->line_height, price($this->lines[$j]->amount_chq), 0, 'R', 0);
|
||||
|
||||
$yp = $yp + $this->line_height;
|
||||
|
||||
@ -181,7 +181,7 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
|
||||
$pdf->SetXY (10, $tab_top + 10 );
|
||||
$pdf->SetXY(10, $tab_top + 10 );
|
||||
|
||||
$iniY = $pdf->GetY();
|
||||
$curY = $pdf->GetY();
|
||||
@ -201,23 +201,23 @@ class pdf_edison extends ModelePDFCommandes
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
$ref = pdf_getlineref($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY (10, $curY);
|
||||
$pdf->SetXY(10, $curY);
|
||||
$pdf->MultiCell(20, 3, $ref, 0, 'C');
|
||||
|
||||
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY (133, $curY);
|
||||
$pdf->SetXY(133, $curY);
|
||||
$pdf->MultiCell(12, 3, $vat_rate, 0, 'C');
|
||||
|
||||
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY (145, $curY);
|
||||
$pdf->SetXY(145, $curY);
|
||||
$pdf->MultiCell(10, 3, $qty, 0, 'C');
|
||||
|
||||
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY (156, $curY);
|
||||
$pdf->SetXY(156, $curY);
|
||||
$pdf->MultiCell(18, 3, $up_excl_tax, 0, 'R', 0);
|
||||
|
||||
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY (174, $curY);
|
||||
$pdf->SetXY(174, $curY);
|
||||
$pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0);
|
||||
|
||||
$nexY+=2; // Passe espace entre les lignes
|
||||
@ -264,22 +264,22 @@ class pdf_edison extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('','', $default_font_size);
|
||||
|
||||
$pdf->SetXY (132, $tab2_top + 0);
|
||||
$pdf->SetXY(132, $tab2_top + 0);
|
||||
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("TotalHT"), 0, 'R', 0);
|
||||
|
||||
$pdf->SetXY (132, $tab2_top + $tab2_lh);
|
||||
$pdf->SetXY(132, $tab2_top + $tab2_lh);
|
||||
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("TotalVAT"), 0, 'R', 0);
|
||||
|
||||
$pdf->SetXY (132, $tab2_top + ($tab2_lh*2));
|
||||
$pdf->SetXY(132, $tab2_top + ($tab2_lh*2));
|
||||
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("TotalTTC"), 1, 'R', 1);
|
||||
|
||||
$pdf->SetXY (174, $tab2_top + 0);
|
||||
$pdf->SetXY(174, $tab2_top + 0);
|
||||
$pdf->MultiCell(26, $tab2_lh, price($object->total_ht), 0, 'R', 0);
|
||||
|
||||
$pdf->SetXY (174, $tab2_top + $tab2_lh);
|
||||
$pdf->SetXY(174, $tab2_top + $tab2_lh);
|
||||
$pdf->MultiCell(26, $tab2_lh, price($object->total_tva), 0, 'R', 0);
|
||||
|
||||
$pdf->SetXY (174, $tab2_top + ($tab2_lh*2));
|
||||
$pdf->SetXY(174, $tab2_top + ($tab2_lh*2));
|
||||
$pdf->MultiCell(26, $tab2_lh, price($object->total_ttc), 1, 'R', 1);
|
||||
|
||||
// Pied de page
|
||||
|
||||
@ -228,7 +228,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top);
|
||||
$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
@ -267,22 +267,22 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxtva, $curY);
|
||||
$pdf->SetXY($this->posxtva, $curY);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R');
|
||||
}
|
||||
|
||||
// Prix unitaire HT avant remise
|
||||
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxup, $curY);
|
||||
$pdf->SetXY($this->posxup, $curY);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1, 3, $up_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Quantity
|
||||
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxqty, $curY);
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $qty, 0, 'R');
|
||||
|
||||
// Remise sur ligne
|
||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||
$pdf->SetXY($this->posxdiscount, $curY);
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
{
|
||||
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
@ -291,7 +291,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
// Total HT ligne
|
||||
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->postotalht, $curY);
|
||||
$pdf->SetXY($this->postotalht, $curY);
|
||||
$pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
@ -592,10 +592,10 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
// Total HT
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
$pdf->SetXY ($col1x, $tab2_top + 0);
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + 0);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + $object->remise), 0, 'R', 1);
|
||||
|
||||
// Show VAT by rates and total
|
||||
@ -611,7 +611,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -623,26 +623,26 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
if (! $this->atleastoneratenotnull) // If not vat at all
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on' && $object->total_localtax1>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1);
|
||||
}
|
||||
|
||||
@ -650,9 +650,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on' && $object->total_localtax2>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -668,7 +668,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -680,7 +680,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -696,7 +696,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -708,7 +708,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -720,12 +720,12 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
|
||||
}
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@ -735,9 +735,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// Already paid + Deposits
|
||||
$index++;
|
||||
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0);
|
||||
|
||||
$resteapayer = $object->total_ttc - $deja_regle;
|
||||
@ -746,10 +746,10 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$index++;
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1);
|
||||
|
||||
// Fin
|
||||
@ -786,28 +786,28 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxtva-3, $tab_top+1);
|
||||
$pdf->SetXY($this->posxtva-3, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
|
||||
}
|
||||
|
||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxup-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxup-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqty-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
|
||||
$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
|
||||
if ($this->atleastonediscount)
|
||||
{
|
||||
$pdf->SetXY ($this->posxdiscount-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxdiscount-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
|
||||
}
|
||||
|
||||
@ -815,7 +815,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
{
|
||||
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
|
||||
}
|
||||
$pdf->SetXY ($this->postotalht-1, $tab_top+1);
|
||||
$pdf->SetXY($this->postotalht-1, $tab_top+1);
|
||||
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHT"),'','C');
|
||||
|
||||
}
|
||||
|
||||
@ -203,22 +203,22 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
||||
$pdf->rect(10+3, $curY+1, 3, 3);
|
||||
$pdf->rect(20+3, $curY+1, 3, 3);
|
||||
//Insertion de la reference du produit
|
||||
$pdf->SetXY (30, $curY+1 );
|
||||
$pdf->SetXY(30, $curY+1 );
|
||||
$pdf->SetFont('','B', $default_font_size - 3);
|
||||
$pdf->MultiCell(24, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'L', 0);
|
||||
//Insertion du libelle
|
||||
$pdf->SetFont('','', $default_font_size - 3);
|
||||
$pdf->SetXY (50, $curY+1 );
|
||||
$pdf->SetXY(50, $curY+1 );
|
||||
//$libelleproduitservice=pdf_getlinedesc($object->$origin,$i,$outputlangs);
|
||||
$libelleproduitservice = pdf_writelinedesc($pdf,$object->$origin,$i,$outputlangs,90,3,50,$curY+1,1);
|
||||
//$pdf->writeHTMLCell(90, 3, 50, $curY+1, $outputlangs->convToOutputCharset($libelleproduitservice), 0, 'L', 0);
|
||||
//Insertion de la quantite commandee
|
||||
$pdf->SetFont('','', $default_font_size - 3);
|
||||
$pdf->SetXY (140, $curY+1 );
|
||||
$pdf->SetXY(140, $curY+1 );
|
||||
$pdf->MultiCell(30, 3, $object->lines[$i]->qty_asked, 0, 'C', 0);
|
||||
//Insertion de la quantite a envoyer
|
||||
$pdf->SetFont('','', $default_font_size - 3);
|
||||
$pdf->SetXY (170, $curY+1 );
|
||||
$pdf->SetXY(170, $curY+1 );
|
||||
$pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0, 'C', 0);
|
||||
|
||||
//Generation de la page 2
|
||||
|
||||
@ -186,7 +186,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
||||
if (! empty($object->note_public))
|
||||
{
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top);
|
||||
$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
|
||||
}
|
||||
|
||||
@ -222,10 +222,10 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
||||
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY ($this->posxqtyordered+5, $curY);
|
||||
$pdf->SetXY($this->posxqtyordered+5, $curY);
|
||||
$pdf->MultiCell(30, 3, $object->lines[$i]->qty_asked,'','C');
|
||||
|
||||
$pdf->SetXY ($this->posxqtytoship+5, $curY);
|
||||
$pdf->SetXY($this->posxqtytoship+5, $curY);
|
||||
$pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped,'','C');
|
||||
|
||||
$nexY+=2; // Passe espace entre les lignes
|
||||
@ -279,15 +279,15 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
|
||||
|
||||
$pdf->SetFont('','',$default_font_size - 1);
|
||||
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->MultiCell(108, 2, $outputlangs->trans("Description"), '', 'L');
|
||||
|
||||
$pdf->line($this->posxqtyordered-1, $tab_top, $this->posxqtyordered-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqtyordered-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxqtyordered-1, $tab_top+1);
|
||||
$pdf->MultiCell(40,2, $outputlangs->transnoentities("QtyOrdered"),'','C');
|
||||
|
||||
$pdf->line($this->posxqtytoship-1, $tab_top, $this->posxqtytoship-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqtytoship-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxqtytoship-1, $tab_top+1);
|
||||
$pdf->MultiCell(40,2, $outputlangs->transnoentities("QtyToShip"),'','C');
|
||||
}
|
||||
|
||||
|
||||
@ -229,7 +229,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top);
|
||||
//$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'J', false, 1, '', '', true, 0, false, false, 0, 'T', true);
|
||||
$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L'); // FPDF
|
||||
$nexY = $pdf->GetY();
|
||||
@ -270,31 +270,31 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxtva, $curY);
|
||||
$pdf->SetXY($this->posxtva, $curY);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R');
|
||||
}
|
||||
|
||||
// Prix unitaire HT avant remise
|
||||
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxup, $curY);
|
||||
$pdf->SetXY($this->posxup, $curY);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1, 3, $up_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Quantity
|
||||
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxqty, $curY);
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $qty, 0, 'R'); // Enough for 6 chars
|
||||
|
||||
// Discount
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
{
|
||||
$pdf->SetXY ($this->posxdiscount-2, $curY);
|
||||
$pdf->SetXY($this->posxdiscount-2, $curY);
|
||||
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount+2, 3, $remise_percent, 0, 'R');
|
||||
}
|
||||
|
||||
// Total HT ligne
|
||||
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->postotalht, $curY);
|
||||
$pdf->SetXY($this->postotalht, $curY);
|
||||
$pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
@ -443,19 +443,19 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top - 5);
|
||||
$pdf->SetXY($tab3_posx, $tab3_top - 5);
|
||||
$pdf->MultiCell(60, 5, $outputlangs->transnoentities("PaymentsAlreadyDone"), 0, 'L', 0);
|
||||
|
||||
$pdf->line($tab3_posx, $tab3_top-1+$tab3_height, $tab3_posx+$tab3_width, $tab3_top-1+$tab3_height);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 4);
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top );
|
||||
$pdf->SetXY($tab3_posx, $tab3_top );
|
||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Payment"), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+21, $tab3_top );
|
||||
$pdf->SetXY($tab3_posx+21, $tab3_top );
|
||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Amount"), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+40, $tab3_top );
|
||||
$pdf->SetXY($tab3_posx+40, $tab3_top );
|
||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Type"), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+58, $tab3_top );
|
||||
$pdf->SetXY($tab3_posx+58, $tab3_top );
|
||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Num"), 0, 'L', 0);
|
||||
|
||||
$y=0;
|
||||
@ -485,13 +485,13 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
$invoice->fetch($obj->fk_facture_source);
|
||||
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top+$y );
|
||||
$pdf->SetXY($tab3_posx, $tab3_top+$y );
|
||||
$pdf->MultiCell(20, 3, dol_print_date($obj->datef,'day',false,$outputlangs,true), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+21, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
|
||||
$pdf->MultiCell(20, 3, price($obj->amount_ttc), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+40, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+40, $tab3_top+$y);
|
||||
$pdf->MultiCell(20, 3, $text, 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+58, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);
|
||||
$pdf->MultiCell(20, 3, $invoice->ref, 0, 'L', 0);
|
||||
|
||||
$pdf->line($tab3_posx, $tab3_top+$y+3, $tab3_posx+$tab3_width, $tab3_top+$y+3 );
|
||||
@ -522,15 +522,15 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$y+=3;
|
||||
$row = $this->db->fetch_object($resql);
|
||||
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top+$y );
|
||||
$pdf->SetXY($tab3_posx, $tab3_top+$y );
|
||||
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+21, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
|
||||
$pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+40, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+40, $tab3_top+$y);
|
||||
$oper = $outputlangs->getTradFromKey("PaymentTypeShort" . $row->code);
|
||||
|
||||
$pdf->MultiCell(20, 3, $oper, 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+58, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);
|
||||
$pdf->MultiCell(30, 3, $row->num, 0, 'L', 0);
|
||||
|
||||
$pdf->line($tab3_posx, $tab3_top+$y+3, $tab3_posx+$tab3_width, $tab3_top+$y+3 );
|
||||
@ -713,9 +713,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
// Total HT
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
$pdf->SetXY ($col1x, $tab2_top + 0);
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + 0);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + $object->remise), 0, 'R', 1);
|
||||
|
||||
// Show VAT by rates and total
|
||||
@ -731,7 +731,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
{
|
||||
@ -741,7 +741,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -749,18 +749,18 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (! $this->atleastoneratenotnull) // If no vat at all
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on' && $object->total_localtax1>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1);
|
||||
}
|
||||
|
||||
@ -768,9 +768,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on' && $object->total_localtax2>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -786,7 +786,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -798,7 +798,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -814,7 +814,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -826,7 +826,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -838,13 +838,13 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$text=$outputlangs->transnoentities("TotalTTC");
|
||||
if ($object->type == 2) $text=$outputlangs->transnoentities("TotalTTCToYourCredit");
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $text, $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
|
||||
}
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@ -859,18 +859,18 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
// Already paid + Deposits
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("Paid"), 0, 'L', 0);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount), 0, 'R', 0);
|
||||
|
||||
// Credit note
|
||||
if ($creditnoteamount)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("CreditNotes"), 0, 'L', 0);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($creditnoteamount), 0, 'R', 0);
|
||||
}
|
||||
|
||||
@ -880,9 +880,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$index++;
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle - $creditnoteamount - $depositsamount), $useborder, 'R', 1);
|
||||
|
||||
$resteapayer=0;
|
||||
@ -891,9 +891,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$index++;
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1);
|
||||
|
||||
// Fin
|
||||
@ -932,28 +932,28 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxtva-3, $tab_top+1);
|
||||
$pdf->SetXY($this->posxtva-3, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
|
||||
}
|
||||
|
||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxup-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxup-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqty-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
|
||||
$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
|
||||
if ($this->atleastonediscount)
|
||||
{
|
||||
$pdf->SetXY ($this->posxdiscount-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxdiscount-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
|
||||
}
|
||||
|
||||
@ -961,7 +961,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
|
||||
}
|
||||
$pdf->SetXY ($this->postotalht-1, $tab_top+1);
|
||||
$pdf->SetXY($this->postotalht-1, $tab_top+1);
|
||||
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHT"),'','C');
|
||||
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
|
||||
$pdf->SetFillColor(220,220,220);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY ($this->marges['g'], $tab_top + $this->marges['g'] );
|
||||
$pdf->SetXY($this->marges['g'], $tab_top + $this->marges['g'] );
|
||||
|
||||
$iniY = $pdf->GetY();
|
||||
$curY = $pdf->GetY();
|
||||
@ -223,23 +223,23 @@ class pdf_oursin extends ModelePDFFactures
|
||||
if ($this->franchise!=1)
|
||||
{
|
||||
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->marges['g']+118, $curY);
|
||||
$pdf->SetXY($this->marges['g']+118, $curY);
|
||||
$pdf->MultiCell(12, 3, $vat_rate, 0, 'R');
|
||||
}
|
||||
}
|
||||
|
||||
// Prix unitaire HT avant remise
|
||||
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->marges['g']+132, $curY);
|
||||
$pdf->SetXY($this->marges['g']+132, $curY);
|
||||
$pdf->MultiCell(16, 3, $up_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Quantity
|
||||
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->marges['g']+150, $curY);
|
||||
$pdf->SetXY($this->marges['g']+150, $curY);
|
||||
$pdf->MultiCell(10, 3, $qty, 0, 'R');
|
||||
|
||||
// Remise sur ligne
|
||||
$pdf->SetXY ($this->marges['g']+160, $curY);
|
||||
$pdf->SetXY($this->marges['g']+160, $curY);
|
||||
if ($object->lines[$i]->remise_percent) {
|
||||
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->MultiCell(14, 3, $remise_percent, 0, 'R');
|
||||
@ -247,7 +247,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
|
||||
// Total HT
|
||||
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->marges['g']+168, $curY);
|
||||
$pdf->SetXY($this->marges['g']+168, $curY);
|
||||
$pdf->MultiCell(21, 3, $total_excl_tax, 0, 'R', 0);
|
||||
|
||||
|
||||
@ -327,19 +327,19 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top - 5);
|
||||
$pdf->SetXY($tab3_posx, $tab3_top - 5);
|
||||
$pdf->MultiCell(60, 5, $outputlangs->transnoentities("PaymentsAlreadyDone"), 0, 'L', 0);
|
||||
|
||||
$pdf->Rect($tab3_posx, $tab3_top-1, $tab3_width, $tab3_height);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 4);
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top-1 );
|
||||
$pdf->SetXY($tab3_posx, $tab3_top-1 );
|
||||
$pdf->MultiCell(20, 4, $outputlangs->transnoentities("Payment"), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+21, $tab3_top-1 );
|
||||
$pdf->SetXY($tab3_posx+21, $tab3_top-1 );
|
||||
$pdf->MultiCell(20, 4, $outputlangs->transnoentities("Amount"), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+40, $tab3_top-1 );
|
||||
$pdf->SetXY($tab3_posx+40, $tab3_top-1 );
|
||||
$pdf->MultiCell(20, 4, $outputlangs->transnoentities("Type"), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+58, $tab3_top-1 );
|
||||
$pdf->SetXY($tab3_posx+58, $tab3_top-1 );
|
||||
$pdf->MultiCell(20, 4, $outputlangs->transnoentities("Num"), 0, 'L', 0);
|
||||
|
||||
$y=0;
|
||||
@ -369,13 +369,13 @@ class pdf_oursin extends ModelePDFFactures
|
||||
|
||||
$invoice->fetch($obj->fk_facture_source);
|
||||
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top+$y );
|
||||
$pdf->SetXY($tab3_posx, $tab3_top+$y );
|
||||
$pdf->MultiCell(20, 3, dol_print_date($obj->datef,'day',false,$outputlangs,true), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+21, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
|
||||
$pdf->MultiCell(20, 3, price($obj->amount_ttc), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+40, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+40, $tab3_top+$y);
|
||||
$pdf->MultiCell(20, 3, $text, 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+58, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);
|
||||
$pdf->MultiCell(20, 3, $invoice->ref, 0, 'L', 0);
|
||||
|
||||
$pdf->line($tab3_posx, $tab3_top+$y+3, $tab3_posx+$tab3_width, $tab3_top+$y+3 );
|
||||
@ -406,15 +406,15 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$y+=3;
|
||||
$row = $this->db->fetch_object($resql);
|
||||
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top+$y );
|
||||
$pdf->SetXY($tab3_posx, $tab3_top+$y );
|
||||
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+21, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
|
||||
$pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+40, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+40, $tab3_top+$y);
|
||||
$oper = $outputlangs->getTradFromKey("PaymentTypeShort" . $row->code);
|
||||
|
||||
$pdf->MultiCell(20, 3, $oper, 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+58, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);
|
||||
$pdf->MultiCell(30, 3, $row->num, 0, 'L', 0);
|
||||
|
||||
$pdf->line($tab3_posx, $tab3_top+$y+3, $tab3_posx+$tab3_width, $tab3_top+$y+3 );
|
||||
@ -592,15 +592,15 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$col1x=$this->marges['g']+110; $col2x=$this->marges['g']+164;
|
||||
$lltot = 200; $largcol2 = $lltot - $col2x;
|
||||
|
||||
$pdf->SetXY ($this->marges['g'], $tab2_top + 0);
|
||||
$pdf->SetXY($this->marges['g'], $tab2_top + 0);
|
||||
|
||||
$useborder=0;
|
||||
$index = 0;
|
||||
|
||||
// Total HT
|
||||
$pdf->SetXY ($col1x, $tab2_top + 0);
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 0);
|
||||
$pdf->SetXY ($col2x, $tab2_top + 0);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + $object->remise), 0, 'R', 0);
|
||||
|
||||
// Show VAT by rates and total
|
||||
@ -616,7 +616,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
{
|
||||
@ -626,7 +626,7 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -634,9 +634,9 @@ class pdf_oursin extends ModelePDFFactures
|
||||
if (! $this->atleastoneratenotnull) // If no vat at all
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -645,11 +645,11 @@ class pdf_oursin extends ModelePDFFactures
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetTextColor(22,137,210);
|
||||
$pdf->SetFont('','B', $default_font_size + 1);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), 0, 'L', 0);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), 0, 'R', 0);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
}
|
||||
@ -665,18 +665,18 @@ class pdf_oursin extends ModelePDFFactures
|
||||
|
||||
// Already paid + Deposits
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount), 0, 'R', 0);
|
||||
|
||||
// Credit note
|
||||
if ($creditnoteamount)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("CreditNotes"), 0, 'L', 0);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($creditnoteamount), 0, 'R', 0);
|
||||
}
|
||||
|
||||
@ -686,9 +686,9 @@ class pdf_oursin extends ModelePDFFactures
|
||||
$index++;
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle - $creditnoteamount - $depositsamount), $useborder, 'R', 1);
|
||||
|
||||
$resteapayer=0;
|
||||
@ -696,10 +696,10 @@ class pdf_oursin extends ModelePDFFactures
|
||||
|
||||
$index++;
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), 0, 'L', 0);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), 0, 'R', 0);
|
||||
|
||||
// Fin
|
||||
|
||||
@ -290,7 +290,7 @@ function facture_meta_create($db, $facid, $message="")
|
||||
";
|
||||
}
|
||||
}
|
||||
$fp = fopen ($file,"w");
|
||||
$fp = fopen($file,"w");
|
||||
fputs($fp,$meta);
|
||||
fclose($fp);
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
|
||||
@ -255,7 +255,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$tab_top = 98;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top);
|
||||
$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($fichinter->note_public), 0, 'L');
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
|
||||
@ -184,23 +184,23 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
|
||||
$nexY = $pdf->GetY();
|
||||
|
||||
$pdf->SetXY (10, $curY );
|
||||
$pdf->SetXY(10, $curY );
|
||||
|
||||
$pdf->MultiCell(20, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'C');
|
||||
|
||||
// TODO Field not yet saved in database
|
||||
//$pdf->SetXY (133, $curY );
|
||||
//$pdf->SetXY(133, $curY );
|
||||
//$pdf->MultiCell(10, 5, $object->lines[$i]->tva_tx, 0, 'C');
|
||||
|
||||
$pdf->SetXY (145, $curY );
|
||||
$pdf->SetXY(145, $curY );
|
||||
$pdf->MultiCell(10, 3, $object->lines[$i]->qty_shipped, 0, 'C');
|
||||
|
||||
// TODO Field not yet saved in database
|
||||
//$pdf->SetXY (156, $curY );
|
||||
//$pdf->SetXY(156, $curY );
|
||||
//$pdf->MultiCell(20, 3, price($object->lines[$i]->price), 0, 'R', 0);
|
||||
|
||||
// TODO Field not yet saved in database
|
||||
//$pdf->SetXY (174, $curY );
|
||||
//$pdf->SetXY(174, $curY );
|
||||
//$total = price($object->lines[$i]->price * $object->lines[$i]->qty_shipped);
|
||||
//$pdf->MultiCell(26, 3, $total, 0, 'R', 0);
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top);
|
||||
$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
@ -243,26 +243,26 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
|
||||
/*
|
||||
// TVA
|
||||
$pdf->SetXY ($this->posxtva, $curY);
|
||||
$pdf->SetXY($this->posxtva, $curY);
|
||||
$pdf->MultiCell(10, 4, ($object->lines[$i]->tva_tx < 0 ? '*':'').abs($object->lines[$i]->tva_tx), 0, 'R');
|
||||
|
||||
// Prix unitaire HT avant remise
|
||||
$pdf->SetXY ($this->posxup, $curY);
|
||||
$pdf->SetXY($this->posxup, $curY);
|
||||
$pdf->MultiCell(20, 4, price($object->lines[$i]->subprice), 0, 'R', 0);
|
||||
*/
|
||||
// Quantity
|
||||
$pdf->SetXY ($this->posxqty, $curY);
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
$pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0, 'R');
|
||||
/*
|
||||
// Remise sur ligne
|
||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||
$pdf->SetXY($this->posxdiscount, $curY);
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
{
|
||||
$pdf->MultiCell(14, 3, $object->lines[$i]->remise_percent."%", 0, 'R');
|
||||
}
|
||||
|
||||
// Total HT ligne
|
||||
$pdf->SetXY ($this->postotalht, $curY);
|
||||
$pdf->SetXY($this->postotalht, $curY);
|
||||
$total = price($object->lines[$i]->price * $object->lines[$i]->qty);
|
||||
$pdf->MultiCell(23, 3, $total, 0, 'R', 0);
|
||||
|
||||
@ -438,28 +438,28 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->MultiCell(80,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||
|
||||
// Modif SEB pour avoir une col en plus pour les commentaires clients
|
||||
$pdf->line($this->posxcomm, $tab_top, $this->posxcomm, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxcomm, $tab_top+1);
|
||||
$pdf->SetXY($this->posxcomm, $tab_top+1);
|
||||
$pdf->MultiCell(80,2, $outputlangs->transnoentities("Comments"),'','L');
|
||||
|
||||
// Qty
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqty-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+1);
|
||||
$pdf->MultiCell(30, 2, $outputlangs->transnoentities("QtyShipped"),'','R');
|
||||
|
||||
// Modif Seb cadres signatures
|
||||
$pdf->SetFont('','', $default_font_size);
|
||||
$larg_sign = ($this->page_largeur-$this->marge_gauche-$this->marge_droite)/3;
|
||||
$pdf->Rect($this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25 );
|
||||
$pdf->SetXY ($this->marge_gauche + 2, $tab_top + $tab_height + 5);
|
||||
$pdf->SetXY($this->marge_gauche + 2, $tab_top + $tab_height + 5);
|
||||
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->name).":",'','L');
|
||||
|
||||
$pdf->Rect(2*$larg_sign+$this->marge_gauche, ($tab_top + $tab_height + 3), $larg_sign, 25 );
|
||||
$pdf->SetXY (2*$larg_sign+$this->marge_gauche + 2, $tab_top + $tab_height + 5);
|
||||
$pdf->SetXY(2*$larg_sign+$this->marge_gauche + 2, $tab_top + $tab_height + 5);
|
||||
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("ForCustomer").':','','L');
|
||||
|
||||
}
|
||||
|
||||
@ -344,14 +344,14 @@ class pdf_standard {
|
||||
$this->_Metric = $format['metric'];
|
||||
$this->_Avery_Name = $format['name'];
|
||||
$this->_Avery_Code = $format['code'];
|
||||
$this->_Margin_Left = $this->_Convert_Metric ($format['marginLeft'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Margin_Top = $this->_Convert_Metric ($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_X_Space = $this->_Convert_Metric ($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Y_Space = $this->_Convert_Metric ($format['SpaceY'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Margin_Left = $this->_Convert_Metric($format['marginLeft'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Margin_Top = $this->_Convert_Metric($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_X_Space = $this->_Convert_Metric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Y_Space = $this->_Convert_Metric($format['SpaceY'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_X_Number = $format['NX'];
|
||||
$this->_Y_Number = $format['NY'];
|
||||
$this->_Width = $this->_Convert_Metric ($format['width'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Height = $this->_Convert_Metric ($format['height'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Width = $this->_Convert_Metric($format['width'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Height = $this->_Convert_Metric($format['height'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->Set_Char_Size($pdf, $format['font-size']);
|
||||
}
|
||||
|
||||
|
||||
@ -323,14 +323,14 @@ class pdf_standardlabel {
|
||||
$this->_Metric = $format['metric'];
|
||||
$this->_Avery_Name = $format['name'];
|
||||
$this->_Avery_Code = $format['code'];
|
||||
$this->_Margin_Left = $this->_Convert_Metric ($format['marginLeft'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Margin_Top = $this->_Convert_Metric ($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_X_Space = $this->_Convert_Metric ($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Y_Space = $this->_Convert_Metric ($format['SpaceY'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Margin_Left = $this->_Convert_Metric($format['marginLeft'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Margin_Top = $this->_Convert_Metric($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_X_Space = $this->_Convert_Metric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Y_Space = $this->_Convert_Metric($format['SpaceY'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_X_Number = $format['NX'];
|
||||
$this->_Y_Number = $format['NY'];
|
||||
$this->_Width = $this->_Convert_Metric ($format['width'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Height = $this->_Convert_Metric ($format['height'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Width = $this->_Convert_Metric($format['width'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->_Height = $this->_Convert_Metric($format['height'], $this->_Metric, $this->_Metric_Doc);
|
||||
$this->Set_Char_Size($pdf, $format['font-size']);
|
||||
}
|
||||
|
||||
|
||||
@ -172,7 +172,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
if (! empty($object->note_public))
|
||||
{
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetXY ($this->posxref-1, $tab_top-2);
|
||||
$pdf->SetXY($this->posxref-1, $tab_top-2);
|
||||
$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-($tab_top-2);
|
||||
@ -309,7 +309,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
$pdf->SetFont('','', $default_font_size);
|
||||
|
||||
$pdf->SetXY ($this->posxref-1, $tab_top+2);
|
||||
$pdf->SetXY($this->posxref-1, $tab_top+2);
|
||||
$pdf->MultiCell(80,2, $outputlangs->transnoentities("Tasks"),'','L');
|
||||
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top);
|
||||
$pdf->MultiCell(190, 4, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
@ -253,22 +253,22 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxtva, $curY);
|
||||
$pdf->SetXY($this->posxtva, $curY);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-1, 4, $vat_rate, 0, 'R');
|
||||
}
|
||||
|
||||
// Prix unitaire HT avant remise
|
||||
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxup, $curY);
|
||||
$pdf->SetXY($this->posxup, $curY);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1, 4, $up_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Quantity
|
||||
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxqty, $curY);
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 4, $qty, 0, 'R');
|
||||
|
||||
// Remise sur ligne
|
||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||
$pdf->SetXY($this->posxdiscount, $curY);
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
{
|
||||
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
@ -277,7 +277,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
// Total HT ligne
|
||||
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->postotalht, $curY);
|
||||
$pdf->SetXY($this->postotalht, $curY);
|
||||
$pdf->MultiCell(26, 4, $total_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
@ -599,10 +599,10 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
// Total HT
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
$pdf->SetXY ($col1x, $tab2_top + 0);
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + 0);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + $object->remise), 0, 'R', 1);
|
||||
|
||||
$index = 0;
|
||||
@ -620,7 +620,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -632,7 +632,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -640,19 +640,19 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
if (! $this->atleastoneratenotnull) // If not vat at all
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on' && $object->total_localtax1>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1);
|
||||
}
|
||||
|
||||
@ -660,9 +660,9 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on' && $object->total_localtax2>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -678,7 +678,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -690,7 +690,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -706,7 +706,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -718,7 +718,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
|
||||
}
|
||||
@ -733,12 +733,12 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
}
|
||||
@ -747,10 +747,10 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
{
|
||||
$index++;
|
||||
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0);
|
||||
|
||||
$resteapayer = $object->total_ttc - $deja_regle;
|
||||
@ -761,10 +761,10 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$index++;
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle), $useborder, 'R', 1);
|
||||
|
||||
$resteapayer=0;
|
||||
@ -773,10 +773,10 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
$index++;
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1);
|
||||
|
||||
// Fin
|
||||
@ -814,28 +814,28 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('','',$default_font_size - 1);
|
||||
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxtva-3, $tab_top+1);
|
||||
$pdf->SetXY($this->posxtva-3, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
|
||||
}
|
||||
|
||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxup-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxup-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqty-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
|
||||
$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
|
||||
if ($this->atleastonediscount)
|
||||
{
|
||||
$pdf->SetXY ($this->posxdiscount-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxdiscount-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
|
||||
}
|
||||
|
||||
@ -843,7 +843,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
{
|
||||
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
|
||||
}
|
||||
$pdf->SetXY ($this->postotalht-1, $tab_top+1);
|
||||
$pdf->SetXY($this->postotalht-1, $tab_top+1);
|
||||
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHT"),'','C');
|
||||
|
||||
}
|
||||
|
||||
@ -214,7 +214,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top);
|
||||
$pdf->MultiCell(190, 4, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
@ -253,22 +253,22 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxtva, $curY);
|
||||
$pdf->SetXY($this->posxtva, $curY);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-1, 4, $vat_rate, 0, 'R');
|
||||
}
|
||||
|
||||
// Prix unitaire HT avant remise
|
||||
$up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxup, $curY);
|
||||
$pdf->SetXY($this->posxup, $curY);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1, 4, $up_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Quantity
|
||||
$qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->posxqty, $curY);
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 4, $qty, 0, 'R');
|
||||
|
||||
// Remise sur ligne
|
||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||
$pdf->SetXY($this->posxdiscount, $curY);
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
{
|
||||
$remise_percent = pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
@ -277,7 +277,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
|
||||
// Total HT ligne
|
||||
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails, $hookmanager);
|
||||
$pdf->SetXY ($this->postotalht, $curY);
|
||||
$pdf->SetXY($this->postotalht, $curY);
|
||||
$pdf->MultiCell(26, 4, $total_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
@ -599,10 +599,10 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
|
||||
// Total HT
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
$pdf->SetXY ($col1x, $tab2_top + 0);
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + 0);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + $object->remise), 0, 'R', 1);
|
||||
|
||||
$index = 0;
|
||||
@ -620,7 +620,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -632,7 +632,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -640,19 +640,19 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
if (! $this->atleastoneratenotnull) // If not vat at all
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on' && $object->total_localtax1>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1);
|
||||
}
|
||||
|
||||
@ -660,9 +660,9 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on' && $object->total_localtax2>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -678,7 +678,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -690,7 +690,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -706,7 +706,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -718,7 +718,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
|
||||
}
|
||||
@ -733,12 +733,12 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFillColor(224,224,124);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
}
|
||||
@ -747,10 +747,10 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
{
|
||||
$index++;
|
||||
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0);
|
||||
|
||||
$resteapayer = $object->total_ttc - $deja_regle;
|
||||
@ -761,10 +761,10 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$index++;
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle), $useborder, 'R', 1);
|
||||
|
||||
$resteapayer=0;
|
||||
@ -773,10 +773,10 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
$index++;
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1);
|
||||
|
||||
// Fin
|
||||
@ -814,28 +814,28 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
|
||||
$pdf->SetFont('','',$default_font_size - 1);
|
||||
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
|
||||
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxtva-3, $tab_top+1);
|
||||
$pdf->SetXY($this->posxtva-3, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
|
||||
}
|
||||
|
||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxup-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxup-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqty-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
|
||||
$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
|
||||
if ($this->atleastonediscount)
|
||||
{
|
||||
$pdf->SetXY ($this->posxdiscount-1, $tab_top+1);
|
||||
$pdf->SetXY($this->posxdiscount-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
|
||||
}
|
||||
|
||||
@ -843,7 +843,7 @@ class pdf_propale_jaune extends ModelePDFPropales
|
||||
{
|
||||
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
|
||||
}
|
||||
$pdf->SetXY ($this->postotalht-1, $tab_top+1);
|
||||
$pdf->SetXY($this->postotalht-1, $tab_top+1);
|
||||
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHT"),'','C');
|
||||
|
||||
}
|
||||
|
||||
@ -227,31 +227,31 @@ class pdf_paiement
|
||||
|
||||
$pdf->SetFont('','',10);
|
||||
|
||||
$pdf->SetXY (11, 16);
|
||||
$pdf->SetXY(11, 16);
|
||||
$pdf->MultiCell(80, 2, $outputlangs->transnoentities("DateBuild")." : ".dol_print_date(time(),"day",false,$outputlangs,true), 0, 'L');
|
||||
|
||||
$pdf->SetXY (11, 22);
|
||||
$pdf->SetXY(11, 22);
|
||||
$pdf->MultiCell(80, 2, $outputlangs->transnoentities("Page")." : ".$page, 0, 'L');
|
||||
|
||||
// Title line
|
||||
|
||||
$pdf->SetXY (11, $this->tab_top+2);
|
||||
$pdf->SetXY(11, $this->tab_top+2);
|
||||
$pdf->MultiCell(30, 2, 'Date');
|
||||
|
||||
$pdf->line(40, $this->tab_top, 40, $this->tab_top + $this->tab_height + 10);
|
||||
$pdf->SetXY (42, $this->tab_top+2);
|
||||
$pdf->SetXY(42, $this->tab_top+2);
|
||||
$pdf->MultiCell(40, 2, $outputlangs->transnoentities("PaymentMode"), 0, 'L');
|
||||
|
||||
$pdf->line(80, $this->tab_top, 80, $this->tab_top + $this->tab_height + 10);
|
||||
$pdf->SetXY (82, $this->tab_top+2);
|
||||
$pdf->SetXY(82, $this->tab_top+2);
|
||||
$pdf->MultiCell(40, 2, $outputlangs->transnoentities("Invoice"), 0, 'L');
|
||||
|
||||
$pdf->line(120, $this->tab_top, 120, $this->tab_top + $this->tab_height + 10);
|
||||
$pdf->SetXY (122, $this->tab_top+2);
|
||||
$pdf->SetXY(122, $this->tab_top+2);
|
||||
$pdf->MultiCell(40, 2, $outputlangs->transnoentities("AmountInvoice"), 0, 'L');
|
||||
|
||||
$pdf->line(160, $this->tab_top, 160, $this->tab_top + $this->tab_height + 10);
|
||||
$pdf->SetXY (162, $this->tab_top+2);
|
||||
$pdf->SetXY(162, $this->tab_top+2);
|
||||
$pdf->MultiCell(40, 2, $outputlangs->transnoentities("AmountPayment"), 0, 'L');
|
||||
|
||||
$pdf->line(10, $this->tab_top + 10, 200, $this->tab_top + 10 );
|
||||
@ -284,28 +284,28 @@ class pdf_paiement
|
||||
$yp = 0;
|
||||
}
|
||||
|
||||
$pdf->SetXY (10, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(10, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(30, $this->line_height, $lines[$j][1], 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY (40, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(40, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(80, $this->line_height, $lines[$j][2].' '.$lines[$j][3], 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY (120, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(120, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, '', 0, 'R', 1);
|
||||
|
||||
$pdf->SetXY (160, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(160, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][4], 0, 'R', 1);
|
||||
$yp = $yp + 5;
|
||||
}
|
||||
|
||||
// Invoice number
|
||||
$pdf->SetXY (80, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(80, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][0], 0, 'L', 0);
|
||||
|
||||
$pdf->SetXY (120, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(120, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][5], 0, 'R', 0);
|
||||
|
||||
$pdf->SetXY (160, $this->tab_top + 10 + $yp);
|
||||
$pdf->SetXY(160, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell(40, $this->line_height, $lines[$j][6], 0, 'R', 0);
|
||||
$yp = $yp + 5;
|
||||
|
||||
|
||||
@ -220,7 +220,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top);
|
||||
$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
@ -260,20 +260,20 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs);
|
||||
$pdf->SetXY ($this->posxtva, $curY);
|
||||
$pdf->SetXY($this->posxtva, $curY);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R');
|
||||
}
|
||||
|
||||
// Unit price before discount
|
||||
$pdf->SetXY ($this->posxup, $curY);
|
||||
$pdf->SetXY($this->posxup, $curY);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1, 3, price($object->lines[$i]->pu_ht), 0, 'R', 0);
|
||||
|
||||
// Quantity
|
||||
$pdf->SetXY ($this->posxqty, $curY);
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $object->lines[$i]->qty, 0, 'R');
|
||||
|
||||
// Discount on line
|
||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||
$pdf->SetXY($this->posxdiscount, $curY);
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
{
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $object->lines[$i]->remise_percent."%", 0, 'R');
|
||||
@ -281,7 +281,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
|
||||
// Total HT line
|
||||
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs);
|
||||
$pdf->SetXY ($this->postotalht, $curY);
|
||||
$pdf->SetXY($this->postotalht, $curY);
|
||||
$pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
@ -403,7 +403,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$tab2_hl = 4;
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
|
||||
$pdf->SetXY ($this->marge_gauche, $tab2_top + 0);
|
||||
$pdf->SetXY($this->marge_gauche, $tab2_top + 0);
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->pays_code == 'FR' && $this->franchise == 1)
|
||||
{
|
||||
@ -415,9 +415,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
|
||||
// Total HT
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
$pdf->SetXY ($col1x, $tab2_top + 0);
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + 0);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + $object->remise), 0, 'R', 1);
|
||||
|
||||
// Affichage des totaux de TVA par taux (conformement a reglementation)
|
||||
@ -430,7 +430,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
|
||||
@ -444,25 +444,25 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
if (! $this->atleastoneratenotnull) // If not vat at all
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on' && $object->total_localtax1>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1);
|
||||
}
|
||||
|
||||
@ -470,9 +470,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on' && $object->total_localtax2>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -488,7 +488,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -500,7 +500,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -516,7 +516,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -528,7 +528,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -538,12 +538,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$useborder=0;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@ -552,19 +552,19 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
{
|
||||
$index++;
|
||||
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0);
|
||||
|
||||
$index++;
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
//$pdf->SetFont('','B', $default_font_size - 1);
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle), $useborder, 'R', 1);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@ -600,29 +600,29 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top+2);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top+2);
|
||||
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxtva-3, $tab_top+2);
|
||||
$pdf->SetXY($this->posxtva-3, $tab_top+2);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
|
||||
}
|
||||
|
||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxup-1, $tab_top+2);
|
||||
$pdf->SetXY($this->posxup-1, $tab_top+2);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqty-1, $tab_top+2);
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+2);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
|
||||
$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
|
||||
|
||||
if ($this->atleastonediscount)
|
||||
{
|
||||
$pdf->SetXY ($this->posxdiscount-1, $tab_top+2);
|
||||
$pdf->SetXY($this->posxdiscount-1, $tab_top+2);
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
|
||||
}
|
||||
|
||||
@ -630,7 +630,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
{
|
||||
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
|
||||
}
|
||||
$pdf->SetXY ($this->postotalht-1, $tab_top+2);
|
||||
$pdf->SetXY($this->postotalht-1, $tab_top+2);
|
||||
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHTShort"),'','C');
|
||||
|
||||
}
|
||||
@ -653,19 +653,19 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 2);
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top - 5);
|
||||
$pdf->SetXY($tab3_posx, $tab3_top - 5);
|
||||
$pdf->MultiCell(60, 5, $outputlangs->transnoentities("PaymentsAlreadyDone"), 0, 'L', 0);
|
||||
|
||||
$pdf->line($tab3_posx, $tab3_top-1+$tab3_height, $tab3_posx+$tab3_width, $tab3_top-1+$tab3_height);
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 4);
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top );
|
||||
$pdf->SetXY($tab3_posx, $tab3_top );
|
||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Payment"), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+21, $tab3_top );
|
||||
$pdf->SetXY($tab3_posx+21, $tab3_top );
|
||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Amount"), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+40, $tab3_top );
|
||||
$pdf->SetXY($tab3_posx+40, $tab3_top );
|
||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Type"), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+58, $tab3_top );
|
||||
$pdf->SetXY($tab3_posx+58, $tab3_top );
|
||||
$pdf->MultiCell(20, 3, $outputlangs->transnoentities("Num"), 0, 'L', 0);
|
||||
|
||||
$y=0;
|
||||
@ -688,15 +688,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$y+=3;
|
||||
$row = $this->db->fetch_object($resql);
|
||||
|
||||
$pdf->SetXY ($tab3_posx, $tab3_top+$y );
|
||||
$pdf->SetXY($tab3_posx, $tab3_top+$y );
|
||||
$pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+21, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+21, $tab3_top+$y);
|
||||
$pdf->MultiCell(20, 3, price($row->amount), 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+40, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+40, $tab3_top+$y);
|
||||
$oper = $outputlangs->getTradFromKey("PaymentTypeShort" . $row->code);
|
||||
|
||||
$pdf->MultiCell(20, 3, $oper, 0, 'L', 0);
|
||||
$pdf->SetXY ($tab3_posx+58, $tab3_top+$y);
|
||||
$pdf->SetXY($tab3_posx+58, $tab3_top+$y);
|
||||
$pdf->MultiCell(30, 3, $row->num, 0, 'L', 0);
|
||||
|
||||
$pdf->line($tab3_posx, $tab3_top+$y+3, $tab3_posx+$tab3_width, $tab3_top+$y+3 );
|
||||
|
||||
@ -223,7 +223,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$tab_top = 88;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top);
|
||||
$pdf->MultiCell(190, 3, $outputlangs->convToOutputCharset($object->note_public), 0, 'L');
|
||||
$nexY = $pdf->GetY();
|
||||
$height_note=$nexY-$tab_top;
|
||||
@ -261,20 +261,20 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$vat_rate = pdf_getlinevatrate($object, $i, $outputlangs);
|
||||
$pdf->SetXY ($this->posxtva, $curY);
|
||||
$pdf->SetXY($this->posxtva, $curY);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R');
|
||||
}
|
||||
|
||||
// Unit price before discount
|
||||
$pdf->SetXY ($this->posxup, $curY);
|
||||
$pdf->SetXY($this->posxup, $curY);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1, 3, price($object->lines[$i]->subprice), 0, 'R', 0);
|
||||
|
||||
// Quantity
|
||||
$pdf->SetXY ($this->posxqty, $curY);
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $object->lines[$i]->qty, 0, 'R');
|
||||
|
||||
// Discount on line
|
||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||
$pdf->SetXY($this->posxdiscount, $curY);
|
||||
if ($object->lines[$i]->remise_percent)
|
||||
{
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, $object->lines[$i]->remise_percent."%", 0, 'R');
|
||||
@ -282,7 +282,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
// Total HT line
|
||||
$total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs);
|
||||
$pdf->SetXY ($this->postotalht, $curY);
|
||||
$pdf->SetXY($this->postotalht, $curY);
|
||||
$pdf->MultiCell(26, 3, $total_excl_tax, 0, 'R', 0);
|
||||
|
||||
// Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva
|
||||
@ -404,7 +404,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$tab2_hl = 4;
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
|
||||
$pdf->SetXY ($this->marge_gauche, $tab2_top + 0);
|
||||
$pdf->SetXY($this->marge_gauche, $tab2_top + 0);
|
||||
|
||||
// If France, show VAT mention if not applicable
|
||||
if ($this->emetteur->pays_code == 'FR' && $this->franchise == 1)
|
||||
@ -417,10 +417,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
// Total HT
|
||||
$pdf->SetFillColor(255,255,255);
|
||||
$pdf->SetXY ($col1x, $tab2_top + 0);
|
||||
$pdf->SetXY($col1x, $tab2_top + 0);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + 0);
|
||||
$pdf->SetXY($col2x, $tab2_top + 0);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + $object->remise), 0, 'R', 1);
|
||||
|
||||
// Affichage des totaux de TVA par taux (conformement a reglementation)
|
||||
@ -433,7 +433,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
|
||||
@ -447,26 +447,26 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
if (! $this->atleastoneratenotnull) // If not vat at all
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_tva), 0, 'R', 1);
|
||||
|
||||
// Total LocalTax1
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on' && $object->total_localtax1>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT1".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax1), $useborder, 'R', 1);
|
||||
}
|
||||
|
||||
@ -474,9 +474,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on' && $object->total_localtax2>0)
|
||||
{
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalLT2".$mysoc->pays_code), $useborder, 'L', 1);
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_localtax2), $useborder, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -492,7 +492,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -504,7 +504,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -520,7 +520,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
//$this->atleastoneratenotnull++;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
|
||||
$tvacompl='';
|
||||
if (preg_match('/\*/',$tvakey))
|
||||
@ -532,7 +532,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
@ -542,12 +542,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$useborder=0;
|
||||
|
||||
$index++;
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->SetFillColor(224,224,224);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@ -556,19 +556,19 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
{
|
||||
$index++;
|
||||
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0);
|
||||
|
||||
$index++;
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
//$pdf->SetFont('','B', $default_font_size - 1);
|
||||
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1);
|
||||
|
||||
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle), $useborder, 'R', 1);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
@ -604,28 +604,28 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
|
||||
$pdf->SetXY ($this->posxdesc-1, $tab_top+2);
|
||||
$pdf->SetXY($this->posxdesc-1, $tab_top+2);
|
||||
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
|
||||
|
||||
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
|
||||
{
|
||||
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxtva-3, $tab_top+2);
|
||||
$pdf->SetXY($this->posxtva-3, $tab_top+2);
|
||||
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
|
||||
}
|
||||
|
||||
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxup-1, $tab_top+2);
|
||||
$pdf->SetXY($this->posxup-1, $tab_top+2);
|
||||
$pdf->MultiCell($this->posxqty-$this->posxup-1,2, $outputlangs->transnoentities("PriceUHT"),'','C');
|
||||
|
||||
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
|
||||
$pdf->SetXY ($this->posxqty-1, $tab_top+2);
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+2);
|
||||
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
|
||||
|
||||
$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
|
||||
if ($this->atleastonediscount)
|
||||
{
|
||||
$pdf->SetXY ($this->posxdiscount-1, $tab_top+2);
|
||||
$pdf->SetXY($this->posxdiscount-1, $tab_top+2);
|
||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
|
||||
}
|
||||
|
||||
@ -633,7 +633,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
{
|
||||
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
|
||||
}
|
||||
$pdf->SetXY ($this->postotalht-1, $tab_top+2);
|
||||
$pdf->SetXY($this->postotalht-1, $tab_top+2);
|
||||
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHTShort"),'','C');
|
||||
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ if ($action == "set")
|
||||
$fp = fopen($dir.$file,"r");
|
||||
if ($fp)
|
||||
{
|
||||
while (!feof ($fp))
|
||||
while (!feof($fp))
|
||||
{
|
||||
$buf = fgets($fp, 4096);
|
||||
if (substr($buf, 0, 2) <> '--')
|
||||
@ -286,7 +286,7 @@ if ($action == "set")
|
||||
$fp = fopen($dir.$file,"r");
|
||||
if ($fp)
|
||||
{
|
||||
while (!feof ($fp))
|
||||
while (!feof($fp))
|
||||
{
|
||||
$buf = fgets($fp, 4096);
|
||||
|
||||
@ -407,7 +407,7 @@ if ($action == "set")
|
||||
if ($fp)
|
||||
{
|
||||
$buffer='';
|
||||
while (!feof ($fp))
|
||||
while (!feof($fp))
|
||||
{
|
||||
$buf = fgets($fp, 4096);
|
||||
if (substr($buf, 0, 2) <> '--')
|
||||
@ -513,7 +513,7 @@ if ($action == "set")
|
||||
$sizeofgroup=1; // Grouping request to have 1 query for several requests does not works with mysql, so we use 1.
|
||||
|
||||
// Load all requests
|
||||
while (!feof ($fp))
|
||||
while (!feof($fp))
|
||||
{
|
||||
$buffer = fgets($fp, 4096);
|
||||
$buffer = trim($buffer);
|
||||
|
||||
@ -367,7 +367,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
|
||||
{
|
||||
global $mysoc, $conf;
|
||||
|
||||
$pdf->SetXY ($curx, $cury);
|
||||
$pdf->SetXY($curx, $cury);
|
||||
|
||||
if (empty($onlynumber))
|
||||
{
|
||||
@ -389,7 +389,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
|
||||
if (empty($onlynumber))
|
||||
{
|
||||
$pdf->SetFont('','',6);
|
||||
$pdf->SetXY ($curx, $cury);
|
||||
$pdf->SetXY($curx, $cury);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Bank").': ' . $outputlangs->convToOutputCharset($account->bank), 0, 'L', 0);
|
||||
$cury+=3;
|
||||
}
|
||||
@ -413,9 +413,9 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
|
||||
{
|
||||
// Bank code
|
||||
$tmplength=18;
|
||||
$pdf->SetXY ($curx, $cury+5);
|
||||
$pdf->SetXY($curx, $cury+5);
|
||||
$pdf->SetFont('','',8);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->code_banque), 0, 'C', 0);
|
||||
$pdf->SetXY ($curx, $cury+1);
|
||||
$pdf->SetXY($curx, $cury+1);
|
||||
$curx+=$tmplength;
|
||||
$pdf->SetFont('','B',6);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankCode"), 0, 'C', 0);
|
||||
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8 );
|
||||
@ -424,9 +424,9 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
|
||||
{
|
||||
// Desk
|
||||
$tmplength=18;
|
||||
$pdf->SetXY ($curx, $cury+5);
|
||||
$pdf->SetXY($curx, $cury+5);
|
||||
$pdf->SetFont('','',8);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->code_guichet), 0, 'C', 0);
|
||||
$pdf->SetXY ($curx, $cury+1);
|
||||
$pdf->SetXY($curx, $cury+1);
|
||||
$curx+=$tmplength;
|
||||
$pdf->SetFont('','B',6);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("DeskCode"), 0, 'C', 0);
|
||||
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8 );
|
||||
@ -435,9 +435,9 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
|
||||
{
|
||||
// Number
|
||||
$tmplength=24;
|
||||
$pdf->SetXY ($curx, $cury+5);
|
||||
$pdf->SetXY($curx, $cury+5);
|
||||
$pdf->SetFont('','',8);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->number), 0, 'C', 0);
|
||||
$pdf->SetXY ($curx, $cury+1);
|
||||
$pdf->SetXY($curx, $cury+1);
|
||||
$curx+=$tmplength;
|
||||
$pdf->SetFont('','B',6);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankAccountNumber"), 0, 'C', 0);
|
||||
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8 );
|
||||
@ -446,9 +446,9 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
|
||||
{
|
||||
// Key
|
||||
$tmplength=13;
|
||||
$pdf->SetXY ($curx, $cury+5);
|
||||
$pdf->SetXY($curx, $cury+5);
|
||||
$pdf->SetFont('','',8);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->cle_rib), 0, 'C', 0);
|
||||
$pdf->SetXY ($curx, $cury+1);
|
||||
$pdf->SetXY($curx, $cury+1);
|
||||
$curx+=$tmplength;
|
||||
$pdf->SetFont('','B',6);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankAccountNumberKey"), 0, 'C', 0);
|
||||
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8 );
|
||||
@ -461,12 +461,12 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
|
||||
else
|
||||
{
|
||||
$pdf->SetFont('','B',6);
|
||||
$pdf->SetXY ($curx, $cury);
|
||||
$pdf->SetXY($curx, $cury);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("Bank").': ' . $outputlangs->convToOutputCharset($account->bank), 0, 'L', 0);
|
||||
$cury+=3;
|
||||
|
||||
$pdf->SetFont('','B',6);
|
||||
$pdf->SetXY ($curx, $cury);
|
||||
$pdf->SetXY($curx, $cury);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("BankAccountNumber").': ' . $outputlangs->convToOutputCharset($account->number), 0, 'L', 0);
|
||||
$cury+=3;
|
||||
}
|
||||
@ -481,7 +481,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
|
||||
|
||||
if (empty($onlynumber) && ! empty($account->domiciliation))
|
||||
{
|
||||
$pdf->SetXY ($curx, $cury);
|
||||
$pdf->SetXY($curx, $cury);
|
||||
$val=$outputlangs->transnoentities("Residence").': ' . $outputlangs->convToOutputCharset($account->domiciliation);
|
||||
$pdf->MultiCell(90, 3, $val, 0, 'L', 0);
|
||||
$nboflines=dol_nboflines_bis($val,120);
|
||||
@ -490,9 +490,9 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0)
|
||||
}
|
||||
else if (! $usedetailedbban) $cury+=1;
|
||||
|
||||
$pdf->SetXY ($curx, $cury);
|
||||
$pdf->SetXY($curx, $cury);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities($ibankey).': ' . $outputlangs->convToOutputCharset($account->iban), 0, 'L', 0);
|
||||
$pdf->SetXY ($curx, $cury+3);
|
||||
$pdf->SetXY($curx, $cury+3);
|
||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities($bickey).': ' . $outputlangs->convToOutputCharset($account->bic), 0, 'L', 0);
|
||||
|
||||
return $pdf->getY();
|
||||
|
||||
@ -2104,7 +2104,7 @@ class Product extends CommonObject
|
||||
if ($res)
|
||||
{
|
||||
$prods = array ();
|
||||
while ($record = $this->db->fetch_array ($res))
|
||||
while ($record = $this->db->fetch_array($res))
|
||||
{
|
||||
$prods[$record['id']]['id'] = $record['rowid'];
|
||||
$prods[$record['id']]['label'] = $this->db->escape($record['label']);
|
||||
@ -2138,7 +2138,7 @@ class Product extends CommonObject
|
||||
if ($res)
|
||||
{
|
||||
$prods = array ();
|
||||
while ($record = $this->db->fetch_array ($res))
|
||||
while ($record = $this->db->fetch_array($res))
|
||||
{
|
||||
$prods[$this->db->escape($record['label'])] = array(0=>$record['id']);
|
||||
}
|
||||
|
||||
@ -194,7 +194,7 @@ if (GETPOST('action') == 'builddoc' && $user->rights->projet->creer)
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?id='.$project->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?id='.$project->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
@ -452,7 +452,7 @@ if (empty($reshook))
|
||||
}
|
||||
else
|
||||
{
|
||||
Header ('Location: '.$_SERVER["PHP_SELF"].'?socid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
Header('Location: '.$_SERVER["PHP_SELF"].'?socid='.$object->id.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc'));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user