Skip to content

Commit

Permalink
Uniformize name of standard PDF template
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed May 4, 2017
1 parent 39d9a0f commit 768df56
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 24 deletions.
2 changes: 1 addition & 1 deletion htdocs/admin/fichinter.php
Expand Up @@ -265,7 +265,7 @@

$head=fichinter_admin_prepare_head();

dol_fiche_head($head, 'ficheinter', $langs->trans("Interventions"), 0, 'intervention');
dol_fiche_head($head, 'ficheinter', $langs->trans("Interventions"), -1, 'intervention');

// Interventions numbering model

Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
Expand Up @@ -49,7 +49,7 @@ function __construct($db=0)

$this->db = $db;
$this->name = "rouget";
$this->description = $langs->trans("DocumentModelSimple");
$this->description = $langs->trans("DocumentModelStandardPDF");

$this->type = 'pdf';
$formatarray=pdf_getFormat();
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
Expand Up @@ -65,7 +65,7 @@ function __construct($db)

$this->db = $db;
$this->name = 'soleil';
$this->description = $langs->trans("DocumentModelStandard");
$this->description = $langs->trans("DocumentModelStandardPDF");

// Dimension page pour format A4
$this->type = 'pdf';
Expand Down
11 changes: 9 additions & 2 deletions htdocs/core/modules/modProduct.class.php
Expand Up @@ -53,7 +53,7 @@ function __construct($db)
$this->module_position = 20;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Gestion des produits";
$this->description = "Product management";

// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
Expand Down Expand Up @@ -83,7 +83,14 @@ function __construct($db)
$this->const[$r][3] = 'Module to control product codes';
$this->const[$r][4] = 0;
$r++;


/*$this->const[$r][0] = "PRODUCT_ADDON_PDF";
$this->const[$r][1] = "chaine";
$this->const[$r][2] = "standard";
$this->const[$r][3] = 'Default module for document generation';
$this->const[$r][4] = 0;
$r++;*/

