diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index 6fbecbf26756e767860f931cd8e53322ccf440eb..f1413bb371227957d0b42f1b838b64b32f37a276 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -266,7 +266,8 @@ if ($resql) $num = $db->num_rows($resql); $params=''; - if ($search_field1 != '') $params.= '&search_field1='.urlencode($search_field1); + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + if ($search_field1 != '') $params.= '&search_field1='.urlencode($search_field1); if ($search_field2 != '') $params.= '&search_field2='.urlencode($search_field2); if ($optioncss != '') $param.='&optioncss='.$optioncss; // Add $param from extra fields diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index e8c5749088ade96e81329c48e82109a2cbcae178..66de3be2cc54b41c5e22eeee6baa4407e704d36f 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1376,17 +1376,12 @@ else print $form->formconfirm("card.php?rowid=".$rowid,$langs->trans("DeleteMember"),$langs->trans("ConfirmDeleteMember"),"confirm_delete",$formquestion,0,1); } - /* - * Confirm add in spip - */ + // Confirm add in spip if ($action == 'add_spip') { print $form->formconfirm("card.php?rowid=".$rowid, $langs->trans('AddIntoSpip'), $langs->trans('AddIntoSpipConfirmation'), 'confirm_add_spip'); } - - /* - * Confirm removed from spip - */ + // Confirm removed from spip if ($action == 'del_spip') { print $form->formconfirm("card.php?rowid=$rowid", $langs->trans('DeleteIntoSpip'), $langs->trans('DeleteIntoSpipConfirmation'), 'confirm_del_spip'); @@ -1551,8 +1546,16 @@ else } else { - print $langs->trans("SubscriptionNotReceived"); - if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + if (! $adht->cotisation) + { + print $langs->trans("SubscriptionNotRecorded"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } + else + { + print $langs->trans("SubscriptionNotReceived"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } } print '</td></tr>'; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index 998dc53d5258a734813551146183e83c5de6aa8e..784f6d4dea762f8c3a0f07dfde8b817c2b2edb58 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -722,8 +722,16 @@ if ($rowid > 0) } else { - print $langs->trans("SubscriptionNotReceived"); - if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + if (! $adht->cotisation) + { + print $langs->trans("SubscriptionNotRecorded"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } + else + { + print $langs->trans("SubscriptionNotReceived"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } } print '</td></tr>'; diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 38447c17c5e1d89a87e341b71f610fa74632ba64..ce611528a62dcf5b83c171ee9b3c1fb548ba3910 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -233,11 +233,6 @@ if ($id > 0) print '<div class="underbanner clearboth"></div>'; print '<table class="border" width="100%">'; - // Alias name (commercial, trademark or alias name) - print '<tr><td class="titelfield">'.$langs->trans('AliasNames').'</td><td colspan="3">'; - print $object->name_alias; - print "</td></tr>"; - // Prospect/Customer print '<tr><td width="30%">'.$langs->trans('ProspectCustomer').'</td><td width="70%" colspan="3">'; print $object->getLibCustProspStatut(); diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index bcca56ed6457cceb637180e35b16a40a11d263a1..bd72fcc17f72580997e87d3d00b87a6ee7abf91c 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -202,13 +202,14 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - $paramlist=''; - $paramlist.=(GETPOST("orphelins")?"&orphelins=1":""); - $paramlist.=($search_ref?"&search_ref=".urlencode($search_ref):""); - $paramlist.=($search_company?"&search_company=".urlencode($search_company):""); - $paramlist.=($search_amount?"&search_amount=".urlencode($search_amount):""); - $paramlist.=($search_payment_num?"&search_payment_num=".urlencode($search_payment_num):""); - if ($optioncss != '') $paramlist.='&optioncss='.urlencode($optioncss); + $param=''; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + $param.=(GETPOST("orphelins")?"&orphelins=1":""); + $param.=($search_ref?"&search_ref=".urlencode($search_ref):""); + $param.=($search_company?"&search_company=".urlencode($search_company):""); + $param.=($search_amount?"&search_amount=".urlencode($search_amount):""); + $param.=($search_payment_num?"&search_payment_num=".urlencode($search_payment_num):""); + if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; @@ -218,24 +219,24 @@ if ($resql) print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">'; - print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"],$paramlist,$sortfield,$sortorder,'',$num, $nbtotalofrecords,'title_accountancy.png', 0, '', '', $limit); + print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num, $nbtotalofrecords,'title_accountancy.png', 0, '', '', $limit); print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; - print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"p.rowid","",$paramlist,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"dp","",$paramlist,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$paramlist,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle","",$paramlist,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Numero"),$_SERVER["PHP_SELF"],"p.num_paiement","",$paramlist,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$paramlist,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"p.amount","",$paramlist,'align="right"',$sortfield,$sortorder); - //print_liste_field_titre($langs->trans("Invoices"),"","","",$paramlist,'align="left"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("RefPayment"),$_SERVER["PHP_SELF"],"p.rowid","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"dp","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Numero"),$_SERVER["PHP_SELF"],"p.num_paiement","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$param,"",$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"p.amount","",$param,'align="right"',$sortfield,$sortorder); + //print_liste_field_titre($langs->trans("Invoices"),"","","",$param,'align="left"',$sortfield,$sortorder); $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$paramlist,'align="right"',$sortfield,$sortorder); + if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); print "</tr>\n"; diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 36c79c0f7c5c28aa035078ca690c7903e8e7a9e3..0a34723e2ce105e8b072a5958c224301833c778b 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -328,8 +328,7 @@ if (empty($reshook)) $label = $lines[$i]->product_label; } - if ($conf->global->PRODUIT_DESC_IN_FORM) - $desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; + $desc .= ($lines[$i]->desc && $lines[$i]->desc!=$lines[$i]->libelle)?dol_htmlentitiesbr($lines[$i]->desc):''; } else { $desc = dol_htmlentitiesbr($lines[$i]->desc); @@ -360,7 +359,6 @@ if (empty($reshook)) $error++; break; } - } } } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 74cd27bc460aef05e5a187d84c6de24458ea5295..dcf593e6ccdcd2b4a5c5af39a1297554de2f92c0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4297,7 +4297,7 @@ class Form } $return.= '>'.vatrate($rate['libtva']); //$return.=($rate['code']?' '.$rate['code']:''); - $return.= (empty($defaultcode) && $rate['nprtva']) ? ' *': ''; // We show the * (old behaviour only if new vat code is not used) + $return.= (empty($rate['code']) && $rate['nprtva']) ? ' *': ''; // We show the * (old behaviour only if new vat code is not used) $return.= '</option>'; } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 8631c57657652bcb62ed6978e56f21435d88ac0b..b2b6d8274a591496b04b9ae53e286d1d062e8a6c 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -186,9 +186,9 @@ function societe_prepare_head(Societe $object) if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) )) { $head[$h][1] = $langs->trans("Events"); - $head[$h][1].= ' / '; + $head[$h][1].= '/'; } - $head[$h][1].= $langs->trans("Info"); + $head[$h][1].= $langs->trans("Agenda"); $head[$h][2] = 'agenda'; $h++; diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index a39783820f8786d62d27dcef8a3c9c737c1bdf42..98b281d04dd7087a76ef18f3764ad0210bf065f6 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -209,7 +209,7 @@ 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 ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __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 ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); -- Accounting Expert -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '(! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire', '', 0, 7, __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 ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__); -- Dispatch insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 1, __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 ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 2, __ENTITY__); diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 1f0756a666cdbf77b7b2ea4a98a391fbf3a68b96..4c5b654a76fb090c8a7e2a12f70992333dd06b1e 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -117,7 +117,7 @@ $coldisplay=-1; // We remove first td } $coldisplay++; - print '<td align="right"><input type="text" class="flat" size="8" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht,0,'',0):price($line->subprice,0,'',0)) . '"'; + print '<td align="right"><input type="text" class="flat" size="5" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht,0,'',0):price($line->subprice,0,'',0)) . '"'; if ($this->situation_counter > 1) print ' readonly'; print '></td>'; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 35ef726be2092e77b8ed7735ae7b5b1def5a324d..6d3f7b05966b5b64b68f4342147ed2d0165d4c92 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -705,7 +705,9 @@ class Expedition extends CommonObject // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record $result=$mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ShipmentValidatedInDolibarr",$numref)); if ($result < 0) { - $error++; break; + $error++; + $this->errors[]=$mouvS->error; + break; } } else @@ -713,17 +715,12 @@ class Expedition extends CommonObject // line with batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record - $result=$mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ShipmentValidatedInDolibarr",$numref), '', $obj->eatby, $obj->sellby, $obj->batch); + // ->fk_origin_stock = id into table llx_product_batch (may be rename into llx_product_stock_batch in another version) + $result=$mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ShipmentValidatedInDolibarr",$numref), '', $obj->eatby, $obj->sellby, $obj->batch, $obj->fk_origin_stock); if ($result < 0) { - $error++; break; - } - - // We update content of table llx_product_batch (will be rename into llx_product_stock_batch inantoher version) - // We can set livraison_batch to deprecated and adapt livraison to handle batch too (mouvS->_create also calls mouvS->_create_batch) - if (! empty($conf->productbatch->enabled)) - { - $result=$mouvS->livraison_batch($obj->fk_origin_stock, $qty); // ->fk_origin_stock = id into table llx_product_batch (will be rename into llx_product_stock_batch in another version) - if ($result < 0) { $error++; $this->errors[]=$mouvS->error; break; } + $error++; + $this->errors[]=$mouvS->error; + break; } } } diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index a946649592a85b613cf3a719b51bc2f86223deab..71b852880fbdea6e4db21327ba99ad1abaa53708 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -333,7 +333,7 @@ if ($action == "confirm_save_from_refuse" && GETPOST("confirm") == "yes" && $id if ($result > 0) { - if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) + if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition { // Send mail @@ -390,6 +390,7 @@ if ($action == "confirm_save_from_refuse" && GETPOST("confirm") == "yes" && $id else { $mesg=$mailfile->error; + setEventMessages($mesg, null, 'errors'); } // END - Send mail } @@ -438,7 +439,7 @@ if ($action == "confirm_approve" && GETPOST("confirm") == "yes" && $id > 0 && $u if ($result > 0) { - if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) + if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition { // Send mail @@ -542,7 +543,7 @@ if ($action == "confirm_refuse" && GETPOST('confirm')=="yes" && $id > 0 && $user if ($result > 0) { - if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) + if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition { // Send mail @@ -583,7 +584,6 @@ if ($action == "confirm_refuse" && GETPOST('confirm')=="yes" && $id > 0 && $user else { setEventMessages($langs->trans("ErrorFailedToSendMail",$emailFrom,$emailTo), null, 'errors'); - $mesg="Impossible d'envoyer l'email."; } // END - Send mail } @@ -627,7 +627,7 @@ if ($action == "confirm_cancel" && GETPOST('confirm')=="yes" && GETPOST('detail_ if ($result > 0) { - if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) + if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition { // Send mail @@ -667,6 +667,7 @@ if ($action == "confirm_cancel" && GETPOST('confirm')=="yes" && GETPOST('detail_ else { $mesg="Impossible d'envoyer l'email."; + setEventMessages($mesg, null, 'errors'); } // END - Send mail } @@ -756,7 +757,7 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid) if ($result > 0) { - if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) + if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) // TODO Translate this so we can remove condition { // Send mail @@ -806,9 +807,8 @@ if ($action == 'set_paid' && $id > 0 && $user->rights->expensereport->to_paid) endif; else: - - $mesg="Impossible d'envoyer l'email."; - + $mesg="Impossible d'envoyer l'email."; + setEventMessages($mesg, null, 'errors'); endif; // END - Send mail } @@ -921,7 +921,7 @@ if ($action == 'confirm_delete_line' && GETPOST("confirm") == "yes") $total_ht = $object_ligne->total_ht; $total_tva = $object_ligne->total_tva; - $result=$object->deleteline(GETPOST("rowid")); + $result=$object->deleteline(GETPOST("rowid"), $user); if ($result >= 0) { if ($result > 0) @@ -961,7 +961,6 @@ if ($action == "updateligne" ) $rowid = $_POST['rowid']; $type_fees_id = GETPOST('fk_c_type_fees'); - $object_ligne->vatrate = price2num(GETPOST('vatrate')); $projet_id = $fk_projet; $comments = GETPOST('comments'); $qty = GETPOST('qty'); @@ -983,6 +982,7 @@ if ($action == "updateligne" ) if (! $error) { + // TODO Use update method of ExpenseReportLine $result = $object->updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comments, $qty, $value_unit, $date, $id); if ($result >= 0) { @@ -1078,29 +1078,6 @@ $formfile = new FormFile($db); $formproject = new FormProjets($db); $projecttmp = new Project($db); -if (! empty($conf->global->DEPLACEMENT_TO_CLEAN)) -{ - if(!empty($_GET['mesg'])) - { - $text_mesg = explode(",",$_GET['mesg']); - - foreach($text_mesg as $text) - { - $mesg.= "- ".$langs->trans($text)."<br />"; - } - - print "<div class=\"error\" style=\"font-size:15px;background-color:#FFB3B3;\">"; - print $langs->trans("LINE_NOT_ADDED")."<br />"; - print $mesg; - print "</div>"; - } - else - { - if ($mesg) print "<div class=\"error\" style=\"font-size:16px;background-color:red;\">".$mesg."</div>"; - } -} - - // Create if ($action == 'create') { 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 14849e6fa9c742f0d8fc0c9070c442142ad71c42..c72ec02ca511a76635d839af31983111f7d6d126 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 @@ -454,3 +454,9 @@ CREATE TABLE llx_advtargetemailing )ENGINE=InnoDB; ALTER TABLE llx_advtargetemailing ADD UNIQUE INDEX uk_advtargetemailing_name (name); + + + +-- At end +ALTER TABLE llx_product_batch ADD UNIQUE INDEX uk_product_batch (fk_product_stock, batch); + diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 663af76b0cdd7430b80ea113691b34a0fc09b32e..2c89416307180f648a1a9a8b9a7b19f7ebd341b9 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -68,7 +68,35 @@ delete from llx_adherent_extrafields where fk_object not in (select rowid from l delete from llx_product_extrafields where fk_object not in (select rowid from llx_product); --delete from llx_societe_commerciaux where fk_soc not in (select rowid from llx_societe); + +-- Clean stocks + +-- Reference for qty is llx_product_stock (detail in llx_product_batch may be not complete) +-- qty in llx_product may be not up to date update llx_product_batch set batch = '' where batch = 'Non défini'; +update llx_product_batch set batch = '' where batch = 'Non défini'; + +DELETE FROM llx_product_lot WHERE fk_product NOT IN (select rowid from llx_product); +DELETE FROM llx_product_stock WHERE fk_product NOT IN (select rowid from llx_product); +DELETE FROM llx_product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM llx_product_batch as pb); + +-- Merge splitted lines into one in table llx_product_batch +DROP TABLE tmp_llx_product_batch; +DROP TABLE tmp_llx_product_batch2; +CREATE TABLE tmp_llx_product_batch AS select fk_product_stock, eatby, sellby, batch, SUM(qty) as qty, COUNT(rowid) as nb FROM llx_product_batch GROUP BY fk_product_stock, eatby, sellby, batch HAVING COUNT(rowid) > 1; +CREATE TABLE tmp_llx_product_batch2 AS select pb.rowid, pb.fk_product_stock, pb.eatby, pb.sellby, pb.batch, pb.qty from llx_product_batch as pb, tmp_llx_product_batch as tpb where pb.fk_product_stock = tpb.fk_product_stock and COALESCE(pb.eatby, '') = COALESCE(tpb.eatby,'') and COALESCE(pb.sellby, '') = COALESCE(tpb.sellby, '') and pb.batch = tpb.batch +--select * from tmp_llx_product_batch; +--select * from tmp_llx_product_batch2; +DELETE FROM llx_product_batch WHERE rowid IN (select rowid FROM tmp_llx_product_batch2); +INSERT INTO llx_product_batch(fk_product_stock, eatby, sellby, batch, qty) SELECT fk_product_stock, eatby, sellby, batch, qty FROM tmp_llx_product_batch; + +DELETE FROM llx_product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM llx_product_batch as pb); +DELETE FROM llx_product_batch WHERE qty = 0; + + +-- Stock calculation on product +UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid); + -- Fix: delete category child with no category parent. drop table tmp_categorie; @@ -123,12 +151,6 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, position) values insert into llx_c_actioncomm (id, code, type, libelle, module, position) values ( 50, 'AC_OTH', 'system', 'Other' ,NULL, 5); --- Stock calculation on product -DELETE FROM llx_product_stock WHERE fk_product NOT IN (select rowid from llx_product); - -UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps WHERE ps.fk_product = p.rowid); - - -- VMYSQL4.1 DELETE T1 FROM llx_boxes_def as T1, llx_boxes_def as T2 where T1.entity = T2.entity AND T1.file = T2.file AND T1.note = T2.note and T1.rowid > T2.rowid; -- VPGSQL8.2 DELETE FROM llx_boxes_def as T1 WHERE rowid NOT IN (SELECT min(rowid) FROM llx_boxes_def GROUP BY file, entity, note); diff --git a/htdocs/install/mysql/tables/llx_product_batch.key.sql b/htdocs/install/mysql/tables/llx_product_batch.key.sql index d022beac743b4383de6d3737a3ba7db102ab9c45..100e092399de759f1fff0a618135ee6c7e13bfeb 100644 --- a/htdocs/install/mysql/tables/llx_product_batch.key.sql +++ b/htdocs/install/mysql/tables/llx_product_batch.key.sql @@ -19,3 +19,6 @@ ALTER TABLE llx_product_batch ADD INDEX idx_fk_product_stock(fk_product_stock); ALTER TABLE llx_product_batch ADD INDEX idx_batch(batch); ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid); + +ALTER TABLE llx_product_batch ADD UNIQUE INDEX uk_product_batch (fk_product_stock, batch); + diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 7b6604dce5194ff13fbefad09a0420688e748e25..a159e7aae8d92ef8efa3b61eab5ab229b0a5753b 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -346,8 +346,8 @@ PaymentConditionPT_5050=50%% in advance, 50%% on delivery FixAmount=Fix amount VarAmount=Variable amount (%% tot.) # PaymentType -PaymentTypeVIR=Bank deposit -PaymentTypeShortVIR=Bank deposit +PaymentTypeVIR=Bank transfer +PaymentTypeShortVIR=Bank transfer PaymentTypePRE=Bank's order PaymentTypeShortPRE=Bank's order PaymentTypeLIQ=Cash diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 06dfa25166c968682df2d7930155e1526a689355..9539c5fd39b3552eaee8965e67b4b913db873126 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -124,6 +124,7 @@ Int=Int DateAndTime=Date and time PublicMemberCard=Member public card MemberNotOrNoMoreExpectedToSubscribe=Member not or no more expected to subscribe +SubscriptionNotRecorded=Subscription not recorded AddSubscription=Create subscription ShowSubscription=Show subscription MemberModifiedInDolibarr=Member modified in Dolibarr diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index b409d0c752f921023cebc56dbf0f7b507e6d0e77..e4a349382b0939935f9305e457d8a134ad9f4f87 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -82,7 +82,9 @@ if ($id > 0 || ! empty($ref)) $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'margin', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index 32c39b63b4f3e4df5b36cd2d6c5836825d4027f5..cd12539c2f77dfb1e4eb7f46dcda7ae7af1a60d7 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -95,11 +95,6 @@ if ($socid > 0) print '<div class="underbanner clearboth"></div>'; print '<table class="border tableforfield" width="100%">'; - // Alias names (commercial, trademark or alias names) - print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td>'; - print $object->name_alias; - print "</td></tr>"; - if ($object->client) { print '<tr><td class="titlefield">'; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index d98637925467f1f3065bb871b68be4b355cce903..5fdfa1f23370adaa7c7d71aa411ce3e621ecd2d3 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1409,7 +1409,9 @@ else $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'card', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index 749da6d86e259e15289c8f2f5aa644f92a0abb8b..d4440dac0f3362e59b17353d8f2d203bf97ed997 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -429,8 +429,8 @@ class Productbatch extends CommonObject $sql.= " FROM ".MAIN_DB_PREFIX.self::$_table_element." as t"; $sql.= " WHERE fk_product_stock=".$fk_product_stock; - if (! empty($eatby)) array_push($where," eatby = '".$this->db->idate($eatby)."'"); - if (! empty($sellby)) array_push($where," sellby = '".$this->db->idate($sellby)."'"); + if (! empty($eatby)) array_push($where," eatby = '".$this->db->idate($eatby)."'"); // deprecated + if (! empty($sellby)) array_push($where," sellby = '".$this->db->idate($sellby)."'"); // deprecated if (! empty($batch_number)) $sql.= " AND batch = '".$this->db->escape($batch_number)."'"; if (! empty($where)) $sql.= " AND (".implode(" OR ",$where).")"; diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index adfce7d6229623409c683b045cc7890ba1aea7a4..d0d262922512a26402d95c55efd1959e06416db5 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -190,7 +190,9 @@ if ($id > 0 || ! empty($ref)) */ if ($user->rights->produit->lire || $user->rights->service->lire) { - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<table class="border" width="100%">'; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index ca207f8429f5e597381b7aa6891a366f5e81da3b..3030058fe9e1bd45862ccc679fb8602bfc07a958 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -195,7 +195,9 @@ if ($object->id) } - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 6a76055d3fc3a39b72eafd39be3fd2dd9582ebbc..ebc3b4eb6e5fdda89626e4a8d98d370ca5ccc5e9 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -297,8 +297,10 @@ if ($id > 0 || $ref) $titre=$langs->trans("CardProduct".$object->type); $picto=($object->type== Product::TYPE_SERVICE?'service':'product'); dol_fiche_head($head, 'suppliers', $titre, 0, $picto); - - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/product/info.php b/htdocs/product/info.php index 3ca96a2847d32cb75c8077ef15d747f748f3f83c..51510b518a6d63f51ee464c592560f8f6455c2f9 100644 --- a/htdocs/product/info.php +++ b/htdocs/product/info.php @@ -85,7 +85,7 @@ if ($id > 0 || $ref) $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); $object->info($object->id); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 5b024391b208fc16d2e3b4f0abed379120842564..67bb3165fb640fa6894eef831e119fdeec016af5 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -625,7 +625,9 @@ $titre = $langs->trans("CardProduct" . $object->type); $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); dol_fiche_head($head, 'price', $titre, 0, $picto); -dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); +$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + +dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index e330e9d8b7573fce9311ccea33afe30092c4d558..56dcc876d3e3cb75de154fae3b601a6985bcdf4f 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -255,7 +255,8 @@ if ($resql) $formProduct->loadWarehouses(); $warehouses_list = $formProduct->cache_warehouses; $nb_warehouse = count($warehouses_list); - $colspan_warehouse = $nb_warehouse > 1 ? $nb_warehouse+1 : 1; + $colspan_warehouse = 1; + if (! empty($conf->global->STOCK_DETAIL_ON_WAREHOUSE)) { $colspan_warehouse = $nb_warehouse > 1 ? $nb_warehouse+1 : 1; } print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'; diff --git a/htdocs/product/stats/card.php b/htdocs/product/stats/card.php index 49b700b46caa96203f6009c2b730da517c57f1ee..7003690e3c8b7d3fc1e02ddb8619f10292bfe3b1 100644 --- a/htdocs/product/stats/card.php +++ b/htdocs/product/stats/card.php @@ -106,7 +106,9 @@ if (! empty($id) || ! empty($ref) || GETPOST('id') == 'all') dol_fiche_head($head, 'stats', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); dol_fiche_end(); } diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 6933497614175558603b6daf4281f1b5fa9515e4..f9b9d14d794551c8e071e7202fcf0dff5f186b59 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -99,7 +99,9 @@ if ($id > 0 || ! empty($ref)) $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 83f0912b3ee073b56531a258778673ac04199191..4bdfdcc5c8117ad64b10626dd8faa407fd73627b 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -106,7 +106,9 @@ if ($id > 0 || ! empty($ref)) { if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index c2e6b25f7ab2119a8141ccdceb58ca3290a5c83c..ff91fbf299e87542921e272d08791652493045eb 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -89,7 +89,9 @@ if ($id > 0 || ! empty($ref)) $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 57c426dc3a1ade8f49c715be8baf873f5ee7781f..6f3f85464547971a64d75e485cd21430c37c2a23 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -102,7 +102,9 @@ if ($id > 0 || ! empty($ref)) $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 27e5495a7710bc03309919c3c81ed1e2537ac90b..77bd4b73887cb7960396f85ff0d3d7a5d970259b 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -101,7 +101,9 @@ if ($id > 0 || ! empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index 2fa69740e8b9adab23ca5673e5515147ebc4db8d..d23853c174fc022a639676bf047cbe1efc508456 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -99,7 +99,9 @@ if ($id > 0 || ! empty($ref)) $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index f34f4482a499c199969e1ec2fb44712bb6b760f4..659bea1f5a8a9e182d2bf300e1a73ac8ea5b7121 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -185,7 +185,7 @@ if ($action == 'create') print '<table class="border" width="100%">'; // Ref - print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="libelle" size="20" value=""></td></tr>'; + print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Ref").'</td><td colspan="3"><input name="libelle" size="20" value=""></td></tr>'; print '<tr><td >'.$langs->trans("LocationSummary").'</td><td colspan="3"><input name="lieu" size="40" value="'.(!empty($object->lieu)?$object->lieu:'').'"></td></tr>'; @@ -209,7 +209,7 @@ if ($action == 'create') print '</td></tr>'; // Country - print '<tr><td width="25%">'.$langs->trans('Country').'</td><td colspan="3">'; + print '<tr><td>'.$langs->trans('Country').'</td><td colspan="3">'; print $form->select_country((!empty($object->country_id)?$object->country_id:$mysoc->country_code),'country_id'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); print '</td></tr>'; diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 944fb3f8dfb62f61fa80a5d2d51f174acd6982db..f1542d593b6cc514d3cd428e56dca3aeeee9f100 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -65,9 +65,10 @@ class MouvementStock extends CommonObject * @param date $sellby sell-by date * @param string $batch batch number * @param boolean $skip_batch If set to true, stock movement is done without impacting batch record + * @param int $id_product_batch Id product_batch (when skip_batch is flase and we already know which record of product_batch to use) * @return int <0 if KO, 0 if fk_product is null, >0 if OK */ - function _create($user, $fk_product, $entrepot_id, $qty, $type, $price=0, $label='', $inventorycode='', $datem='',$eatby='',$sellby='',$batch='',$skip_batch=false) + function _create($user, $fk_product, $entrepot_id, $qty, $type, $price=0, $label='', $inventorycode='', $datem='',$eatby='',$sellby='',$batch='',$skip_batch=false, $id_product_batch=0) { global $conf, $langs; @@ -125,9 +126,14 @@ class MouvementStock extends CommonObject return -2; } - // If a serial number is provided, we check that sellby and eatby match already existing serial - $sql = "SELECT pb.rowid, pb.batch, pb.eatby, pb.sellby FROM ".MAIN_DB_PREFIX."product_batch as pb, ".MAIN_DB_PREFIX."product_stock as ps"; - $sql.= " WHERE pb.fk_product_stock = ps.rowid AND ps.fk_product = ".$fk_product." AND pb.batch = '".$this->db->escape($batch)."'"; + // FIXME Code not complete to implement this + // Check table llx_product_lot from batchnumber for same product + // If found and eatby/sellby defined into table and provided and differs, return error + // If found and eatby/sellby not defined into table and provided, we update table + // If found and eatby/sellby defined into table and not provided, we take value from table + // If not found, we add record + $sql = "SELECT pb.rowid, pb.batch, pb.eatby, pb.sellby FROM ".MAIN_DB_PREFIX."product_lot as pb"; + $sql.= " WHERE pb.fk_product = ".$fk_product." AND pb.batch = '".$this->db->escape($batch)."'"; dol_syslog(get_class($this)."::_create scan serial for this product to check if eatby and sellby match", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) @@ -310,8 +316,15 @@ class MouvementStock extends CommonObject // Update detail stock for batch product if (! $error && ! empty($conf->productbatch->enabled) && $product->hasbatch() && ! $skip_batch) { - $param_batch=array('fk_product_stock' =>$fk_product_stock, 'eatby'=>$eatby, 'sellby'=>$sellby, 'batchnumber'=>$batch); - $result=$this->_create_batch($param_batch, $qty); + if ($id_product_batch > 0) + { + $result=$this->createBatch($id_product_batch, $qty); + } + else + { + $param_batch=array('fk_product_stock' =>$fk_product_stock, 'batchnumber'=>$batch); + $result=$this->createBatch($param_batch, $qty); + } if ($result<0) $error++; } @@ -334,7 +347,7 @@ class MouvementStock extends CommonObject } } - // If stock is now 0, we can remove entry into llx_stock_product, but only if there is no child lines into llx_product_batch (detail of batch, because we can imagine + // If stock is now 0, we can remove entry into llx_product_stock, but only if there is no child lines into llx_product_batch (detail of batch, because we can imagine // having a lot1/qty=X and lot2/qty=-X, so 0 but we must not loose repartition of different lot. $sql="DELETE FROM ".MAIN_DB_PREFIX."product_stock WHERE reel = 0 AND rowid NOT IN (SELECT fk_product_stock FROM ".MAIN_DB_PREFIX."product_batch as pb)"; $resql=$this->db->query($sql); @@ -436,24 +449,14 @@ class MouvementStock extends CommonObject * @param date $eatby eat-by date * @param date $sellby sell-by date * @param string $batch batch number + * @param int $id_product_batch Id product_batch * @return int <0 if KO, >0 if OK */ - function livraison($user, $fk_product, $entrepot_id, $qty, $price=0, $label='', $datem='', $eatby='', $sellby='', $batch='') + function livraison($user, $fk_product, $entrepot_id, $qty, $price=0, $label='', $datem='', $eatby='', $sellby='', $batch='', $id_product_batch=0) { - return $this->_create($user, $fk_product, $entrepot_id, (0 - $qty), 2, $price, $label, '', $datem, $eatby, $sellby, $batch, true); - } + $skip_batch = empty($conf->productbatch->enabled); - /** - * Decrease stock for batch record - * - * @param int $id_stock_dluo Id product_dluo - * @param int $qty Quantity - * @return int <0 if KO, >0 if OK - */ - function livraison_batch($id_stock_dluo, $qty) - { - $ret=$this->_create_batch($id_stock_dluo, (0 - $qty)); - return $ret; + return $this->_create($user, $fk_product, $entrepot_id, (0 - $qty), 2, $price, $label, '', $datem, $eatby, $sellby, $batch, $skip_batch, $id_product_batch); } /** @@ -527,16 +530,18 @@ class MouvementStock extends CommonObject } /** - * Create or update batch record (update table llx_product_batch) + * Create or update batch record (update table llx_product_batch). No check is done here, done by parent. * - * @param array|int $dluo Could be either - * - int if row id of product_batch table - * - or complete array('fk_product_stock'=>, 'eatby'=>, 'sellby'=> , 'batchnumber'=>) - * @param int $qty Quantity of product with batch number. May be a negative amount. - * @return int <0 if KO, else return productbatch id + * @param array|int $dluo Could be either + * - int if row id of product_batch table + * - or complete array('fk_product_stock'=>, 'batchnumber'=>) + * @param int $qty Quantity of product with batch number. May be a negative amount. + * @return int <0 if KO, else return productbatch id */ - function _create_batch($dluo, $qty) + private function createBatch($dluo, $qty) { + global $user; + $pdluo=new Productbatch($this->db); $result=0; @@ -548,7 +553,7 @@ class MouvementStock extends CommonObject if (empty($pdluo->id)) { // We didn't find the line. May be it was deleted before by a previous move in same transaction. - $this->error = 'Error. You ask a move on a record for a serial that does not exists anymore. May be you take the same serial on samewarehouse several times in same shipment or it was used by another shipment. Remove this shipment and prepare another one.'; + $this->error = 'Error. You ask a move on a record for a serial that does not exists anymore. May be you take the same serial on same warehouse several times in same shipment or it was used by another shipment. Remove this shipment and prepare another one.'; $this->errors[] = $this->error; $result = -2; } @@ -558,21 +563,19 @@ class MouvementStock extends CommonObject if (isset($dluo['fk_product_stock'])) { $vfk_product_stock=$dluo['fk_product_stock']; - $veatby = $dluo['eatby']; - $vsellby = $dluo['sellby']; $vbatchnumber = $dluo['batchnumber']; - $result = $pdluo->find($vfk_product_stock,$veatby,$vsellby,$vbatchnumber); + $result = $pdluo->find($vfk_product_stock,'','',$vbatchnumber); // Search on batch number only (eatby and sellby are deprecated here) } else { - dol_syslog(get_class($this)."::_create_batch array param dluo must contain at least key fk_product_stock".$error, LOG_ERR); + dol_syslog(get_class($this)."::createBatch array param dluo must contain at least key fk_product_stock".$error, LOG_ERR); $result = -1; } } else { - dol_syslog(get_class($this)."::_create_batch error invalid param dluo".$error, LOG_ERR); + dol_syslog(get_class($this)."::createBatch error invalid param dluo".$error, LOG_ERR); $result = -1; } @@ -585,9 +588,9 @@ class MouvementStock extends CommonObject $pdluo->qty += $qty; if ($pdluo->qty == 0) { - $result=$pdluo->delete(0,1); + $result=$pdluo->delete($user,1); } else { - $result=$pdluo->update(0,1); + $result=$pdluo->update($user,1); } } else // product_batch record not found @@ -598,7 +601,7 @@ class MouvementStock extends CommonObject $pdluo->sellby = $vsellby; $pdluo->batch = $vbatchnumber; - $result=$pdluo->create(0,1); + $result=$pdluo->create($user,1); if ($result < 0) { $this->error=$pdluo->error; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 05b0aecf5b61e57f3dee3f5d52f7d4aeaa2d67f1..499efd298479a47897eda6914e50373f5b8b39ec 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -405,7 +405,9 @@ if ($id > 0 || $ref) dol_htmloutput_events(); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); print '<div class="fichecenter">'; @@ -746,12 +748,13 @@ if ($resql) print '<td colspan="4"><input type="submit" class="button" id="savelinebutton" name="save" value="'.$langs->trans("Save").'">'; print '<input type="submit" class="button" id="cancellinebutton" name="Cancel" value="'.$langs->trans("Cancel").'"></td></tr>'; print '</table></form>'; + print '</td></tr>'; } else { print "\n".'<tr><td align="right">'; print img_picto($langs->trans("Tranfer"),'uparrow','class="hideonsmartphone"').' '; - print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=transfert&pdluoid='.$pdluo->id.'">'.$langs->trans("StockTransfer").'</a>'; + print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&id_entrepot='.$entrepotstatic->id.'&action=transfert&pdluoid='.$pdluo->id.'">'.$langs->trans("StockTransfer").'</a>'; // Disabled, because edition of stock content must use the "Correct stock menu". // Do not use this, or data will be wrong (bad tracking of movement label, inventory code, ... //print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=editline&lineid='.$pdluo->id.'#'.$pdluo->id.'">'; diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index 1c0448192f1c2404a65b4499f7480d8ef19837c3..a50fafca2787396257d4f6a1d6f1bca579261117 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -108,7 +108,7 @@ print '<td colspan="3">'; print '<input type="text" name="label" size="60" value="'.dol_escape_htmltag($valformovementlabel).'">'; print '</td>'; - print '<td width="20%">'.$langs->trans("InventoryCode").'</td><td width="20%"><input class="flat" name="inventorycode" id="inventorycode" size="14" value="'.GETPOST("inventorycode").'"></td>'; + print '<td width="20%">'.$langs->trans("InventoryCode").'</td><td width="20%"><input class="flat" name="inventorycode" id="inventorycode" size="14" value="'.(GETPOST("inventorycode")?GETPOST("inventorycode",'alpha'):dol_print_date(dol_now(),'%y%m%d%H%M%S')).'"></td>'; print '</tr>'; print '</table>'; diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 96c94e9efffc326755429677a5a1e9751238bb35..d83dfd238c73ff2dcddf20f214f7b784495a6423 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -185,7 +185,9 @@ if ($action == 'edit') dol_fiche_head($head, 'translation', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); if (! empty($object->multilangs)) { @@ -227,7 +229,9 @@ else { dol_fiche_head($head, 'translation', $titre, 0, $picto); - dol_banner_tab($object, 'ref', '', ($user->societe_id?0:1), 'ref'); + $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; + + dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); $cnt_trans = 0; if (! empty($object->multilangs)) diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 7bbba527ed8cd5c9c5ad4e5832b0c64d35bf9c45..4547c7d75daaf23533b102b959de07170cc13722 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -88,19 +88,14 @@ if ($socid) print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent">'; - // Alias names (commercial, trademark or alias names) - print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">'; - print $object->name_alias; - print "</td></tr>"; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; + print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } if ($object->client) { - print '<tr><td>'; + print '<tr><td class="titlefield">'; print $langs->trans('CustomerCode').'</td><td colspan="3">'; print $object->code_client; if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; @@ -109,7 +104,7 @@ if ($socid) if ($object->fournisseur) { - print '<tr><td>'; + print '<tr><td class="titlefield">'; print $langs->trans('SupplierCode').'</td><td colspan="3">'; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 62364c57644c9524c68226e32a257c8172cd1048..cb1d783497cef979f268e33e1c1d161a8a4393c3 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1009,7 +1009,7 @@ class Societe extends CommonObject global $langs; global $conf; - if (empty($rowid) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1; + if (empty($rowid) && empty($ref) && empty($ref_ext) && empty($ref_int) && empty($idprof1) && empty($idprof2) && empty($idprof3) && empty($idprof4)) return -1; $sql = 'SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as date_creation, s.prefix_comm'; $sql .= ', s.status'; diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 661483cf2a2e7cda6b9eb18d15cffd9c9ba78290..d5b68057ff1b118da7db3d6d072c19750f3ddbcb 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -121,20 +121,16 @@ print '<div class="fichecenter">'; print '<div class="underbanner clearboth"></div>'; print '<table class="border" width="100%">'; -// Alias names (commercial, trademark or alias names) -print '<tr id="name_alias"><td class="titlefield"><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>'; -print '<td colspan="3">'.$object->name_alias.'</td></tr>'; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; + print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } //if ($conf->agenda->enabled && $user->rights->agenda->myactions->read) $elementTypeArray['action']=$langs->transnoentitiesnoconv('Events'); if ($object->client) { - print '<tr><td>'; + print '<tr><td class="titlefield">'; print $langs->trans('CustomerCode').'</td><td colspan="3">'; print $object->code_client; if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; @@ -155,7 +151,7 @@ if ($object->client) if ($object->fournisseur) { - print '<tr><td>'; + print '<tr><td class="titlefield">'; print $langs->trans('SupplierCode').'</td><td colspan="3">'; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index fff130629be71d16be674ab19df443ca67fdef8d..4ad8abc9a4307032011d5003e5203493066f345f 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -116,20 +116,15 @@ if ($object->id) print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent">'; - // Alias names (commercial, trademark or alias names) - print '<tr><td class="titlefield" width="25%">'.$langs->trans('AliasNames').'</td><td colspan="3">'; - print $object->name_alias; - print "</td></tr>"; - // Prefix if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; + print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } if ($object->client) { - print '<tr><td>'; + print '<tr><td class="titlefield">'; print $langs->trans('CustomerCode').'</td><td colspan="3">'; print $object->code_client; if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; @@ -138,7 +133,7 @@ if ($object->id) if ($object->fournisseur) { - print '<tr><td>'; + print '<tr><td class="titlefield">'; print $langs->trans('SupplierCode').'</td><td colspan="3">'; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; @@ -146,7 +141,7 @@ if ($object->id) } // Number of files - print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; + print '<tr><td class="titlefield">'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; // Total size print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index acd7f32d375b4e21475842f321052c75b69a8ddc..156a4620634bf5aee3cb395aa4ab555c237b19d3 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -82,19 +82,14 @@ if ($id > 0) print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent">'; - // Alias names (commercial, trademark or alias names) - print '<tr><td class="titlefield" width="25%">'.$langs->trans('AliasNames').'</td><td colspan="3">'; - print $object->name_alias; - print "</td></tr>"; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { - print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; + print '<tr><td class="titlefield">'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; } if ($object->client) { - print '<tr><td>'; + print '<tr><td class="titlefield">'; print $langs->trans('CustomerCode').'</td><td colspan="3">'; print $object->code_client; if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; @@ -103,7 +98,7 @@ if ($id > 0) if ($object->fournisseur) { - print '<tr><td>'; + print '<tr><td class="titlefield">'; print $langs->trans('SupplierCode').'</td><td colspan="3">'; print $object->code_fournisseur; if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php index 6eb9765d034c2ad5fa0b30ef09a8538282c7ab70..eb3963d0f7aa7f5fbc5d46063c63f900bc8621cf 100644 --- a/htdocs/societe/project.php +++ b/htdocs/societe/project.php @@ -87,11 +87,6 @@ if ($socid) print '<div class="underbanner clearboth"></div>'; print '<table class="border centpercent">'; - // Alias names (commercial, trademark or alias names) - print '<tr><td class="titlefield">'.$langs->trans('AliasNames').'</td><td colspan="3">'; - print $object->name_alias; - print "</td></tr>"; - if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field { print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>'; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 02543d469933691da8c8147bf936e8b0d69cbfa1..71df6128afb207ef989fd4a0e252ad1c82843989 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -986,8 +986,8 @@ else print '<td colspan="3"><input type="text" size="60" name="name_alias" id="name_alias_input" value="'.$object->name_alias.'" size="32"></td></tr>'; // Prospect/Customer - print '<tr><td width="25%">'.fieldLabel('ProspectCustomer','customerprospect',1).'</td>'; - print '<td width="25%" class="maxwidthonsmartphone">'; + print '<tr><td class="titlefieldcreate">'.fieldLabel('ProspectCustomer','customerprospect',1).'</td>'; + print '<td class="maxwidthonsmartphone">'; $selected=isset($_POST['client'])?GETPOST('client'):$object->client; print '<select class="flat" name="client" id="customerprospect">'; if (GETPOST("type") == '') print '<option value="-1"></option>'; @@ -997,7 +997,7 @@ else print '<option value="0"'.((string) $selected == '0'?' selected':'').'>'.$langs->trans('NorProspectNorCustomer').'</option>'; print '</select></td>'; - print '<td width="25%">'.fieldLabel('CustomerCode','customer_code').'</td><td width="25%">'; + print '<td>'.fieldLabel('CustomerCode','customer_code').'</td><td width="25%">'; print '<table class="nobordernopadding"><tr><td>'; $tmpcode=$object->code_client; if (empty($tmpcode) && ! empty($modCodeClient->code_auto)) $tmpcode=$modCodeClient->getNextValue($object,0); @@ -1494,7 +1494,7 @@ else } // Name - print '<tr><td width="25%">'.fieldLabel('ThirdPartyName','name',1).'</td>'; + print '<tr><td class="titlefield">'.fieldLabel('ThirdPartyName','name',1).'</td>'; print '<td colspan="3"><input type="text" size="60" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus"></td></tr>'; // Alias names (commercial, trademark or alias names) @@ -1519,8 +1519,8 @@ else } // Prospect/Customer - print '<tr><td width="25%">'.fieldLabel('ProspectCustomer','customerprospect',1).'</td>'; - print '<td width="25%"><select class="flat" name="client" id="customerprospect">'; + print '<tr><td>'.fieldLabel('ProspectCustomer','customerprospect',1).'</td>'; + print '<td><select class="flat" name="client" id="customerprospect">'; if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2"'.($object->client==2?' selected':'').'>'.$langs->trans('Prospect').'</option>'; if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="3"'.($object->client==3?' selected':'').'>'.$langs->trans('ProspectCustomer').'</option>'; if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print '<option value="1"'.($object->client==1?' selected':'').'>'.$langs->trans('Customer').'</option>'; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 162310f4697f2d2b8fd3847468f5a852abfbbd3f..3a82b25deeb96169f62f069d01bdd1eea4b74185 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -3142,19 +3142,19 @@ table.cal_month { border-spacing: 0px; } table.cal_month td:first-child { border-left: 0px; } table.cal_month td:last-child { border-right: 0px; } .cal_current_month { border-top: 0; border-left: solid 1px #E0E0E0; border-right: 0; border-bottom: solid 1px #E0E0E0; } -.cal_current_month_peruserleft { border-top: 0; border-left: solid 3px #6C7C7B; border-right: 0; border-bottom: solid 1px #E0E0E0; } +.cal_current_month_peruserleft { border-top: 0; border-left: solid 2px #6C7C7B; border-right: 0; border-bottom: solid 1px #E0E0E0; } .cal_current_month_oneday { border-right: solid 1px #E0E0E0; } .cal_other_month { border-top: 0; border-left: solid 1px #C0C0C0; border-right: 0; border-bottom: solid 1px #C0C0C0; } -.cal_other_month_peruserleft { border-top: 0; border-left: solid 3px #6C7C7B !important; border-right: 0; } +.cal_other_month_peruserleft { border-top: 0; border-left: solid 2px #6C7C7B !important; border-right: 0; } .cal_current_month_right { border-right: solid 1px #E0E0E0; } .cal_other_month_right { border-right: solid 1px #C0C0C0; } .cal_other_month { opacity: 0.6; background: #EAEAEA; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past_month { opacity: 0.6; background: #EEEEEE; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_current_month { background: #FFFFFF; border-left: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } -.cal_current_month_peruserleft { background: #FFFFFF; border-left: solid 3px #6C7C7B; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_current_month_peruserleft { background: #FFFFFF; border-left: solid 2px #6C7C7B; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today { background: #FDFDF0; border-left: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today_peruser { background: #FDFDF0; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } -.cal_today_peruser_peruserleft { background: #FDFDF0; border-left: solid 3px #6C7C7B; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_today_peruser_peruserleft { background: #FDFDF0; border-left: solid 2px #6C7C7B; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past { } .cal_peruser { padding: 0px; } .cal_impair { background: #F8F8F8; } @@ -3642,9 +3642,9 @@ div.dolEventError h1, div.dolEventError h2 { /* ============================================================================== */ .divmap, #google-visualization-geomap-embed-0, #google-visualization-geomap-embed-1, #google-visualization-geomap-embed-2 { - -moz-box-shadow: 0px 0px 10px #AAA; +/* -moz-box-shadow: 0px 0px 10px #AAA; -webkit-box-shadow: 0px 0px 10px #AAA; - box-shadow: 0px 0px 10px #AAA; + box-shadow: 0px 0px 10px #AAA; */ } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 3de39efb50fbc1aa147a6160fca966eb1945f32b..4f9e1c2455467cc50f5b8ffe89606cd2317ff5ba 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3019,19 +3019,19 @@ table.cal_month { border-spacing: 0px; } table.cal_month td:first-child { border-left: 0px; } table.cal_month td:last-child { border-right: 0px; } .cal_current_month { border-top: 0; border-left: solid 1px #E0E0E0; border-right: 0; border-bottom: solid 1px #E0E0E0; } -.cal_current_month_peruserleft { border-top: 0; border-left: solid 3px #6C7C7B; border-right: 0; border-bottom: solid 1px #E0E0E0; } +.cal_current_month_peruserleft { border-top: 0; border-left: solid 2px #6C7C7B; border-right: 0; border-bottom: solid 1px #E0E0E0; } .cal_current_month_oneday { border-right: solid 1px #E0E0E0; } .cal_other_month { border-top: 0; border-left: solid 1px #C0C0C0; border-right: 0; border-bottom: solid 1px #C0C0C0; } -.cal_other_month_peruserleft { border-top: 0; border-left: solid 3px #6C7C7B !important; border-right: 0; } +.cal_other_month_peruserleft { border-top: 0; border-left: solid 2px #6C7C7B !important; border-right: 0; } .cal_current_month_right { border-right: solid 1px #E0E0E0; } .cal_other_month_right { border-right: solid 1px #C0C0C0; } .cal_other_month { opacity: 0.6; background: #EAEAEA; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past_month { opacity: 0.6; background: #EEEEEE; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_current_month { background: #FFFFFF; border-left: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } -.cal_current_month_peruserleft { background: #FFFFFF; border-left: solid 3px #6C7C7B; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_current_month_peruserleft { background: #FFFFFF; border-left: solid 2px #6C7C7B; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today { background: #FDFDF0; border-left: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today_peruser { background: #FDFDF0; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } -.cal_today_peruser_peruserleft { background: #FDFDF0; border-left: solid 3px #6C7C7B; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_today_peruser_peruserleft { background: #FDFDF0; border-left: solid 2px #6C7C7B; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-<?php print $left; ?>: 2px; padding-<?php print $right; ?>: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past { } .cal_peruser { padding: 0px; } .cal_impair { background: #F8F8F8; } @@ -3518,9 +3518,9 @@ div.dolEventError h1, div.dolEventError h2 { /* ============================================================================== */ .divmap, #google-visualization-geomap-embed-0, #google-visualization-geomap-embed-1, google-visualization-geomap-embed-2 { - -moz-box-shadow: 0px 0px 10px #AAA; +/* -moz-box-shadow: 0px 0px 10px #AAA; -webkit-box-shadow: 0px 0px 10px #AAA; - box-shadow: 0px 0px 10px #AAA; + box-shadow: 0px 0px 10px #AAA; */ }