mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-24 18:31:29 +01:00
Fix: Translation of Offered on PDF
This commit is contained in:
@@ -1379,7 +1379,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// Remise %
|
// Remise %
|
||||||
if ($objp->remise_percent > 0 && $objp->special_code != 3)
|
if ($objp->remise_percent > 0 && $objp->special_code != 3)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.dol_print_reduction($objp->remise_percent)."</td>\n";
|
print '<td align="right">'.dol_print_reduction($objp->remise_percent,$langs)."</td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1137,7 +1137,7 @@ else
|
|||||||
/* */
|
/* */
|
||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
$now=gmmktime();
|
$now=gmmktime();
|
||||||
|
|
||||||
$id = $_GET['id'];
|
$id = $_GET['id'];
|
||||||
$ref= $_GET['ref'];
|
$ref= $_GET['ref'];
|
||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
@@ -1559,7 +1559,7 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
if ($objp->remise_percent > 0)
|
if ($objp->remise_percent > 0)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.dol_print_reduction($objp->remise_percent).'</td>';
|
print '<td align="right">'.dol_print_reduction($objp->remise_percent,$langs).'</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2053,7 +2053,7 @@ else
|
|||||||
include_once(DOL_DOCUMENT_ROOT.'/html.formactions.class.php');
|
include_once(DOL_DOCUMENT_ROOT.'/html.formactions.class.php');
|
||||||
$formactions=new FormActions($db);
|
$formactions=new FormActions($db);
|
||||||
$somethingshown=$formactions->showactions($commande,'order',$socid);
|
$somethingshown=$formactions->showactions($commande,'order',$socid);
|
||||||
|
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2640,7 +2640,7 @@ else
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
if ($objp->remise_percent > 0)
|
if ($objp->remise_percent > 0)
|
||||||
{
|
{
|
||||||
print '<td align="right">'.dol_print_reduction($objp->remise_percent)."</td>\n";
|
print '<td align="right">'.dol_print_reduction($objp->remise_percent,$langs)."</td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -564,7 +564,7 @@ if ($id > 0)
|
|||||||
$langs->trans("MakeOrder"),$langs->trans("ConfirmMakeOrder",dolibarr_print_date($date_com,'day')),"confirm_commande");
|
$langs->trans("MakeOrder"),$langs->trans("ConfirmMakeOrder",dolibarr_print_date($date_com,'day')),"confirm_commande");
|
||||||
print '<br />';
|
print '<br />';
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Confirmation de la suppression d'une ligne produit
|
* Confirmation de la suppression d'une ligne produit
|
||||||
*/
|
*/
|
||||||
@@ -724,7 +724,7 @@ if ($id > 0)
|
|||||||
print '<td align="right" nowrap="nowrap">'.$commandline->qty.'</td>';
|
print '<td align="right" nowrap="nowrap">'.$commandline->qty.'</td>';
|
||||||
if ($commandline->remise_percent > 0)
|
if ($commandline->remise_percent > 0)
|
||||||
{
|
{
|
||||||
print '<td align="right" nowrap="nowrap">'.dol_print_reduction($commandline->remise_percent)."</td>\n";
|
print '<td align="right" nowrap="nowrap">'.dol_print_reduction($commandline->remise_percent,$langs)."</td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -864,7 +864,7 @@ if ($id > 0)
|
|||||||
print '<td align="right">'.$langs->trans('ReductionShort').'</td>';
|
print '<td align="right">'.$langs->trans('ReductionShort').'</td>';
|
||||||
print '<td colspan="4"> </td>';
|
print '<td colspan="4"> </td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print '<form id="addpredefinedproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'#add" method="post">';
|
print '<form id="addpredefinedproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$commande->id.'#add" method="post">';
|
||||||
print '<input type="hidden" name="id" value="'.$id.'">';
|
print '<input type="hidden" name="id" value="'.$id.'">';
|
||||||
print '<input type="hidden" name="action" value="addligne">';
|
print '<input type="hidden" name="action" value="addligne">';
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||||
if ($com->lignes[$i]->remise_percent)
|
if ($com->lignes[$i]->remise_percent)
|
||||||
{
|
{
|
||||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, dol_print_reduction($com->lignes[$i]->remise_percent), 0, 'R');
|
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 3, dol_print_reduction($com->lignes[$i]->remise_percent,$outputlangs), 0, 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total HT ligne
|
// Total HT ligne
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "crabe";
|
$this->name = "crabe";
|
||||||
$this->description = $langs->trans('PDFCrabeDescription');
|
$this->description = $langs->trans('PDFCrabeDescription');
|
||||||
|
|
||||||
// Dimension page pour format A4
|
// Dimension page pour format A4
|
||||||
$this->type = 'pdf';
|
$this->type = 'pdf';
|
||||||
$this->page_largeur = 210;
|
$this->page_largeur = 210;
|
||||||
@@ -78,7 +78,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$this->option_credit_note = 1; // G<>re les avoirs
|
$this->option_credit_note = 1; // G<>re les avoirs
|
||||||
$this->option_freetext = 1; // Support add of a personalised text
|
$this->option_freetext = 1; // Support add of a personalised text
|
||||||
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
||||||
|
|
||||||
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
|
if (defined("FACTURE_TVAOPTION") && FACTURE_TVAOPTION == 'franchise')
|
||||||
$this->franchise=1;
|
$this->franchise=1;
|
||||||
|
|
||||||
@@ -113,13 +113,13 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||||
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
// Force output charset to ISO, because, FPDF expect text encoded in ISO
|
||||||
$outputlangs->charset_output='ISO-8859-1';
|
$outputlangs->charset_output='ISO-8859-1';
|
||||||
|
|
||||||
$outputlangs->load("main");
|
$outputlangs->load("main");
|
||||||
$outputlangs->load("dict");
|
$outputlangs->load("dict");
|
||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
$outputlangs->load("bills");
|
$outputlangs->load("bills");
|
||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
$outputlangs->setPhpLang();
|
$outputlangs->setPhpLang();
|
||||||
|
|
||||||
if ($conf->facture->dir_output)
|
if ($conf->facture->dir_output)
|
||||||
@@ -131,7 +131,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$fac = new Facture($this->db,"",$id);
|
$fac = new Facture($this->db,"",$id);
|
||||||
$ret=$fac->fetch($id);
|
$ret=$fac->fetch($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$deja_regle = $fac->getSommePaiement();
|
$deja_regle = $fac->getSommePaiement();
|
||||||
$amount_credit_not_included = $fac->getSommeCreditNote();
|
$amount_credit_not_included = $fac->getSommeCreditNote();
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
$pdf=new FPDI('P','mm',$this->format);
|
$pdf=new FPDI('P','mm',$this->format);
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->Open();
|
$pdf->Open();
|
||||||
$pdf->AddPage();
|
$pdf->AddPage();
|
||||||
|
|
||||||
@@ -237,13 +237,13 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
for ($i = 0 ; $i < $nblignes ; $i++)
|
for ($i = 0 ; $i < $nblignes ; $i++)
|
||||||
{
|
{
|
||||||
$curY = $nexY;
|
$curY = $nexY;
|
||||||
|
|
||||||
// Description de la ligne produit
|
// Description de la ligne produit
|
||||||
$libelleproduitservice=dol_htmlentitiesbr($fac->lignes[$i]->libelle,1);
|
$libelleproduitservice=dol_htmlentitiesbr($fac->lignes[$i]->libelle,1);
|
||||||
if ($fac->lignes[$i]->desc && $fac->lignes[$i]->desc != $fac->lignes[$i]->libelle)
|
if ($fac->lignes[$i]->desc && $fac->lignes[$i]->desc != $fac->lignes[$i]->libelle)
|
||||||
{
|
{
|
||||||
if ($libelleproduitservice) $libelleproduitservice.="<br>";
|
if ($libelleproduitservice) $libelleproduitservice.="<br>";
|
||||||
|
|
||||||
if ($fac->lignes[$i]->desc == '(CREDIT_NOTE)' && $fac->lignes[$i]->fk_remise_except)
|
if ($fac->lignes[$i]->desc == '(CREDIT_NOTE)' && $fac->lignes[$i]->fk_remise_except)
|
||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($this->db);
|
$discount=new DiscountAbsolute($this->db);
|
||||||
@@ -266,7 +266,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si ligne associee a un code produit
|
// Si ligne associee a un code produit
|
||||||
if ($fac->lignes[$i]->produit_id)
|
if ($fac->lignes[$i]->produit_id)
|
||||||
{
|
{
|
||||||
@@ -287,7 +287,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
|
|
||||||
$libelleproduitservice=$prefix_prodserv.$prodser->ref." - ".$libelleproduitservice;
|
$libelleproduitservice=$prefix_prodserv.$prodser->ref." - ".$libelleproduitservice;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($fac->lignes[$i]->date_start && $fac->lignes[$i]->date_end)
|
if ($fac->lignes[$i]->date_start && $fac->lignes[$i]->date_end)
|
||||||
@@ -321,7 +321,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||||
if ($fac->lignes[$i]->remise_percent)
|
if ($fac->lignes[$i]->remise_percent)
|
||||||
{
|
{
|
||||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dol_print_reduction($fac->lignes[$i]->remise_percent), 0, 'R');
|
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dol_print_reduction($fac->lignes[$i]->remise_percent,$outputlangs), 0, 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total HT ligne
|
// Total HT ligne
|
||||||
@@ -355,7 +355,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
$nblineFollowDesc = 0;
|
$nblineFollowDesc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// test si besoin nouvelle page
|
// test si besoin nouvelle page
|
||||||
if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1))
|
if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1))
|
||||||
{
|
{
|
||||||
@@ -413,9 +413,9 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->Close();
|
$pdf->Close();
|
||||||
|
|
||||||
$pdf->Output($file);
|
$pdf->Output($file);
|
||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
$langs->setPhpLang(); // On restaure langue session
|
$langs->setPhpLang(); // On restaure langue session
|
||||||
return 1; // Pas d'erreur
|
return 1; // Pas d'erreur
|
||||||
}
|
}
|
||||||
@@ -617,7 +617,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if ($object->type != 2)
|
if ($object->type != 2)
|
||||||
{
|
{
|
||||||
// Check a payment mode is defined
|
// Check a payment mode is defined
|
||||||
if (empty($object->mode_reglement_code)
|
if (empty($object->mode_reglement_code)
|
||||||
&& ! $conf->global->FACTURE_CHQ_NUMBER
|
&& ! $conf->global->FACTURE_CHQ_NUMBER
|
||||||
&& ! $conf->global->FACTURE_RIB_NUMBER)
|
&& ! $conf->global->FACTURE_RIB_NUMBER)
|
||||||
{
|
{
|
||||||
@@ -626,10 +626,10 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetFont('Arial','B',8);
|
$pdf->SetFont('Arial','B',8);
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
|
||||||
$pdf->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
|
|
||||||
$posy=$pdf->GetY()+1;
|
$posy=$pdf->GetY()+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sown payment mode
|
// Sown payment mode
|
||||||
if ($object->mode_reglement_code
|
if ($object->mode_reglement_code
|
||||||
&& $object->mode_reglement_code != 'CHQ'
|
&& $object->mode_reglement_code != 'CHQ'
|
||||||
@@ -639,15 +639,15 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
$titre = $outputlangs->transnoentities("PaymentMode").':';
|
||||||
$pdf->MultiCell(80, 5, $titre, 0, 'L');
|
$pdf->MultiCell(80, 5, $titre, 0, 'L');
|
||||||
|
|
||||||
$pdf->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$pdf->SetXY(50, $posy);
|
$pdf->SetXY(50, $posy);
|
||||||
$lib_mode_reg=$outputlangs->transnoentities("PaymentMode".$object->mode_reglement_code)!=('PaymentMode'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentMode".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement);
|
$lib_mode_reg=$outputlangs->transnoentities("PaymentMode".$object->mode_reglement_code)!=('PaymentMode'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentMode".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement);
|
||||||
$pdf->MultiCell(80, 5, $lib_mode_reg,0,'L');
|
$pdf->MultiCell(80, 5, $lib_mode_reg,0,'L');
|
||||||
|
|
||||||
$posy=$pdf->GetY()+2;
|
$posy=$pdf->GetY()+2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Propose mode reglement par CHQ
|
* Propose mode reglement par CHQ
|
||||||
*/
|
*/
|
||||||
@@ -660,16 +660,16 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
$account->fetch($conf->global->FACTURE_CHQ_NUMBER);
|
$account->fetch($conf->global->FACTURE_CHQ_NUMBER);
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$pdf->SetFont('Arial','B',8);
|
$pdf->SetFont('Arial','B',8);
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$outputlangs->convToOutputCharset($account->proprio)).':',0,'L',0);
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$outputlangs->convToOutputCharset($account->proprio)).':',0,'L',0);
|
||||||
$posy=$pdf->GetY()+1;
|
$posy=$pdf->GetY()+1;
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$pdf->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0);
|
$pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($account->adresse_proprio), 0, 'L', 0);
|
||||||
|
|
||||||
$posy=$pdf->GetY()+2;
|
$posy=$pdf->GetY()+2;
|
||||||
}
|
}
|
||||||
if ($conf->global->FACTURE_CHQ_NUMBER == -1)
|
if ($conf->global->FACTURE_CHQ_NUMBER == -1)
|
||||||
@@ -678,16 +678,16 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetFont('Arial','B',8);
|
$pdf->SetFont('Arial','B',8);
|
||||||
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedToShort').' '.$outputlangs->convToOutputCharset($this->emetteur->nom).' '.$outputlangs->transnoentities('SendTo').':',0,'L',0);
|
$pdf->MultiCell(90, 3, $outputlangs->transnoentities('PaymentByChequeOrderedToShort').' '.$outputlangs->convToOutputCharset($this->emetteur->nom).' '.$outputlangs->transnoentities('SendTo').':',0,'L',0);
|
||||||
$posy=$pdf->GetY()+1;
|
$posy=$pdf->GetY()+1;
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
$pdf->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$pdf->MultiCell(80, 6, $outputlangs->convToOutputCharset($this->emetteur->adresse_full), 0, 'L', 0);
|
$pdf->MultiCell(80, 6, $outputlangs->convToOutputCharset($this->emetteur->adresse_full), 0, 'L', 0);
|
||||||
|
|
||||||
$posy=$pdf->GetY()+2;
|
$posy=$pdf->GetY()+2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Si mode reglement non force ou si force a VIR, propose mode reglement par RIB
|
* Si mode reglement non force ou si force a VIR, propose mode reglement par RIB
|
||||||
*/
|
*/
|
||||||
@@ -697,7 +697,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
{
|
{
|
||||||
$account = new Account($this->db);
|
$account = new Account($this->db);
|
||||||
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
$account->fetch($conf->global->FACTURE_RIB_NUMBER);
|
||||||
|
|
||||||
$curx=$this->marge_gauche;
|
$curx=$this->marge_gauche;
|
||||||
$cury=$posy;
|
$cury=$posy;
|
||||||
|
|
||||||
@@ -707,7 +707,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $posy;
|
return $posy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -732,7 +732,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$lltot = 200; $col1x = 120; $col2x = 182; $largcol2 = $lltot - $col2x;
|
$lltot = 200; $col1x = 120; $col2x = 182; $largcol2 = $lltot - $col2x;
|
||||||
|
|
||||||
$index = 0;
|
$index = 0;
|
||||||
|
|
||||||
// Total HT
|
// Total HT
|
||||||
$pdf->SetFillColor(255,255,255);
|
$pdf->SetFillColor(255,255,255);
|
||||||
$pdf->SetXY ($col1x, $tab2_top + 0);
|
$pdf->SetXY ($col1x, $tab2_top + 0);
|
||||||
@@ -755,7 +755,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if (eregi('\*',$tvakey))
|
if (eregi('\*',$tvakey))
|
||||||
{
|
{
|
||||||
$tvakey=eregi_replace('\*','',$tvakey);
|
$tvakey=eregi_replace('\*','',$tvakey);
|
||||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||||
}
|
}
|
||||||
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
$totalvat =$outputlangs->transnoentities("TotalVAT").' ';
|
||||||
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
$totalvat.=vatrate($tvakey,1).$tvacompl;
|
||||||
@@ -790,7 +790,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$creditnoteamount=$object->getSommeCreditNote();
|
$creditnoteamount=$object->getSommeCreditNote();
|
||||||
$resteapayer = $object->total_ttc - $deja_regle - $creditnoteamount;
|
$resteapayer = $object->total_ttc - $deja_regle - $creditnoteamount;
|
||||||
if ($object->paye) $resteapayer=0;
|
if ($object->paye) $resteapayer=0;
|
||||||
|
|
||||||
if ($deja_regle > 0 || $creditnoteamount > 0)
|
if ($deja_regle > 0 || $creditnoteamount > 0)
|
||||||
{
|
{
|
||||||
// Already payed
|
// Already payed
|
||||||
@@ -809,7 +809,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$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);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($creditnoteamount), 0, 'R', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
$resteapayer = $object->total_ttc - $deja_regle - $creditnoteamount;
|
$resteapayer = $object->total_ttc - $deja_regle - $creditnoteamount;
|
||||||
if ($object->paye) $resteapayer=0;
|
if ($object->paye) $resteapayer=0;
|
||||||
|
|
||||||
@@ -823,7 +823,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1);
|
$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);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle), $useborder, 'R', 1);
|
||||||
|
|
||||||
$resteapayer=0;
|
$resteapayer=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -915,7 +915,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$outputlangs->load("companies");
|
$outputlangs->load("companies");
|
||||||
|
|
||||||
//Affiche le filigrane brouillon - Print Draft Watermark
|
//Affiche le filigrane brouillon - Print Draft Watermark
|
||||||
if($object->statut==0 && (! empty($conf->global->FACTURE_DRAFT_WATERMARK)) )
|
if($object->statut==0 && (! empty($conf->global->FACTURE_DRAFT_WATERMARK)) )
|
||||||
{
|
{
|
||||||
$watermark_angle=atan($this->page_hauteur/$this->page_largeur);
|
$watermark_angle=atan($this->page_hauteur/$this->page_largeur);
|
||||||
$watermark_x=5;
|
$watermark_x=5;
|
||||||
@@ -932,7 +932,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->_out('Q');
|
$pdf->_out('Q');
|
||||||
}
|
}
|
||||||
//Print content
|
//Print content
|
||||||
|
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->SetFont('Arial','B',13);
|
$pdf->SetFont('Arial','B',13);
|
||||||
|
|
||||||
@@ -1010,7 +1010,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CorrectionInvoice").' : '.$outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CorrectionInvoice").' : '.$outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
$posy+=5;
|
$posy+=5;
|
||||||
$pdf->SetXY(100,$posy);
|
$pdf->SetXY(100,$posy);
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
@@ -1023,7 +1023,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEcheance")." : " . dolibarr_print_date($object->date_lim_reglement,"day",false,$outputlangs), '', 'R');
|
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEcheance")." : " . dolibarr_print_date($object->date_lim_reglement,"day",false,$outputlangs), '', 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($showadress)
|
if ($showadress)
|
||||||
{
|
{
|
||||||
// Emetteur
|
// Emetteur
|
||||||
@@ -1102,7 +1102,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$socname = $object->client->nom;
|
$socname = $object->client->nom;
|
||||||
}
|
}
|
||||||
$pdf->MultiCell(96,4, $outputlangs->convToOutputCharset($socname), 0, 'L');
|
$pdf->MultiCell(96,4, $outputlangs->convToOutputCharset($socname), 0, 'L');
|
||||||
|
|
||||||
// Nom client
|
// Nom client
|
||||||
$carac_client = "\n".$object->contact->getFullName($outputlangs,1,1);
|
$carac_client = "\n".$object->contact->getFullName($outputlangs,1,1);
|
||||||
|
|
||||||
@@ -1121,7 +1121,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->SetXY(102,$posy+3);
|
$pdf->SetXY(102,$posy+3);
|
||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$pdf->MultiCell(96,4, $outputlangs->convToOutputCharset($object->client->nom), 0, 'L');
|
$pdf->MultiCell(96,4, $outputlangs->convToOutputCharset($object->client->nom), 0, 'L');
|
||||||
|
|
||||||
// Nom du contact facturation si c'est une societe
|
// Nom du contact facturation si c'est une societe
|
||||||
$arrayidcontact = $object->getIdContact('external','BILLING');
|
$arrayidcontact = $object->getIdContact('external','BILLING');
|
||||||
if (sizeof($arrayidcontact) > 0)
|
if (sizeof($arrayidcontact) > 0)
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
$pdf->SetXY ($this->posxdiscount, $curY);
|
$pdf->SetXY ($this->posxdiscount, $curY);
|
||||||
if ($propale->lignes[$i]->remise_percent && $propale->lignes[$i]->special_code != 3)
|
if ($propale->lignes[$i]->remise_percent && $propale->lignes[$i]->special_code != 3)
|
||||||
{
|
{
|
||||||
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dol_print_reduction($propale->lignes[$i]->remise_percent), 0, 'R');
|
$pdf->MultiCell($this->postotalht-$this->posxdiscount-1, 4, dol_print_reduction($propale->lignes[$i]->remise_percent,$outputlangs), 0, 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total HT ligne
|
// Total HT ligne
|
||||||
@@ -341,7 +341,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
{
|
{
|
||||||
$nblineFollowDesc = 0;
|
$nblineFollowDesc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// test si besoin nouvelle page
|
// test si besoin nouvelle page
|
||||||
if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1))
|
if (($nexY+$nblineFollowDesc) > ($tab_top+$tab_height) && $i < ($nblignes - 1))
|
||||||
{
|
{
|
||||||
@@ -847,7 +847,7 @@ class pdf_propale_azur extends ModelePDFPropales
|
|||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->SetFont('Arial','B',11);
|
$pdf->SetFont('Arial','B',11);
|
||||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->nom), 0, 'L');
|
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->nom), 0, 'L');
|
||||||
|
|
||||||
// Caracteristiques emetteur
|
// Caracteristiques emetteur
|
||||||
$carac_emetteur = '';
|
$carac_emetteur = '';
|
||||||
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->convToOutputCharset($this->emetteur->adresse);
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ AutomaticCode=Automatic code
|
|||||||
NotManaged=Not managed
|
NotManaged=Not managed
|
||||||
FeatureDisabled=Feature disabled
|
FeatureDisabled=Feature disabled
|
||||||
MoveBox=Move box %s
|
MoveBox=Move box %s
|
||||||
Offered=Offered
|
Offered=Free
|
||||||
NotEnoughPermissions=You don't have permission for this action
|
NotEnoughPermissions=You don't have permission for this action
|
||||||
SessionName=Session name
|
SessionName=Session name
|
||||||
Method=Method
|
Method=Method
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
@@ -77,7 +77,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$valueforccc='',$date=
|
|||||||
// Clean parameters
|
// Clean parameters
|
||||||
if ($date == '') $date=mktime(); // We use local year and month of PHP server to search numbers
|
if ($date == '') $date=mktime(); // We use local year and month of PHP server to search numbers
|
||||||
// but we should use local year and month of user
|
// but we should use local year and month of user
|
||||||
|
|
||||||
// Extract value for mask counter, mask raz and mask offset
|
// Extract value for mask counter, mask raz and mask offset
|
||||||
if (! eregi('\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}',$mask,$reg)) return 'ErrorBadMask';
|
if (! eregi('\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}',$mask,$reg)) return 'ErrorBadMask';
|
||||||
$masktri=$reg[1].$reg[2].$reg[3];
|
$masktri=$reg[1].$reg[2].$reg[3];
|
||||||
@@ -139,7 +139,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$valueforccc='',$date=
|
|||||||
if (strlen($reg[2]) == 4) $yearcomp=sprintf("%04d",date("Y",$date)+$yearoffset);
|
if (strlen($reg[2]) == 4) $yearcomp=sprintf("%04d",date("Y",$date)+$yearoffset);
|
||||||
if (strlen($reg[2]) == 2) $yearcomp=sprintf("%02d",date("y",$date)+$yearoffset);
|
if (strlen($reg[2]) == 2) $yearcomp=sprintf("%02d",date("y",$date)+$yearoffset);
|
||||||
if (strlen($reg[2]) == 1) $yearcomp=substr(date("y",$date),2,1)+$yearoffset;
|
if (strlen($reg[2]) == 1) $yearcomp=substr(date("y",$date),2,1)+$yearoffset;
|
||||||
|
|
||||||
$sqlwhere='';
|
$sqlwhere='';
|
||||||
$sqlwhere.='( (SUBSTRING('.$field.', '.(strlen($reg[1])+1).', '.strlen($reg[2]).') >= '.$yearcomp;
|
$sqlwhere.='( (SUBSTRING('.$field.', '.(strlen($reg[1])+1).', '.strlen($reg[2]).') >= '.$yearcomp;
|
||||||
if ($monthcomp > 1) // Test useless if monthcomp = 1 (or 0 is same as 1)
|
if ($monthcomp > 1) // Test useless if monthcomp = 1 (or 0 is same as 1)
|
||||||
@@ -196,7 +196,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$valueforccc='',$date=
|
|||||||
if ($maskrefclient_maskcounter)
|
if ($maskrefclient_maskcounter)
|
||||||
{
|
{
|
||||||
//print "maskrefclient_maskcounter=".$maskrefclient_maskcounter." maskwithnocode=".$maskwithnocode." maskrefclient=".$maskrefclient."\n<br>";
|
//print "maskrefclient_maskcounter=".$maskrefclient_maskcounter." maskwithnocode=".$maskwithnocode." maskrefclient=".$maskrefclient."\n<br>";
|
||||||
|
|
||||||
// Define $sqlstring
|
// Define $sqlstring
|
||||||
$maskrefclient_posnumstart=strpos($maskwithnocode,$maskrefclient_maskcounter,strpos($maskwithnocode,$maskrefclient)); // Pos of counter in final string (from 0 to ...)
|
$maskrefclient_posnumstart=strpos($maskwithnocode,$maskrefclient_maskcounter,strpos($maskwithnocode,$maskrefclient)); // Pos of counter in final string (from 0 to ...)
|
||||||
if ($maskrefclient_posnumstart <= 0) return 'ErrorBadMask';
|
if ($maskrefclient_posnumstart <= 0) return 'ErrorBadMask';
|
||||||
@@ -224,7 +224,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$valueforccc='',$date=
|
|||||||
if ($where) $maskrefclient_sql.=$where; //use the same optional where as general mask
|
if ($where) $maskrefclient_sql.=$where; //use the same optional where as general mask
|
||||||
if ($sqlwhere) $maskrefclient_sql.=' AND '.$sqlwhere; //use the same sqlwhere as general mask
|
if ($sqlwhere) $maskrefclient_sql.=' AND '.$sqlwhere; //use the same sqlwhere as general mask
|
||||||
$maskrefclient_sql.=' AND (SUBSTRING('.$field.', '.(strpos($maskwithnocode,$maskrefclient)+1).', '.strlen($maskrefclient_maskclientcode).")='".$maskrefclient_clientcode."')";
|
$maskrefclient_sql.=' AND (SUBSTRING('.$field.', '.(strpos($maskwithnocode,$maskrefclient)+1).', '.strlen($maskrefclient_maskclientcode).")='".$maskrefclient_clientcode."')";
|
||||||
|
|
||||||
dolibarr_syslog("functions2::get_next_value maskrefclient_sql=".$maskrefclient_sql, LOG_DEBUG);
|
dolibarr_syslog("functions2::get_next_value maskrefclient_sql=".$maskrefclient_sql, LOG_DEBUG);
|
||||||
$maskrefclient_resql=$db->query($maskrefclient_sql);
|
$maskrefclient_resql=$db->query($maskrefclient_sql);
|
||||||
if ($maskrefclient_resql)
|
if ($maskrefclient_resql)
|
||||||
@@ -522,11 +522,8 @@ function dol_set_user_page_param($db, &$user, $url='', $tab)
|
|||||||
* \param reduction Reduction percentage
|
* \param reduction Reduction percentage
|
||||||
* \return string Formated reduction
|
* \return string Formated reduction
|
||||||
*/
|
*/
|
||||||
function dol_print_reduction($reduction=0)
|
function dol_print_reduction($reduction=0,$langs)
|
||||||
{
|
{
|
||||||
global $langs;
|
|
||||||
$langs->load("main");
|
|
||||||
|
|
||||||
$string = '';
|
$string = '';
|
||||||
if ($reduction == 100)
|
if ($reduction == 100)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user