Fix: traduction
This commit is contained in:
parent
6e69cc9f5e
commit
2b868859c9
@ -107,14 +107,15 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
$outputlangs->load("orders");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
$outputlangs->load("orders");
|
||||
|
||||
$outputlangs->setPhpLang();
|
||||
|
||||
if ($conf->commande->dir_output)
|
||||
if ($conf->commande->dir_output)
|
||||
{
|
||||
// Définition de l'objet $com (pour compatibilite ascendante)
|
||||
if (! is_object($com))
|
||||
|
||||
@ -49,12 +49,12 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "crabe";
|
||||
$this->description = $langs->trans('PDFCrabeDescription');
|
||||
$this->description = $langs->trans('PDFCrabeDescription');
|
||||
|
||||
// Dimension page pour format A4
|
||||
$this->type = 'pdf';
|
||||
@ -103,39 +103,41 @@ class pdf_crabe extends ModelePDFFactures
|
||||
*/
|
||||
function write_pdf_file($fac,$outputlangs='')
|
||||
{
|
||||
global $user,$langs,$conf;
|
||||
global $user,$langs,$conf;
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
|
||||
$outputlangs->setPhpLang();
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("products");
|
||||
|
||||
$outputlangs->setPhpLang();
|
||||
|
||||
if ($conf->facture->dir_output)
|
||||
if ($conf->facture->dir_output)
|
||||
{
|
||||
// Définition de l'objet $fac (pour compatibilite ascendante)
|
||||
if (! is_object($fac))
|
||||
{
|
||||
// Définition de l'objet $fac (pour compatibilite ascendante)
|
||||
if (! is_object($fac))
|
||||
{
|
||||
$id = $fac;
|
||||
$fac = new Facture($this->db,"",$id);
|
||||
$ret=$fac->fetch($id);
|
||||
}
|
||||
$deja_regle = $fac->getSommePaiement();
|
||||
|
||||
// Définition de $dir et $file
|
||||
if ($fac->specimen)
|
||||
{
|
||||
$dir = $conf->facture->dir_output;
|
||||
$file = $dir . "/SPECIMEN.pdf";
|
||||
}
|
||||
else
|
||||
{
|
||||
$facref = sanitize_string($fac->ref);
|
||||
$dir = $conf->facture->dir_output . "/" . $facref;
|
||||
$file = $dir . "/" . $facref . ".pdf";
|
||||
}
|
||||
$id = $fac;
|
||||
$fac = new Facture($this->db,"",$id);
|
||||
$ret=$fac->fetch($id);
|
||||
}
|
||||
|
||||
$deja_regle = $fac->getSommePaiement();
|
||||
|
||||
// Définition de $dir et $file
|
||||
if ($fac->specimen)
|
||||
{
|
||||
$dir = $conf->facture->dir_output;
|
||||
$file = $dir . "/SPECIMEN.pdf";
|
||||
}
|
||||
else
|
||||
{
|
||||
$facref = sanitize_string($fac->ref);
|
||||
$dir = $conf->facture->dir_output . "/" . $facref;
|
||||
$file = $dir . "/" . $facref . ".pdf";
|
||||
}
|
||||
|
||||
if (! file_exists($dir))
|
||||
{
|
||||
|
||||
@ -49,6 +49,8 @@ class modProduit extends DolibarrModules
|
||||
*/
|
||||
function modProduit($DB)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$this->db = $DB ;
|
||||
$this->id = 'produit'; // Same value xxx than in file modXxx.class.php file
|
||||
$this->numero = 50 ;
|
||||
@ -168,9 +170,20 @@ class modProduit extends DolibarrModules
|
||||
$r++;
|
||||
$this->import_code[$r]=$this->id.'_'.$r;
|
||||
$this->import_label[$r]="ProductsOrServices"; // Translation key
|
||||
$this->import_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"PriceHT",'p.price_ttc'=>"PriceTTC",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration");
|
||||
$this->import_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration");
|
||||
$this->import_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.price_ttc'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product");
|
||||
//$this->import_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration");
|
||||
|
||||
if($conf->global->PRODUIT_MULTIPRICES)
|
||||
{
|
||||
$this->import_multiprices[$r]=array();
|
||||
|
||||
for($i=1;$i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT;$i++)
|
||||
{
|
||||
$this->import_multiprices[$r][$i]["price_ht"] = "SellingPriceHT ".$i;
|
||||
$this->import_multiprices[$r][$i]["price_ttc"] = "SellingPriceTTC ".$i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -105,10 +105,11 @@ class pdf_propale_azur extends ModelePDFPropales
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
$outputlangs->load("main");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("products");
|
||||
$outputlangs->load("dict");
|
||||
$outputlangs->load("companies");
|
||||
$outputlangs->load("bills");
|
||||
$outputlangs->load("propal");
|
||||
$outputlangs->load("products");
|
||||
|
||||
$outputlangs->setPhpLang();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user