From b3b80701fd4825b1ddd6ccb18b207aed413adb8a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 1 Jun 2013 02:03:19 +0200 Subject: [PATCH 1/7] Fix: Bug with jmobile --- htdocs/comm/action/fiche.php | 6 +++--- htdocs/core/lib/agenda.lib.php | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 3a74a2881bf..4b438786d56 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -888,7 +888,7 @@ if ($id > 0) print ''; print ''; //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' '; + print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' '; print ''."\n"; print '
'; print ''; @@ -897,7 +897,7 @@ if ($id > 0) print ''; print ''; //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone"').' '; + print img_picto($langs->trans("ViewCal"),'object_calendarweek','class="hideonsmartphone"').' '; print '
'."\n"; print '
'; print ''; @@ -906,7 +906,7 @@ if ($id > 0) print ''; print ''; //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone"').' '; + print img_picto($langs->trans("ViewCal"),'object_calendarday','class="hideonsmartphone"').' '; print '
'."\n"; print ''; print ''; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 433b0fc82e6..dda971668de 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -115,13 +115,13 @@ function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirt // Buttons print ''; - print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' '; + print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' '; print '
'; - print img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone"').' '; + print img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone"').' '; print '
'; - print img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone"').' '; + print img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone"').' '; print '
'; - print img_picto($langs->trans("ViewList"),'object_list','class="hideonsmartphone"').' '; + print img_picto($langs->trans("ViewList"),'object_list','class="hideonsmartphone"').' '; print ''; // Legend From 0b3a52395d5d0a3f046e24833d76c80c4c14a07a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 1 Jun 2013 02:21:39 +0200 Subject: [PATCH 2/7] Fix: Missing mayotte --- htdocs/install/mysql/data/llx_20_c_departements.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index 4d13d502a4d..97281cdc9c3 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -135,6 +135,8 @@ insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,no insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 2,'972','97209',3,'MARTINIQUE','Martinique'); insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 3,'973','97302',3,'GUYANE','Guyane'); insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 4,'974','97411',3,'REUNION','Réunion'); +insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values ( 6,'976','97601',3,'MAYOTTE','Mayotte'); + -- Provinces Belgium (id country=2) insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'01','',1,'ANVERS','Anvers'); From 9b96e38a3580978eb8d9b6411a8e204818a18379 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 1 Jun 2013 02:49:44 +0200 Subject: [PATCH 3/7] Fix: Update vat rates for canada Conflicts: htdocs/langs/fr_CA/main.lang --- htdocs/install/mysql/data/llx_c_tva.sql | 2 ++ htdocs/langs/fr_CA/main.lang | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index 86adc112413..b198db78fe2 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -66,6 +66,8 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 2 -- CANADA (id country=14) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (141, 14, '7','0','VAT standard rate',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (142, 14, '0','0','VAT Rate 0',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (143, 14,'5','0','9.975','1','TPS and TVQ rate',1); + -- CAMEROUN (id country=24) insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (241, 24, '19.25','0','VAT standard rate',1); diff --git a/htdocs/langs/fr_CA/main.lang b/htdocs/langs/fr_CA/main.lang index cb3893d45fc..834235f7573 100644 --- a/htdocs/langs/fr_CA/main.lang +++ b/htdocs/langs/fr_CA/main.lang @@ -22,4 +22,4 @@ IncludedVAT=Dont TPS VAT=TPS LT1CA=TVQ VATRate=Taux TPS -ErrorNoVATRateDefinedForSellerCountry=Erreur, aucun taux de taxe défini pour le pays '%s'. \ No newline at end of file +ErrorNoVATRateDefinedForSellerCountry=Erreur, aucun taux de taxe défini pour le pays '%s'. From 520101bdfb6f82ca078c326820053ddef9507133 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 1 Jun 2013 02:52:25 +0200 Subject: [PATCH 4/7] Fix: Missing vat rate --- htdocs/install/mysql/migration/3.3.0-3.4.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index eee29dbd594..a98ecd1e922 100755 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -382,3 +382,6 @@ ALTER TABLE llx_user_clicktodial ADD COLUMN url varchar(255) AFTER fk_user; ALTER TABLE llx_fichinterdet ADD COLUMN fk_parent_line integer NULL AFTER fk_fichinter; ALTER TABLE llx_societe_address CHANGE COLUMN tel phone varchar(20); + +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,localtax1,localtax1_type,note,active) values (143, 14,'5','0','9.975','1','TPS and TVQ rate',1); + From 7b207574493b531ebe76ce55a744a2c11017ae77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sat, 1 Jun 2013 15:51:17 +0200 Subject: [PATCH 5/7] Fix: [bug #908] Erreur lors de la configuration du module --- htdocs/admin/supplier_order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 7195d9ef388..48bc14f1245 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -55,7 +55,7 @@ $specimenthirdparty->initAsSpecimen(); if ($action == 'updateMask') { $maskconstorder=GETPOST('maskconstorder','alpha'); - $maskvalue=GETPOST('maskvalue','alpha'); + $maskvalue=GETPOST('maskorder','alpha'); if ($maskconstorder) $res = dolibarr_set_const($db,$maskconstorder,$maskvalue,'chaine',0,'',$conf->entity); From c5783215c45efbe5b04053389c70982c155f1a82 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 1 Jun 2013 23:45:03 +0200 Subject: [PATCH 6/7] Fix: Var not initialized Fix: Pb of duplicate run of javascript with jmobile --- htdocs/core/get_menudiv.php | 3 ++- htdocs/core/search_page.php | 11 +++++++++-- htdocs/main.inc.php | 3 ++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php index 59ab4c9ecf3..cdc1391e2bb 100644 --- a/htdocs/core/get_menudiv.php +++ b/htdocs/core/get_menudiv.php @@ -48,9 +48,10 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); $title=$langs->trans("Menu"); // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests +$head=''."\n"; $arrayofjs=array(); $arrayofcss=array(); -top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); +top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); print ''."\n"; diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index 1ea6138873e..a2516c160a3 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -45,12 +45,18 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); * View */ +$title=$langs->trans("Search"); + // URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests -top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); +$head=''."\n"; +$arrayofjs=array(); +$arrayofcss=array(); +top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss); -print ''."\n"; +print ''."\n"; +print '
'; //print '
'; $nbofsearch=0; @@ -112,6 +118,7 @@ print '
'."\n"; print ''; print "\n"; +print ''; print ''."\n"; $db->close(); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index f3f85d53949..f22110f57d7 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1683,6 +1683,7 @@ function main_area($title='') print "\n"; + if (! empty($conf->dol_use_jmobile)) print '
'; print '
'."\n"; if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print info_admin($langs->trans("WarningYouAreInMaintenanceMode",$conf->global->MAIN_ONLY_LOGIN_ALLOWED)); } @@ -1802,7 +1803,7 @@ if (! function_exists("llxFooter")) print "\n\n"; print '
'."\n"; - + if (! empty($conf->dol_use_jmobile)) print '
'; // end data-role="page" //XXX print "\n".' '."\n"; if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print ' '."\n"; From c12da33dcdf4ec894433137760d4a7e5308c6676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sun, 2 Jun 2013 00:37:33 +0200 Subject: [PATCH 7/7] Fixed empty table when few modules are activated in product card view --- htdocs/product/fiche.php | 208 ++++++++++++++++++++------------------- 1 file changed, 107 insertions(+), 101 deletions(-) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 632540df203..0a8aed4634f 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -638,16 +638,16 @@ $formproduct = new FormProduct($db); if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { - // ----------------------------------------- - // When used with CANVAS - // ----------------------------------------- - if (empty($object->error) && $id) - { - $object = new Product($db); - $result=$object->fetch($id); - if ($result <= 0) dol_print_error('',$object->error); - } - $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates + // ----------------------------------------- + // When used with CANVAS + // ----------------------------------------- + if (empty($object->error) && $id) + { + $object = new Product($db); + $result=$object->fetch($id); + if ($result <= 0) dol_print_error('',$object->error); + } + $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates $objcanvas->display_canvas($action); // Show template } else @@ -1315,8 +1315,9 @@ print "\n
\n"; if ($object->id && ($action == '' || $action == 'view') && $object->status) { - print ''; - //print '
'; + //Variable used to check if any text is going to be printed + $html = ''; + //print '
'; // Propals if (! empty($conf->propal->enabled) && $user->rights->propale->creer) @@ -1325,42 +1326,42 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $langs->load("propal"); - print '
'; - print ''; - print ''; - print ''; + $html .= ''; + $html .= ''; + $html .= '
'.$langs->trans("AddToOtherProposals").'
'; + $html .= '
'.$langs->trans("AddToOtherProposals").'
'; $var=true; $otherprop = $propal->liste_array(2,1,0); - print '
'; - print ''; - print ''; + $html .= ''; + $html .= ''; + $html .= '
'; if (is_array($otherprop) && count($otherprop)) { $var=!$var; - print ''; - print ''; + $html .= ''; + $html .= ''; } else { - print "'; + $html .= "'; } - print '
'; - print ''; - print $langs->trans("Proposals").''; - print $form->selectarray("propalid", $otherprop, 0, 1); - print '
'.$langs->trans("Quantity").' '; - print ''.$langs->trans("ReductionShort").'(%) '; - print ''; - print ''; - print ''; - print '
'; + $html .= ''; + $html .= $langs->trans("Proposals").''; + $html .= $form->selectarray("propalid", $otherprop, 0, 1); + $html .= '
'.$langs->trans("Quantity").' '; + $html .= ''.$langs->trans("ReductionShort").'(%) '; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= '
"; - print $langs->trans("NoOtherOpenedPropals"); - print '
"; + $html .= $langs->trans("NoOtherOpenedPropals"); + $html .= '
'; - print '
'; + $html .= '
'; + $html .= ''; - print ''; - print ''; + $html .= ''; + $html .= ''; } // Commande @@ -1370,42 +1371,42 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $langs->load("orders"); - print ''; - print ''.$langs->trans("AddToOtherOrders").''; - print ''; - print ''; + $html .= ''; + $html .= ''.$langs->trans("AddToOtherOrders").''; + $html .= ''; + $html .= ''; $var=true; $othercom = $commande->liste_array(2, 1, null); - print '
'; - print ''; - print ''; + $html .= ''; + $html .= ''; + $html .= '
'; if (is_array($othercom) && count($othercom)) { $var=!$var; - print ''; - print ''; + $html .= ''; + $html .= ''; } else { - print "'; + $html .= "'; } - print '
'; - print ''; - print $langs->trans("Orders").''; - print $form->selectarray("commandeid", $othercom, 0, 1); - print '
'.$langs->trans("Quantity").' '; - print ''.$langs->trans("ReductionShort").'(%) '; - print ''; - print ''; - print ''; - print '
'; + $html .= ''; + $html .= $langs->trans("Orders").''; + $html .= $form->selectarray("commandeid", $othercom, 0, 1); + $html .= '
'.$langs->trans("Quantity").' '; + $html .= ''.$langs->trans("ReductionShort").'(%) '; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= '
"; - print $langs->trans("NoOtherOpenedOrders"); - print '
"; + $html .= $langs->trans("NoOtherOpenedOrders"); + $html .= '
'; - print '
'; + $html .= ''; + $html .= ''; - print ''; - print ''; + $html .= ''; + $html .= ''; } // Factures @@ -1415,47 +1416,52 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $langs->load("bills"); - print ''; - print ''.$langs->trans("AddToOtherOrders").''; - print ''; - print ''; - - $var=true; - $otherinvoice = $invoice->liste_array(2, 1, null); - print '
'; - print ''; - print ''; - if (is_array($otherinvoice) && count($otherinvoice)) - { - $var=!$var; - print ''; - print ''; - } - else - { - print "'; - } - print '
'; - print ''; - print $langs->trans("Invoice").''; - print $form->selectarray("factureid", $otherinvoice, 0, 1); - print '
'.$langs->trans("Quantity").' '; - print ''.$langs->trans("ReductionShort").'(%) '; - print ''; - print ''; - print ''; - print '
"; - print $langs->trans("NoOtherDraftBills"); - print '
'; - print '
'; - - print ''; - print ''; + $html .= ''; + $html .= ''.$langs->trans("AddToOtherOrders").''; + $html .= ''; + $html .= ''; + + $var=true; + $otherinvoice = $invoice->liste_array(2, 1, null); + $html .= '
'; + $html .= ''; + $html .= ''; + if (is_array($otherinvoice) && count($otherinvoice)) + { + $var=!$var; + $html .= ''; + $html .= ''; + } + else + { + $html .= "'; + } + $html .= '
'; + $html .= ''; + $html .= $langs->trans("Invoice").''; + $html .= $form->selectarray("factureid", $otherinvoice, 0, 1); + $html .= '
'.$langs->trans("Quantity").' '; + $html .= ''.$langs->trans("ReductionShort").'(%) '; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= '
"; + $html .= $langs->trans("NoOtherDraftBills"); + $html .= '
'; + $html .= '
'; + + $html .= ''; + $html .= ''; } - print ''; - - print '
'; + //If any text is going to be printed, then we show the table + if (!empty($html)) + { + print ''; + print $html; + print '
'; + print '
'; + } }