forked from Wavyzz/dolibarr
Merge remote-tracking branch 'upstream/develop' into socialnetworks
This commit is contained in:
@@ -509,12 +509,12 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
$weighttxt='';
|
||||
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->weight)
|
||||
{
|
||||
$weighttxt=round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuring_units_string($object->lines[$i]->weight_units, "weight");
|
||||
$weighttxt=round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units);
|
||||
}
|
||||
$voltxt='';
|
||||
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->volume)
|
||||
{
|
||||
$voltxt=round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuring_units_string($object->lines[$i]->volume_units?$object->lines[$i]->volume_units:0, "volume");
|
||||
$voltxt=round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units?$object->lines[$i]->volume_units:0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -525,12 +525,12 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$weighttxt='';
|
||||
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->weight)
|
||||
{
|
||||
$weighttxt=round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuring_units_string($object->lines[$i]->weight_units, "weight");
|
||||
$weighttxt=round($object->lines[$i]->weight * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->weight_units);
|
||||
}
|
||||
$voltxt='';
|
||||
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->volume)
|
||||
{
|
||||
$voltxt=round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuring_units_string($object->lines[$i]->volume_units?$object->lines[$i]->volume_units:0, "volume");
|
||||
$voltxt=round($object->lines[$i]->volume * $object->lines[$i]->qty_shipped, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->volume_units?$object->lines[$i]->volume_units:0);
|
||||
}
|
||||
|
||||
if (empty($conf->global->SHIPPING_PDF_HIDE_WEIGHT_AND_VOLUME))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/**
|
||||
* \file htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
|
||||
* \ingroup ficheinter
|
||||
* \brief Fichier de la classe permettant de generer les fiches d'intervention au modele Soleil
|
||||
* \brief File of Class to build interventions documents with model Soleil
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/fichinter/modules_fichinter.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
@@ -142,7 +142,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$this->option_condreg = 0; // Display payment terms
|
||||
$this->option_codeproduitservice = 0; // Display product-service code
|
||||
$this->option_multilang = 1; // Available in several languages
|
||||
$this->option_draft_watermark = 1; //Support add of a watermark on drafts
|
||||
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
|
||||
|
||||
// Get source company
|
||||
$this->emetteur=$mysoc;
|
||||
@@ -266,7 +266,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$tab_height = 130;
|
||||
$tab_height_newpage = 150;
|
||||
|
||||
// Affiche notes
|
||||
// Display notes
|
||||
$notetoshow=empty($object->note_public)?'':$object->note_public;
|
||||
if ($notetoshow)
|
||||
{
|
||||
@@ -394,7 +394,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
|
||||
}
|
||||
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut
|
||||
$pdf->SetFont('', '', $default_font_size - 1); // We reposition the default font
|
||||
|
||||
// Detect if some page were added automatically and output _tableau for past pages
|
||||
while ($pagenb < $pageposafter)
|
||||
@@ -573,7 +573,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FICHINTER_DRAFT_WATERMARK);
|
||||
}
|
||||
|
||||
//Prepare la suite
|
||||
//Prepare next
|
||||
$pdf->SetTextColor(0, 0, 60);
|
||||
$pdf->SetFont('', 'B', $default_font_size + 3);
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ class mod_arctic extends ModeleNumRefFicheinter
|
||||
$tooltip.=$langs->trans("GenericMaskCodes4a", $langs->transnoentities("InterventionCard"), $langs->transnoentities("InterventionCard"));
|
||||
$tooltip.=$langs->trans("GenericMaskCodes5");
|
||||
|
||||
// Parametrage du prefix
|
||||
// Setting the prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskvalue" value="'.$conf->global->FICHINTER_ARTIC_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
@@ -130,7 +130,7 @@ class mod_arctic extends ModeleNumRefFicheinter
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/functions2.lib.php';
|
||||
|
||||
// On défini critere recherche compteur
|
||||
// We define the search criteria of the counter
|
||||
$mask=$conf->global->FICHINTER_ARTIC_MASK;
|
||||
|
||||
if (! $mask)
|
||||
|
||||
@@ -164,7 +164,12 @@ class modFicheinter extends DolibarrModules
|
||||
's.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','s.fk_pays'=>'Country','s.phone'=>'Phone',
|
||||
's.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode',
|
||||
's.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",
|
||||
'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote", 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'InterLineId',
|
||||
'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote");
|
||||
$keyforselect='fichinter'; $keyforelement='intervention'; $keyforaliasextra='extra';
|
||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||
$this->export_fields_array[$r]+=array(
|
||||
'pj.ref'=>'ProjectRef','pj.title'=>'ProjectLabel',
|
||||
'fd.rowid'=>'InterLineId',
|
||||
'fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"
|
||||
);
|
||||
//$this->export_TypeFields_array[$r]=array(
|
||||
@@ -175,24 +180,30 @@ class modFicheinter extends DolibarrModules
|
||||
// 'fd.total_ht'=>"Numeric"
|
||||
//);
|
||||
$this->export_TypeFields_array[$r]=array(
|
||||
's.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_country:label','s.phone'=>'Text','s.siren'=>'Text',
|
||||
's.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",
|
||||
'f.duree'=>"Duree",'f.fk_statut'=>'Statut','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean", 'pj.ref'=>'Text',
|
||||
'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"
|
||||
's.rowid'=>"Numeric",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_country:label','s.phone'=>'Text','s.siren'=>'Text',
|
||||
's.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text',
|
||||
'f.rowid'=>'Numeric','f.ref'=>"Text",'f.datec'=>"Date",
|
||||
'f.duree'=>"Duree",'f.fk_statut'=>'Numeric','f.description'=>"Text",'f.datee'=>"Date",'f.dateo'=>"Date",'f.fulldayevent'=>"Boolean",
|
||||
'pj.ref'=>'Text','pj.title'=>'Text',
|
||||
'fd.rowid'=>"Numeric",'fd.date'=>"Date",'fd.duree'=>"Duree",'fd.description'=>"Text",'fd.total_ht'=>"Numeric"
|
||||
);
|
||||
$this->export_entities_array[$r]=array(
|
||||
's.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','s.fk_pays'=>'company','s.phone'=>'company',
|
||||
's.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company',
|
||||
's.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",
|
||||
'f.fk_statut'=>"intervention",'f.description'=>"intervention", 'pj.ref'=>'project', 'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",
|
||||
'f.fk_statut'=>"intervention",'f.description'=>"intervention", 'pj.ref'=>'project', 'pj.title'=>'project', 'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",
|
||||
'fd.duree'=>'inter_line','fd.description'=>'inter_line'
|
||||
);
|
||||
$this->export_dependencies_array[$r]=array('inter_line'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||
$keyforselect='fichinterdet'; $keyforelement='inter_line'; $keyforaliasextra='extradet';
|
||||
include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php';
|
||||
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'fichinter as f';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'fichinter_extrafields as extra ON f.rowid = extra.fk_object';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON f.fk_projet = pj.rowid';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'fichinterdet as fd ON f.rowid = fd.fk_fichinter,';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'fichinterdet as fd ON f.rowid = fd.fk_fichinter';
|
||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'fichinterdet_extrafields as extradet ON fd.rowid = extradet.fk_object,';
|
||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'societe as s';
|
||||
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid';
|
||||
$this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('intervention').')';
|
||||
|
||||
@@ -85,7 +85,7 @@ class modProduct extends DolibarrModules
|
||||
$this->const[$r][3] = 'Module to control product codes';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
|
||||
$this->const[$r][0] = "PRODUCT_PRICE_UNIQ";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "1";
|
||||
@@ -182,7 +182,8 @@ class modProduct extends DolibarrModules
|
||||
'p.accountancy_code_sell'=>"ProductAccountancySellCode", 'p.accountancy_code_sell_intra'=>"ProductAccountancySellIntraCode",
|
||||
'p.accountancy_code_sell_export'=>"ProductAccountancySellExportCode", 'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",
|
||||
'p.note'=>"NotePrivate",'p.note_public'=>'NotePublic',
|
||||
'p.weight'=>"Weight",'p.length'=>"Length",'p.width'=>"Width",'p.height'=>"Height",'p.surface'=>"Surface",'p.volume'=>"Volume",
|
||||
'p.weight'=>"Weight", 'p.weight_units'=>"WeightUnits", 'p.length'=>"Length", 'p.width'=>"Width", 'p.height'=>"Height", 'p.length_units'=>"SizeUnits",
|
||||
'p.surface'=>"Surface", 'p.surface_units'=>"SurfaceUnits", 'p.volume'=>"Volume", 'p.volume_units'=>"VolumeUnits",
|
||||
'p.duration'=>"Duration",
|
||||
'p.finished' => 'Nature',
|
||||
'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",
|
||||
|
||||
@@ -198,7 +198,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
|
||||
// Translations
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "propal"));
|
||||
|
||||
|
||||
@@ -450,12 +450,12 @@ class pdf_squille extends ModelePdfReception
|
||||
$weighttxt='';
|
||||
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->weight)
|
||||
{
|
||||
$weighttxt=round($object->lines[$i]->product->weight * $object->lines[$i]->qty, 5).' '.measuring_units_string($object->lines[$i]->product->weight_units, "weight");
|
||||
$weighttxt=round($object->lines[$i]->product->weight * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "weight", $object->lines[$i]->product->weight_units);
|
||||
}
|
||||
$voltxt='';
|
||||
if ($object->lines[$i]->fk_product_type == 0 && $object->lines[$i]->product->volume)
|
||||
{
|
||||
$voltxt=round($object->lines[$i]->product->volume * $object->lines[$i]->qty, 5).' '.measuring_units_string($object->lines[$i]->product->volume_units?$object->lines[$i]->product->volume_units:0, "volume");
|
||||
$voltxt=round($object->lines[$i]->product->volume * $object->lines[$i]->qty, 5).' '.measuringUnitString(0, "volume", $object->lines[$i]->product->volume_units?$object->lines[$i]->product->volume_units:0);
|
||||
}
|
||||
|
||||
$pdf->writeHTMLCell($this->posxqtyordered - $this->posxweightvol + 2, 3, $this->posxweightvol - 1, $curY, $weighttxt.(($weighttxt && $voltxt)?'<br>':'').$voltxt, 0, 0, false, true, 'C');
|
||||
|
||||
Reference in New Issue
Block a user