From 9d8438ecdd2a70831a1c3ca883bda504e3c306a3 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 19 Jul 2013 13:39:01 +0200 Subject: [PATCH 1/9] Minor fix on remisecheque display --- htdocs/compta/paiement/fiche.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/paiement/fiche.php b/htdocs/compta/paiement/fiche.php index dc68d07d4f4..9f16508c590 100644 --- a/htdocs/compta/paiement/fiche.php +++ b/htdocs/compta/paiement/fiche.php @@ -260,7 +260,7 @@ if (! empty($conf->banque->enabled)) print ''; print ''.$langs->trans('CheckReceipt').''; print ''; - print $bordereau->getNomUrl(1,0,'showall'); + print $bordereau->getNomUrl(1); print ''; print ''; } From fc8805f2cab6f8164e93cee4ecc937b118118666 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 19 Jul 2013 16:52:58 +0200 Subject: [PATCH 2/9] Added missing trad on shipment + display calculated weight after true weight --- htdocs/expedition/fiche.php | 8 +++++++- htdocs/langs/en_US/sendings.lang | 2 ++ htdocs/langs/fr_FR/sendings.lang | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 56be5f04b54..34c6a3a9adb 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1115,6 +1115,12 @@ else print ''.$form->editfieldkey("Weight",'trueWeight',$object->trueWeight,$object,$user->rights->expedition->creer).''; print $form->editfieldval("Weight",'trueWeight',$object->trueWeight,$object,$user->rights->expedition->creer); print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string($object->weight_units,"weight"):''; + if ($totalWeight > 0) + { + if (!empty($object->trueWeight)) print ' ('.$langs->trans("SumOfProductWeights").': '; + print $totalWeight.' '.measuring_units_string(0,"weight"); + if (!empty($object->trueWeight)) print ')'; + } print ''; // Width @@ -1152,7 +1158,7 @@ else if ($totalVolume > 0) { if ($calculatedVolume) print ' ('.$langs->trans("SumOfProductVolumes").': '; - print $totalVolume; + print $totalVolume.' '.measuring_units_string(0,"volume"); if ($calculatedVolume) print ')'; } print "\n"; diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index b7a7832164b..7efe5c450ab 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -71,3 +71,5 @@ DocumentModelSirocco=Simple document model for delivery receipts DocumentModelTyphon=More complete document model for delivery receipts (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined +SumOfProductVolumes=Sum of product volumes +SumOfProductWeights=Sum of product weights \ No newline at end of file diff --git a/htdocs/langs/fr_FR/sendings.lang b/htdocs/langs/fr_FR/sendings.lang index f60cf8c2d09..50f430d9e2c 100644 --- a/htdocs/langs/fr_FR/sendings.lang +++ b/htdocs/langs/fr_FR/sendings.lang @@ -71,3 +71,5 @@ DocumentModelSirocco=Modèle de bon de réception/livraison simple DocumentModelTyphon=Modèle de bon de réception/livraison complet (logo…) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constante EXPEDITION_ADDON_NUMBER non définie +SumOfProductVolumes=Somme des volumes des produits +SumOfProductWeights=Somme des poids des produits \ No newline at end of file From 00aded09bb1b84e3d791b071de52a6f95248e3df Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 19 Jul 2013 17:27:08 +0200 Subject: [PATCH 3/9] Fix : shipment prices not related to qty shipped --- htdocs/expedition/class/expedition.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 11c0f803400..6ba325f8e8e 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -978,13 +978,14 @@ class Expedition extends CommonObject $line->volume_units = $obj->volume_units; // For invoicing + $tabprice = calcul_price_total($obj->qty_shipped, $obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, 0, 'HT', $info_bits, $obj->fk_product_type); // We force type to 0 $line->desc = $obj->description; // We need ->desc because some code into CommonObject use desc (property defined for other elements) $line->qty = $obj->qty_shipped; - $line->total_ht = $obj->total_ht; - $line->total_localtax1 = $obj->total_localtax1; - $line->total_localtax2 = $obj->total_localtax2; - $line->total_ttc = $obj->total_ttc; - $line->total_tva = $obj->total_tva; + $line->total_ht = $tabprice[0]; + $line->total_localtax1 = $tabprice[9]; + $line->total_localtax2 = $tabprice[10]; + $line->total_ttc = $tabprice[2]; + $line->total_tva = $tabprice[1]; $line->tva_tx = $obj->tva_tx; $line->localtax1_tx = $obj->localtax1_tx; $line->localtax2_tx = $obj->localtax2_tx; @@ -992,7 +993,6 @@ class Expedition extends CommonObject $line->subprice = $obj->subprice; $line->remise_percent = $obj->remise_percent; - $tabprice = calcul_price_total($obj->qty_shipped, $obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, 0, 'HT', $info_bits, $obj->fk_product_type); // We force type to 0 $this->total_ht+= $tabprice[0]; $this->total_tva+= $tabprice[1]; $this->total_ttc+= $tabprice[2]; From 7c24686532287746b14b9f671eed81379895edc1 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 19 Jul 2013 17:27:22 +0200 Subject: [PATCH 4/9] Add good vars for odt generation --- .../core/class/commondocgenerator.class.php | 93 +++++++++++++++++++ .../doc/doc_generic_shipment_odt.modules.php | 50 +++++----- 2 files changed, 118 insertions(+), 25 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 92a4dcd07a5..1ea5b7fb1e9 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -304,6 +304,99 @@ abstract class CommonDocGenerator 'line_date_end'=>$line->date_end ); } + + /** + * Define array with couple substitution key => substitution value + * + * @param Object $object Main object to use as data source + * @param Translate $outputlangs Lang object to use for output + * @param array_key $array_key Name of the key for return array + * @return array Array of substitution + */ + function get_substitutionarray_shipment($object,$outputlangs,$array_key='object') + { + global $conf; + dol_include_once('/core/lib/product.lib.php'); + $object->list_delivery_methods($object->shipping_method_id); + $calculatedVolume=($object->trueWidth * $object->trueHeight * $object->trueDepth); + + $array_shipment=array( + $array_key.'_id'=>$object->id, + $array_key.'_ref'=>$object->ref, + $array_key.'_ref_ext'=>$object->ref_ext, + $array_key.'_ref_customer'=>$object->ref_customer, + $array_key.'_date_delivery'=>dol_print_date($object->date_delivery,'day'), + $array_key.'_hour_delivery'=>dol_print_date($object->date_delivery,'hour'), + $array_key.'_date_creation'=>dol_print_date($object->date_creation,'day'), + $array_key.'_total_ht'=>price($object->total_ht), + $array_key.'_total_vat'=>price($object->total_tva), + $array_key.'_total_ttc'=>price($object->total_ttc), + $array_key.'_total_discount_ht' => price($object->getTotalDiscount()), + $array_key.'_note_private'=>$object->note_private, + $array_key.'_note'=>$object->note_public, + $array_key.'_tracking_number'=>$object->tracking_number, + $array_key.'_tracking_url'=>$object->tracking_url, + $array_key.'_shipping_method'=>$object->listmeths[0]['libelle'], + $array_key.'_weight'=>$object->trueWeight.' '.measuring_units_string($object->weight_units, 'weight'), + $array_key.'_width'=>$object->trueWidth.' '.measuring_units_string($object->width_units, 'size'), + $array_key.'_height'=>$object->trueHeight.' '.measuring_units_string($object->height_units, 'size'), + $array_key.'_depth'=>$object->trueDepth.' '.measuring_units_string($object->depth_units, 'size'), + $array_key.'_size'=>$calculatedVolume.' '.measuring_units_string(0, 'volume'), + ); + + // Add vat by rates + foreach ($object->lines as $line) + { + if (empty($array_shipment[$array_key.'_total_vat_'.$line->tva_tx])) $array_shipment[$array_key.'_total_vat_'.$line->tva_tx]=0; + $array_shipment[$array_key.'_total_vat_'.$line->tva_tx]+=$line->total_tva; + } + + // Retrieve extrafields + /*if(is_array($object->array_options) && count($object->array_options)) + { + require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + $extrafields = new ExtraFields($this->db); + $extralabels = $extrafields->fetch_name_optionals_label('shipment',true); + $object->fetch_optionals($object->id,$extralabels); + + $array_shipment = $this->fill_substitutionarray_with_extrafields($object,$array_shipment,$extrafields,$array_key,$outputlangs); + }*/ + return $array_shipment; + } + + + /** + * Define array with couple substitution key => substitution value + * + * @param array $line Array of lines + * @param Translate $outputlangs Lang object to use for output + * @return array Substitution array + */ + function get_substitutionarray_shipment_lines($line,$outputlangs) + { + global $conf; + dol_include_once('/core/lib/product.lib.php'); + + return array( + 'line_fulldesc'=>doc_getlinedesc($line,$outputlangs), + 'line_product_ref'=>$line->product_ref, + 'line_product_label'=>$line->product_label, + 'line_desc'=>$line->desc, + 'line_vatrate'=>vatrate($line->tva_tx,true,$line->info_bits), + 'line_up'=>price($line->subprice), + 'line_qty'=>$line->qty, + 'line_qty_shipped'=>$line->qty_shipped, + 'line_qty_asked'=>$line->qty_asked, + 'line_discount_percent'=>($line->remise_percent?$line->remise_percent.'%':''), + 'line_price_ht'=>price($line->total_ht), + 'line_price_ttc'=>price($line->total_ttc), + 'line_price_vat'=>price($line->total_tva), + 'line_weight'=>empty($line->weight) ? '' : $line->weight*$line->qty_shipped.' '.measuring_units_string($line->weight_units, 'weight'), + 'line_length'=>empty($line->length) ? '' : $line->length*$line->qty_shipped.' '.measuring_units_string($line->length_units, 'size'), + 'line_surface'=>empty($line->surface) ? '' : $line->surface*$line->qty_shipped.' '.measuring_units_string($line->surface_units, 'surface'), + 'line_volume'=>empty($line->volume) ? '' : $line->volume*$line->qty_shipped.' '.measuring_units_string($line->volume_units, 'volume'), + ); + } /** * Fill array with couple extrafield key => extrafield value diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 68472f0e747..994d9362044 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -98,29 +98,29 @@ class doc_generic_shipment_odt extends ModelePdfExpedition global $conf; $resarray=array( - 'object_id'=>$object->id, - 'object_ref'=>$object->ref, - 'object_ref_ext'=>$object->ref_ext, - 'object_ref_customer'=>$object->ref_client, - 'object_hour'=>dol_print_date($object->date,'hour'), - 'object_date'=>dol_print_date($object->date,'day'), - 'object_date_delivery'=>dol_print_date($object->date_livraison,'dayhour'), - 'object_date_creation'=>dol_print_date($object->date_creation,'day'), - 'object_date_modification'=>(! empty($object->date_modification)?dol_print_date($object->date_modification,'day'):''), - 'object_date_validation'=>(! empty($object->date_validation)?dol_print_date($object->date_validation,'dayhour'):''), - 'object_date_delivery_planed'=>(! empty($object->date_livraison)?dol_print_date($object->date_livraison,'day'):''), - 'object_date_close'=>dol_print_date($object->date_cloture,'dayhour'), - 'object_payment_mode_code'=>$object->mode_reglement_code, - 'object_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement), - 'object_payment_term_code'=>$object->cond_reglement_code, - 'object_payment_term'=>($outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code)!='PaymentCondition'.$object->cond_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code):$object->cond_reglement), - 'object_total_ht'=>price($object->total_ht,0,$outputlangs), - 'object_total_vat'=>price($object->total_tva,0,$outputlangs), - 'object_total_ttc'=>price($object->total_ttc,0,$outputlangs), - 'object_total_discount_ht' => price($object->getTotalDiscount(), 0, $outputlangs), - 'object_vatrate'=>vatrate($object->tva), - 'object_note_private'=>$object->note, - 'object_note'=>$object->note_public, + 'object_id'=>$object->id, + 'object_ref'=>$object->ref, + 'object_ref_ext'=>$object->ref_ext, + 'object_ref_customer'=>$object->ref_client, + 'object_hour'=>dol_print_date($object->date,'hour'), + 'object_date'=>dol_print_date($object->date,'day'), + 'object_date_delivery'=>dol_print_date($object->date_livraison,'dayhour'), + 'object_date_creation'=>dol_print_date($object->date_creation,'day'), + 'object_date_modification'=>(! empty($object->date_modification)?dol_print_date($object->date_modification,'day'):''), + 'object_date_validation'=>(! empty($object->date_validation)?dol_print_date($object->date_validation,'dayhour'):''), + 'object_date_delivery_planed'=>(! empty($object->date_livraison)?dol_print_date($object->date_livraison,'day'):''), + 'object_date_close'=>dol_print_date($object->date_cloture,'dayhour'), + 'object_payment_mode_code'=>$object->mode_reglement_code, + 'object_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement), + 'object_payment_term_code'=>$object->cond_reglement_code, + 'object_payment_term'=>($outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code)!='PaymentCondition'.$object->cond_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code):$object->cond_reglement), + 'object_total_ht'=>price($object->total_ht,0,$outputlangs), + 'object_total_vat'=>price($object->total_tva,0,$outputlangs), + 'object_total_ttc'=>price($object->total_ttc,0,$outputlangs), + 'object_total_discount_ht' => price($object->getTotalDiscount(), 0, $outputlangs), + 'object_vatrate'=>vatrate($object->tva), + 'object_note_private'=>$object->note, + 'object_note'=>$object->note_public, ); // Add vat by rates @@ -468,7 +468,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition } } // Replace tags of object + external modules - $tmparray=$this->get_substitutionarray_object($object,$outputlangs); + $tmparray=$this->get_substitutionarray_shipment($object,$outputlangs); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); @@ -496,7 +496,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $listlines = $odfHandler->setSegment('lines'); foreach ($object->lines as $line) { - $tmparray=$this->get_substitutionarray_lines($line,$outputlangs); + $tmparray=$this->get_substitutionarray_shipment_lines($line,$outputlangs); complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray,'line'=>$line); From bef913cc2f8d12493546653972cbdf635704d156 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 19 Jul 2013 17:28:46 +0200 Subject: [PATCH 5/9] Update changelog --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0375d554b22..b1a64f1c296 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.5 compared to 3.4 ***** For users: +- New: [ task #862 ] Add ODT on shipments +- New: [ task #149 ] Add # of notes and attachments in tabs - New: [ task #877 ] Reorganize menus. - New: [ task #858 ] Holiday module: note on manual holiday assignation. - New: [ task #892 ] Add hidden option in thirdparty customer/supplier module to hide non active From c555c173155698f50f0f99b1fde2521fa9841164 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Sat, 20 Jul 2013 23:47:37 +0200 Subject: [PATCH 6/9] Update modBanque.class.php Add Export of check deposit / bill --- htdocs/core/modules/modBanque.class.php | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/htdocs/core/modules/modBanque.class.php b/htdocs/core/modules/modBanque.class.php index d578371b635..9ab82a297fd 100644 --- a/htdocs/core/modules/modBanque.class.php +++ b/htdocs/core/modules/modBanque.class.php @@ -160,6 +160,35 @@ class modBanque extends DolibarrModules $this->export_sql_end[$r] .=' WHERE ba.rowid = b.fk_account'; $this->export_sql_end[$r] .=' AND ba.entity = '.$conf->entity; $this->export_sql_order[$r] =' ORDER BY b.datev, b.num_releve'; + + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='Bordereaux remise Chq/Fact'; + $this->export_permission[$r]=array(array("banque","export")); + $this->export_fields_array[$r]=array('ba.ref'=>'AccountRef','ba.label'=>'AccountLabel','b.datev'=>'DateValue','b.num_chq'=>'ChequeOrTransferNumber','b.amount'=>'Credit','b.num_releve'=>'AccountStatement','b.datec'=>"DateCreation", + "bu.url_id"=>"IdThirdParty","s.nom"=>"ThirdParty","bch.date_bordereau"=>"DateBordereau","bch.number"=>"NumeroBordereau","bch.amount"=>"TotalBordereau","bch.nbcheque"=>"NbCheque","f.facnumber"=>"NumFacture" + ); + $this->export_TypeFields_array[$r]=array('ba.ref'=>'Text','ba.label'=>'Text','b.datev'=>'Date','b.num_chq'=>'Text','b.amount'=>'Number','b.num_releve'=>'Text','b.datec'=>"Date", + "bu.url_id"=>"Text","s.nom"=>"Text","bch.date_bordereau"=>"Date","bch.number"=>"Text","bch.amount"=>"Number","bch.nbcheque"=>"NumBer","f.facnumber"=>"Text" + ); + $this->export_entities_array[$r]=array('ba.ref'=>'account','ba.label'=>'account','b.datev'=>'account','b.num_chq'=>'account','b.amount'=>'account','b.num_releve'=>'account','b.datec'=>"account", + "bu.url_id"=>"company","s.nom"=>"company","s.code_compta"=>"company","s.code_compta_fournisseur"=>"company","f.facnumber"=>"bill"); + $this->export_special_array[$r]=array('b.amount'=>'NULLIFNEG'); + + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'bank_account as ba, '.MAIN_DB_PREFIX.'bank as b)'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX."bank_url as bu ON (bu.fk_bank = b.rowid AND bu.type = 'company')"; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON bu.url_id = s.rowid'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'bordereau_cheque as bch ON (bch.rowid = b.fk_bordereau and bch.fk_bank_account=ba.rowid)'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiement as p ON b.rowid = p.fk_bank '; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON p.rowid = pf.fk_paiement '; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'facture as f ON f.rowid = pf.fk_facture '; + $this->export_sql_end[$r] .=' WHERE ba.rowid = b.fk_account'; + $this->export_sql_end[$r] .=' AND b.fk_type = "CHQ"'; + $this->export_sql_end[$r] .=' AND p.fk_paiement = 7'; + $this->export_sql_end[$r] .=' AND ba.entity = '.$conf->entity; + $this->export_sql_order[$r] =' ORDER BY b.datev, b.num_releve'; + } From 1a8377d8479bc657362560c4a2e76dfb6778a1ef Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sun, 21 Jul 2013 10:47:55 +0200 Subject: [PATCH 7/9] Add category contact into left menu entry --- htdocs/core/menus/standard/eldy.lib.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index bea2a29936c..8d2b3325996 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -637,6 +637,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $newmenu->add("/categories/fiche.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); } + // Categories Contact + $newmenu->add("/categories/index.php?leftmenu=cat&type=4", $langs->trans("ContactCategoriesShort"), 0, $user->rights->categorie->lire, '', $mainmenu, 'cat'); + if (empty($user->societe_id)) + { + $newmenu->add("/categories/fiche.php?action=create&type=4", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer); + } // Categories suppliers if (! empty($conf->fournisseur->enabled)) { From bbacef6815229984cd8165fe2f1324722b8f2adb Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Mon, 22 Jul 2013 10:15:48 +0200 Subject: [PATCH 8/9] Add category contact into left menu entry for augeria theme --- htdocs/core/menus/init_menu_auguria.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index fa0e48556c8..2fb1e9ad68d 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -79,6 +79,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Third parties - Category customer 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->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 650__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=1', 'SuppliersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 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->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 651__+MAX_llx_menu__, 'companies', '', 650__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=1', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); +-- Third parties - Category contact +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->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 650__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=4', 'ContactCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 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->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 651__+MAX_llx_menu__, 'companies', '', 650__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=4', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Third parties - Category supplier 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->fournisseur->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 660__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=2', 'CustomersProspectsCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 661__+MAX_llx_menu__, 'companies', '', 660__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=2', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); From 26894d9749c8440d2178f2d4e67c88d8d70c699e Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Mon, 22 Jul 2013 10:17:31 +0200 Subject: [PATCH 9/9] Fix bug in SQL --- htdocs/core/menus/init_menu_auguria.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 2fb1e9ad68d..d97a33cb8ea 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -79,12 +79,12 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Third parties - Category customer 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->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 650__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=1', 'SuppliersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 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->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 651__+MAX_llx_menu__, 'companies', '', 650__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=1', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); --- Third parties - Category contact -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->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 650__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=4', 'ContactCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 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->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 651__+MAX_llx_menu__, 'companies', '', 650__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=4', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Third parties - Category supplier 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->fournisseur->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 660__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=2', 'CustomersProspectsCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 661__+MAX_llx_menu__, 'companies', '', 660__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=2', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); +-- Third parties - Category contact +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->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 670__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=4', 'ContactCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 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->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 671__+MAX_llx_menu__, 'companies', '', 670__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=4', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Product - Product 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->product->enabled', __HANDLER__, 'left', 2800__+MAX_llx_menu__, 'products', 'product', 3__+MAX_llx_menu__, '/product/index.php?leftmenu=product&type=0', 'Products', 0, 'products', '$user->rights->produit->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->product->enabled', __HANDLER__, 'left', 2801__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/fiche.php?leftmenu=product&action=create&type=0', 'NewProduct', 1, 'products', '$user->rights->produit->creer', '', 2, 0, __ENTITY__);