diff --git a/ChangeLog b/ChangeLog index 439ae83b35d..a17879fcbdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -115,6 +115,7 @@ NEW: Use new select2 component for juridical status, country and state selection NEW: When creating order, proposal or invoice from thirdparty card, the project is asked during creation. A link to create project if it does not exists is also available. NEW: Uniformize form creation of proposal to add public and private notes during creation like for order and invoice. NEW: More robust antiXSS engine. +NEW: Compatibility with Mysql 5.7+ For developers: NEW: The search box and the bookmarks are now rendered by the menu manager. diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index e59e91781fc..8bb5befa991 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -22,7 +22,11 @@ /** * \file htdocs/accountancy/admin/productaccount.php * \ingroup Accounting Expert +<<<<<<< HEAD * \brief To define accounting account on product / service +======= + * \brief Onglet de gestion de parametrages des ventilations +>>>>>>> refs/remotes/origin/3.9 */ require '../../main.inc.php'; @@ -241,7 +245,7 @@ if ($result) { $num_lines = $db->num_rows($result); $i = 0; - print load_fiche_titre($langs->trans("InitAccountancy"), '', 'title_setup'); + print_barre_liste($langs->trans("ProductAccountingAccountSelect"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num_lines); print '
'; print $langs->trans("InitAccountancyDesc") . '
'; diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 9bc63b87eba..dbca9aeddd9 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1067,7 +1067,7 @@ class BookKeeping extends CommonObject } } else { $this->error = "Error " . $this->db->lasterror(); - dol_syslog(get_class($this) . "::fetch_per_mvt " . $this->error, LOG_ERR); + dol_syslog(get_class($this) . "::fetch_all_per_mvt " . $this->error, LOG_ERR); return - 1; } diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 555a8a3818e..a2a1619cb63 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -148,7 +148,7 @@ if ($action == 'ventil' && ! empty($btn_ventil)) { dol_syslog("/accountancy/customer/list.php sql=" . $sql, LOG_DEBUG); if ($db->query($sql)) { - print '
' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . $monCompte . '
'; + print '
' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' ' . $langs->trans("VentilatedinAccount") . ' : ' . $monCompte . '
'; } else { print '
' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' ' . $langs->trans("NotVentilatedinAccount") . ' : ' . $monCompte . '
' . $sql . '
'; } diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 23c22afbb2c..4ca8b152202 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -415,7 +415,7 @@ if ($action == 'export_csv') { // Model Cegid Expert Export if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) -{ + { $sep = ";"; foreach ( $tabpay as $key => $val ) { @@ -461,18 +461,18 @@ if ($action == 'export_csv') { } } else { foreach ( $tabbq[$key] as $k => $mt ) { - print $date . $sep; - print $journal . $sep; - print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . $sep; - print $sep; - print ($mt < 0 ? 'D' : 'C') . $sep; - print ($mt <= 0 ? price(- $mt) : $mt) . $sep; - print $val["type_payment"] . $sep; - print $val["ref"] . $sep; - print "\n"; + print $date . $sep; + print $journal . $sep; + print length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUSPENSE) . $sep; + print $sep; + print ($mt < 0 ? 'D' : 'C') . $sep; + print ($mt <= 0 ? price(- $mt) : $mt) . $sep; + print $val["type_payment"] . $sep; + print $val["ref"] . $sep; + print "\n"; + } } } - } } else { // Model Classic Export foreach ( $tabpay as $key => $val ) { @@ -518,7 +518,8 @@ if ($action == 'export_csv') { } } } -} else { +} +else { $form = new Form($db); llxHeader('', $langs->trans("FinanceJournal")); @@ -628,5 +629,4 @@ if ($action == 'export_csv') { llxFooter(); } - $db->close(); diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index d5a5e1d1fb1..86232bb2029 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -269,7 +269,7 @@ if ($action == 'export_csv') { // Model Cegid Expert Export if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) -{ + { $sep = ";"; foreach ( $tabfac as $key => $val ) { diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 4545ac9578b..4678a677597 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -295,7 +295,7 @@ if ($action == 'export_csv') { // Model Cegid Expert Export if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) -{ + { $sep = ";"; foreach ( $tabfac as $key => $val ) { diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index 2fbd3de6a0f..b7cc6e94bf2 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -78,6 +78,11 @@ else if ($action == 'update') $res = dolibarr_set_const($db, "GENBARCODE_BARCODETYPE_THIRDPARTY", $coder_id,'chaine',0,'',$conf->entity); } } +else if ($action == 'updateengine') +{ + // TODO Update engines. + +} // define constants for models generator that need parameters if ($action == 'setModuleOptions') @@ -190,6 +195,10 @@ $var=true; print '
'; print load_fiche_titre($langs->trans("BarcodeEncodeModule"),'',''); +print "
"; +print ''; +print ""; + print ''; print ''; print ''; @@ -282,11 +291,18 @@ if ($resql) } print "
'.$langs->trans("Name").'
\n"; +if (empty($conf->use_javascript_ajax)) +{ + // TODO Implement code behind action updateengine + //print '
'; +} +print '
'; + print "
"; + /* - * Autres options - * + * Other options */ print load_fiche_titre($langs->trans("OtherOptions"),'',''); diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index f89d1220e4a..f2ef90677c5 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -186,10 +186,13 @@ class FactureRec extends Facture /** * Recupere l'objet facture et ses lignes de factures * - * @param int $rowid Id de la facture a recuperer - * @return int >0 si ok, <0 si ko + * @param int $rowid Id of object to load + * @param string $ref Reference of invoice + * @param string $ref_ext External reference of invoice + * @param int $ref_int Internal reference of other object + * @return int >0 if OK, <0 if KO, 0 if not found */ - function fetch($rowid) + function fetch($rowid, $ref='', $ref_ext='', $ref_int='') { $sql = 'SELECT f.titre,f.fk_soc,f.amount,f.tva,f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise'; $sql.= ', f.date_lim_reglement as dlr'; @@ -203,8 +206,13 @@ class FactureRec extends Facture $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON f.fk_mode_reglement = p.id'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as el ON el.fk_target = f.rowid AND el.targettype = 'facture'"; $sql.= ' WHERE f.rowid='.$rowid; - - dol_syslog("FactureRec::Fetch rowid=".$rowid."", LOG_DEBUG); + if ($ref) $sql.= " AND f.titre='".$this->db->escape($ref)."'"; + /* This field are not used for template invoice + if ($ref_ext) $sql.= " AND f.ref_ext='".$this->db->escape($ref_ext)."'"; + if ($ref_int) $sql.= " AND f.ref_int='".$this->db->escape($ref_int)."'"; + */ + + dol_syslog(get_class($this)."::fetch rowid=".$rowid, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { @@ -353,32 +361,49 @@ class FactureRec extends Facture /** - * Delete current invoice + * Delete template invoice * - * @return int <0 if KO, >0 if OK + * @param int $rowid Id of invoice to delete. If empty, we delete current instance of invoice + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @param int $idwarehouse Id warehouse to use for stock change. + * @return int <0 if KO, >0 if OK */ - function delete() + function delete($rowid=0, $notrigger=0, $idwarehouse=-1) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet_rec WHERE fk_facture = ".$this->id; + if (empty($rowid)) $rowid=$this->id; + + dol_syslog(get_class($this)."::delete rowid=".$rowid, LOG_DEBUG); + + $error=0; + $this->db->begin(); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet_rec WHERE fk_facture = ".$rowid; dol_syslog($sql); if ($this->db->query($sql)) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."facture_rec WHERE rowid = ".$this->id; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."facture_rec WHERE rowid = ".$rowid; dol_syslog($sql); - if ($this->db->query($sql)) - { - return 1; - } - else + if (! $this->db->query($sql)) { $this->error=$this->db->lasterror(); - return -1; + $error=-1; } } else { $this->error=$this->db->lasterror(); - return -2; + $error=-2; + } + + if (! $error) + { + $this->db->commit(); + return 1; + } + else + { + $this->db->rollback(); + return $error; } } @@ -507,21 +532,29 @@ class FactureRec extends Facture /** * Return clicable name (with picto eventually) * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param string $option Sur quoi pointe le lien ('', 'withdraw') - * @return string Chaine avec URL + * @param int $withpicto Add picto into link + * @param string $option Where point the link + * @param int $max Maxlength of ref + * @param int $short 1=Return just URL + * @param string $moretitle Add more text to title tooltip + * @return string String with URL */ - function getNomUrl($withpicto=0,$option='') + function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='') { global $langs; $result=''; $label=$langs->trans("ShowInvoice").': '.$this->ref; - - $link = ''; + + $url = DOL_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$this->id; + + if ($short) return $url; + + $picto='bill'; + + $link = ''; $linkend=''; - $picto='bill'; if ($withpicto) $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index 1ee9fe9b582..0f03eb8ae47 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -201,8 +201,13 @@ if ($action == 'valide') print ''; +$linkback = '' . $langs->trans("BackToList") . ''; + + // Ref -print ''; +print ''; // Date payment print ''; + print ''; print ''; @@ -279,7 +286,7 @@ if ($resql) else print ' '; print ''; - print ''; + print ''; print ''; print ''; print ''; - print ''; + if (! empty($conf->projet->enabled)) print ''; print ''; print ''; print ''; @@ -1680,14 +1680,17 @@ else print img_picto($langs->trans("Document"), "object_generic"); print ' '.$piece_comptable.''; print ''; - print ''; } - print ''; print ''; print ''; print ''; @@ -1729,10 +1732,13 @@ else print ''; // Select project - print ''; - + if (! empty($conf->projet->enabled)) + { + print ''; + } + // Select type print ''; print ''; //print ''; - print ''; + if (! empty($conf->projet->enabled)) print ''; print ''; print ''; print ''; @@ -1810,10 +1816,13 @@ else print ''; // Select project - print ''; - + if (! empty($conf->projet->enabled)) + { + print ''; + } + // Select type print '
'.$langs->trans('Ref').''.$object->ref.'
'.$langs->trans('Ref').''; +print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); +print '
'.$form->editfieldkey("Date",'datep',$object->date,$object,$user->rights->facture->paiement).''; diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index f9a822fdfc8..4fa9c5b9575 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -103,7 +103,7 @@ class Paiement extends CommonObject { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; - $this->ref = $obj->ref; + $this->ref = $obj->ref?$obj->ref:$obj->rowid; $this->date = $this->db->jdate($obj->dp); $this->datepaye = $this->db->jdate($obj->dp); $this->numero = $obj->num_paiement; diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 1f35aa6fba9..8cda05bec45 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -53,8 +53,9 @@ $companystatic=new Societe($db); $search_ref=GETPOST("search_ref","int"); $search_account=GETPOST("search_account","int"); $search_paymenttype=GETPOST("search_paymenttype"); -$search_amount=GETPOST("search_amount"); -$search_company=GETPOST("search_company"); +$search_amount=GETPOST("search_amount",'alpha'); // alpha because we must be able to search on "< x" +$search_company=GETPOST("search_company",'alpha'); +$search_payment_num=GETPOST('search_payment_num','alpha'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); $limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit; @@ -72,6 +73,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_account=""; $search_amount=""; $search_paymenttype=""; + $search_payment_num=""; $search_company=""; $day=''; $year=''; @@ -165,9 +167,10 @@ else { $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'"; } - if ($search_ref) $sql .=natural_search('p.ref', $search_ref); + if ($search_ref) $sql .=natural_search('p.ref', $search_ref); if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account; if ($search_paymenttype != "") $sql .=" AND c.code='".$db->escape($search_paymenttype)."'"; + if ($search_payment_num != '') $sql .=" AND p.num_paiement = '".$db->escape($search_payment_num)."'"; if ($search_amount) $sql .=" AND p.amount='".$db->escape(price2num($search_amount))."'"; if ($search_company) $sql .= natural_search('s.nom', $search_company); // Add where from hooks @@ -209,6 +212,7 @@ if ($resql) 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); @@ -237,6 +241,9 @@ if ($resql) print ''; $form->select_types_paiements($search_paymenttype,'search_paymenttype','',2,1,1); print ''; + print ''; + print ''; $form->select_comptes($search_account,'search_account',0,'',1); print ''.$langs->trans("PaymentTypeShort".$objp->paiement_code).' '.$objp->num_paiement.''.$langs->trans("PaymentTypeShort".$objp->paiement_code).''.$objp->num_paiement.''; if ($objp->bid) { diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index d762b134b1c..bd9a4b781f5 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -512,10 +512,12 @@ else $(\'textarea[name="address"]\').val("'.dol_escape_js($objsoc->address).'"); $(\'input[name="zipcode"]\').val("'.dol_escape_js($objsoc->zip).'"); $(\'input[name="town"]\').val("'.dol_escape_js($objsoc->town).'"); - $(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'"); - $(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'"); - $(\'input[name="email"]\').val("'.dol_escape_js($objsoc->email).'"); - }); + console.log("Set state_id to '.dol_escape_js($objsoc->state_id).'"); + $(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'").trigger("change"); + /* set country at end because it will trigger page refresh */ + console.log("Set country id to '.dol_escape_js($objsoc->country_id).'"); + $(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'").trigger("change"); /* trigger required to update select2 components */ + }); })'."\n"; print ''."\n"; } @@ -750,11 +752,14 @@ else }); $("#copyaddressfromsoc").click(function() { - $(\'textarea[name="address"]\').text("'.dol_escape_js($objsoc->address).'"); + $(\'textarea[name="address"]\').val("'.dol_escape_js($objsoc->address).'"); $(\'input[name="zipcode"]\').val("'.dol_escape_js($objsoc->zip).'"); $(\'input[name="town"]\').val("'.dol_escape_js($objsoc->town).'"); - $(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'"); - $(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'"); + console.log("Set state_id to '.dol_escape_js($objsoc->state_id).'"); + $(\'select[name="state_id"]\').val("'.dol_escape_js($objsoc->state_id).'").trigger("change"); + /* set country at end because it will trigger page refresh */ + console.log("Set country id to '.dol_escape_js($objsoc->country_id).'"); + $(\'select[name="country_id"]\').val("'.dol_escape_js($objsoc->country_id).'").trigger("change"); /* trigger required to update select2 components */ }); })'."\n"; print ''."\n"; diff --git a/htdocs/core/class/menu.class.php b/htdocs/core/class/menu.class.php index 0715c2fafdc..58e93ec5544 100644 --- a/htdocs/core/class/menu.class.php +++ b/htdocs/core/class/menu.class.php @@ -55,7 +55,7 @@ class Menu * @param string $titre Label of menu to add * @param integer $level Level of menu to add * @param int $enabled Menu active or not (0=Not active, 1=Active, 2=Active but grey) - * @param string $target Target lien + * @param string $target Target link * @param string $mainmenu Main menu ('home', 'companies', 'products', ...) * @param string $leftmenu Left menu ('setup', 'system', 'admintools', ...) * @param int $position Position (not used yet) @@ -74,7 +74,7 @@ class Menu * @param string $titre Label of menu to add * @param integer $level Level of menu to add * @param int $enabled Menu active or not - * @param string $target Target lien + * @param string $target Target link * @param string $mainmenu Main menu ('home', 'companies', 'products', ...) * @param string $leftmenu Left menu ('setup', 'system', 'admintools', ...) * @param int $position Position (not used yet) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index acdf123e4ce..17a1a575a97 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5113,21 +5113,24 @@ function printCommonFooter($zone='private') if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER."\n"; print "\n"; - print ''."\n"; + if (! empty($conf->use_javascript_ajax)) + { + print ''."\n"; + } // Google Analytics (need Google module) if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AN_ID)) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index b54e9a560ac..6c0f30c6b6c 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -208,22 +208,40 @@ 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', 2302__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/reglement.php?leftmenu=tax_vat', 'List', 2, 'companies', '$user->rights->tax->charges->lire', '', 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->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__); --- Ventilation (accounting) -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', 'ventil_customer', 6__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=ventil_customer', 'CustomersVentilation', 0, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 8, __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=="ventil_customer"', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 1, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 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 ('', '$conf->accounting->enabled && $leftmenu=="ventil_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '/accountancy/customer/lines.php', 'Dispatched', 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 && $conf->supplier_invoice->enabled', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'ventil_supplier', 6__+MAX_llx_menu__, '/accountancy/supplier/index.php?leftmenu=ventil_supplier', 'SuppliersVentilation', 0, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 9, __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 && $conf->supplier_invoice->enabled && $leftmenu=="ventil_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php', 'ToDispatch', 1, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 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 ('', '$conf->accounting->enabled && $conf->supplier_invoice->enabled && $leftmenu=="ventil_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php', 'Dispatched', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 1, __ENTITY__); --- Rapports -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->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __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->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2701__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 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 ('', '$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2702__+MAX_llx_menu__, 'accountancy', '', 2701__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 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 ('', '$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2703__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 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->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2704__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 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 ('', '$conf->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 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->comptabilite->enabled || $conf->accounting->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2708__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __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__); + -- 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__); + 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', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 3, __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 && $conf->fournisseur->enabled', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'ventil_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?leftmenu=dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 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 ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 5, __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 && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 6, __ENTITY__); + -- Journals + -- 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', 2420__+MAX_llx_menu__, 'accountancy', 'journal', 2400__+MAX_llx_menu__, '/accountancy/journal/index.php?leftmenu=journal', 'Journaux', 1, 'accountancy', '$user->rights->accounting->comptarapport->lire', '', 0, 7, __ENTITY__); + -- General Ledger + 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', 2430__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php?leftmenu=bookkeeping', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __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=="bookkeeping"', __HANDLER__, 'left', 2431__+MAX_llx_menu__, 'accountancy', '', 2430__+MAX_llx_menu__, '/accountancy/bookkeeping/listbyyear.php', 'ByYear', 2, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __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=="bookkeeping"', __HANDLER__, 'left', 2432__+MAX_llx_menu__, 'accountancy', '', 2430__+MAX_llx_menu__, '/accountancy/bookkeeping/balancebymonth.php', 'AccountBalanceByMonth', 2, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__); + -- Reports + 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', 2440__+MAX_llx_menu__, 'accountancy', 'report', 2400__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __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=="ca"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __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=="ca"', __HANDLER__, 'left', 2442__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?leftmenu=ca', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 19, __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=="ca"', __HANDLER__, 'left', 2443__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 20, __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=="ca"', __HANDLER__, 'left', 2444__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 21, __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=="ca"', __HANDLER__, 'left', 2445__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 22, __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=="ca"', __HANDLER__, 'left', 2446__+MAX_llx_menu__, 'accountancy', '', 2440__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 23, __ENTITY__); + -- Admin + 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', 2450__+MAX_llx_menu__, 'home', '', 2400__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?leftmenu=setup', 'Fiscalyear', 1, 'admin', '$user->rights->accounting->fiscalyear', '', 0, 24, __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', 2451__+MAX_llx_menu__, 'home', '', 2400__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy', 'Chartofaccounts', 1, 'admin', '$user->rights->accounting->chartofaccount', '', 0, 25, __ENTITY__); +-- Rapports compta simple +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->comptabilite->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 6__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __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->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2701__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 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 ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2702__+MAX_llx_menu__, 'accountancy', '', 2701__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 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 ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2703__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 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->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2704__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 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 ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyuser.php?leftmenu=ca', 'ByUsers', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 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->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2708__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?leftmenu=ca', 'ByProductsAndServices', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 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->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2706__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/sellsjournal.php?leftmenu=ca', 'SellsJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 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->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/purchasesjournal.php?leftmenu=ca', 'PurchasesJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); -- Book Keeping diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 9623958188d..a24a2d32baa 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -294,38 +294,34 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM if (! empty($conf->accounting->enabled) && !empty($user->rights->accounting->mouvements->lire) && $mainmenu == 'accountancy') // Entry in accountancy journal for each bank account { - $newmenu->add('/accountancy/journal/index.php?leftmenu=journal',$langs->trans("Journaux"),0,$user->rights->banque->lire); + $newmenu->add('',$langs->trans("Journaux"),0,$user->rights->accounting->comptarapport->lire,'','accountancy','accounting'); - if ($leftmenu == 'journal') + $sql = "SELECT rowid, label, accountancy_journal"; + $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; + $sql.= " WHERE entity = ".$conf->entity; + $sql.= " AND clos = 0"; + $sql.= " ORDER BY label"; + + $resql = $db->query($sql); + if ($resql) { - $sql = "SELECT rowid, label, accountancy_journal"; - $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; - $sql.= " WHERE entity = ".$conf->entity; - $sql.= " AND clos = 0"; - $sql.= " ORDER BY label"; + $numr = $db->num_rows($resql); + $i = 0; - $resql = $db->query($sql); - if ($resql) + if ($numr > 0) + while ($i < $numr) { - $numr = $db->num_rows($resql); - $i = 0; - - if ($numr > 0) - - while ($i < $numr) - { - $objp = $db->fetch_object($resql); - $newmenu->add('/accountancy/journal/bankjournal.php?id_account='.$objp->rowid,$langs->trans("Journal").' - '.$objp->label,1,$user->rights->accounting->comptarapport->lire); - $i++; - } + $objp = $db->fetch_object($resql); + $newmenu->add('/accountancy/journal/bankjournal.php?id_account='.$objp->rowid,$langs->trans("Journal").' - '.$objp->label,1,$user->rights->accounting->comptarapport->lire,'','accountancy','accounting'); + $i++; } - else dol_print_error($db); - $db->free($resql); - - // Add other journal - $newmenu->add("/accountancy/journal/sellsjournal.php?leftmenu=journal",$langs->trans("SellsJournal"),1,$user->rights->accounting->comptarapport->lire); - $newmenu->add("/accountancy/journal/purchasesjournal.php?leftmenu=journal",$langs->trans("PurchasesJournal"),1,$user->rights->accounting->comptarapport->lire); } + else dol_print_error($db); + $db->free($resql); + + // Add other journal + $newmenu->add("/accountancy/journal/sellsjournal.php?leftmenu=journal",$langs->trans("SellsJournal"),1,$user->rights->accounting->comptarapport->lire); + $newmenu->add("/accountancy/journal/purchasesjournal.php?leftmenu=journal",$langs->trans("PurchasesJournal"),1,$user->rights->accounting->comptarapport->lire); } if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 4de0bfd1743..7c75e0ae49b 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -252,6 +252,10 @@ if (! empty($conf->margin->enabled)) jQuery("input[name='np_marginRate']:first").val(''); jQuery("input[name='np_markRate']:first").val(''); }); + jQuery("#remise_percent").keyup(function() { + jQuery("input[name='np_marginRate']:first").val(''); + jQuery("input[name='np_markRate']:first").val(''); + }); jQuery("#buying_price").keyup(function() { jQuery("input[name='np_marginRate']:first").val(''); jQuery("input[name='np_markRate']:first").val(''); diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index ba860d17465..be9d8ab49bd 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1652,7 +1652,7 @@ else print '
'.$langs->trans('Piece').''.$langs->trans('Date').''.$langs->trans('Project').''.$langs->trans('Project').''.$langs->trans('Type').''.$langs->trans('Description').''.$langs->trans('VAT').''.dol_print_date($db->jdate($objp->date), 'day').''; - if ($objp->projet_id > 0) + if (! empty($conf->projet->enabled)) { - $projecttmp->id=$objp->projet_id; - $projecttmp->ref=$objp->projet_ref; - print $projecttmp->getNomUrl(1); + print ''; + if ($objp->projet_id > 0) + { + $projecttmp->id=$objp->projet_id; + $projecttmp->ref=$objp->projet_ref; + print $projecttmp->getNomUrl(1); + } + print ''.$langs->trans("TF_".strtoupper($objp->type_fees_libelle)).''.$objp->comments.''.vatrate($objp->vatrate,true).''; - $formproject->select_projects(-1, $objp->fk_projet,'fk_projet', 0, 0, 1, 1); - print ''; + $formproject->select_projects(-1, $objp->fk_projet,'fk_projet', 0, 0, 1, 1); + print ''; select_type_fees_id($objp->type_fees_code,'fk_c_type_fees'); @@ -1790,7 +1796,7 @@ else print '
'.$langs->trans('Date').''.$langs->trans('Project').''.$langs->trans('Project').''.$langs->trans('Type').''.$langs->trans('Description').''.$langs->trans('VAT').''; - $formproject->select_projects(-1, $fk_projet, 'fk_projet', 0, 0, 1, 1); - print ''; + $formproject->select_projects(-1, $fk_projet, 'fk_projet', 0, 0, 1, 1); + print ''; select_type_fees_id($fk_c_type_fees,'fk_c_type_fees',1); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8dc0b65da2b..349e2c3cabd 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1943,12 +1943,15 @@ if (! function_exists("llxFooter")) if (! empty($delayedhtmlcontent)) print $delayedhtmlcontent; // Wrapper to show tooltips - print "\n\n"; - print '' . "\n"; + if ($conf->use_javascript_ajax) + { + print "\n\n"; + print '' . "\n"; + } // A div for the address popup print "\n\n"; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 79bb7900edc..9ccb295406a 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4068,8 +4068,7 @@ class Product extends CommonObject { global $conf, $db; - // FIXME USing * into select is forbidden - $sql = "SELECT * FROM ".MAIN_DB_PREFIX."product_pricerules"; + $sql = "SELECT rowid, level, fk_level, var_percent, var_min_percent FROM ".MAIN_DB_PREFIX."product_pricerules"; $query = $db->query($sql); $rules = array(); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 97283b4b2bc..6451f8bdde5 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -314,6 +314,7 @@ else setEventMessages($langs->trans("ProductDeleted", GETPOST('delprod')), null, 'mesgs'); } + if ($search_categ > 0) $param.="&search_categ=".$search_categ; if ($sref) $param="&sref=".$sref; if ($search_ref_supplier) $param="&search_ref_supplier=".$search_ref_supplier; if ($sbarcode) $param.=($sbarcode?"&sbarcode=".$sbarcode:"");