From ab4a3dcaa7793e0a51c6acbf80bd0bc95c90e4eb Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 22 Apr 2013 10:18:03 +0200 Subject: [PATCH 01/13] Fix: missing rename field --- htdocs/core/modules/modFacture.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 666bcb9a22a..4d18c3d8757 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -198,10 +198,10 @@ class modFacture extends DolibarrModules $this->export_label[$r]='CustomersInvoicesAndPayments'; // Translation key (used only if key ExportDataset_xxx_z not found) $this->export_icon[$r]='bill'; $this->export_permission[$r]=array(array("facture","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); - //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); + //$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.rowid'=>"List:facture:facnumber",'f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); $this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them $this->export_sql_start[$r]='SELECT DISTINCT '; From ee843924dd56d1d5b47346a99125bb3f2e8f91c4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Apr 2013 10:33:06 +0200 Subject: [PATCH 02/13] Fix: Some translation change to have things more clear. --- htdocs/core/class/html.form.class.php | 4 ++-- htdocs/langs/en_US/products.lang | 12 +++++++----- htdocs/langs/fr_FR/products.lang | 16 +++++++++------- htdocs/product/class/product.class.php | 7 ++++--- htdocs/product/composition/fiche.php | 15 ++++++++++----- 5 files changed, 32 insertions(+), 22 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 944f364ee4b..97658572831 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -344,7 +344,7 @@ class Form * Show a text and picto with tooltip on text or picto * * @param string $text Text to show - * @param string $htmltext Content html of tooltip. Must be HTML/UTF8 encoded. + * @param string $htmltext HTML content of tooltip. Must be HTML/UTF8 encoded. * @param int $tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2 * @param int $direction -1=Le picto est avant, 0=pas de picto, 1=le picto est apres * @param string $img Code img du picto (use img_xxx() function to get it) @@ -383,7 +383,7 @@ class Form //if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.(($direction < 0)?' ':'').$text.(($direction > 0)?' ':'').''; $paramfortooltiptd.= (($direction < 0)?' style="padding-left: 3px !important;"':''); $paramfortooltiptd.= (($direction > 0)?' style="padding-right: 3px !important;"':''); - if ($text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.''; + if ((string) $text != '') $s.='<'.$tag.$paramfortooltiptd.'>'.$text.''; if ($direction > 0) $s.='<'.$tag.$paramfortooltipimg.' valign="top" width="14">'.$img.''; if (empty($notabs)) $s.=''; diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index b58dec53dcb..6ba653600e4 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -111,10 +111,12 @@ ServiceLimitedDuration=If product is a service with limited duration: MultiPricesAbility=Activate the multi-prices MultiPricesNumPrices=Number of price MultiPriceLevelsName=Price categories -AssociatedProductsAbility=Activate the sub-products -AssociatedProducts=Sub-products -AssociatedProductsNumber=Number of products composing this product -ParentProductsNumber=Number of parent product +AssociatedProductsAbility=Activate the virtual products feature +AssociatedProducts=Virtual product +AssociatedProductsNumber=Number of products composing this virtual product +ParentProductsNumber=Number of parent virtual product +IfZeroItIsNotAVirtualProduct=If 0, this product is not a virtual product +IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any virtual product EditAssociate=Associate Translation=Translation KeywordFilter=Keyword filter @@ -124,7 +126,7 @@ AddDel=Add/Delete Quantity=Quantity NoMatchFound=No match found ProductAssociationList=List of related products/services: name of product/service (quantity affected) -ProductParentList=List of products/services with this product as a component +ProductParentList=List of virtual products/services with this product as a component ErrorAssociationIsFatherOfThis=One of selected product is parent with current product DeleteProduct=Delete a product/service ConfirmDeleteProduct=Are you sure you want to delete this product/service? diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 3d27fdd9d6d..f5ce6482353 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -111,11 +111,13 @@ ServiceLimitedDuration=Si produit de type service à durée limitée : MultiPricesAbility=Prise en charge de prix multiples MultiPricesNumPrices=Nombre de prix MultiPriceLevelsName=Catégorie de prix -AssociatedProductsAbility=Prise en charge des produits composés -AssociatedProducts=Composition -AssociatedProductsNumber=Nbre de sous-produits composant ce produit -ParentProductsNumber=Nbre de produits parent -EditAssociate=Composer +AssociatedProductsAbility=Prise en charge des produits virtuels +AssociatedProducts=Produit virtuel +AssociatedProductsNumber=Nbre de sous-produits constituant ce produit virtuel +ParentProductsNumber=Nbre de produits virtuels parent +IfZeroItIsNotAVirtualProduct=Si 0, ce produit n'est pas un produit virtuel +IfZeroItIsNotUsedByVirtualProduct=Si 0, ce produit n'est pas utilisé par un produit virtuel +EditAssociate=Composer comme produit virtuel Translation=Traduction KeywordFilter=Filtre par mot-clé CategoryFilter=Filtre par catégorie @@ -123,8 +125,8 @@ ProductToAddSearch=Recherche des produits à ajouter AddDel=Ajouter/Retirer Quantity=Quantité NoMatchFound=Aucun résultat n'a été trouvé -ProductAssociationList=Liste des produits/services composant ce produit: Le nombre entre parenthèse est la quantité affectée dans cette composition. -ProductParentList=Liste des produits/services avec ce produit comme composante +ProductAssociationList=Liste des produits/services composant ce produit virtuel: Le nombre entre parenthèse est la quantité affectée dans cette composition. +ProductParentList=Liste des produits/services virtuels avec ce produit comme composante ErrorAssociationIsFatherOfThis=L'un des produits sélectionnés est parent du produit en cours DeleteProduct=Supprimer un produit/service ConfirmDeleteProduct=Êtes-vous sûr de vouloir supprimer ce produit/service ? diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index a8803d6e5e8..f6219d5acd4 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2137,6 +2137,7 @@ class Product extends CommonObject $id=(! empty($desc_pere[0]) ? $desc_pere[0] :''); $nb=(! empty($desc_pere[1]) ? $desc_pere[1] :''); $type=(! empty($desc_pere[2]) ? $desc_pere[2] :''); + $label=(! empty($desc_pere[3]) ? $desc_pere[3] :''); if ($multiply) { @@ -2157,10 +2158,10 @@ class Product extends CommonObject */ 'id'=>$id, // Id product 'nb'=>$nb, // Nb of units that compose parent product 'nb_total'=>$nb*$multiply, // Nb of units for all nb of product - 'stock'=>$this->stock_warehouse[1]->real, // Stock + 'stock'=>$this->stock_warehouse[1]->real, // Stock 'stock_alert'=>$this->seuil_stock_alerte, // Stock alert - 'fullpath' => $compl_path.$nom_pere, // Label - 'type'=>$type // Nb of units that compose parent product + 'fullpath' => $compl_path.$label, // Label + 'type'=>$type // Nb of units that compose parent product ); } else diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index 804759afe3a..471631cc464 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2006 Andre Cianfarani @@ -200,12 +200,15 @@ if ($id || $ref) // Number of subproducts $prodsfather = $product->getFather(); //Parent Products $product->get_sousproduits_arbo(); - print ''.$langs->trans("AssociatedProductsNumber").''.count($product->get_arbo_each_prod()).''; + $nbofsubproducts=count($product->get_arbo_each_prod()); + print ''.$langs->trans("AssociatedProductsNumber").''; + print $form->textwithpicto($nbofsubproducts, $langs->trans('IfZeroItIsNotAVirtualProduct')); + print ''; dol_fiche_end(); - // List of subproducts + // List of products into this virtual product $prods_arbo = $product->get_arbo_each_prod(); if (count($prods_arbo) > 0) { @@ -231,8 +234,10 @@ if ($id || $ref) print ''; } - // Number of parent products - print ''.$langs->trans("ParentProductsNumber").''.count($prodsfather).''; + // Number of parent virtual products + print ''.$langs->trans("ParentProductsNumber").''; + print $form->textwithpicto(count($prodsfather), $langs->trans('IfZeroItIsNotUsedByVirtualProduct')); + print ''; if (count($prodsfather) > 0) { From 5b4b0583998752ac9993d1e1745d58475ba5c2ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Apr 2013 12:30:52 +0200 Subject: [PATCH 03/13] Perf: Minor perf enhancement --- htdocs/product/composition/fiche.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index 206dd87ceae..d02253b4d24 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -198,9 +198,10 @@ if ($id || $ref) print ''; // Number of subproducts - $prodsfather = $product->getFather(); //Parent Products + $prodsfather = $product->getFather(); // Parent Products $product->get_sousproduits_arbo(); - $nbofsubproducts=count($product->get_arbo_each_prod()); + $prods_arbo=$product->get_arbo_each_prod(); + $nbofsubproducts=count($prods_arbo); print ''.$langs->trans("AssociatedProductsNumber").''; print $form->textwithpicto($nbofsubproducts, $langs->trans('IfZeroItIsNotAVirtualProduct')); print ''; @@ -209,7 +210,6 @@ if ($id || $ref) // List of products into this virtual product - $prods_arbo = $product->get_arbo_each_prod(); if (count($prods_arbo) > 0) { print ''; @@ -226,7 +226,8 @@ if ($id || $ref) //print $productstatic->getNomUrl(1).'
'; //print $value[0]; // This contains a tr line. print ''; - print ''.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')    '; + //print ''.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].($value['nb_total'] > $value['nb']?'->'.$value['nb_total']:'').')    '; + print ''.$productstatic->getNomUrl(1,'composition').' ('.$value['nb_total'].')    '; if (! empty($conf->stock->enabled)) print ''.$langs->trans("Stock").' : '.$productstatic->stock_reel.''; print ''; } From 54040bed1d4b5280cd76eb4c751335f439c29941 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Apr 2013 12:48:56 +0200 Subject: [PATCH 04/13] Fix: No slash alone --- htdocs/core/lib/company.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index d01c0456250..695b6deb2c1 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -47,7 +47,7 @@ function societe_prepare_head($object) { $head[$h][0] = DOL_URL_ROOT.'/comm/fiche.php?socid='.$object->id; if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && ($object->client==2 || $object->client==3)) $head[$h][1] = $langs->trans("Prospect"); - if ($object->client==3) $head[$h][1] .= '/'; + if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && $object->client==3) $head[$h][1] .= '/'; if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && ($object->client==1 || $object->client==3)) $head[$h][1] .= $langs->trans("Customer"); $head[$h][2] = 'customer'; $h++; From c87c7703cd4a50b78fd4f3ad4882b5cde4d83d4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Apr 2013 13:01:22 +0200 Subject: [PATCH 05/13] Qual: Make code simpler. --- htdocs/product/class/product.class.php | 95 +++++++++----------------- htdocs/product/composition/fiche.php | 16 +++-- 2 files changed, 43 insertions(+), 68 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 9422eed8250..8cac5ebe573 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1803,7 +1803,7 @@ class Product extends CommonObject $result=$this->del_sousproduit($id_pere, $id_fils); if ($result < 0) return $result; - + // Check not already father of id_pere (to avoid father -> child -> father links) $sql = 'SELECT fk_product_pere from '.MAIN_DB_PREFIX.'product_association'; $sql .= ' WHERE fk_product_pere = '.$id_fils.' AND fk_product_fils = '.$id_pere; @@ -1852,11 +1852,11 @@ class Product extends CommonObject { if (! is_numeric($fk_parent)) $fk_parent=0; if (! is_numeric($fk_child)) $fk_child=0; - + $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_association"; $sql.= " WHERE fk_product_pere = ".$fk_parent; $sql.= " AND fk_product_fils = ".$fk_child; - + dol_syslog(get_class($this).'::del_sousproduit sql='.$sql); if (! $this->db->query($sql)) { @@ -2122,7 +2122,7 @@ class Product extends CommonObject * Define value of this->res * * @param array $prod Products array - * @param string $compl_path Directory path + * @param string $compl_path Directory path of parents to add before * @param int $multiply Because each sublevel must be multiplicated by parent nb * @param int $level Init level * @return void @@ -2132,7 +2132,8 @@ class Product extends CommonObject global $conf,$langs; $product = new Product($this->db); - foreach($prod as $nom_pere => $desc_pere) + //var_dump($prod); + foreach($prod as $id_product => $desc_pere) // nom_pere is 0 or id of sub_product { if (is_array($desc_pere)) // If this parent desc is an array, this is an array of childs { @@ -2140,58 +2141,27 @@ class Product extends CommonObject $nb=(! empty($desc_pere[1]) ? $desc_pere[1] :''); $type=(! empty($desc_pere[2]) ? $desc_pere[2] :''); $label=(! empty($desc_pere[3]) ? $desc_pere[3] :''); + if ($multiply < 1) $multiply=1; - if ($multiply) - { - //print "XXX ".$desc_pere[1]." multiply=".$multiply; - $img=""; - $this->fetch($id); - $this->load_stock(); - if ($this->stock_warehouse[1]->real < $this->seuil_stock_alerte) - { - $img=img_warning($langs->trans("StockTooLow")); - } - $this->res[]= array( -/* "      -> - ".$compl_path.stripslashes($nom_pere)." - (".$desc_pere[1].") ".($desc_pere[1]*$multiply)."   - ".$this->stock_entrepot[1]." ".$img."", - $desc_pere[0], // Id product -*/ 'id'=>$id, // Id product - 'nb'=>$nb, // Nb of units that compose parent product - 'nb_total'=>$nb*$multiply, // Nb of units for all nb of product - 'stock'=>$this->stock_warehouse[1]->real, // Stock - 'stock_alert'=>$this->seuil_stock_alerte, // Stock alert - 'fullpath' => $compl_path.$label, // Label - 'type'=>$type // Nb of units that compose parent product - ); - } - else - { - $this->fetch($desc_pere[0]); - $this->load_stock(); - $this->res[]= array( -/* $compl_path.$nom_pere." (".$desc_pere[1].")", - $desc_pere[0], // Id product -*/ 'id'=>$id, // Id product + //print "XXX We add id=".$id." - label=".$label." - nb=".$nb." - multiply=".$multiply." fullpath=".$compl_path.$label."\n"; + $this->fetch($id); + $this->load_stock(); + $this->res[]= array( + 'id'=>$id, // Id product 'nb'=>$nb, // Nb of units that compose parent product - 'nb_total'=>$nb, // Nb of units for all nb of product - 'stock'=>$this->stock_warehouse[1]->real, // Stock + 'nb_total'=>$nb*$multiply, // Nb of units for all nb of product + 'stock'=>$this->stock_warehouse[1]->real, // Stock 'stock_alert'=>$this->seuil_stock_alerte, // Stock alert - 'fullpath' => $compl_path.$nom_pere, // Label - 'type'=>$type // Nb of units that compose parent product - ); - } - } - else if($nom_pere != "0" && $nom_pere != "1") - { - $this->res[]= array($compl_path.$nom_pere,$desc_pere); + 'fullpath' => $compl_path.$label, // Label + 'type'=>$type // Nb of units that compose parent product + ); } // Recursive call if child is an array - if (is_array($desc_pere[0])) + if (is_array($desc_pere['childs'])) { - $this ->fetch_prod_arbo($desc_pere[0], $nom_pere." -> ", $desc_pere[1]*$multiply, $level+1); + //print 'YYY We go down for '.$desc_pere[3]." -> \n"; + $this ->fetch_prod_arbo($desc_pere['childs'], $compl_path.$desc_pere[3]." -> ", $desc_pere[1]*$multiply, $level+1); } } } @@ -2228,11 +2198,12 @@ class Product extends CommonObject $this->res = array(); if (isset($this->sousprods) && is_array($this->sousprods)) { - foreach($this->sousprods as $nom_pere => $desc_pere) + foreach($this->sousprods as $prod_name => $desc_product) { - if (is_array($desc_pere)) $this->fetch_prod_arbo($desc_pere,"",$multiply); + if (is_array($desc_product)) $this->fetch_prod_arbo($desc_product,"",$multiply); } } + //var_dump($this->res); return $this->res; } @@ -2293,7 +2264,7 @@ class Product extends CommonObject /** - * Return all parent products fo current product + * Return all direct parent products fo current product * * @return array prod */ @@ -2324,19 +2295,19 @@ class Product extends CommonObject } /** - * Return childs of product with if fk_parent + * Return childs of product $id * - * @param int $fk_parent Id of product to search childs of + * @param int $id Id of product to search childs of * @return array Prod */ - function getChildsArbo($fk_parent) + function getChildsArbo($id) { $sql = "SELECT p.rowid, p.label as label, pa.qty as qty, pa.fk_product_fils as id, p.fk_product_type"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $sql.= ", ".MAIN_DB_PREFIX."product_association as pa"; $sql.= " WHERE p.rowid = pa.fk_product_fils"; - $sql.= " AND pa.fk_product_pere = ".$fk_parent; - $sql.= " AND pa.fk_product_fils != ".$fk_parent; // This should not happens, it is to avoid invinite loop if it happens + $sql.= " AND pa.fk_product_pere = ".$id; + $sql.= " AND pa.fk_product_fils != ".$id; // This should not happens, it is to avoid infinite loop if it happens dol_syslog(get_class($this).'::getChildsArbo sql='.$sql); $res = $this->db->query($sql); @@ -2351,7 +2322,7 @@ class Product extends CommonObject $listofchilds=$this->getChildsArbo($rec['id']); foreach($listofchilds as $keyChild => $valueChild) { - $prods[$rec['rowid']][$keyChild] = $valueChild; + $prods[$rec['rowid']]['childs'][$keyChild] = $valueChild; } } @@ -2373,14 +2344,14 @@ class Product extends CommonObject function get_sousproduits_arbo() { $parent = $this->getParent(); - foreach($parent as $key => $value) + foreach($parent as $key => $value) // key=label, value[0]=id { foreach($this->getChildsArbo($value[0]) as $keyChild => $valueChild) { $parent[$key][$keyChild] = $valueChild; } } - foreach($parent as $key => $value) + foreach($parent as $key => $value) // key=label, value is array of childs { $this->sousprods[$key] = $value; } @@ -2418,7 +2389,7 @@ class Product extends CommonObject else if ($option == 'category') { $lien = ''; - } + } else { $lien = ''; diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index d02253b4d24..71ce35c76e1 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -227,7 +227,7 @@ if ($id || $ref) //print $value[0]; // This contains a tr line. print ''; //print ''.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].($value['nb_total'] > $value['nb']?'->'.$value['nb_total']:'').')    '; - print ''.$productstatic->getNomUrl(1,'composition').' ('.$value['nb_total'].')    '; + print ''.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].')    '; if (! empty($conf->stock->enabled)) print ''.$langs->trans("Stock").' : '.$productstatic->stock_reel.''; print ''; } @@ -292,12 +292,14 @@ if ($id || $ref) // Number of subproducts $prodsfather = $product->getFather(); //Parent Products $product->get_sousproduits_arbo(); - print ''.$langs->trans("AssociatedProductsNumber").''.count($product->get_arbo_each_prod()).''; + $prods_arbo=$product->get_arbo_each_prod(); + $nbofsubproducts=count($prods_arbo); + print ''.$langs->trans("AssociatedProductsNumber").''; + print $form->textwithpicto($nbofsubproducts, $langs->trans('IfZeroItIsNotAVirtualProduct')); + print ''; print ''; // List of subproducts - $prods_arbo = $product->get_arbo_each_prod(); - //var_dump($prods_arbo); if(count($prods_arbo) > 0) { print ''; @@ -322,8 +324,10 @@ if ($id || $ref) print ''; } - // Number of parent products - print ''.$langs->trans("ParentProductsNumber").''.count($prodsfather).''; + // Number of parent virtual products + print ''.$langs->trans("ParentProductsNumber").''; + print $form->textwithpicto(count($prodsfather), $langs->trans('IfZeroItIsNotUsedByVirtualProduct')); + print ''; if (count($prodsfather) > 0) { From 335c8cd5112df9a55c0e456d85729547213743fb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Apr 2013 13:01:38 +0200 Subject: [PATCH 06/13] Look: Minor change --- htdocs/theme/eldy/style.css.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 43af5fc2482..bcfb9a051bd 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1326,7 +1326,7 @@ a.tabTitle { text-shadow:1px 1px 1px #ffffff; font-family: ; font-weight: normal; - padding: 5px 6px 2px 6px; + padding: 4px 6px 2px 6px; margin: 0px 6px; text-decoration: none; white-space: nowrap; @@ -1334,7 +1334,7 @@ a.tabTitle { a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { font-family: ; - padding: 5px 6px 2px 6px; + padding: 4px 6px 2px 6px; margin: 0em 0.2em; text-decoration: none; white-space: nowrap; From ed4c18b9d36fdb83c4d0fee00bd339879c61c0e5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Apr 2013 13:15:33 +0200 Subject: [PATCH 07/13] Update changelog. Fix: Fix template ODS. --- ChangeLog | 69 +++++++++--------- .../thirdparties/template_thirdparty.ods | Bin 14558 -> 13595 bytes 2 files changed, 36 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4b8ccf1e55..a70c0f58da2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ English Dolibarr ChangeLog ***** ChangeLog for 3.4 compared to 3.3.2 ***** For users: +- New: Can use ODS templates as document templates. - New: Add link to autofill/reset with quantity to ship when creating a delivery receipt. - New: Event into calendar use different colors for different users. @@ -11,46 +12,48 @@ For users: - New: Add a tab "consumption" on thirdparties to list products bought/sells. - New: Some performance enhancements. - New: Can attach files onto trip and expenses modules. -- New: Add option MAIN_PDF_TITLE_BACKGROUND_COLOR. +- New: Add hidden option MAIN_PDF_TITLE_BACKGROUND_COLOR. - New: Merge tab customer and prospect. - New: Add ES formated address country rule. -- New: Can define a hierarchical responsible on user. -- New: Add a hierarchical view for users. +- New: Can define a hierarchical responsible on user and add a tree view to + see hierarchy of users. - New: Can expand/collapse menus, categories and users list. -- New: extra parameters are supported into ODT templates. -- New: total per vat rate are available as tags for ODT templates. -- New: Add more types for extra parameters (lists, phone, emails, checkbox, prices). +- New: extra parameters are supported into ODT/ODS templates. +- New: total per vat rate are available as tags for ODT/ODS templates. - New: Some part of interface use more CSS3 (ie: agenda) -- New: [ task #707 ] Create option ProfIdx are mandatory to validate a invoice. +- New: [ task #707 ] Create option "ProfIdx is mandatory to validate a invoice". - New: Can define if we want to use VAT or not for subscriptions (foundation module). -- New: Can define a default choice for choice "More action when recording - a subscription" (foundation module). -- New: Add link to check professional id for india. +- New: Can define a default choice for "More action when recording a + subscription" (foundation module). +- New: Add link to check professional id for India. - New: [ task #731 ] Uniformize ref generation - New: [ task #748 ] Add a link "Dolibarr" into left menu -- New: Script email_unpaid_invoices_to_representative accepts now a parameter test - and a delay. -- New: Can define a different clicktodial setup per user. -- New: Add option INVOICE_CAN_NEVER_BE_REMOVED. -- New: Enhance agenda module to reach RFC2445 (add busy information). +- New: Script email_unpaid_invoices_to_representative accepts now a parameter "test" + and a "late delay". +- New: Can define different clicktodial setups for each user. +- New: Add hidden option INVOICE_CAN_NEVER_BE_REMOVED. +- New: Enhance agenda module to reach RFC2445 ("type" not enabled by default and add + "busy" information). - New: Add module Opensurvey. -- New: Default aprrover for holidays i sby default hierchical parent. +- New: Default approver for holidays is set by default to hierchical parent. - First change to prepare feature "click to print" (IPP) for PDF. -- New: [ task #350 ] Merge tab customer and prospect -- New: [ task #710 ] Add substitution into mailing send (and HTML is now valid) -- New: [ task #711 ] Add combobox for contact as done for product/thirdparty -- New: [ task #714 ] In Emailing module admin autogenerate security key of READRECIEPT -- New: [ task #743 ] GED : Add aministration option to disabled autotree to display -- New: [ task #767 ] Customer Address fallback when a contact doesn't have an address -- New: [ task #768 ] WYSIWYG for all mail -- New: [ task #773 ] Add Project document in GED(ECM) modules -- New: [ task #783 ] Add checkbox and radio into extrafield feature -- New: [ task #798 ] Add range limit date on product/services as it is done on order and invoice -- New: [ task #814 ] Add extrafield feature into Project/project tasks module -- New: [ task #770 ] Add ODT document generation for Projects module -- New: [ task #741 ] Add intervention box -- New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated -- New: [ task #823 ] Shipping_validate email notification +- New: [ task #350 ] Merge tab customer and prospect. +- New: [ task #710 ] Add substitution into mailing send (and HTML is now valid). +- New: [ task #711 ] Add combobox for contact, as done for product/thirdparty. +- New: [ task #714 ] In Emailing module admin autogenerate security key of READRECEIPT. +- New: [ task #743 ] GED : Add aministration option to disable autotree display. +- New: [ task #767 ] Customer Address fallback when a contact doesn't have an address. +- New: [ task #768 ] WYSIWYG for all mails. +- New: [ task #773 ] Add Project document in GED(ECM) modules. +- New: [ task #783 ] Add more types for extra parameters (lists, phone, emails, checkbox, + prices, radio). +- New: [ task #798 ] Add range limit date on product/services as it is done on order + and invoice. +- New: [ task #814 ] Add extrafield feature for projects ands tasks. +- New: [ task #770 ] Add ODT document generation for Projects module. +- New: [ task #741 ] Add intervention box. +- New: [ task #826 ] Optionnal increase stock when deleting an invoice already validated. +- New: [ task #823 ] Shipping_validate email notification. For translators: - Update language files. @@ -60,8 +63,8 @@ For developers: - An external module can force its theme. - Add function dol_set_focus('#xxx'). - A mymodule can bring its own core/modules/mymodule/modules_mymodule.php file. -- Removed not used libraries. -- More web services. +- Removed some not used libraries. +- More web services. - Renamed some database fields, code variables and parameters from french to english. - First change to manage margins on contracts. - Add hook getFormMail. diff --git a/htdocs/install/doctemplates/thirdparties/template_thirdparty.ods b/htdocs/install/doctemplates/thirdparties/template_thirdparty.ods index ad50961b562d95810ea98e692c74827e9ece247d..c715d7fb80f94399f3a39710b5d67c73a91db913 100644 GIT binary patch literal 13595 zcmeHuWmsIx(k>b_2~L1OaCdhN7Th&Ra2uS#Ww0Q@B{&54V8J~=AXtFGCAb9$?r>+a zcTTeR+2_0G`*(lbhK99zRlQwZU0q%MtXj%)@CZ0CFvu`4-r7mx!M1$i%rG!8&bMbI6Gj?#WwK6ewv9brSxB*O=?TwwSoSE$%%mAkLCa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zfk#^ zD*v6%Kc#X14V_=9^A9RNBl|&zpZV`0dHyP8zoGIksq}wE(?3;&;rwqy{XLQXQ@FpU jgNIc5s|Z5q{5G+w$iqU$!B9}>kUt(6D5y7F4^RIGT@Nx0 From e65e6516c5bc7f781f1a6d881f2d500df07f83c3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Apr 2013 14:33:47 +0200 Subject: [PATCH 08/13] Fix: Logon theme on amarok --- htdocs/core/tpl/login.tpl.php | 2 +- htdocs/theme/amarok/style.css.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 8717225cd3f..7f10efcc1ec 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -179,7 +179,7 @@ if ($forgetpasslink || $helpcenterlink) -
+

dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?> } div.ficheaddleft { - dol_optimize_smallscreen)) { print "padding-left: 16px;\n"; } + dol_optimize_smallscreen)) { print "padding-left: 16px;\n"; } else print "margin-top: 10px;\n"; ?> } From 1be6a2c1208c7e6b5337892712b1beb1c0d0d1aa Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 22 Apr 2013 12:35:31 +0200 Subject: [PATCH 09/13] Fix: broken features for fileupload --- htdocs/comm/action/document.php | 2 +- htdocs/core/class/fileupload.class.php | 28 +++++++++++++++++++++++++- htdocs/projet/class/task.class.php | 1 + htdocs/projet/tasks/document.php | 8 ++++++-- 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 9fcbca3e743..042f330b199 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -263,7 +263,7 @@ if ($objectid > 0) // Affiche formulaire upload $formfile=new FormFile($db); - $formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/action/document.php?id='.$act->id,'',0,0,($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create)); + $formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/action/document.php?id='.$act->id,'',0,0,($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create),50,$act); // List of document diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index c5e83017940..a86073e6969 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -56,6 +56,8 @@ class FileUpload $filename = $regs[2]; } + $parentForeignKey = ''; + // For compatibility if ($element == 'propal') { $pathname = 'comm/propal'; @@ -69,6 +71,14 @@ class FileUpload $element = $pathname = 'projet'; $dir_output=$conf->$element->dir_output; } + elseif ($element == 'project_task') { + $pathname = 'projet'; $filename='task'; + $dir_output=$conf->projet->dir_output; + $parentForeignKey = 'fk_project'; + $parentClass = 'Project'; + $parentElement = 'projet'; + $parentObject = 'project'; + } elseif ($element == 'fichinter') { $element='ficheinter'; $dir_output=$conf->$element->dir_output; @@ -80,6 +90,10 @@ class FileUpload elseif ($element == 'invoice_supplier') { $pathname = 'fourn'; $filename='fournisseur.facture'; $dir_output=$conf->fournisseur->facture->dir_output; + } + elseif ($element == 'action') { + $pathname = 'comm/action'; $filename='actioncomm'; + $dir_output=$conf->agenda->dir_output; } else { $dir_output=$conf->$element->dir_output; } @@ -97,11 +111,23 @@ class FileUpload $object = new $classname($db); $object->fetch($fk_element); - $object->fetch_thirdparty(); + if (!empty($parentForeignKey)) { + dol_include_once('/'.$parentElement.'/class/'.$parentObject.'.class.php'); + $parent = new $parentClass($db); + $parent->fetch($object->$parentForeignKey); + if (!empty($parent->socid)) { + $parent->fetch_thirdparty(); + } + $object->$parentObject = dol_clone($parent); + } else { + $object->fetch_thirdparty(); + } $object_ref = dol_sanitizeFileName($object->ref); if ($element == 'invoice_supplier') { $object_ref = get_exdir($object->id, 2) . $object_ref; + } else if ($element == 'project_task') { + $object_ref = $object->project->ref . '/' . $object_ref; } $this->options = array( diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index ac29870106b..a177ddf838b 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -183,6 +183,7 @@ class Task extends CommonObject $sql.= " t.label,"; $sql.= " t.description,"; $sql.= " t.duration_effective,"; + $sql.= " t.datec,"; $sql.= " t.dateo,"; $sql.= " t.datee,"; $sql.= " t.fk_user_creat,"; diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 5d42a44d54b..90adc2925c2 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -93,7 +93,11 @@ if ($id > 0 || ! empty($ref)) { $projectstatic->fetch($object->fk_project); - if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); + if (! empty($projectstatic->socid)) { + $projectstatic->fetch_thirdparty(); + } + + $object->project = dol_clone($projectstatic); $upload_dir = $conf->projet->dir_output.'/'.dol_sanitizeFileName($projectstatic->ref).'/'.dol_sanitizeFileName($object->ref); } @@ -114,7 +118,7 @@ if ($action=='delete') { $langs->load("other"); $file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). - $ret=dol_delete_file($file); + $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); From 733872e9c90bcbbd263260c228f4e6eeb6b09d11 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 22 Apr 2013 14:47:37 +0200 Subject: [PATCH 10/13] Fix: merge problem --- htdocs/comm/action/document.php | 323 ++++++++++++++++---------------- 1 file changed, 162 insertions(+), 161 deletions(-) diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 042f330b199..6a576c580ca 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -51,6 +51,19 @@ if ($user->societe_id > 0) $socid = $user->societe_id; } +$act = new ActionComm($db); + +if ($objectid > 0) +{ + $ret = $act->fetch($objectid); + if ($ret > 0) { + $company=new Societe($db); + $company->fetch($act->societe->id); + $act->societe=$company; // For backward compatibility + $act->thirdparty=$company; + } +} + // Get parameters $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); @@ -79,7 +92,7 @@ if ($action == 'delete') { $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid); $file = $upload_dir . '/' . $_GET['urlfile']; // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). - $ret=dol_delete_file($file); + $ret=dol_delete_file($file,0,0,0,$act); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); $action=''; @@ -96,184 +109,172 @@ $help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; llxHeader('',$langs->trans("Agenda"),$help_url); -if ($objectid > 0) +if ($act->id > 0) { - $act = new ActionComm($db); - if ($act->fetch($objectid)) + $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid); + + $author=new User($db); + $author->fetch($act->author->id); + $act->author=$author; + + if ($act->contact->id) $act->fetch_contact($act->contact->id); + + $head=actions_prepare_head($act); + dol_fiche_head($head, 'documents', $langs->trans("Action"),0,'action'); + + // Affichage fiche action en mode visu + print ''; + + $linkback = ''.$langs->trans("BackToList").''; + + // Ref + print ''; + + // Type + if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - $upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($objectid); + print ''; + } - $company=new Societe($db); - $company->fetch($act->societe->id); - $act->societe=$company; + // Title + print ''; - $author=new User($db); - $author->fetch($act->author->id); - $act->author=$author; + // Full day event + print ''; - if ($act->contact->id) $act->fetch_contact($act->contact->id); + // Date start + print ''; + print ''; + print ''; - $head=actions_prepare_head($act); - dol_fiche_head($head, 'documents', $langs->trans("Action"),0,'action'); + // Date end + print ''; - // Affichage fiche action en mode visu - print '
'.$langs->trans("Ref").''; + print $form->showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); + print '
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Title").''.$act->label.'
'.$langs->trans("EventOnFullDay").''.yn($act->fulldayevent).'
'.$langs->trans("DateActionStart").''; + if (! $act->fulldayevent) print dol_print_date($act->datep,'dayhour'); + else print dol_print_date($act->datep,'day'); + if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); + print ''."\n"; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + //print ''; + print img_picto($langs->trans("ViewCal"),'object_calendar').' '; + print '
'."\n"; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + //print ''; + print img_picto($langs->trans("ViewCal"),'object_calendarweek').' '; + print '
'."\n"; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + //print ''; + print img_picto($langs->trans("ViewCal"),'object_calendarday').' '; + print '
'."\n"; + print '
'.$langs->trans("DateActionEnd").''; + if (! $act->fulldayevent) print dol_print_date($act->datef,'dayhour'); + else print dol_print_date($act->datef,'day'); + if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late")); + print '
'; + // Status + print ''; - $linkback = ''.$langs->trans("BackToList").''; + // Location + print ''; - // Ref - print ''; - // Type - if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) + print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; + print $act->getLibStatut(4); + print '
'.$langs->trans("Location").''.$act->location.'
'.$langs->trans("Ref").''; - print $form->showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); - print '


