diff --git a/dev/skeletons/build_class_from_table.php b/dev/skeletons/build_class_from_table.php index ecdbbd09dc4..62ad1188759 100755 --- a/dev/skeletons/build_class_from_table.php +++ b/dev/skeletons/build_class_from_table.php @@ -587,11 +587,10 @@ foreach ($skeletonfiles as $skeletonfile => $outfile) { if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) { - $varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print_liste_field_titre(\$arrayfields['t.".$prop['field']."']['label'],\$_SERVER['PHP_SELF'],'t.".$prop['field']."','',\$param,'',\$sortfield,\$sortorder);\n"; + $varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print_liste_field_titre(\$arrayfields['t.".$prop['field']."']['label'],\$_SERVER['PHP_SELF'],'t.".$prop['field']."','',\$params,'',\$sortfield,\$sortorder);\n"; } } - $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field1']['checked'])) print_liste_field_titre(\$langs->trans('field1'),\$_SERVER['PHP_SELF'],'t.field1','',\$param,'',\$sortfield,\$sortorder);",'/').'/', $varprop, $targetcontent); - $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field2']['checked'])) print_liste_field_titre(\$langs->trans('field2'),\$_SERVER['PHP_SELF'],'t.field2','',\$param,'',\$sortfield,\$sortorder);",'/').'/', '', $targetcontent); + $targetcontent=preg_replace('/LIST_OF_TD_TITLE_FIELDS/', $varprop, $targetcontent); // Substitute fields title search $varprop="\n"; @@ -603,8 +602,7 @@ foreach ($skeletonfiles as $skeletonfile => $outfile) $varprop.="if (! empty(\$arrayfields['t.".$prop['field']."']['checked'])) print '';\n"; } } - $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field1']['checked'])) print '';",'/').'/', $varprop, $targetcontent); - $targetcontent=preg_replace('/'.preg_quote("if (! empty(\$arrayfields['t.field2']['checked'])) print '';",'/').'/', '', $targetcontent); + $targetcontent=preg_replace('/LIST_OF_TD_TITLE_SEARCH/', $varprop, $targetcontent); // Substitute where for .fieldx. $varprop="\n"; @@ -656,6 +654,10 @@ foreach ($skeletonfiles as $skeletonfile => $outfile) $targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_VIEW/', $varprop, $targetcontent); + // LIST_OF_TD_FIELDS_LIST + + + // Build file $fp=fopen($outfile,"w"); if ($fp) diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 5058e4a7d5a..1facee1306e 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -318,8 +318,9 @@ if ($resql) // Fields title print ''; - if (! empty($arrayfields['t.field1']['checked'])) print_liste_field_titre($arrayfields['t.field1']['label'],$_SERVER['PHP_SELF'],'t.field1','',$param,'',$sortfield,$sortorder); - if (! empty($arrayfields['t.field2']['checked'])) print_liste_field_titre($arrayfields['t.field2']['label'],$_SERVER['PHP_SELF'],'t.field2','',$param,'',$sortfield,$sortorder); + // LIST_OF_TD_TITLE_FIELDS + //if (! empty($arrayfields['t.field1']['checked'])) print_liste_field_titre($arrayfields['t.field1']['label'],$_SERVER['PHP_SELF'],'t.field1','',$params,'',$sortfield,$sortorder); + //if (! empty($arrayfields['t.field2']['checked'])) print_liste_field_titre($arrayfields['t.field2']['label'],$_SERVER['PHP_SELF'],'t.field2','',$params,'',$sortfield,$sortorder); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { @@ -344,8 +345,9 @@ if ($resql) // Fields title search print ''; - if (! empty($arrayfields['t.field1']['checked'])) print ''; - if (! empty($arrayfields['t.field2']['checked'])) print ''; + // LIST_OF_TD_TITLE_SEARCH + //if (! empty($arrayfields['t.field1']['checked'])) print ''; + //if (! empty($arrayfields['t.field2']['checked'])) print ''; // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { @@ -408,8 +410,12 @@ if ($resql) $obj = $db->fetch_object($resql); if ($obj) { - // You can use here results - print ''; + $var = !$var; + + // Show here line of result + print ''; + // LIST_OF_TD_FIELDS_LIST + /* if (! empty($arrayfields['t.field1']['checked'])) { print ''.$obj->field1.''; @@ -419,7 +425,7 @@ if ($resql) { print ''.$obj->field2.''; if (! $i) $totalarray['nbfield']++; - } + }*/ // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) { diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 77ede3291d4..d5d41dad0a2 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -5,7 +5,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2014 Juanjo Menent + * Copyright (C) 2010-2016 Juanjo Menent * Copyright (C) 2010-2015 Philippe Grand * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012 Cedric Salvador @@ -1717,7 +1717,7 @@ if ($action == 'create') print ''; print ''; if ($user->rights->propal->creer && $action == 'refclient') { - print '
'; + print ''; print ''; print ''; print ''; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 5396625fcb5..22f2c1b7113 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3329,7 +3329,7 @@ class Commande extends CommonOrder */ function getNomUrl($withpicto=0,$option=0,$max=0,$short=0) { - global $conf, $langs; + global $conf, $langs, $user; $result=''; @@ -3339,17 +3339,29 @@ class Commande extends CommonOrder if ($short) return $url; $picto = 'order'; - $label = '' . $langs->trans("ShowOrder") . ''; - if (! empty($this->ref)) - $label .= '
' . $langs->trans('Ref') . ': ' . $this->ref; - if (! empty($this->ref_client)) - $label.= '
' . $langs->trans('RefCustomer') . ': ' . $this->ref_client; - if (! empty($this->total_ht)) - $label.= '
' . $langs->trans('AmountHT') . ': ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); - if (! empty($this->total_tva)) - $label.= '
' . $langs->trans('VAT') . ': ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); - if (! empty($this->total_ttc)) - $label.= '
' . $langs->trans('AmountTTC') . ': ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); + $label = ''; + + if ($user->rights->commande->lire) { + $label = ''.$langs->trans("ShowOrder").''; + if (!empty($this->ref)) { + $label .= '
'.$langs->trans('Ref').': '.$this->ref; + } + if (!empty($this->ref_client)) { + $label .= '
'.$langs->trans('RefCustomer').': '.$this->ref_client; + } + if (!empty($this->total_ht)) { + $label .= '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, + $conf->currency); + } + if (!empty($this->total_tva)) { + $label .= '
'.$langs->trans('VAT').': '.price($this->total_tva, 0, $langs, 0, -1, -1, + $conf->currency); + } + if (!empty($this->total_ttc)) { + $label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, + $conf->currency); + } + } $linkstart = ''; $linkend=''; diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 10320a85544..5fc3966fdf9 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -141,7 +141,7 @@ if ($prev_id) print price($row[0]); print ''; - print round($row[0]/$bon->amount*100,2)." %"; + if ($bon->amount) print round($row[0]/$bon->amount*100,2)." %"; print ''; print "\n"; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 270bc6b1a06..ccb3d1d314c 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -973,7 +973,7 @@ if (empty($reshook)) * View */ -llxHeader('',$langs->trans("ContractCard"),"Contrat"); +llxHeader('',$langs->trans("Contract"),""); $form = new Form($db); $formfile = new FormFile($db); @@ -1069,7 +1069,7 @@ if ($action == 'create') } else { $tmpcode=''; } - print ''.$langs->trans('Ref').''.$tmpcode.''; + print ''.$langs->trans('Ref').''.$tmpcode.''; // Ref customer print ''.$langs->trans('RefCustomer').''; @@ -1112,12 +1112,12 @@ if ($action == 'create') } // Commercial suivi - print ''.$langs->trans("TypeContact_contrat_internal_SALESREPFOLL").''; + print ''.$langs->trans("TypeContact_contrat_internal_SALESREPFOLL").''; print $form->select_dolusers(GETPOST("commercial_suivi_id")?GETPOST("commercial_suivi_id"):$user->id,'commercial_suivi_id',1,''); print ''; // Commercial signature - print ''.$langs->trans("TypeContact_contrat_internal_SALESREPSIGN").''; + print ''.$langs->trans("TypeContact_contrat_internal_SALESREPSIGN").''; print $form->select_dolusers(GETPOST("commercial_signature_id")?GETPOST("commercial_signature_id"):$user->id,'commercial_signature_id',1,''); print ''; @@ -1163,7 +1163,7 @@ if ($action == 'create') dol_fiche_end(); - print '
'; + print '
'; print ''; print '     '; print ''; @@ -1270,13 +1270,13 @@ else $linkback = ''.$langs->trans("BackToList").''; // Ref du contrat - if (!empty($modCodeContract->code_auto)) { - print ''.$langs->trans("Ref").''; + if (! empty($modCodeContract->code_auto)) { + print ''.$langs->trans("Ref").''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print ""; } else { print ''; - print ''; + print ''; print $form->editfieldkey("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); print ''; print $form->editfieldval("Ref",'ref',$object->ref,$object,$user->rights->contrat->creer); @@ -1285,7 +1285,7 @@ else } print ''; - print ''; + print ''; print $form->editfieldkey("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); print ''; print $form->editfieldval("RefCustomer",'ref_customer',$object->ref_customer,$object,$user->rights->contrat->creer); @@ -1293,7 +1293,7 @@ else print ''; print ''; - print ''; + print ''; print $form->editfieldkey("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); print ''; print $form->editfieldval("RefSupplier",'ref_supplier',$object->ref_supplier,$object,$user->rights->contrat->creer); @@ -1323,7 +1323,7 @@ else // Date print ''; - print ''; + print ''; print $form->editfieldkey("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer); print ''; print $form->editfieldval("Date",'date_contrat',$object->date_contrat,$object,$user->rights->contrat->creer,'datehourpicker'); @@ -1559,7 +1559,7 @@ else } - //Display lines extrafields + // Display lines extrafields if (is_array($extralabelslines) && count($extralabelslines)>0) { print ''; $line = new ContratLigne($db); diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index f5c8ab2cafa..7ec43fc2a56 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -109,7 +109,7 @@ if ($action == 'deletecontact' && $user->rights->contrat->creer) * View */ -llxHeader('', $langs->trans("ContractCard"), "Contrat"); +llxHeader('',$langs->trans("Contract"),""); $form = new Form($db); $formcompany= new FormCompany($db); @@ -142,7 +142,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Reference du contrat - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print ""; diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 95da343e3af..024cf561fb5 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -86,7 +86,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; $form = new Form($db); -llxHeader(); +llxHeader('',$langs->trans("Contract"),""); if ($object->id) @@ -110,7 +110,7 @@ if ($object->id) $linkback = ''.$langs->trans("BackToList").''; // Reference - print ''.$langs->trans('Ref').''.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; + print ''.$langs->trans('Ref').''.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; // Societe print ''.$langs->trans("Customer").''; diff --git a/htdocs/contrat/info.php b/htdocs/contrat/info.php index 2067247dbf6..f993a940e14 100644 --- a/htdocs/contrat/info.php +++ b/htdocs/contrat/info.php @@ -38,7 +38,7 @@ $result = restrictedArea($user, 'contrat',$contratid,''); * View */ -llxHeader(); +llxHeader('',$langs->trans("Contract"),""); $contrat = new Contrat($db); $contrat->fetch($contratid); diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index 502b354ee69..806434176fd 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -58,7 +58,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, * View */ -llxHeader(); +llxHeader('',$langs->trans("Contract"),""); $form = new Form($db); @@ -78,7 +78,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Reference - print ''.$langs->trans('Ref').''.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; + print ''.$langs->trans('Ref').''.$form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '').''; // Societe print ''.$langs->trans("Customer").''; diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index 22ff9155fd1..8977938eb4a 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -22,7 +22,7 @@ // Variable $upload_dir must be defined when entering here // Variable $upload_dirold may also exists. -// Send file/link +// Submit file/link if (GETPOST('sendit') && ! empty($conf->global->MAIN_UPLOAD_DOC)) { if ($object->id) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 1ec75cc43ed..41ff22276d7 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -895,10 +895,8 @@ class FormFile print ''; if (image_format_supported($file['name']) > 0) { - $minifile=getImageFileNameForSize($file['name'], '_mini', '.png'); // Thumbs are created with filename in lower case and with .png extension - //print $relativepath.'
'; - //print $file['path'].'/'.$minifile.'
'; - if (! dol_is_file($file['path'].'/'.$minifile)) $minifile=getImageFileNameForSize($file['name'], '_mini', '.'.$fileinfo['extension']); // For old thumbs + $minifile=getImageFileNameForSize($file['name'], '_mini'); // For new thumbs using same ext (in lower case howerver) than original + if (! dol_is_file($file['path'].'/'.$minifile)) $minifile=getImageFileNameForSize($file['name'], '_mini', '.png'); // For backward compatibility of old thumbs that were created with filename in lower case and with .png extension //print $file['path'].'/'.$minifile.'
'; $urlforhref=getAdvancedPreviewUrl($modulepart, $relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension'])); if (empty($urlforhref)) $urlforhref=DOL_URL_ROOT.'/viewimage.php?modulepart='.$modulepart.'&file='.urlencode($relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension'])); diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index 8db0d2001cd..1aadf650487 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -109,7 +109,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode */ function getExample($langs,$objproduct=0) { - $examplebarcode = $this->getNextValue($objproduct,0); + $examplebarcode = $this->getNextValue($objproduct,''); if (! $examplebarcode) { $examplebarcode = $langs->trans('NotConfigured'); @@ -127,7 +127,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode * Return next value * * @param Product $objproduct Object product - * @param string $type type of barcode (EAN, ISBN, ...) + * @param string $type Type of barcode (EAN, ISBN, ...) * @return string Value if OK, '' if module not configured, <0 if KO */ function getNextValue($objproduct=null,$type='') @@ -278,7 +278,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode } dol_syslog(get_class($this).'::verif_syntax codefortest='.$codefortest." typefortest=".$typefortest); - + $newcodefortest=$codefortest; // Special case, if mask is on 12 digits instead of 13, we remove last char into code to test @@ -290,7 +290,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode dol_syslog(get_class($this).'::verif_syntax newcodefortest='.$newcodefortest); } } - + $result=check_value($mask,$newcodefortest); return $result; diff --git a/htdocs/core/modules/barcode/modules_barcode.class.php b/htdocs/core/modules/barcode/modules_barcode.class.php index 00f5fb967f7..4720ffb1341 100644 --- a/htdocs/core/modules/barcode/modules_barcode.class.php +++ b/htdocs/core/modules/barcode/modules_barcode.class.php @@ -87,11 +87,11 @@ abstract class ModeleNumRefBarCode /** * Return next value available * - * @param Societe $objsoc Object thirdparty - * @param int $type Type + * @param Product $objproduct Object Product + * @param string $type Type of barcode (EAN, ISBN, ...) * @return string Value */ - function getNextValue($objsoc=null,$type=-1) + function getNextValue($objproduct,$type='') { global $langs; return $langs->trans("Function_getNextValue_InModuleNotWorking"); @@ -165,7 +165,7 @@ abstract class ModeleNumRefBarCode $s.=$langs->trans("AutomaticCode").': '.yn($this->code_auto,1,2).'
'; $s.='
'; - $nextval=$this->getNextValue($soc,0); + $nextval=$this->getNextValue($soc,''); if (empty($nextval)) $nextval=$langs->trans("Undefined"); $s.=$langs->trans("NextValue").': '.$nextval.'
'; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index a123ccd633a..eac3c735d66 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1168,7 +1168,7 @@ else if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print ''; diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index b64a16f91ba..473445049f7 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -128,7 +128,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print ""; diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index aca31d4e7c2..59a3bbf3c5d 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -106,7 +106,7 @@ if ($object->id) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print ''; diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index 3c5fce7caa2..c672d48cb71 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -54,7 +54,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, * View */ -llxHeader(); +llxHeader('',$langs->trans("Intervention")); $form = new Form($db); @@ -70,12 +70,12 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; - print ''.$langs->trans('Ref').''; + print ''.$langs->trans('Ref').''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print ''; // Company - print ''.$langs->trans('Company').''.$societe->getNomUrl(1).''; + print ''.$langs->trans('Company').''.$societe->getNomUrl(1).''; print ""; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index d800edd8b0d..b323f58e0b8 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1307,8 +1307,8 @@ if (empty($reshook)) /* * View */ - -llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur"); +$help_url='EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; +llxHeader('',$langs->trans("Order"),$help_url); $form = new Form($db); $formfile = new FormFile($db); @@ -1757,7 +1757,7 @@ elseif (! empty($object->id)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print ''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print ''; diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 8ced1e9844c..446b96687b5 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -112,8 +112,8 @@ else if ($action == 'deletecontact' && $user->rights->fournisseur->commande->cre /* * View */ - -llxHeader('', $langs->trans("Order"), "Commande"); +$help_url='EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; +llxHeader('',$langs->trans("Order"),$help_url); $form = new Form($db); $formcompany = new FormCompany($db); @@ -149,7 +149,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print ''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print ''; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 8fab37eeab0..472c44d1031 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -258,17 +258,15 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) * View */ +$now = dol_now(); + $form = new Form($db); $formproduct = new FormProduct($db); $warehouse_static = new Entrepot($db); $supplierorderdispatch = new CommandeFournisseurDispatch($db); -$help_url = 'EN:CommandeFournisseur'; -llxHeader('', $langs->trans("OrderCard"), $help_url, '', 0, 0, array( - '/fourn/js/lib_dispatch.js' -)); - -$now = dol_now(); +$help_url='EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; +llxHeader('', $langs->trans("Order"), $help_url, '', 0, 0, array('/fourn/js/lib_dispatch.js')); if ($id > 0 || ! empty($ref)) { $soc = new Societe($db); @@ -288,7 +286,7 @@ if ($id > 0 || ! empty($ref)) { print ''; // Ref - print ''; + print ''; print ''; diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index e78320c0043..cd6542a2810 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -89,7 +89,8 @@ $form = new Form($db); if ($object->id > 0) { - llxHeader(); + $help_url='EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; + llxHeader('',$langs->trans("Order"),$help_url); $author = new User($db); $author->fetch($object->user_author_id); @@ -113,7 +114,7 @@ if ($object->id > 0) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''; + print ''; print ''; diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index c8ed0e73660..5cd8510d854 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -62,7 +62,8 @@ if ($id > 0 || ! empty($ref)) $soc->fetch($object->socid); - llxHeader('',$langs->trans("History"),"CommandeFournisseur"); + $help_url='EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; + llxHeader('',$langs->trans("Order"),$help_url); $head = ordersupplier_prepare_head($object); diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 6a1c6cfe80e..1e2ae3e4c7b 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -57,8 +57,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, /* * View */ - -llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur"); +$help_url='EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; +llxHeader('',$langs->trans("Order"),$help_url); $form = new Form($db); @@ -94,7 +94,7 @@ if ($id > 0 || ! empty($ref)) $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''; + print ''; print ''; diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index 46999c537ed..62b474533f4 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2010-2011 Juanjo Menent +-- Copyright (C) 2010-2016 Juanjo Menent -- Copyright (C) 2012 Sebastian Neuwert -- Copyright (C) 2012 Ricardo Schluter -- Copyright (C) 2015 Ferran Marcet @@ -320,4 +320,7 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18123, '', 0, 'San Martín', 1); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18124, '', 0, 'Tacna', 1); INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18125, '', 0, 'Tumbes', 1); -INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18126, '', 0, 'Ucayali', 1); \ No newline at end of file +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18126, '', 0, 'Ucayali', 1); + +-- Regions Panama (id country=178) +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 178, 17801, '', 0, 'Panama', 1); \ No newline at end of file diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index c50bdf94987..066bbb9fd6e 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2010-2013 Juanjo Menent +-- Copyright (C) 2010-2016 Juanjo Menent -- Copyright (C) 2012 Sebastian Neuwert -- Copyright (C) 2012 Ricardo Schluter -- Copyright (C) 2015 Ferran Marcet @@ -1479,4 +1479,16 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2501', 18126, '', 0, '', 'Coronel Portillo', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2502', 18126, '', 0, '', 'Atalaya', 1); INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2503', 18126, '', 0, '', 'Padre Abad', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2504', 18126, '', 0, '', 'Purús', 1); \ No newline at end of file +INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('2504', 18126, '', 0, '', 'Purús', 1); + +-- Provinces Panama (id country=178) +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-1', 17801, '', 0, '', 'Bocas del Toro', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-2', 17801, '', 0, '', 'Coclé', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-3', 17801, '', 0, '', 'Colón', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-4', 17801, '', 0, '', 'Chiriquí', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-5', 17801, '', 0, '', 'Darién', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-6', 17801, '', 0, '', 'Herrera', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-7', 17801, '', 0, '', 'Los Santos', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-8', 17801, '', 0, '', 'Panamá', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-9', 17801, '', 0, '', 'Veraguas', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-13', 17801, '', 0, '', 'Panamá Oeste', 1); \ No newline at end of file diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql index bfbad1f1f2b..8948984e907 100644 --- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql +++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2010-2011 Juanjo Menent +-- Copyright (C) 2010-2016 Juanjo Menent -- Copyright (C) 2012 Sebastian Neuwert -- Copyright (C) 2012 Tommaso Basilici -- Copyright (C) 2012 Ricardo Schluter @@ -308,3 +308,9 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (188, INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (188, '18816', 'SRL - Societate comercialã cu rãspundere limitatã', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (188, '18817', 'URL - Intreprindere profesionala unipersonala cu rãspundere limitata (IPURL)', 1); +-- Panama +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17801', 'Empresa individual', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17802', 'Asociación General', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17803', 'Sociedad de Responsabilidad Limitada', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17804', 'Sociedad Civil', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17805', 'Sociedad Anónima', 1); \ No newline at end of file diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index 774ffc381fc..7c1da17c8b0 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2010-2015 Juanjo Menent +-- Copyright (C) 2010-2016 Juanjo Menent -- Copyright (C) 2012 Sebastian Neuwert -- Copyright (C) 2012 Ricardo Schluter -- @@ -200,6 +200,10 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (17 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1733, 173, '8','0','VAT reduced rate', 1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1734, 173, '0','0','VAT Rate 0', 1); +-- PANAMA (id country=178) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1781, 178, '7','0','ITBMS standard rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1782, 178, '0','0','ITBMS Rate 0',1); + -- PERU (id country=181) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1811, 181, '18','0','VAT standard rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1812, 181, '0','0','VAT Rate 0',1); diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 6afc871f668..1309c1dc225 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -517,4 +517,23 @@ CREATE TABLE llx_oauth_state ( ALTER TABLE llx_product_batch ADD UNIQUE INDEX uk_product_batch (fk_product_stock, batch); +-- Panama datas +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1781, 178, '7','0','ITBMS standard rate',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (1782, 178, '0','0','ITBMS Rate 0',1); +INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 178, 17801, '', 0, 'Panama', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-1', 17801, '', 0, '', 'Bocas del Toro', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-2', 17801, '', 0, '', 'Coclé', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-3', 17801, '', 0, '', 'Colón', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-4', 17801, '', 0, '', 'Chiriquí', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-5', 17801, '', 0, '', 'Darién', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-6', 17801, '', 0, '', 'Herrera', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-7', 17801, '', 0, '', 'Los Santos', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-8', 17801, '', 0, '', 'Panamá', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-9', 17801, '', 0, '', 'Veraguas', 1); +INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('PA-13', 17801, '', 0, '', 'Panamá Oeste', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17801', 'Empresa individual', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17802', 'Asociación General', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17803', 'Sociedad de Responsabilidad Limitada', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17804', 'Sociedad Civil', 1); +INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17805', 'Sociedad Anónima', 1); diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 130a0e55208..c42c3981494 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -5,9 +5,10 @@ * Copyright (C) 2007 Auguria SARL * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent - * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012 Cedric Salvador - * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2016 Ferran Marcet * * 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 @@ -114,7 +115,7 @@ if ($action == 'setModuleOptions') } } -if ($action == 'other' && GETPOST('value_PRODUIT_LIMIT_SIZE') > 0) +if ($action == 'other' && GETPOST('value_PRODUIT_LIMIT_SIZE') >= 0) { $res = dolibarr_set_const($db, "PRODUIT_LIMIT_SIZE", GETPOST('value_PRODUIT_LIMIT_SIZE'),'chaine',0,'',$conf->entity); } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 90cc0ef806d..5d72f67a0eb 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1856,14 +1856,14 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) { $var=!$var; $html .= ''; } else { $html .= ''; } @@ -1882,14 +1882,14 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) { $var=!$var; $html .= ''; } else { $html .= ''; } @@ -1908,14 +1908,14 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) { $var=!$var; $html .= ''; } else { $html .= ''; } @@ -1933,7 +1933,8 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) dol_fiche_head(''); $html .= ''; + $html .= ''; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 3f8e258b9ea..f4cf2c994a6 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3694,7 +3694,7 @@ class Product extends CommonObject if ($size == 1 || $size == 'small') { // Format vignette // Find name of thumb file - $photo_vignette=basename(getImageFileNameForSize($dir.$file, '_small', '.png')); + $photo_vignette=basename(getImageFileNameForSize($dir.$file, '_small')); if (! dol_is_file($dirthumb.$photo_vignette)) $photo_vignette=''; // Get filesize of original file diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 259ffae5913..cddcff12374 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -110,7 +110,7 @@ if (empty($reshook)) } } - // Action sending file + // Action submit/delete file/link include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; } diff --git a/htdocs/websites/index.php b/htdocs/websites/index.php index 113e4531f04..655bdd18e9f 100644 --- a/htdocs/websites/index.php +++ b/htdocs/websites/index.php @@ -702,6 +702,7 @@ if (count($object->records) > 0) else $out.=''; $out.=''; print $out; + print ''; //print $form->selectarray('page', $array);
' . $langs->trans("Ref") . '
' . $langs->trans("Ref") . ''; print $form->showrefnav($commande, 'ref', '', 1, 'ref', 'ref'); print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); print '
'; - $html .= $langs->trans("AddToDraftProposals").''; + $html .= $langs->trans("AddToDraftProposals").''; $html .= $form->selectarray("propalid", $otherprop, 0, 1); $html .= '
'; - $html .= $langs->trans("AddToDraftProposals").''; + $html .= $langs->trans("AddToDraftProposals").''; $html .= $langs->trans("NoDraftProposals"); $html .= '
'; - $html .= $langs->trans("AddToDraftOrders").''; + $html .= $langs->trans("AddToDraftOrders").''; $html .= $form->selectarray("commandeid", $othercom, 0, 1); $html .= '
'; - $html .= $langs->trans("AddToDraftOrders").''; + $html .= $langs->trans("AddToDraftOrders").''; $html .= $langs->trans("NoDraftOrders"); $html .= '
'; - $html .= $langs->trans("AddToDraftInvoices").''; + $html .= $langs->trans("AddToDraftInvoices").''; $html .= $form->selectarray("factureid", $otherinvoice, 0, 1); $html .= '
'; - $html .= $langs->trans("AddToDraftInvoices").''; + $html .= $langs->trans("AddToDraftInvoices").''; $html .= $langs->trans("NoDraftInvoices"); $html .= '
'.$langs->trans("Quantity").' '; - $html .= ''.$langs->trans("ReductionShort").'(%) '; + $html .= ''.$langs->trans("ReductionShort").'(%) '; $html .= ''; $html .= '