From bba8f972a191a9dc7d596f3a083c6a60ee055a1d Mon Sep 17 00:00:00 2001 From: alexis Algoud Date: Wed, 10 May 2017 16:10:14 +0200 Subject: [PATCH 1/5] FIX situation invoice broken due to the all percent application form inside addline form --- htdocs/compta/facture.php | 43 ++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 05174fd940b..c9f223723be 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3800,30 +3800,20 @@ else if ($id > 0 || ! empty($ref)) // Lines $result = $object->getLinesArray(); - print '
- - - - - '; - - if (! empty($conf->use_javascript_ajax) && $object->statut == 0) { - include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; - } - - print '
'; - print ''; - // Show global modifiers if (! empty($conf->global->INVOICE_USE_SITUATION)) { if ($object->situation_cycle_ref && $object->statut == 0) { + print '
'; + print '
'; + + print ''; print ''; print ''; print ''; print ''; - + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print ''; } @@ -3846,7 +3836,7 @@ else if ($id > 0 || ! empty($ref)) print ''; print ''; print "\n"; - + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print ''; } @@ -3860,8 +3850,29 @@ else if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; + + print '
   
 
'; + print '
'; + } + } + + + + print '
+ + + + + '; + + if (! empty($conf->use_javascript_ajax) && $object->statut == 0) { + include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; + } + + print '
'; + print ''; // Show object lines if (! empty($object->lines)) From c2f76522eb2587f61bed1ec9f2d8fcec2a1f9b1b Mon Sep 17 00:00:00 2001 From: alexis Algoud Date: Thu, 11 May 2017 09:04:14 +0200 Subject: [PATCH 2/5] fix form inside table --- htdocs/compta/facture.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index c9f223723be..aad8b77811f 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3805,15 +3805,15 @@ else if ($id > 0 || ! empty($ref)) { if ($object->situation_cycle_ref && $object->statut == 0) { print '
'; - print '
'; - - print ''; print ''; print ''; print ''; print ''; + print '
'; + print ''; + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { print ''; } @@ -3849,9 +3849,11 @@ else if ($id > 0 || ! empty($ref)) print ''; print ''; print ''; - print ''; print '
 %
'; + + print ''; + print '
'; } From 1a016524e0ee866877666b1a0af2a5b769a72d48 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 May 2017 17:44:51 +0200 Subject: [PATCH 3/5] Fix log --- scripts/cron/cron_run_jobs.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index d60218fba22..fb03cad5757 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -90,7 +90,7 @@ if ($userlogin == 'firstadmin') if ($obj) { $userlogin = $obj->login; - echo "First admin user found is login '".$userlogin."'\n
"; + echo "First admin user found is login '".$userlogin."'\n"; } } else dol_print_error($db); @@ -146,7 +146,8 @@ if(is_array($object->lines) && (count($object->lines)>0)) // Loop over job foreach($object->lines as $line) { - dol_syslog("cron_run_jobs.php cronjobid: ".$line->id, LOG_WARNING); + dol_syslog("cron_run_jobs.php cronjobid: ".$line->id, LOG_DEBUG); + echo "cron_run_jobs.php cronjobid: ".$line->id."\n"; //If date_next_jobs is less of current date, execute the program, and store the execution time of the next execution in database if (($line->datenextrun < $now) && (empty($line->datestart) || $line->datestart <= $now) && (empty($line->dateend) || $line->dateend >= $now)) From 8fc285c8b35806f5da7e0bdefa2d1eaeb198f924 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 May 2017 18:32:13 +0200 Subject: [PATCH 4/5] Fix bad date usage --- htdocs/cron/list.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 880235a9a17..5056f4711d3 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -404,11 +404,11 @@ if ($num > 0) print ''; print ''; - if(!empty($obj->datestart)) {print dol_print_date($obj->datestart,'dayhour');} + if(!empty($obj->datestart)) {print dol_print_date($db->jdate($obj->datestart),'dayhour');} print ''; print ''; - if(!empty($obj->dateend)) {print dol_print_date($obj->dateend,'dayhour');} + if(!empty($obj->dateend)) {print dol_print_date($db->jdate($obj->dateend),'dayhour');} print ''; print ''; @@ -420,11 +420,11 @@ if ($num > 0) print ''; print ''; - if(!empty($obj->datenextrun)) {print dol_print_date($obj->datenextrun,'dayhour');} + if(!empty($obj->datenextrun)) {print dol_print_date($db->jdate($obj->datenextrun),'dayhour');} print ''; print ''; - if(!empty($obj->datelastrun)) {print dol_print_date($obj->datelastrun,'dayhour');} + if(!empty($obj->datelastrun)) {print dol_print_date($db->jdate($obj->datelastrun),'dayhour');} print ''; print ''; From d86b42b024cdf8ffb5d793ff935ffa28663dc70b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 May 2017 14:45:08 +0200 Subject: [PATCH 5/5] Missing title, bad css --- htdocs/langs/en_US/suppliers.lang | 1 + htdocs/product/fournisseurs.php | 8 +++++--- htdocs/product/price.php | 7 ++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index b890919ace5..d84925d0676 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -14,6 +14,7 @@ TotalSellingPriceMinShort=Total of subproducts selling prices SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price +SupplierPrices=Supplier prices ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s NoRecordedSuppliers=No suppliers recorded SupplierPayment=Supplier payment diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 6ff8d9deca0..1d54495b605 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -584,6 +584,11 @@ if ($id > 0 || $ref) if ($user->rights->fournisseur->lire) { + $product_fourn = new ProductFournisseur($db); + $product_fourn_list = $product_fourn->list_product_fournisseur_price($object->id, $sortfield, $sortorder); + $nbtotalofrecords = count($product_fourn_list); + print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVEUR ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($product_fourn_list), $nbtotalofrecords, 'title_accountancy.png'); + // Suppliers list title print '
'; print ''; @@ -611,9 +616,6 @@ if ($id > 0 || $ref) print_liste_field_titre(''); print "\n"; - $product_fourn = new ProductFournisseur($db); - $product_fourn_list = $product_fourn->list_product_fournisseur_price($object->id, $sortfield, $sortorder); - if (is_array($product_fourn_list)) { $var=true; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 1e9bcec3d52..607d6e07097 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1755,7 +1755,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) else if ($action != 'showlog_default_price' && $action != 'edit_price') { // List of all prices by customers - + print ''."\n"; + // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { @@ -1792,8 +1793,8 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) if (count($prodcustprice->lines) > 0 || $search_soc) { print ''; - print ''; - print ''; + print ''; + print ''; // Print the search button print '
  '; $searchpitco=$form->showFilterAndCheckAddButtons(0);