'; + + + // Third party - Contact + print ''; + print "
".dol_print_phone($act->societe->tel); } - - // Title - print ''; - - // Full day event - print ''; - - // Date start - print ''; - print ''; - print ''; - - // Date end - print ''; - - // Status - print ''; - - // Location - print ''; - - - print '
'.$langs->trans("ActionOnCompany").''.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None")); + if ($act->societe->id && $act->type_code == 'AC_TEL') + { + if ($act->societe->fetch($act->societe->id)) { - print '
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Title").''.$act->label.'
'.$langs->trans("EventOnFullDay").''.yn($act->fulldayevent).'
'.$langs->trans("DateActionStart").''; - if (! $act->fulldayevent) print dol_print_date($act->datep,'dayhour'); - else print dol_print_date($act->datep,'day'); - if ($act->percentage == 0 && $act->datep && $act->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); - print ''."\n"; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendar').' '; - print '
'."\n"; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendarweek').' '; - print '
'."\n"; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - //print ''; - print img_picto($langs->trans("ViewCal"),'object_calendarday').' '; - print '
'."\n"; - print '
'.$langs->trans("DateActionEnd").''; - if (! $act->fulldayevent) print dol_print_date($act->datef,'dayhour'); - else print dol_print_date($act->datef,'day'); - if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late")); - print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; - print $act->getLibStatut(4); - print '
'.$langs->trans("Location").''.$act->location.'