// Boxes
$this->boxes = array(
0=>array('file'=>'box_produits.php','enabledbydefaulton'=>'Home'),
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/modService.class.php
Expand Up @@ -51,7 +51,7 @@ function __construct($db)
$this->module_position = 30;
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i','',get_class($this));
$this->description = "Gestion des services";
$this->description = "Service management";

// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
Expand Down
14 changes: 4 additions & 10 deletions htdocs/core/modules/product/doc/pdf_standard.modules.php
Expand Up @@ -92,8 +92,8 @@ public function __construct($db)
$langs->load("companies");

$this->db = $db;
$this->name = "PDF template";
$this->description = $langs->trans("DocumentModelPdf");
$this->name = "standard";
$this->description = $langs->trans("DocumentModelStandardPDF");

// Dimension page pour format A4
$this->type = 'pdf';
Expand All @@ -107,15 +107,9 @@ public function __construct($db)
$this->marge_basse =isset($conf->global->MAIN_PDF_MARGIN_BOTTOM)?$conf->global->MAIN_PDF_MARGIN_BOTTOM:10;

$this->option_logo = 1; // Affiche logo
$this->option_tva = 0; // Gere option tva PRODUCT_TVAOPTION
$this->option_modereg = 0; // Affiche mode reglement
$this->option_condreg = 0; // Affiche conditions reglement
$this->option_codeproduitservice = 0; // Affiche code produit-service
$this->option_multilang = 1; // Dispo en plusieurs langues
$this->option_escompte = 0; // Affiche si il y a eu escompte
$this->option_credit_note = 0; // Support credit notes
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 1; // Support add of a watermark on drafts
$this->option_freetext = 0; // Support add of a personalised text

// Recupere emetteur
$this->emetteur=$mysoc;
Expand Down Expand Up @@ -262,7 +256,7 @@ function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidede
}
if ($object->weight)
{
$pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").': '.$object->length.'x'.$object->width.'x'.$object->height, 0, 1);
$pdf->writeHTMLCell(190, 3, $this->marge_gauche, $nexY, $langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").': '.($object->length != ''?$object->length:'?').' x '.($object->width != ''?$object->width:'?').' x '.($object->height != ''?$object->height:'?'), 0, 1);
$nexY = $pdf->GetY();
}
if ($object->surface)
Expand Down
2 changes: 1 addition & 1 deletion htdocs/fichinter/admin/fichinter_extrafields.php
Expand Up @@ -71,7 +71,7 @@

$head=fichinter_admin_prepare_head();

dol_fiche_head($head, 'attributes', $langs->trans("Interventions"), 0, 'intervention');
dol_fiche_head($head, 'attributes', $langs->trans("Interventions"), -1, 'intervention');

require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

Expand Down
2 changes: 1 addition & 1 deletion htdocs/fichinter/admin/fichinterdet_extrafields.php
Expand Up @@ -72,7 +72,7 @@

$head=fichinter_admin_prepare_head();

dol_fiche_head($head, 'attributesdet', $langs->trans("Interventions"), 0, 'intervention');
dol_fiche_head($head, 'attributesdet', $langs->trans("Interventions"), -1, 'intervention');

require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';

Expand Down
1 change: 1 addition & 0 deletions htdocs/langs/en_US/main.lang
Expand Up @@ -647,6 +647,7 @@ FreeLineOfType=Free entry of type
CloneMainAttributes=Clone object with its main attributes
PDFMerge=PDF Merge
Merge=Merge
DocumentModelStandardPDF=Standard PDF template
PrintContentArea=Show page to print main content area
MenuManager=Menu manager
WarningYouAreInMaintenanceMode=Warning, you are in a maintenance mode, so only login <b>%s</b> is allowed to use application at the moment.
Expand Down
1 change: 0 additions & 1 deletion htdocs/langs/en_US/sendings.lang
Expand Up @@ -37,7 +37,6 @@ SendingSheet=Shipment sheet
ConfirmDeleteSending=Are you sure you want to delete this shipment?
ConfirmValidateSending=Are you sure you want to validate this shipment with reference <b>%s</b>?
ConfirmCancelSending=Are you sure you want to cancel this shipment?
DocumentModelSimple=Simple document model
DocumentModelMerou=Merou A5 model
WarningNoQtyLeftToSend=Warning, no products waiting to be shipped.
StatsOnShipmentsOnlyValidated=Statistics conducted on shipments only validated. Date used is date of validation of shipment (planed delivery date is not always known).
Expand Down
3 changes: 0 additions & 3 deletions htdocs/product/admin/product.php
Expand Up @@ -512,10 +512,7 @@
}
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
$htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
$htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark,1,1);


print '<td align="center">';
Expand Down
21 changes: 19 additions & 2 deletions htdocs/product/class/product.class.php
Expand Up @@ -4367,14 +4367,31 @@ function initAsSpecimen()
$this->id=0;
$this->ref = 'PRODUCT_SPEC';
$this->label = 'PRODUCT SPECIMEN';
$this->description = 'PRODUCT SPECIMEN '.dol_print_date($now,'dayhourlog');
$this->description = 'This is description of this product specimen that was created the '.dol_print_date($now,'dayhourlog').'.';
$this->specimen=1;
$this->country_id=1;
$this->tosell=1;
$this->tobuy=1;
$this->tobatch=0;
$this->note='This is a comment (private)';

$this->date_creation = $now;
$this->date_modification = $now;

$this->weight = 4;
$this->weight_unit = 1;

$this->length = 5;
$this->length_unit = 1;
$this->width = 6;
$this->width_unit = 0;
$this->height = null;
$this->height_unit = null;

$this->surface = 30;
$this->surface_unit = 0;
$this->volume = 300;
$this->volume_unit = 0;

$this->barcode=-1; // Create barcode automatically
}

Expand Down

0 comments on commit 768df56

Please sign in to comment.