From 9493e252c9ff75b06467a881fe23a5cc25093af7 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 15 Sep 2014 09:55:09 +0200 Subject: [PATCH 01/13] add refext into fecth product --- htdocs/product/class/product.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index d7bdec82079..e6695b75bc6 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1206,6 +1206,7 @@ class Product extends CommonObject $sql.= " weight, weight_units, length, length_units, surface, surface_units, volume, volume_units, barcode, fk_barcode_type, finished,"; $sql.= " accountancy_code_buy, accountancy_code_sell, stock, pmp,"; $sql.= " datec, tms, import_key, entity, desiredstock"; + $sql.= " ,ref_ext"; $sql.= " FROM ".MAIN_DB_PREFIX."product"; if ($id) $sql.= " WHERE rowid = ".$this->db->escape($id); else @@ -1277,6 +1278,7 @@ class Product extends CommonObject $this->date_modification = $obj->tms; $this->import_key = $obj->import_key; $this->entity = $obj->entity; + $this->ref_ext = $obj->ref_ext; $this->db->free($resql); From 144da16391a1e9e2e6c2d1f10c308133c6638071 Mon Sep 17 00:00:00 2001 From: braito4 Date: Tue, 16 Sep 2014 19:42:11 +0200 Subject: [PATCH 02/13] Missing date_start, date_end in webserver server_invoice.php --- htdocs/webservices/server_invoice.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index c79c862146c..c59544aa3f8 100644 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -537,6 +537,8 @@ function createInvoice($authentication,$invoice) $newline->total_ht=$line['total_net']; $newline->total_tva=$line['total_vat']; $newline->total_ttc=$line['total']; + $newline->date_start=dol_stringtotime($line['date_start']); + $newline->date_end=dol_stringtotime($line['date_end']); $newline->fk_product=$line['product_id']; $newobject->lines[]=$newline; } From 9c54dc57dfea2b2f4d3177152f8b9bd5228f11f9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Sep 2014 12:31:35 +0200 Subject: [PATCH 03/13] Save some usefull cleaning requests into repair.sql --- htdocs/install/mysql/migration/repair.sql | 28 ++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 224a76cdf73..70fae404149 100644 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -108,14 +108,7 @@ UPDATE llx_product p SET p.stock= (SELECT SUM(ps.reel) FROM llx_product_stock ps -- VMYSQL DELETE from llx_menu where module = 'margins' and url = '/margin/index.php' and not exists (select * from llx_const where name = 'MAIN_MODULE_MARGIN' or name = 'MAIN_MODULE_MARGINS'); --- Requests to clean old tables or fields - --- DROP TABLE llx_c_methode_commande_fournisseur; --- DROP TABLE llx_c_source; --- DROP TABLE llx_cond_reglement; --- DROP TABLE llx_expedition_methode; --- DROP TABLE llx_product_fournisseur; --- ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur; +ALTER TABLE llx_product_fournisseur_price DROP COLUMN fk_product_fournisseur; ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur; @@ -155,3 +148,22 @@ UPDATE llx_projet_task SET fk_task_parent = 0 WHERE fk_task_parent = rowid UPDATE llx_actioncomm set fk_user_action = fk_user_done where fk_user_done > 0 and (fk_user_action is null or fk_user_action = 0); UPDATE llx_actioncomm set fk_user_action = fk_user_author where fk_user_author > 0 and (fk_user_action is null or fk_user_action = 0); + +-- Requests to clean old tables or fields + +-- DROP TABLE llx_c_methode_commande_fournisseur; +-- DROP TABLE llx_c_source; +-- DROP TABLE llx_cond_reglement; +-- DROP TABLE llx_expedition_methode; +-- DROP TABLE llx_product_fournisseur; + +-- To replace amount on all invoice and lines when forgetting to apply a 20% vat +-- update llx_facturedet set tva_tx = 20 where tva_tx = 0; +-- update llx_facturedet set total_ht = round(total_ttc / 1.2, 5) where total_ht = total_ttc; +-- update llx_facturedet set total_tva = total_ttc - total_ht where total_vat = 0; +-- update llx_facture set total = round(total_ttc / 1.2, 5) where total_ht = total_ttc; +-- update llx_facture set tva = total_ttc - total where tva = 0; + + + + From d225d92c0b48f9937fb753eae301742445748f3b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 17 Sep 2014 16:03:21 +0200 Subject: [PATCH 04/13] Fix: remove hook restriction ! --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 2bd3c757e47..8e70f265f2c 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1325,7 +1325,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0) if (! $tmpdir) { unset($listofdir[$key]); continue; } if (is_dir($tmpdir)) { - $tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$','','name',SORT_ASC,0,true); // Disable hook for the moment + $tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$'); if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles); } } From f18502870705ff76635228da1b3e05cc055604c4 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 17 Sep 2014 16:03:21 +0200 Subject: [PATCH 05/13] Fix: remove hook restriction ! --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 917ceaf0e65..67e94ee7af2 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1325,7 +1325,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0) if (! $tmpdir) { unset($listofdir[$key]); continue; } if (is_dir($tmpdir)) { - $tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$','','name',SORT_ASC,0,true); // Disable hook for the moment + $tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$'); if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles); } } From de6e1c50366ca6532175d4f0774436ce3c7e3da1 Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Wed, 17 Sep 2014 18:01:59 +0300 Subject: [PATCH 06/13] Correct view greek language in PDF --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 67e94ee7af2..494b06f09da 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1220,7 +1220,7 @@ function dol_print_reduction($reduction,$langs) $string = ''; if ($reduction == 100) { - $string = $langs->trans("Offered"); + $string = $langs->transnoentities("Offered"); } else { From a41dc3acd9ff9a4b3b8ce0786185cdc2f327c0f6 Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Wed, 17 Sep 2014 18:06:31 +0300 Subject: [PATCH 07/13] Correct view greek language --- htdocs/societe/consumption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index bedc41e2446..a22a49e35eb 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -246,7 +246,7 @@ $typeElementString = $form->selectarray("type_element",$elementTypeArray,GETPOST $button = ''; $param="&sref=".$sref."&month=".$month."&year=".$year."&sprod_fulldescr=".$sprod_fulldescr."&socid=".$socid."&type_element=".$type_element; -print_barre_liste($langs->trans('ProductsIntoElements', $typeElementString.' '.$button), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, '', ''); +print_barre_liste($langs->transnoentitiesnoconv('ProductsIntoElements', $typeElementString.' '.$button), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, '', ''); if ($sql_select) { From f0ebd7721d60185e95b9b403d60185f0b73bcb36 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 17 Sep 2014 17:49:39 +0200 Subject: [PATCH 08/13] Fix: Restore sort feature. Still did not see why previous commit is a bug fix of dolibarr bug. --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 8e70f265f2c..58422dcda36 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1325,7 +1325,7 @@ function getListOfModels($db,$type,$maxfilenamelength=0) if (! $tmpdir) { unset($listofdir[$key]); continue; } if (is_dir($tmpdir)) { - $tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$'); + $tmpfiles=dol_dir_list($tmpdir,'files',0,'\.od(s|t)$','','name',SORT_ASC,0); if (count($tmpfiles)) $listoffiles=array_merge($listoffiles,$tmpfiles); } } From ab83e22a127c5986b1829035429d2f59b47b7d75 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 18 Sep 2014 09:57:13 +0200 Subject: [PATCH 09/13] Fix: Invoices payments may be older than invoices --- ChangeLog | 1 + htdocs/compta/paiement.php | 4 ++-- htdocs/fourn/facture/paiement.php | 4 ++-- htdocs/langs/en_US/errors.lang | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4b334c542a..b4331635592 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ For users: - Fix: Must unaccent strings into SEPA file. - Fix: Extrafield feature select from table should try to translate multiple column when not needed - Fix: cents for indian ruppes are calle paisa and paise. +- Fix: Invoices payments may be older than invoices. ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 008721ef018..3aafa1c165b 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -108,8 +108,8 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye if ($datepaye && ($datepaye < $tmpinvoice->date)) { $langs->load("errors"); - $error++; - setEventMessage($langs->transnoentities("ErrorPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'errors'); + //$error++; + setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings'); } } diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 7b443bf15c0..bb84e279ba9 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -105,8 +105,8 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye if ($datepaye && ($datepaye < $tmpinvoice->date)) { $langs->load("errors"); - $error++; - setEventMessage($langs->transnoentities("ErrorPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'errors'); + //$error++; + setEventMessage($langs->transnoentities("WarningPaymentDateLowerThanInvoiceDate", dol_print_date($datepaye,'day'), dol_print_date($tmpinvoice->date, 'day'), $tmpinvoice->ref), 'warnings'); } } diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index b874ef58f07..bbaa010bfbb 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -133,7 +133,6 @@ ErrorPHPNeedModule=Error, your PHP must have module %s installed to use t ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s ErrorWarehouseMustDiffers=Source and target warehouses must differs ErrorBadFormat=Bad format! -ErrorPaymentDateLowerThanInvoiceDate=Payment date (%s) cant' be before invoice date (%s) for invoice %s. ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, this member is not yet linked to any thirdparty. Link member to an existing third party or create a new thirdparty before creating subscription with invoice. ErrorThereIsSomeDeliveries=Error, there is some deliveries linked to this shipment. Deletion refused. @@ -153,4 +152,5 @@ WarningCloseAlways=Warning, closing is done even if amount differs between sourc WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). WarningNotRelevant=Irrelevant operation for this dataset -WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers. \ No newline at end of file +WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Feature disabled when display setup is optimized for blind person or text browsers. +WarningPaymentDateLowerThanInvoiceDate=Payment date (%s) is earlier than invoice date (%s) for invoice %s. \ No newline at end of file From 039105a3f1ac80632b5478fefbcba51d874d20b3 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 18 Sep 2014 10:02:03 +0200 Subject: [PATCH 10/13] Fix: Invoices payments may be older than invoices. fr and es trans --- htdocs/langs/es_ES/errors.lang | 2 +- htdocs/langs/fr_FR/errors.lang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index 34c6c689043..19c12805da2 100644 --- a/htdocs/langs/es_ES/errors.lang +++ b/htdocs/langs/es_ES/errors.lang @@ -133,7 +133,6 @@ ErrorPHPNeedModule=Error, su PHP debe tener instalado el módulo %s para ErrorOpenIDSetupNotComplete=Ha configurado Dolibarr para aceptar la autentificación OpenID, pero la URL del servicio OpenID no se encuentra definida en la constante %s ErrorWarehouseMustDiffers=El almacén de origen y destino deben de ser diferentes ErrorBadFormat=¡El formato es erróneo! -ErrorPaymentDateLowerThanInvoiceDate=La fecha de pago (%s) no puede ser anterior a la fecha (%s) de la factura %s. ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Error, este miembro aún no está enlazado a un tercero. Enlace el miembro a un tercero existente o cree un tercero nuevo antes de crear la suscripción con la factura. ErrorThereIsSomeDeliveries=Error, hay entregas vinculadas a este envío. No se puede eliminar. @@ -154,3 +153,4 @@ WarningUsingThisBoxSlowDown=Atención, el uso de este panel provoca serias ralen WarningClickToDialUserSetupNotComplete=La configuración de ClickToDial para su cuenta de usuario no está completa (vea la pestaña ClickToDial en su ficha de usuario) WarningNotRelevant=Operación irrelevante para este conjunto de datos WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Funcionalidad desactivada cuando la configuración de visualización es optimizada para personas ciegas o navegadores de texto. +WarningPaymentDateLowerThanInvoiceDate=La fecha de pago (%s) es anterior a la fecha (%s) de la factura %s. \ No newline at end of file diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 3cd8609a047..954a83375b9 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -133,7 +133,6 @@ ErrorPHPNeedModule=Erreur, votre PHP doit avoir le module %s installé po ErrorOpenIDSetupNotComplete=Vous avez configuré Dolibarr pour accepter l'authentication OpenID, mais l'URL du service OpenID n'est pas défini dans la constante %s ErrorWarehouseMustDiffers=Les entrepôts source et destination doivent être différents ErrorBadFormat=Mauvais format -ErrorPaymentDateLowerThanInvoiceDate=La date de paiement (%s) ne peut être inférieure à la date de facturaction (%s) de la facture %s. ErrorMemberNotLinkedToAThirpartyLinkOrCreateFirst=Erreur, cet adhérent n'est lié à aucun tiers. Lier l'adhérent à un tiers existant ou créer un nouveau tiers pour le lier avant de créer l'adhésion avec facture. ErrorThereIsSomeDeliveries=Erreur, il y a des bordereaux de réception liées à ces expéditions. La suppression est refusée. @@ -154,3 +153,4 @@ WarningUsingThisBoxSlowDown=Attention, l'utilisation de cette boite provoque de WarningClickToDialUserSetupNotComplete=La configuration ClickToDial pour votre compte utilisateur n'est pas complète (voir l'onglet ClickToDial sur votre fiche utilisateur) WarningNotRelevant=Opération non pertinente pour cet ensemble de données WarningFeatureDisabledWithDisplayOptimizedForBlindNoJs=Fonction désactivé quand l'affichage est en mode optimisé pour les personnes aveugles ou les navigateurs textes. +WarningPaymentDateLowerThanInvoiceDate=La date de paiement (%s) est inférieure à la date de facturaction (%s) de la facture %s. From 015b0d80361207ef45fe9b916ec5f2b4f5d0f465 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Sep 2014 10:05:37 +0200 Subject: [PATCH 11/13] Fix: Bad calculation of total Fix: Warning message not translated --- htdocs/.gitignore | 1 + htdocs/core/lib/project.lib.php | 51 +++++++++++++++++++++------------ htdocs/langs/en_US/errors.lang | 2 ++ htdocs/projet/index.php | 5 ++-- htdocs/projet/tasks/index.php | 3 +- 5 files changed, 41 insertions(+), 21 deletions(-) diff --git a/htdocs/.gitignore b/htdocs/.gitignore index a4ebd2bb7c7..e7d542c9320 100644 --- a/htdocs/.gitignore +++ b/htdocs/.gitignore @@ -2,6 +2,7 @@ /custom* /extensions* /nltechno* +/teclib* /bootstrap* /google* /multicompany* diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 1dccb2c2456..3062fe1783a 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -228,7 +228,14 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $numlines=count($lines); - $total=0; + // We declare counter as global because we want to edit them into recursive call + global $total_projectlinesa_spent,$total_projectlinesa_planned,$total_projectlinesa_spent_if_planned; + if ($level == 0) + { + $total_projectlinesa_spent=0; + $total_projectlinesa_planned=0; + $total_projectlinesa_spent_if_planned=0; + } for ($i = 0 ; $i < $numlines ; $i++) { @@ -293,8 +300,8 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if ($showproject) { + // Project ref print ""; - //var_dump($taskrole); if ($showlineingray) print ''; $projectstatic->id=$lines[$i]->fk_project; $projectstatic->ref=$lines[$i]->projectref; @@ -390,7 +397,9 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t $level++; if ($lines[$i]->id) projectLinesa($inc, $lines[$i]->id, $lines, $level, $var, $showproject, $taskrole, $projectsListId, $addordertick); $level--; - $total += $lines[$i]->duration; + $total_projectlinesa_spent += $lines[$i]->duration; + $total_projectlinesa_planned += $lines[$i]->planned_workload; + if ($lines[$i]->planned_workload) $total_projectlinesa_spent_if_planned += $lines[$i]->duration; } } else @@ -399,7 +408,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t } } - if ($total>0 && $level==0) + if (($total_projectlinesa_planned > 0 || $total_projectlinesa_spent > 0) && $level==0) { print ''; print ''.$langs->trans("Total").''; @@ -407,10 +416,16 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; print ''; print ''; + print ''; + print convertSecondToTime($total_projectlinesa_planned, 'allhourmin'); + print ''; print ''; - print ''; - print ''.convertSecondToTime($total, 'allhourmin').''; - print ''; + print ''; + print convertSecondToTime($total_projectlinesa_spent, 'allhourmin'); + print ''; + print ''; + if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_spent_if_planned / $total_projectlinesa_planned,2).' %'; + print ''; if ($addordertick) print ''; print ''; } @@ -459,7 +474,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr if (empty($mine) || ! empty($tasksrole[$lines[$i]->id])) { print "\n"; - + // Project print ""; $projectstatic->id=$lines[$i]->fk_project; @@ -468,14 +483,14 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr $projectstatic->label=$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]; print $projectstatic->getNomUrl(1); print ""; - + // Ref print ''; $taskstatic->id=$lines[$i]->id; $taskstatic->ref=$lines[$i]->id; print $taskstatic->getNomUrl(1); print ''; - + // Label task print ""; for ($k = 0 ; $k < $level ; $k++) @@ -486,28 +501,28 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr $taskstatic->ref=$lines[$i]->label; print $taskstatic->getNomUrl(0); print "\n"; - + // Date start print ''; print dol_print_date($lines[$i]->date_start,'dayhour'); print ''; - + // Date end print ''; print dol_print_date($lines[$i]->date_end,'dayhour'); print ''; - + // Planned Workload print ''; if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin'); else print '--:--'; print ''; - + // Progress declared % print ''; print $lines[$i]->progress.' %'; print ''; - + // Time spent print ''; if ($lines[$i]->duration) @@ -518,7 +533,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr } else print '--:--'; print "\n"; - + $disabledproject=1;$disabledtask=1; //print "x".$lines[$i]->fk_project; //var_dump($lines[$i]); @@ -534,7 +549,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr { $disabledtask=1; } - + print ''; $s =$form->select_date('',$lines[$i]->id,'','','',"addtime",1,0,1,$disabledtask); $s.='   '; @@ -546,7 +561,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject")); else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou")); print ''; - + print "\n"; } diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 4e020ab3ae0..d98fa1756eb 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -146,3 +146,5 @@ WarningCloseAlways=Warning, closing is done even if amount differs between sourc WarningUsingThisBoxSlowDown=Warning, using this box slow down seriously all pages showing the box. WarningClickToDialUserSetupNotComplete=Setup of ClickToDial information for your user are not complete (see tab ClickToDial onto your user card). WarningNotRelevant=Irrelevant operation for this dataset +WarningTooManyDataPleaseUseMoreFilters=Too many data. Please use more filters + diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index a4b71c62393..97c0851d910 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -164,9 +164,10 @@ if ( $resql ) if ($num > (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)) { -/* print ''; +/* $langs->load("errors"); + print ''; print ''; - print $langs->trans("TooManyDataPleaseUseMoreFilters"); + print $langs->trans("WarningTooManyDataPleaseUseMoreFilters"); print '';*/ } else diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index a798157dd11..e9fa7c6522a 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -121,9 +121,10 @@ print "\n"; if (count($tasksarray) > (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)) { + $langs->load("errors"); print ''; print ''; - print $langs->trans("TooManyDataPleaseUseMoreFilters"); + print $langs->trans("WarningTooManyDataPleaseUseMoreFilters"); print ''; } else From 3a38153889907238094121a24f56bd306dcf3ac0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Sep 2014 22:42:43 +0200 Subject: [PATCH 12/13] Typo error --- build/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/debian/control b/build/debian/control index f4f9e12aa58..fc0cee30319 100755 --- a/build/debian/control +++ b/build/debian/control @@ -68,4 +68,4 @@ Description: Web based software to manage a company or foundation PDF exports, And a lot more modules... . - You can also add third parties external modules or develop yours. + You can also add external modules from third parties or develop yours. From c87e28d5f959b52e367a4ee4cda0d78613cca89e Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 19 Sep 2014 09:57:35 +0200 Subject: [PATCH 13/13] - Fix: [ bug #1593 ] Spanish Localtax IRPF not being calculated since 3.6.0 in supplier invoices when adding a line --- ChangeLog | 1 + htdocs/fourn/facture/fiche.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4331635592..079219e6c7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ For users: - Fix: Extrafield feature select from table should try to translate multiple column when not needed - Fix: cents for indian ruppes are calle paisa and paise. - Fix: Invoices payments may be older than invoices. +- Fix: [ bug #1593 ] Spanish Localtax IRPF not being calculated since 3.6.0 in supplier invoices when adding a line ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index d60059cd17f..98522e21342 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -517,11 +517,11 @@ elseif ($action == 'update_line' && $user->rights->fournisseur->facture->creer) } - $localtax1tx= get_localtax($_POST['tauxtva'], 1, $mysoc,$object->thirdparty); - $localtax2tx= get_localtax($_POST['tauxtva'], 2, $mysoc,$object->thirdparty); + $localtax1_tx= get_localtax($_POST['tauxtva'], 1, $mysoc,$object->thirdparty); + $localtax2_tx= get_localtax($_POST['tauxtva'], 2, $mysoc,$object->thirdparty); $remise_percent=GETPOST('remise_percent'); - $result=$object->updateline(GETPOST('lineid'), $label, $pu, GETPOST('tauxtva'), $localtax1tx, $localtax2tx, GETPOST('qty'), GETPOST('idprod'), $price_base_type, 0, $type, $remise_percent); + $result=$object->updateline(GETPOST('lineid'), $label, $pu, GETPOST('tauxtva'), $localtax1_tx, $localtax2_tx, GETPOST('qty'), GETPOST('idprod'), $price_base_type, 0, $type, $remise_percent); if ($result >= 0) { unset($_POST['label']); @@ -617,13 +617,13 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) $tvatx=get_default_tva($object->thirdparty, $mysoc, $productsupplier->id, $_POST['idprodfournprice']); $npr = get_default_npr($object->thirdparty, $mysoc, $productsupplier->id, $_POST['idprodfournprice']); - $localtax1tx= get_localtax($tvatx, 1, $mysoc,$object->thirdparty); - $localtax2tx= get_localtax($tvatx, 2, $mysoc,$object->thirdparty); + $localtax1_tx= get_localtax($tvatx, 1, $mysoc,$object->thirdparty); + $localtax2_tx= get_localtax($tvatx, 2, $mysoc,$object->thirdparty); $type = $productsupplier->type; // TODO Save the product supplier ref into database into field ref_supplier (must rename field ref into ref_supplier first) - $result=$object->addline($desc, $productsupplier->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $qty, $idprod, $remise_percent, '', '', 0, $npr); + $result=$object->addline($desc, $productsupplier->fourn_pu, $tvatx, $localtax1_tx, $localtax2_tx, $qty, $idprod, $remise_percent, '', '', 0, $npr); } if ($idprod == -2 || $idprod == 0) { @@ -662,7 +662,7 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) $price_base_type = 'HT'; //print $product_desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0 - $result=$object->addline($product_desc, $ht, $tva_tx, $localtax1tx, $localtax2tx, $qty, 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); + $result=$object->addline($product_desc, $ht, $tva_tx, $localtax1_tx, $localtax2_tx, $qty, 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); } else { @@ -670,7 +670,7 @@ elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) $ht = $ttc / (1 + ($tva_tx / 100)); $price_base_type = 'HT'; //print $product_desc, $pu, $txtva, $qty, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits='', $price_base_type='HT', $type=0 - $result=$object->addline($product_desc, $ht, $tva_tx,$localtax1tx, $localtax2tx, $qty, 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); + $result=$object->addline($product_desc, $ht, $tva_tx,$localtax1_tx, $localtax2_tx, $qty, 0, $remise_percent, $datestart, $dateend, 0, $npr, $price_base_type, $type); } }