'; - - - // Third party - Contact - print ''; - print ''; - print ''; - - // Project - if (! empty($conf->projet->enabled)) - { - print ''; - } - - // Priority - print ''; - - - print '
'.$langs->trans("ActionOnCompany").''.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None")); - if ($act->societe->id && $act->type_code == 'AC_TEL') - { - if ($act->societe->fetch($act->societe->id)) - { - print "
".dol_print_phone($act->societe->tel); - } - } - print '
'.$langs->trans("Contact").''; - if ($act->contact->id > 0) - { - print $act->contact->getNomUrl(1); - if ($act->contact->id && $act->type_code == 'AC_TEL') - { - if ($act->contact->fetch($act->contact->id)) - { - print "
".dol_print_phone($act->contact->phone_pro); - } - } - } - else - { - print $langs->trans("None"); - } - - print '
'.$langs->trans("Project").''; - if ($act->fk_project) - { - $project=new Project($db); - $project->fetch($act->fk_project); - print $project->getNomUrl(1); - } - print '
'.$langs->trans("Priority").''; - print ($act->priority?$act->priority:''); - print '


'; - - // Construit liste des fichiers - $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); - $totalsize=0; - foreach($filearray as $key => $file) + } + print ''; + print ''; + print ''; - print ''; - print '
'.$langs->trans("Contact").''; + if ($act->contact->id > 0) + { + print $act->contact->getNomUrl(1); + if ($act->contact->id && $act->type_code == 'AC_TEL') { - $totalsize+=$file['size']; + if ($act->contact->fetch($act->contact->id)) + { + print "
".dol_print_phone($act->contact->phone_pro); + } } - - - print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; - - print '
'; - - - // Affiche formulaire upload - $formfile=new FormFile($db); - $formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/action/document.php?id='.$act->id,'',0,0,($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create),50,$act); - - - // List of document - $param='&id='.$act->id; - $formfile->list_of_documents($filearray,$act,'actions',$param,0,'',$user->rights->agenda->myactions->create); } else { - dol_print_error($db); + print $langs->trans("None"); } + + print ''; + + // Project + if (! empty($conf->projet->enabled)) + { + print ''.$langs->trans("Project").''; + if ($act->fk_project) + { + $project=new Project($db); + $project->fetch($act->fk_project); + print $project->getNomUrl(1); + } + print ''; + } + + // Priority + print ''.$langs->trans("Priority").''; + print ($act->priority?$act->priority:''); + print ''; + + + print '

