Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/admin/modules.php
This commit is contained in:
Laurent Destailleur
2017-02-08 10:59:05 +01:00
32 changed files with 118 additions and 135 deletions

View File

@@ -749,7 +749,8 @@ while ($i < min($num, $limit))
print '<td align="center" class="nowrap">'; print '<td align="center" class="nowrap">';
print dol_print_date($datefin,'day'); print dol_print_date($datefin,'day');
if ($memberstatic->hasDelay()) { if ($memberstatic->hasDelay()) {
print " ".img_warning($langs->trans("SubscriptionLate")); $textlate .= ' ('.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($conf->adherent->subscription->warning_delay/60/60/24) >= 0 ? '+' : '').ceil($conf->adherent->subscription->warning_delay/60/60/24).' '.$langs->trans("days").')';
print " ".img_warning($langs->trans("SubscriptionLate").$textlate);
} }
print '</td>'; print '</td>';
} }

View File

@@ -46,14 +46,17 @@ $action=GETPOST('action');
*/ */
// positionne la variable pour le nombre de rss externes // positionne la variable pour le nombre de rss externes
$sql ="SELECT MAX(".$db->decrypt('name').") as name FROM ".MAIN_DB_PREFIX."const"; $sql ="SELECT ".$db->decrypt('name')." as name FROM ".MAIN_DB_PREFIX."const";
$sql.=" WHERE ".$db->decrypt('name')." LIKE 'EXTERNAL_RSS_URLRSS_%'"; $sql.=" WHERE ".$db->decrypt('name')." LIKE 'EXTERNAL_RSS_URLRSS_%'";
$result=$db->query($sql); //print $sql;
$result=$db->query($sql); // We can't use SELECT MAX() because EXTERNAL_RSS_URLRSS_10 is lower than EXTERNAL_RSS_URLRSS_9
if ($result) if ($result)
{ {
$obj = $db->fetch_object($result); while ($obj = $db->fetch_object($result))
preg_match('/([0-9]+)$/i',$obj->name,$reg); {
if ($reg[1]) $lastexternalrss = $reg[1]; preg_match('/([0-9]+)$/i',$obj->name,$reg);
if ($reg[1] && $reg[1] > $lastexternalrss) $lastexternalrss = $reg[1];
}
} }
else else
{ {

View File

@@ -59,9 +59,7 @@ llxHeader('',$langs->trans("CustomersStandingOrdersArea"));
if (prelevement_check_config() < 0) if (prelevement_check_config() < 0)
{ {
$langs->load("errors"); $langs->load("errors");
print '<div class="error">'; setEventMessages($langs->trans("ErrorModuleSetupNotComplete"), null, 'errors');
print $langs->trans("ErrorModuleSetupNotComplete");
print '</div>';
} }
print load_fiche_titre($langs->trans("CustomersStandingOrdersArea")); print load_fiche_titre($langs->trans("CustomersStandingOrdersArea"));

View File

@@ -61,7 +61,6 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 311__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 311__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 320__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/product/admin/product_tools.php?mainmenu=home&amp;leftmenu=admintools', 'ProductVatMassChange', 1, 'products', '', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 320__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/product/admin/product_tools.php?mainmenu=home&amp;leftmenu=admintools', 'ProductVatMassChange', 1, 'products', '', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools" && $conf->accounting->enabled', __HANDLER__, 'left', 321__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=home&amp;leftmenu=admintools', 'InitAccountancy', 1, 'accountancy', '', '', 2, 0, __ENTITY__);
-- Home - Menu users and groups -- Home - Menu users and groups
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 4, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);

View File

@@ -579,12 +579,6 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/product/admin/product_tools.php?mainmenu=home&amp;leftmenu=admintools", $langs->trans("ProductVatMassChange"), 1, $user->admin); $newmenu->add("/product/admin/product_tools.php?mainmenu=home&amp;leftmenu=admintools", $langs->trans("ProductVatMassChange"), 1, $user->admin);
} }
if (! empty($conf->accounting->enabled))
{
$langs->load("accountancy");
$newmenu->add("/accountancy/admin/productaccount.php?mainmenu=home&amp;leftmenu=admintools", $langs->trans("InitAccountancy"), 1, $user->admin);
}
$newmenu->add("/support/index.php?mainmenu=home&amp;leftmenu=admintools", $langs->trans("HelpCenter"),1,1,'targethelp'); $newmenu->add("/support/index.php?mainmenu=home&amp;leftmenu=admintools", $langs->trans("HelpCenter"),1,1,'targethelp');
} }

View File

@@ -94,7 +94,7 @@ class modExpedition extends DolibarrModules
$this->const[$r][0] = "EXPEDITION_ADDON_NUMBER"; $this->const[$r][0] = "EXPEDITION_ADDON_NUMBER";
$this->const[$r][1] = "chaine"; $this->const[$r][1] = "chaine";
$this->const[$r][2] = "mod_expedition_safor"; $this->const[$r][2] = "mod_expedition_safor";
$this->const[$r][3] = 'Nom du gestionnaire de numerotation des expeditions'; $this->const[$r][3] = 'Name for numbering manager for shipments';
$this->const[$r][4] = 0; $this->const[$r][4] = 0;
$r++; $r++;

View File

@@ -208,7 +208,7 @@ class modFacture extends DolibarrModules
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancySellCode'); $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'f.fk_user_author'=>'CreatedById','uc.login'=>'CreatedByLogin','f.fk_user_valid'=>'ValidatedById','uv.login'=>'ValidatedByLogin', 'pj.ref'=>'ProjectRef', 'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.subprice'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel','p.accountancy_code_sell'=>'ProductAccountancySellCode');
//Add 'fd.label'=>"Label" to export_fields_array if you use it. Not used by dolibarr currently. //Add 'fd.label'=>"Label" to export_fields_array if you use it. Not used by dolibarr currently.
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text'); //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text", 'pj.ref'=>'Text', 'fd.label'=>'Text', 'fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text'); $this->export_TypeFields_array[$r]=array('s.rowid'=>'Numeric','s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>'Numeric','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Numeric','f.note_private'=>"Text",'f.note_public'=>"Text",'f.fk_user_author'=>'Numeric','uc.login'=>'Text','f.fk_user_valid'=>'Numeric','uv.login'=>'Text','pj.ref'=>'Text','fd.rowid'=>'Numeric','fd.label'=>'Text','fd.description'=>"Text",'fd.subprice'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text','p.accountancy_code_sell'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'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','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice", 'pj.ref'=>'project', 'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.subprice'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product','f.fk_user_author'=>'user','uc.login'=>'user','f.fk_user_valid'=>'user','uv.login'=>'user'); $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'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','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice", 'pj.ref'=>'project', 'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.subprice'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product','p.accountancy_code_sell'=>'product','f.fk_user_author'=>'user','uc.login'=>'user','f.fk_user_valid'=>'user','uv.login'=>'user');
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
$keyforselect='facture'; $keyforelement='invoice'; $keyforaliasextra='extra'; $keyforselect='facture'; $keyforelement='invoice'; $keyforaliasextra='extra';