'; + + // Construit liste des fichiers + $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); + $totalsize=0; + foreach($filearray as $key => $file) + { + $totalsize+=$file['size']; + } + + + print ''; + print ''; + print '
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; + + print ''; + + + // Affiche formulaire upload + $formfile=new FormFile($db); + $formfile->form_attach_new_file(DOL_URL_ROOT.'/comm/action/document.php?id='.$act->id,'',0,0,($user->rights->agenda->myactions->create||$user->rights->agenda->allactions->create),50,$act); + + + // List of document + $param='&id='.$act->id; + $formfile->list_of_documents($filearray,$act,'actions',$param,0,'',$user->rights->agenda->myactions->create); } else { From 29a8c10504369d925bc17b0814a28ef152c6ca49 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 22 Apr 2013 15:09:19 +0200 Subject: [PATCH 11/13] Fix: broken features --- htdocs/compta/sociales/class/chargesociales.class.php | 2 +- htdocs/compta/sociales/document.php | 4 ++-- htdocs/core/class/fileupload.class.php | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 6fbd0a23143..f62b2fcc594 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class ChargeSociales extends CommonObject { - public $element='rowid'; + public $element='chargesociales'; public $table='chargesociales'; public $table_element='chargesociales'; diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index dcb082b41d7..452de21285a 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -79,7 +79,7 @@ if (GETPOST("sendit") && ! empty($conf->global->MAIN_UPLOAD_DOC)) if ($action == 'delete') { $file = $upload_dir . '/' . GETPOST("urlfile"); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). - $ret=dol_delete_file($file); + $ret=dol_delete_file($file,0,0,0,$object); if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); } @@ -172,7 +172,7 @@ if ($object->id) // Affiche formulaire upload $formfile=new FormFile($db); - $formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id,'',0,0,$user->rights->tax->charges->creer); + $formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id,'',0,0,$user->rights->tax->charges->creer,50,$object); // List of document diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index a86073e6969..6bb5b9209d1 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -94,6 +94,10 @@ class FileUpload elseif ($element == 'action') { $pathname = 'comm/action'; $filename='actioncomm'; $dir_output=$conf->agenda->dir_output; + } + elseif ($element == 'chargesociales') { + $pathname = 'compta/sociales'; $filename='chargesociales'; + $dir_output=$conf->tax->dir_output; } else { $dir_output=$conf->$element->dir_output; } From 28757c8d8888db695fedc32b62dcf69ec8e3a205 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 22 Apr 2013 15:26:14 +0200 Subject: [PATCH 12/13] Fix: missing commit --- htdocs/core/class/fileupload.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index 6bb5b9209d1..910ad55e0a0 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -91,6 +91,9 @@ class FileUpload $pathname = 'fourn'; $filename='fournisseur.facture'; $dir_output=$conf->fournisseur->facture->dir_output; } + elseif ($element == 'product') { + $dir_output = $conf->product->multidir_output[$conf->entity]; + } elseif ($element == 'action') { $pathname = 'comm/action'; $filename='actioncomm'; $dir_output=$conf->agenda->dir_output; From de5a57a3c8c56823be209b806586b2349cc9919f Mon Sep 17 00:00:00 2001 From: simnandez Date: Mon, 22 Apr 2013 16:23:59 +0200 Subject: [PATCH 13/13] Fix: Uniformize creation in orders --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index f4d7f3581db..ed73b895280 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -658,7 +658,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu { $langs->load("orders"); $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); - $newmenu->add("/societe/societe.php?leftmenu=orders", $langs->trans("NewOrder"), 1, $user->rights->commande->creer); + $newmenu->add("/commande/fiche.php?action=create", $langs->trans("NewOrder"), 1, $user->rights->commande->creer); $newmenu->add("/commande/liste.php?leftmenu=orders", $langs->trans("List"), 1, $user->rights->commande->lire); if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->commande->lire); if (empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/liste.php?leftmenu=orders&viewstatut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->commande->lire);