View File

@@ -2242,9 +2242,10 @@ function select_expensereport_statut($selected='',$htmlname='fk_statut',$useempt
* @param int $selected Preselected type * @param int $selected Preselected type
* @param string $htmlname Name of field in form * @param string $htmlname Name of field in form
* @param int $showempty Add an empty field * @param int $showempty Add an empty field
* @param int $active 1=Active only, 0=Unactive only, -1=All
* @return string Select html * @return string Select html
*/ */
function select_type_fees_id($selected='',$htmlname='type',$showempty=0) function select_type_fees_id($selected='',$htmlname='type',$showempty=0, $active=1)
{ {
global $db,$langs,$user; global $db,$langs,$user;
$langs->load("trips"); $langs->load("trips");
@@ -2258,6 +2259,7 @@ function select_type_fees_id($selected='',$htmlname='type',$showempty=0)
} }
$sql = "SELECT c.id, c.code, c.label as type FROM ".MAIN_DB_PREFIX."c_type_fees as c"; $sql = "SELECT c.id, c.code, c.label as type FROM ".MAIN_DB_PREFIX."c_type_fees as c";
if ($active >= 0) $sql.= " WHERE c.active = ".$active;
$sql.= " ORDER BY c.label ASC"; $sql.= " ORDER BY c.label ASC";
$resql=$db->query($sql); $resql=$db->query($sql);
if ($resql) if ($resql)

View File

@@ -288,15 +288,15 @@ class Export
{ {
// mode plage // mode plage
$ValueArray = explode("+", $ValueField); $ValueArray = explode("+", $ValueField);
$szFilterQuery ="(".$this->conditionDate($NameField,$ValueArray[0],">="); $szFilterQuery ="(".$this->conditionDate($NameField,trim($ValueArray[0]),">=");
$szFilterQuery.=" AND ".$this->conditionDate($NameField,$ValueArray[1],"<=").")"; $szFilterQuery.=" AND ".$this->conditionDate($NameField,trim($ValueArray[1]),"<=").")";
} }
else else
{ {
if (is_numeric(substr($ValueField,0,1))) if (is_numeric(substr($ValueField,0,1)))
$szFilterQuery=$this->conditionDate($NameField,$ValueField,"="); $szFilterQuery=$this->conditionDate($NameField,trim($ValueField),"=");
else else
$szFilterQuery=$this->conditionDate($NameField,substr($ValueField,1),substr($ValueField,0,1)); $szFilterQuery=$this->conditionDate($NameField,trim(substr($ValueField,1)),substr($ValueField,0,1));
} }
break; break;
case 'Duree': case 'Duree':

View File

@@ -595,7 +595,7 @@ if ($step == 2 && $datatoexport)
{ {
// Selected fields // Selected fields
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?step=2&datatoexport='.$datatoexport.'&action=unselectfield&field='.$code.'">'.img_left('default', 0, 'style="max-width: 20px"').'</a></td>'; print '<td align="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?step=2&datatoexport='.$datatoexport.'&action=unselectfield&field='.$code.'">'.img_left('default', 0, 'style="max-width: 20px"').'</a></td>';
print '<td>'; print '<td>';
//print $text.'-'.$htmltext."<br>"; //print $text.'-'.$htmltext."<br>";
print $form->textwithpicto($text,$htmltext); print $form->textwithpicto($text,$htmltext);
@@ -610,7 +610,7 @@ if ($step == 2 && $datatoexport)
print $form->textwithpicto($text,$htmltext); print $form->textwithpicto($text,$htmltext);
//print ' ('.$code.')'; //print ' ('.$code.')';
print '</td>'; print '</td>';
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?step=2&datatoexport='.$datatoexport.'&action=selectfield&field='.$code.'">'.img_right('default', 0, 'style="max-width: 20px"').'</a></td>'; print '<td align="center"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?step=2&datatoexport='.$datatoexport.'&action=selectfield&field='.$code.'">'.img_right('default', 0, 'style="max-width: 20px"').'</a></td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
} }

View File

@@ -46,7 +46,7 @@ class FactureFournisseur extends CommonInvoice
public $fk_element='fk_facture_fourn'; public $fk_element='fk_facture_fourn';
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto='bill'; public $picto='bill';
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
@@ -320,12 +320,12 @@ class FactureFournisseur extends CommonInvoice
{ {
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn)'; $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn)';
$sql .= ' VALUES ('.$this->id.')'; $sql .= ' VALUES ('.$this->id.')';
$resql_insert=$this->db->query($sql); $resql_insert=$this->db->query($sql);
if ($resql_insert) if ($resql_insert)
{ {
$idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det'); $idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det');
$this->updateline( $this->updateline(
$idligne, $idligne,
$this->lines[$i]->description, $this->lines[$i]->description,
@@ -354,19 +354,19 @@ class FactureFournisseur extends CommonInvoice
foreach ($this->lines as $i => $val) foreach ($this->lines as $i => $val)
{ {
$line = $this->lines[$i]; $line = $this->lines[$i];
// Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array // Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array
//if (! is_object($line)) $line=json_decode(json_encode($line), FALSE); // convert recursively array into object. //if (! is_object($line)) $line=json_decode(json_encode($line), FALSE); // convert recursively array into object.
if (! is_object($line)) $line = (object) $line; if (! is_object($line)) $line = (object) $line;
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn)'; $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn)';
$sql .= ' VALUES ('.$this->id.')'; $sql .= ' VALUES ('.$this->id.')';
$resql_insert=$this->db->query($sql); $resql_insert=$this->db->query($sql);
if ($resql_insert) if ($resql_insert)
{ {
$idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det'); $idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det');
$this->updateline( $this->updateline(
$idligne, $idligne,
$line->description, $line->description,
@@ -387,9 +387,9 @@ class FactureFournisseur extends CommonInvoice
$this->db->rollback(); $this->db->rollback();
return -5; return -5;
} }
} }
} }
// Update total price // Update total price
$result=$this->update_price(); $result=$this->update_price();
if ($result > 0) if ($result > 0)
@@ -413,7 +413,7 @@ class FactureFournisseur extends CommonInvoice
} }
} }
else if ($reshook < 0) $error++; else if ($reshook < 0) $error++;
if (! $error) if (! $error)
{ {
// Call trigger // Call trigger
@@ -421,7 +421,7 @@ class FactureFournisseur extends CommonInvoice
if ($result < 0) $error++; if ($result < 0) $error++;
// End call triggers // End call triggers
} }
if (! $error) if (! $error)
{ {
$this->db->commit(); $this->db->commit();
@@ -587,7 +587,7 @@ class FactureFournisseur extends CommonInvoice
$this->multicurrency_total_ht = $obj->multicurrency_total_ht; $this->multicurrency_total_ht = $obj->multicurrency_total_ht;
$this->multicurrency_total_tva = $obj->multicurrency_total_tva; $this->multicurrency_total_tva = $obj->multicurrency_total_tva;
$this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
$this->extraparams = (array) json_decode($obj->extraparams, true); $this->extraparams = (array) json_decode($obj->extraparams, true);
$this->socid = $obj->socid; $this->socid = $obj->socid;
@@ -671,8 +671,8 @@ class FactureFournisseur extends CommonInvoice
$line->subprice = $obj->pu_ht; $line->subprice = $obj->pu_ht;
$line->pu_ht = $obj->pu_ht; $line->pu_ht = $obj->pu_ht;
$line->pu_ttc = $obj->pu_ttc; $line->pu_ttc = $obj->pu_ttc;
$line->vat_src_code = $obj->vat_src_code; $line->vat_src_code = $obj->vat_src_code;
$line->tva_tx = $obj->tva_tx; $line->tva_tx = $obj->tva_tx;
$line->localtax1_tx = $obj->localtax1_tx; $line->localtax1_tx = $obj->localtax1_tx;
$line->localtax2_tx = $obj->localtax2_tx; $line->localtax2_tx = $obj->localtax2_tx;
@@ -700,7 +700,7 @@ class FactureFournisseur extends CommonInvoice
$line->multicurrency_total_ht = $obj->multicurrency_total_ht; $line->multicurrency_total_ht = $obj->multicurrency_total_ht;
$line->multicurrency_total_tva = $obj->multicurrency_total_tva; $line->multicurrency_total_tva = $obj->multicurrency_total_tva;
$line->multicurrency_total_ttc = $obj->multicurrency_total_ttc; $line->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
$this->lines[$i] = $line; $this->lines[$i] = $line;
$i++; $i++;
@@ -1260,7 +1260,7 @@ class FactureFournisseur extends CommonInvoice
if (! $error && empty($notrigger)) if (! $error && empty($notrigger))
{ {
// Call trigger // Call trigger
$result=$this->call_trigger('BILL_SUPPLIER_VALIDATE',$user); $result=$this->call_trigger('BILL_SUPPLIER_UNVALIDATE',$user);
if ($result < 0) $error++; if ($result < 0) $error++;
// End call triggers // End call triggers
} }
@@ -1332,7 +1332,7 @@ class FactureFournisseur extends CommonInvoice
if (empty($txlocaltax2)) $txlocaltax2=0; if (empty($txlocaltax2)) $txlocaltax2=0;
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty); $localtaxes_type=getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty);
// Clean vat code // Clean vat code
$vat_src_code=''; $vat_src_code='';
if (preg_match('/\((.*)\)/', $txtva, $reg)) if (preg_match('/\((.*)\)/', $txtva, $reg))
@@ -1340,7 +1340,7 @@ class FactureFournisseur extends CommonInvoice
$vat_src_code = $reg[1]; $vat_src_code = $reg[1];
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
} }
$remise_percent=price2num($remise_percent); $remise_percent=price2num($remise_percent);
$qty=price2num($qty); $qty=price2num($qty);
$pu=price2num($pu); $pu=price2num($pu);
@@ -1374,7 +1374,7 @@ class FactureFournisseur extends CommonInvoice
//$this->line->label=$label; // deprecated //$this->line->label=$label; // deprecated
$this->line->desc=$desc; $this->line->desc=$desc;
$this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative $this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
$this->line->vat_src_code=$vat_src_code; $this->line->vat_src_code=$vat_src_code;
$this->line->tva_tx=$txtva; $this->line->tva_tx=$txtva;
$this->line->localtax1_tx=$txlocaltax1; $this->line->localtax1_tx=$txlocaltax1;
@@ -1503,7 +1503,7 @@ class FactureFournisseur extends CommonInvoice
$vat_src_code = $reg[1]; $vat_src_code = $reg[1];
$vatrate = preg_replace('/\s*\(.*\)/', '', $vatrate); // Remove code into vatrate. $vatrate = preg_replace('/\s*\(.*\)/', '', $vatrate); // Remove code into vatrate.
} }
$tabprice = calcul_price_total($qty, $pu, $remise_percent, $vatrate, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); $tabprice = calcul_price_total($qty, $pu, $remise_percent, $vatrate, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise);
$total_ht = $tabprice[0]; $total_ht = $tabprice[0];
$total_tva = $tabprice[1]; $total_tva = $tabprice[1];
@@ -1513,13 +1513,13 @@ class FactureFournisseur extends CommonInvoice
$pu_ttc = $tabprice[5]; $pu_ttc = $tabprice[5];
$total_localtax1 = $tabprice[9]; $total_localtax1 = $tabprice[9];
$total_localtax2 = $tabprice[10]; $total_localtax2 = $tabprice[10];
// MultiCurrency // MultiCurrency
$multicurrency_total_ht = $tabprice[16]; $multicurrency_total_ht = $tabprice[16];
$multicurrency_total_tva = $tabprice[17]; $multicurrency_total_tva = $tabprice[17];
$multicurrency_total_ttc = $tabprice[18]; $multicurrency_total_ttc = $tabprice[18];
$pu_ht_devise = $tabprice[19]; $pu_ht_devise = $tabprice[19];
if (empty($info_bits)) $info_bits=0; if (empty($info_bits)) $info_bits=0;
if ($idproduct) if ($idproduct)
@@ -1545,7 +1545,7 @@ class FactureFournisseur extends CommonInvoice
$line->pu_ttc = $pu_ttc; $line->pu_ttc = $pu_ttc;
$line->qty = $qty; $line->qty = $qty;
$line->remise_percent = $remise_percent; $line->remise_percent = $remise_percent;
$line->vat_src_code=$vat_src_code; $line->vat_src_code=$vat_src_code;
$line->tva_tx = $vatrate; $line->tva_tx = $vatrate;
$line->localtax1_tx = $txlocaltax1; $line->localtax1_tx = $txlocaltax1;
@@ -1871,7 +1871,7 @@ class FactureFournisseur extends CommonInvoice
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.=' class="classfortooltip"'; $linkclose.=' class="classfortooltip"';
} }
$linkstart = '<a href="'.$url.'"'; $linkstart = '<a href="'.$url.'"';
$linkstart.=$linkclose.'>'; $linkstart.=$linkclose.'>';
$linkend='</a>'; $linkend='</a>';
@@ -2179,10 +2179,10 @@ class FactureFournisseur extends CommonInvoice
} }
else else
{ {
$modele = ''; // No default value. For supplier invoice, we allow to disable all PDF generation $modele = ''; // No default value. For supplier invoice, we allow to disable all PDF generation
} }
} }
if (empty($modele)) if (empty($modele))
{ {
return 0; return 0;
@@ -2266,7 +2266,7 @@ class SupplierInvoiceLine extends CommonObjectLine
public $product_ref; public $product_ref;
/** /**
* Supplier reference of price when we added the line. May have been changed after line was added. * Supplier reference of price when we added the line. May have been changed after line was added.
* TODO Rename field ref to ref_supplier into table llx_facture_fourn_det and llx_commande_fournisseurdet and update fields into updateline * TODO Rename field ref to ref_supplier into table llx_facture_fourn_det and llx_commande_fournisseurdet and update fields into updateline
* @var string * @var string
*/ */
@@ -2555,13 +2555,13 @@ class SupplierInvoiceLine extends CommonObjectLine
$sql.= ", product_type = ".$this->product_type; $sql.= ", product_type = ".$this->product_type;
$sql.= ", info_bits = ".$this->info_bits; $sql.= ", info_bits = ".$this->info_bits;
$sql.= ", fk_unit = ".$fk_unit; $sql.= ", fk_unit = ".$fk_unit;
// Multicurrency // Multicurrency
$sql.= " , multicurrency_subprice=".price2num($this->multicurrency_subprice).""; $sql.= " , multicurrency_subprice=".price2num($this->multicurrency_subprice)."";
$sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; $sql.= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht)."";
$sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; $sql.= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva)."";
$sql.= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; $sql.= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc)."";
$sql.= " WHERE rowid = ".$this->id; $sql.= " WHERE rowid = ".$this->id;
dol_syslog(get_class($this)."::update", LOG_DEBUG); dol_syslog(get_class($this)."::update", LOG_DEBUG);
@@ -2675,7 +2675,7 @@ class SupplierInvoiceLine extends CommonObjectLine
$sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").","; $sql.= " ".(! empty($this->label)?"'".$this->db->escape($this->label)."'":"null").",";
$sql.= " '".$this->db->escape($this->desc)."',"; $sql.= " '".$this->db->escape($this->desc)."',";
$sql.= " ".price2num($this->qty).","; $sql.= " ".price2num($this->qty).",";
$sql.= " ".(empty($this->vat_src_code)?"''":"'".$this->vat_src_code."'").","; $sql.= " ".(empty($this->vat_src_code)?"''":"'".$this->vat_src_code."'").",";
$sql.= " ".price2num($this->tva_tx).","; $sql.= " ".price2num($this->tva_tx).",";
$sql.= " ".price2num($this->localtax1_tx).","; $sql.= " ".price2num($this->localtax1_tx).",";
@@ -2745,7 +2745,7 @@ class SupplierInvoiceLine extends CommonObjectLine
$this->db->rollback(); $this->db->rollback();
return -2; return -2;
} }
} }
/** /**
* Mise a jour de l'objet ligne de commande en base * Mise a jour de l'objet ligne de commande en base
* *

View File

@@ -46,6 +46,7 @@ if (!$user->rights->fournisseur->facture->lire) accessforbidden();
$langs->load("bills"); $langs->load("bills");
$langs->load("companies"); $langs->load("companies");
$langs->load('products'); $langs->load('products');
$langs->load('projects');
$socid = GETPOST('socid','int'); $socid = GETPOST('socid','int');

View File

@@ -184,6 +184,7 @@ ALTER TABLE llx_resource_extrafields ADD INDEX idx_resource_extrafields (fk_obje
INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_SIZE_SHORTLIST_LIMIT')__,__ENCRYPT('3')__,'chaine','Max length for small lists (tabs)',0); INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('MAIN_SIZE_SHORTLIST_LIMIT')__,__ENCRYPT('3')__,'chaine','Max length for small lists (tabs)',0);
INSERT INTO llx_const (name, value, type, note, visible, entity) values (__ENCRYPT('EXPEDITION_ADDON_NUMBER')__, __ENCRYPT('mod_expedition_safor')__, 'chaine','Name for numbering manager for shipments',0,1);
ALTER TABLE llx_bank_account ADD COLUMN note_public text; ALTER TABLE llx_bank_account ADD COLUMN note_public text;
ALTER TABLE llx_bank_account ADD COLUMN model_pdf varchar(255); ALTER TABLE llx_bank_account ADD COLUMN model_pdf varchar(255);

View File

@@ -22,7 +22,7 @@ FilesUpdated=Updated Files
FilesModified=Modified Files FilesModified=Modified Files
FilesAdded=Added Files FilesAdded=Added Files
FileCheckDolibarr=Check integrity of application files FileCheckDolibarr=Check integrity of application files
AvailableOnlyOnPackagedVersions=The local file for integrity checking is only available when application is installed from a certified package AvailableOnlyOnPackagedVersions=The local file for integrity checking is only available when application is installed from an official package
XmlNotFound=Xml Integrity File of application not found XmlNotFound=Xml Integrity File of application not found
SessionId=Session ID SessionId=Session ID
SessionSaveHandler=Handler to save sessions SessionSaveHandler=Handler to save sessions
@@ -296,7 +296,7 @@ YouCanSubmitFile=For this step, you can send package using this tool: Select mod
CurrentVersion=Dolibarr current version CurrentVersion=Dolibarr current version
CallUpdatePage=Go to the page that updates the database structure and data: %s. CallUpdatePage=Go to the page that updates the database structure and data: %s.
LastStableVersion=Latest stable version LastStableVersion=Latest stable version
LastActivationDate=Last activation date LastActivationDate=Latest activation date
UpdateServerOffline=Update server offline UpdateServerOffline=Update server offline
GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:<br><b>{000000}</b> corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br> GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:<br><b>{000000}</b> corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask. <br><b>{000000+000}</b> same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. <br><b>{000000@x}</b> same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required. <br><b>{dd}</b> day (01 to 31).<br><b>{mm}</b> month (01 to 12).<br><b>{yy}</b>, <b>{yyyy}</b> or <b>{y}</b> year over 2, 4 or 1 numbers. <br>
GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.<br><b>{tttt}</b> The code of third party type on n characters (see dictionary-thirdparty types).<br> GenericMaskCodes2=<b>{cccc}</b> the client code on n characters<br><b>{cccc000}</b> the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.<br><b>{tttt}</b> The code of third party type on n characters (see dictionary-thirdparty types).<br>
@@ -1398,7 +1398,7 @@ SendingsSetup=Sending module setup
SendingsReceiptModel=Sending receipt model SendingsReceiptModel=Sending receipt model
SendingsNumberingModules=Sendings numbering modules SendingsNumberingModules=Sendings numbering modules
SendingsAbility=Support shipping sheets for customer deliveries SendingsAbility=Support shipping sheets for customer deliveries
NoNeedForDeliveryReceipts=In most cases, sendings receipts are used both as sheets for customer deliveries (list of products to send) and sheets that is recevied and signed by customer. So product deliveries receipts is a duplicated feature and is rarely activated. NoNeedForDeliveryReceipts=In most cases, shipping sheets are used both as sheets for customer deliveries (list of products to send) and sheets that is received and signed by customer. So product deliveries receipts is a duplicated feature and is rarely activated.
FreeLegalTextOnShippings=Free text on shipments FreeLegalTextOnShippings=Free text on shipments
##### Deliveries ##### ##### Deliveries #####
DeliveryOrderNumberingModules=Products deliveries receipt numbering module DeliveryOrderNumberingModules=Products deliveries receipt numbering module
@@ -1621,7 +1621,7 @@ MailToSendSupplierOrder=To send supplier order
MailToSendSupplierInvoice=To send supplier invoice MailToSendSupplierInvoice=To send supplier invoice
MailToThirdparty=To send email from third party page MailToThirdparty=To send email from third party page
ByDefaultInList=Show by default on list view ByDefaultInList=Show by default on list view
YouUseLastStableVersion=You use the last stable version YouUseLastStableVersion=You use the latest stable version
TitleExampleForMajorRelease=Example of message you can use to announce this major release (feel free to use it on your web sites) TitleExampleForMajorRelease=Example of message you can use to announce this major release (feel free to use it on your web sites)
TitleExampleForMaintenanceRelease=Example of message you can use to announce this maintenance release (feel free to use it on your web sites) TitleExampleForMaintenanceRelease=Example of message you can use to announce this maintenance release (feel free to use it on your web sites)
ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> for complete list of changes. ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version %s is a major release with a lot of new features for both users and developers. You can download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read <a href="https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog">ChangeLog</a> for complete list of changes.

View File

@@ -74,13 +74,13 @@ Conciliate=Reconcile
Conciliation=Reconciliation Conciliation=Reconciliation
ReconciliationLate=Reconciliation late ReconciliationLate=Reconciliation late
IncludeClosedAccount=Include closed accounts IncludeClosedAccount=Include closed accounts
OnlyOpenedAccount=Only open accounts OnlyOpenedAccount=Only opened accounts
AccountToCredit=Account to credit AccountToCredit=Account to credit
AccountToDebit=Account to debit AccountToDebit=Account to debit
DisableConciliation=Disable reconciliation feature for this account DisableConciliation=Disable reconciliation feature for this account
ConciliationDisabled=Reconciliation feature disabled ConciliationDisabled=Reconciliation feature disabled
LinkedToAConciliatedTransaction=Linked to a conciliated entry LinkedToAConciliatedTransaction=Linked to a conciliated entry
StatusAccountOpened=Open StatusAccountOpened=Opened
StatusAccountClosed=Closed StatusAccountClosed=Closed
AccountIdShort=Number AccountIdShort=Number
LineRecord=Transaction LineRecord=Transaction

View File

@@ -1,13 +1,13 @@
# Dolibarr language file - Source file is en_US - bills # Dolibarr language file - Source file is en_US - bills
Bill=Invoice Bill=Invoice
Bills=Invoices Bills=Invoices
BillsCustomers=Customers invoices BillsCustomers=Customer invoices
BillsCustomer=Customers invoice BillsCustomer=Customer invoice
BillsSuppliers=Suppliers invoices BillsSuppliers=Supplier invoices
BillsCustomersUnpaid=Unpaid customers invoices BillsCustomersUnpaid=Unpaid customer invoices
BillsCustomersUnpaidForCompany=Unpaid customer's invoices for %s BillsCustomersUnpaidForCompany=Unpaid customer invoices for %s
BillsSuppliersUnpaid=Unpaid supplier's invoices BillsSuppliersUnpaid=Unpaid supplier invoices
BillsSuppliersUnpaidForCompany=Unpaid supplier's invoices for %s BillsSuppliersUnpaidForCompany=Unpaid supplier invoices for %s
BillsLate=Late payments BillsLate=Late payments
BillsStatistics=Customers invoices statistics BillsStatistics=Customers invoices statistics
BillsStatisticsSuppliers=Suppliers invoices statistics BillsStatisticsSuppliers=Suppliers invoices statistics
@@ -151,14 +151,14 @@ NoQualifiedRecurringInvoiceTemplateFound=No recurring template invoice qualified
FoundXQualifiedRecurringInvoiceTemplate=Found %s recurring template invoice(s) qualified for generation. FoundXQualifiedRecurringInvoiceTemplate=Found %s recurring template invoice(s) qualified for generation.
NotARecurringInvoiceTemplate=Not a recurring template invoice NotARecurringInvoiceTemplate=Not a recurring template invoice
NewBill=New invoice NewBill=New invoice
LastBills=Last %s invoices LastBills=Latest %s invoices
LastCustomersBills=Last %s customers invoices LastCustomersBills=Latest %s customer invoices
LastSuppliersBills=Last %s suppliers invoices LastSuppliersBills=Latest %s supplier invoices
AllBills=All invoices AllBills=All invoices
OtherBills=Other invoices OtherBills=Other invoices
DraftBills=Draft invoices DraftBills=Draft invoices
CustomersDraftInvoices=Customers draft invoices CustomersDraftInvoices=Customer draft invoices
SuppliersDraftInvoices=Suppliers draft invoices SuppliersDraftInvoices=Supplier draft invoices
Unpaid=Unpaid Unpaid=Unpaid
ConfirmDeleteBill=Are you sure you want to delete this invoice? ConfirmDeleteBill=Are you sure you want to delete this invoice?
ConfirmValidateBill=Are you sure you want to validate this invoice with reference <b>%s</b>? ConfirmValidateBill=Are you sure you want to validate this invoice with reference <b>%s</b>?

View File

@@ -25,8 +25,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers
BoxTitleLastModifiedSuppliers=Latest %s modified suppliers BoxTitleLastModifiedSuppliers=Latest %s modified suppliers
BoxTitleLastModifiedCustomers=Latest %s modified customers BoxTitleLastModifiedCustomers=Latest %s modified customers
BoxTitleLastCustomersOrProspects=Latest %s customers or prospects BoxTitleLastCustomersOrProspects=Latest %s customers or prospects
BoxTitleLastCustomerBills=Latest %s customer's invoices BoxTitleLastCustomerBills=Latest %s customer invoices
BoxTitleLastSupplierBills=Latest %s supplier's invoices BoxTitleLastSupplierBills=Latest %s supplier invoices
BoxTitleLastModifiedProspects=Latest %s modified prospects BoxTitleLastModifiedProspects=Latest %s modified prospects
BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastModifiedMembers=Latest %s members
BoxTitleLastFicheInter=Latest %s modified interventions BoxTitleLastFicheInter=Latest %s modified interventions
@@ -51,12 +51,12 @@ ClickToAdd=Click here to add.
NoRecordedCustomers=No recorded customers NoRecordedCustomers=No recorded customers
NoRecordedContacts=No recorded contacts NoRecordedContacts=No recorded contacts
NoActionsToDo=No actions to do NoActionsToDo=No actions to do
NoRecordedOrders=No recorded customer's orders NoRecordedOrders=No recorded customer orders
NoRecordedProposals=No recorded proposals NoRecordedProposals=No recorded proposals
NoRecordedInvoices=No recorded customer's invoices NoRecordedInvoices=No recorded customer invoices
NoUnpaidCustomerBills=No unpaid customer's invoices NoUnpaidCustomerBills=No unpaid customer invoices
NoUnpaidSupplierBills=No unpaid supplier's invoices NoUnpaidSupplierBills=No unpaid supplier invoices
NoModifiedSupplierBills=No recorded supplier's invoices NoModifiedSupplierBills=No recorded supplier invoices
NoRecordedProducts=No recorded products/services NoRecordedProducts=No recorded products/services
NoRecordedProspects=No recorded prospects NoRecordedProspects=No recorded prospects
NoContractedProducts=No products/services contracted NoContractedProducts=No products/services contracted

View File

@@ -390,7 +390,7 @@ ListCustomersShort=List of customers
ThirdPartiesArea=Third parties and contact area ThirdPartiesArea=Third parties and contact area
LastModifiedThirdParties=Latest %s modified third parties LastModifiedThirdParties=Latest %s modified third parties
UniqueThirdParties=Total of unique third parties UniqueThirdParties=Total of unique third parties
InActivity=Open InActivity=Opened
ActivityCeased=Closed ActivityCeased=Closed
ThirdPartyIsClosed=Third party is closed ThirdPartyIsClosed=Third party is closed
ProductsIntoElements=List of products/services into %s ProductsIntoElements=List of products/services into %s
@@ -405,7 +405,7 @@ MergeThirdparties=Merge third parties
ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one? All linked objects (invoices, orders, ...) will be moved to current third party so you will be able to delete the duplicate one. ConfirmMergeThirdparties=Are you sure you want to merge this third party into the current one? All linked objects (invoices, orders, ...) will be moved to current third party so you will be able to delete the duplicate one.
ThirdpartiesMergeSuccess=Thirdparties have been merged ThirdpartiesMergeSuccess=Thirdparties have been merged
SaleRepresentativeLogin=Login of sales representative SaleRepresentativeLogin=Login of sales representative
SaleRepresentativeFirstname=Firstname of sales representative SaleRepresentativeFirstname=First name of sales representative
SaleRepresentativeLastname=Lastname of sales representative SaleRepresentativeLastname=Last name of sales representative
ErrorThirdpartiesMerge=There was an error when deleting the thirdparties. Please check the log. Changes have been reverted. ErrorThirdpartiesMerge=There was an error when deleting the thirdparties. Please check the log. Changes have been reverted.
NewCustomerSupplierCodeProposed=New customer or supplier code suggested on duplicate code NewCustomerSupplierCodeProposed=New customer or supplier code suggested on duplicate code

View File

@@ -17,8 +17,8 @@ CronMethodDoesNotExists=Class %s does not contains any method %s
# Menu # Menu
EnabledAndDisabled=Enabled and disabled EnabledAndDisabled=Enabled and disabled
# Page list # Page list
CronLastOutput=Last run output CronLastOutput=Latest run output
CronLastResult=Last result code CronLastResult=Latest result code
CronCommand=Command CronCommand=Command
CronList=Scheduled jobs CronList=Scheduled jobs
CronDelete=Delete scheduled jobs CronDelete=Delete scheduled jobs

View File

@@ -76,8 +76,8 @@ BoxTitleLastLeaveRequests=Latest %s modified leave requests
HolidaysMonthlyUpdate=Monthly update HolidaysMonthlyUpdate=Monthly update
ManualUpdate=Manual update ManualUpdate=Manual update
HolidaysCancelation=Leave request cancelation HolidaysCancelation=Leave request cancelation
EmployeeLastname=Employee lastname EmployeeLastname=Employee last name
EmployeeFirstname=Employee firstname EmployeeFirstname=Employee first name
TypeWasDisabledOrRemoved=Leave type (id %s) was disabled or removed TypeWasDisabledOrRemoved=Leave type (id %s) was disabled or removed
## Configuration du Module ## ## Configuration du Module ##

View File

@@ -13,8 +13,8 @@ LDAPUsers=Users in LDAP database
LDAPFieldStatus=Status LDAPFieldStatus=Status
LDAPFieldFirstSubscriptionDate=First subscription date LDAPFieldFirstSubscriptionDate=First subscription date
LDAPFieldFirstSubscriptionAmount=First subscription amount LDAPFieldFirstSubscriptionAmount=First subscription amount
LDAPFieldLastSubscriptionDate=Last subscription date LDAPFieldLastSubscriptionDate=Latest subscription date
LDAPFieldLastSubscriptionAmount=Last subscription amount LDAPFieldLastSubscriptionAmount=Latest subscription amount
LDAPFieldSkype=Skype id LDAPFieldSkype=Skype id
LDAPFieldSkypeExample=Example : skypeName LDAPFieldSkypeExample=Example : skypeName
UserSynchronized=User synchronized UserSynchronized=User synchronized

View File

@@ -85,7 +85,7 @@ LineInFile=Line %s in file
RecipientSelectionModules=Defined requests for recipient's selection RecipientSelectionModules=Defined requests for recipient's selection
MailSelectedRecipients=Selected recipients MailSelectedRecipients=Selected recipients
MailingArea=EMailings area MailingArea=EMailings area
LastMailings=Last %s emailings LastMailings=Latest %s emailings
TargetsStatistics=Targets statistics TargetsStatistics=Targets statistics
NbOfCompaniesContacts=Unique contacts/addresses NbOfCompaniesContacts=Unique contacts/addresses
MailNoChangePossible=Recipients for validated emailing can't be changed MailNoChangePossible=Recipients for validated emailing can't be changed

View File

@@ -87,7 +87,7 @@ Undefined=Undefined
PasswordForgotten=Password forgotten? PasswordForgotten=Password forgotten?
SeeAbove=See above SeeAbove=See above
HomeArea=Home area HomeArea=Home area
LastConnexion=Last connection LastConnexion=Latest connection
PreviousConnexion=Previous connection PreviousConnexion=Previous connection
PreviousValue=Previous value PreviousValue=Previous value
ConnectedOnMultiCompany=Connected on environment ConnectedOnMultiCompany=Connected on environment
@@ -237,7 +237,7 @@ DateCreation=Creation date
DateCreationShort=Creat. date DateCreationShort=Creat. date
DateModification=Modification date DateModification=Modification date
DateModificationShort=Modif. date DateModificationShort=Modif. date
DateLastModification=Last modification date DateLastModification=Latest modification date
DateValidation=Validation date DateValidation=Validation date
DateClosing=Closing date DateClosing=Closing date
DateDue=Due date DateDue=Due date
@@ -433,7 +433,7 @@ Reportings=Reporting
Draft=Draft Draft=Draft
Drafts=Drafts Drafts=Drafts
Validated=Validated Validated=Validated
Opened=Open Opened=Opened
New=New New=New
Discount=Discount Discount=Discount
Unknown=Unknown Unknown=Unknown

View File

@@ -136,8 +136,8 @@ DocForAllMembersCards=Generate business cards for all members
DocForOneMemberCards=Generate business cards for a particular member DocForOneMemberCards=Generate business cards for a particular member
DocForLabels=Generate address sheets DocForLabels=Generate address sheets
SubscriptionPayment=Subscription payment SubscriptionPayment=Subscription payment
LastSubscriptionDate=Last subscription date LastSubscriptionDate=Latest subscription date
LastSubscriptionAmount=Last subscription amount LastSubscriptionAmount=Latest subscription amount
MembersStatisticsByCountries=Members statistics by country MembersStatisticsByCountries=Members statistics by country
MembersStatisticsByState=Members statistics by state/province MembersStatisticsByState=Members statistics by state/province
MembersStatisticsByTown=Members statistics by town MembersStatisticsByTown=Members statistics by town
@@ -149,7 +149,7 @@ MembersByStateDesc=This screen show you statistics on members by state/provinces
MembersByTownDesc=This screen show you statistics on members by town. MembersByTownDesc=This screen show you statistics on members by town.
MembersStatisticsDesc=Choose statistics you want to read... MembersStatisticsDesc=Choose statistics you want to read...
MenuMembersStats=Statistics MenuMembersStats=Statistics
LastMemberDate=Last member date LastMemberDate=Latest member date
Nature=Nature Nature=Nature
Public=Information are public Public=Information are public
NewMemberbyWeb=New member added. Awaiting approval NewMemberbyWeb=New member added. Awaiting approval

View File

@@ -238,7 +238,7 @@ GlobalVariables=Global variables
VariableToUpdate=Variable to update VariableToUpdate=Variable to update
GlobalVariableUpdaters=Global variable updaters GlobalVariableUpdaters=Global variable updaters
UpdateInterval=Update interval (minutes) UpdateInterval=Update interval (minutes)
LastUpdated=Last updated LastUpdated=Latest update
CorrectlyUpdated=Correctly updated CorrectlyUpdated=Correctly updated
PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is PropalMergePdfProductActualFile=Files use to add into PDF Azur are/is
PropalMergePdfProductChooseFile=Select PDF files PropalMergePdfProductChooseFile=Select PDF files

View File

@@ -29,9 +29,9 @@ DeleteAProject=Delete a project
DeleteATask=Delete a task DeleteATask=Delete a task
ConfirmDeleteAProject=Are you sure you want to delete this project? ConfirmDeleteAProject=Are you sure you want to delete this project?
ConfirmDeleteATask=Are you sure you want to delete this task? ConfirmDeleteATask=Are you sure you want to delete this task?
OpenedProjects=Open projects OpenedProjects=Opened projects
OpenedTasks=Open tasks OpenedTasks=Opened tasks
OpportunitiesStatusForOpenedProjects=Opportunities amount of open projects by status OpportunitiesStatusForOpenedProjects=Opportunities amount of opened projects by status
OpportunitiesStatusForProjects=Opportunities amount of projects by status OpportunitiesStatusForProjects=Opportunities amount of projects by status
ShowProject=Show project ShowProject=Show project
SetProject=Set project SetProject=Set project
@@ -47,7 +47,7 @@ TaskTimeSpent=Time spent on tasks
TaskTimeUser=User TaskTimeUser=User
TaskTimeNote=Note TaskTimeNote=Note
TaskTimeDate=Date TaskTimeDate=Date
TasksOnOpenedProject=Tasks on open projects TasksOnOpenedProject=Tasks on opened projects
WorkloadNotDefined=Workload not defined WorkloadNotDefined=Workload not defined
NewTimeSpent=New time spent NewTimeSpent=New time spent
MyTimeSpent=My time spent MyTimeSpent=My time spent
@@ -179,9 +179,9 @@ ProjectsStatistics=Statistics on projects/leads
TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible.
IdTaskTime=Id task time IdTaskTime=Id task time
YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label. But best practice may be to add a dedicated field, also called complementary attributes. YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label. But best practice may be to add a dedicated field, also called complementary attributes.
OpenedProjectsByThirdparties=Open projects by thirdparties OpenedProjectsByThirdparties=Opened projects by thirdparties
OnlyOpportunitiesShort=Only opportunities OnlyOpportunitiesShort=Only opportunities
OpenedOpportunitiesShort=Open opportunities OpenedOpportunitiesShort=Opened opportunities
NotAnOpportunityShort=Not an opportunity NotAnOpportunityShort=Not an opportunity
OpportunityTotalAmount=Opportunities total amount OpportunityTotalAmount=Opportunities total amount
OpportunityPonderatedAmount=Opportunities weighted amount OpportunityPonderatedAmount=Opportunities weighted amount

View File

@@ -3,7 +3,7 @@ Proposals=Commercial proposals
Proposal=Commercial proposal Proposal=Commercial proposal
ProposalShort=Proposal ProposalShort=Proposal
ProposalsDraft=Draft commercial proposals ProposalsDraft=Draft commercial proposals
ProposalsOpened=Open commercial proposals ProposalsOpened=Opened commercial proposals
Prop=Commercial proposals Prop=Commercial proposals
CommercialProposal=Commercial proposal CommercialProposal=Commercial proposal
ProposalCard=Proposal card ProposalCard=Proposal card
@@ -26,9 +26,9 @@ AmountOfProposalsByMonthHT=Amount by month (net of tax)
NbOfProposals=Number of commercial proposals NbOfProposals=Number of commercial proposals
ShowPropal=Show proposal ShowPropal=Show proposal
PropalsDraft=Drafts PropalsDraft=Drafts
PropalsOpened=Open PropalsOpened=Opened
PropalStatusDraft=Draft (needs to be validated) PropalStatusDraft=Draft (needs to be validated)
PropalStatusValidated=Validated (proposal is open) PropalStatusValidated=Validated (proposal is opened)
PropalStatusSigned=Signed (needs billing) PropalStatusSigned=Signed (needs billing)
PropalStatusNotSigned=Not signed (closed) PropalStatusNotSigned=Not signed (closed)
PropalStatusBilled=Billed PropalStatusBilled=Billed

View File

@@ -29,8 +29,8 @@ Location=Location
LocationSummary=Short name location LocationSummary=Short name location
NumberOfDifferentProducts=Number of different products NumberOfDifferentProducts=Number of different products
NumberOfProducts=Total number of products NumberOfProducts=Total number of products
LastMovement=Last movement LastMovement=Latest movement
LastMovements=Last movements LastMovements=Latest movements
Units=Units Units=Units
Unit=Unit Unit=Unit
StockCorrection=Correct stock StockCorrection=Correct stock

View File

@@ -8,7 +8,7 @@ SearchRequest=Find a request
DraftRequests=Draft requests DraftRequests=Draft requests
SupplierProposalsDraft=Draft supplier proposals SupplierProposalsDraft=Draft supplier proposals
LastModifiedRequests=Latest %s modified price requests LastModifiedRequests=Latest %s modified price requests
RequestsOpened=Open price requests RequestsOpened=Opened price requests
SupplierProposalArea=Supplier proposals area SupplierProposalArea=Supplier proposals area
SupplierProposalShort=Supplier proposal SupplierProposalShort=Supplier proposal
SupplierProposals=Supplier proposals SupplierProposals=Supplier proposals
@@ -23,7 +23,7 @@ ConfirmValidateAsk=Are you sure you want to validate this price request under na
DeleteAsk=Delete request DeleteAsk=Delete request
ValidateAsk=Validate request ValidateAsk=Validate request
SupplierProposalStatusDraft=Draft (needs to be validated) SupplierProposalStatusDraft=Draft (needs to be validated)
SupplierProposalStatusValidated=Validated (request is open) SupplierProposalStatusValidated=Validated (request is opened)
SupplierProposalStatusClosed=Closed SupplierProposalStatusClosed=Closed
SupplierProposalStatusSigned=Accepted SupplierProposalStatusSigned=Accepted
SupplierProposalStatusNotSigned=Refused SupplierProposalStatusNotSigned=Refused

View File

@@ -36,7 +36,7 @@ AdministratorDesc=Administrator
DefaultRights=Default permissions DefaultRights=Default permissions
DefaultRightsDesc=Define here <u>default</u> permissions that are automatically granted to a <u>new created</u> user (Go on user card to change permission of an existing user). DefaultRightsDesc=Define here <u>default</u> permissions that are automatically granted to a <u>new created</u> user (Go on user card to change permission of an existing user).
DolibarrUsers=Dolibarr users DolibarrUsers=Dolibarr users
LastName=Last Name LastName=Last name
FirstName=First name FirstName=First name
ListOfGroups=List of groups ListOfGroups=List of groups
NewGroup=New group NewGroup=New group

View File

@@ -289,12 +289,7 @@ if(!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrep
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_warehouse_properties AS pse ON (p.rowid = pse.fk_product AND pse.fk_entrepot = '.$fk_entrepot.')'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_warehouse_properties AS pse ON (p.rowid = pse.fk_product AND pse.fk_entrepot = '.$fk_entrepot.')';
} }
$sql.= ' WHERE p.entity IN (' . getEntity("product", 1) . ')'; $sql.= ' WHERE p.entity IN (' . getEntity("product", 1) . ')';
if ($sall) { if ($sall) $sql .= natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall);
$sql .= ' AND (p.ref LIKE "%'.$db->escape($sall).'%" ';
$sql .= 'OR p.label LIKE "%'.$db->escape($sall).'%" ';
$sql .= 'OR p.description LIKE "%'.$db->escape($sall).'%" ';
$sql .= 'OR p.note LIKE "%'.$db->escape($sall).'%")';
}
// if the type is not 1, we show all products (type = 0,2,3) // if the type is not 1, we show all products (type = 0,2,3)
if (dol_strlen($type)) { if (dol_strlen($type)) {
if ($type == 1) { if ($type == 1) {
@@ -303,20 +298,8 @@ if (dol_strlen($type)) {
$sql .= ' AND p.fk_product_type <> 1'; $sql .= ' AND p.fk_product_type <> 1';
} }
} }
if ($sref) { if ($sref) $sql.=natural_search('p.ref', $sref);
//natural search if ($snom) $sql.=natural_search('p.label', $snom);
$scrit = explode(' ', $sref);
foreach ($scrit as $crit) {
$sql .= ' AND p.ref LIKE "%' . $crit . '%"';
}
}
if ($snom) {
//natural search
$scrit = explode(' ', $snom);
foreach ($scrit as $crit) {
$sql .= ' AND p.label LIKE "%' . $db->escape($crit) . '%"';
}
}
$sql.= ' AND p.tobuy = 1'; $sql.= ' AND p.tobuy = 1';
if (!empty($canvas)) $sql .= ' AND p.canvas = "' . $db->escape($canvas) . '"'; if (!empty($canvas)) $sql .= ' AND p.canvas = "' . $db->escape($canvas) . '"';
$sql.= ' GROUP BY p.rowid, p.ref, p.label, p.description, p.price'; $sql.= ' GROUP BY p.rowid, p.ref, p.label, p.description, p.price';
@@ -522,7 +505,7 @@ print_liste_field_titre($langs->trans('StockLimitShort'), $_SERVER["PHP_SELF"],
print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $param, '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $param, '', 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans('Ordered'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre($langs->trans('Ordered'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans('StockToBuy'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre($langs->trans('StockToBuy'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans('Supplier'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder); print_liste_field_titre($langs->trans('SupplierRef'), $_SERVER["PHP_SELF"], '', $param, '', 'align="right"', $sortfield, $sortorder);
print "</tr>\n"; print "</tr>\n";
// Lignes des champs de filtre // Lignes des champs de filtre

View File

@@ -3609,7 +3609,9 @@ class Societe extends CommonObject
*/ */
public function setCategories($categories, $type) public function setCategories($categories, $type)
{ {
// Decode type require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
// Decode type
if ($type == 'customer') { if ($type == 'customer') {
$type_id = Categorie::TYPE_CUSTOMER; $type_id = Categorie::TYPE_CUSTOMER;
$type_text = 'customer'; $type_text = 'customer';
@@ -3627,7 +3629,6 @@ class Societe extends CommonObject
} }
// Get current categories // Get current categories
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$c = new Categorie($this->db); $c = new Categorie($this->db);
$existing = $c->containing($this->id, $type_id, 'id'); $existing = $c->containing($this->id, $type_id, 'id');