From c7c3780400a49107701414d05596bd37b4649ba1 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 5 Oct 2018 15:34:32 +0200 Subject: [PATCH 01/22] clean code --- htdocs/admin/prelevement.php | 2 -- htdocs/compta/index.php | 9 ++------- htdocs/core/boxes/modules_boxes.php | 1 - htdocs/fourn/commande/dispatch.php | 4 ---- htdocs/variants/card.php | 1 - htdocs/variants/combinations.php | 1 - 6 files changed, 2 insertions(+), 16 deletions(-) diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index c40eca7380e..cdfcd451f2c 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -465,7 +465,6 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) { $num = $db->num_rows($resql); $i = 0; - $var = false; while ($i < $num) { $obj = $db->fetch_object($resql); @@ -511,7 +510,6 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) { $num = $db->num_rows($resql); $i = 0; - $var = false; while ($i < $num) { $obj = $db->fetch_object($resql); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index ea43c270b5f..eec0c640b67 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -162,7 +162,6 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) if ( $resql ) { - $var = false; $num = $db->num_rows($resql); print ''; @@ -350,7 +349,6 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $resql = $db->query($sql); if ($resql) { - $var=false; $num = $db->num_rows($resql); $i = 0; @@ -473,7 +471,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $resql=$db->query($sql); if ($resql) { - $var=false; $num = $db->num_rows($resql); print '
'; @@ -520,7 +517,6 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $total_ttc += $obj->total_ttc; $totalam += $obj->am; $i++; - $var = !$var; } } else @@ -1069,7 +1065,7 @@ if ($resql) $obj = $db->fetch_object($resql); - print ""; + print ''; print ''; $i++; } @@ -1080,7 +1076,6 @@ if ($resql) print ''; - +// End of page llxFooter(); - $db->close(); diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index 4377b90d17a..47646a0facf 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -213,7 +213,6 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box require_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; $MAXLENGTHBOX=60; // Mettre 0 pour pas de limite - $var = false; $cachetime = 900; // 900 : 15mn $cachedir = DOL_DATA_ROOT.'/boxes/temp'; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 44b10bf6f88..7f2e5ba4139 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -533,7 +533,6 @@ if ($id > 0 || ! empty($ref)) { $nbproduct = 0; // Nb of predefined product lines to dispatch (already done or not) if SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED is off (default) // or nb of line that remain to dispatch if SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED is on. - $var = false; while ( $i < $num ) { $objp = $db->fetch_object($resql); @@ -794,8 +793,6 @@ if ($id > 0 || ! empty($ref)) { print ''; print "\n"; - $var = false; - while ( $i < $num ) { $objp = $db->fetch_object($resql); @@ -869,7 +866,6 @@ if ($id > 0 || ! empty($ref)) { print "\n"; $i ++; - $var = ! $var; } $db->free($resql); diff --git a/htdocs/variants/card.php b/htdocs/variants/card.php index be73db1fff0..8cb4e13b33e 100644 --- a/htdocs/variants/card.php +++ b/htdocs/variants/card.php @@ -133,7 +133,6 @@ if ($confirm == 'yes') { $langs->load('products'); $title = $langs->trans('ProductAttributeName', dol_htmlentities($object->label)); -$var = false; llxHeader('', $title); diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 0d1ea7af03b..f5c0d813995 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -27,7 +27,6 @@ require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination2ValuePair.cla $langs->loadLangs(array("products", "other")); -$var = false; $id = GETPOST('id', 'int'); $valueid = GETPOST('valueid', 'int'); $ref = GETPOST('ref'); From 94df8d297d70818bf14a8850865e92d1047eab65 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 5 Oct 2018 15:44:57 +0200 Subject: [PATCH 02/22] Standardize code --- htdocs/asset/class/asset.class.php | 3 +++ htdocs/compta/facture/class/facture-rec.class.php | 4 ++++ htdocs/core/class/events.class.php | 5 +++++ htdocs/core/class/fiscalyear.class.php | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 8aee71b4926..54d263dce6d 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -106,6 +106,9 @@ class Asset extends CommonObject */ public $ref; + /** + * @var int Entity + */ public $entity; /** diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 1c97b82d926..ad33432484f 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -64,7 +64,11 @@ class FactureRec extends CommonInvoice */ public $picto='bill'; + /** + * @var int Entity + */ public $entity; + public $number; public $date; public $amount; diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index d8d71513cd9..020998fa37a 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -61,7 +61,12 @@ class Events // extends CommonObject public $tms; public $type; + + /** + * @var int Entity + */ public $entity; + public $dateevent; /** diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index c4ab50179d9..4bdcf54b59a 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -64,6 +64,10 @@ class Fiscalyear extends CommonObject public $date_end; public $datec; public $statut; // 0=open, 1=closed + + /** + * @var int Entity + */ public $entity; public $statuts=array(); From da560289e3f1126a74b030d36e734604215947f8 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 5 Oct 2018 15:48:38 +0200 Subject: [PATCH 03/22] Standardize code --- htdocs/accountancy/class/accountingaccount.class.php | 4 ++++ htdocs/asset/class/asset.class.php | 4 ++++ htdocs/comm/action/class/actioncommreminder.class.php | 5 +++++ htdocs/cron/class/cronjob.class.php | 10 ++++++++++ htdocs/product/class/productcustomerprice.class.php | 8 ++++++++ 5 files changed, 31 insertions(+) diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 4929e118a3b..07918488636 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -86,6 +86,10 @@ class AccountingAccount extends CommonObject public $account_number; public $account_parent; public $account_category; + + /** + * @var int Status + */ public $status; /** diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 54d263dce6d..3f35c063fe9 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -135,6 +135,10 @@ class Asset extends CommonObject public $fk_user_creat; public $fk_user_modif; public $import_key; + + /** + * @var int Status + */ public $status; // If this object has a subtable with lines diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index 6c9632d83e5..15a318b0343 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -92,7 +92,12 @@ class ActionCommReminder extends CommonObject public $offsetvalue; public $offsetunit; + + /** + * @var int Status + */ public $status; + // END MODULEBUILDER PROPERTIES diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index a0db4a1f572..26b17016a5f 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -76,7 +76,12 @@ class Cronjob extends CommonObject public $lastoutput; public $unitfrequency; public $frequency; + + /** + * @var int Status + */ public $status; + public $processing; public $fk_user_author; public $fk_user_mod; @@ -1379,7 +1384,12 @@ class Cronjobline public $lastoutput; public $unitfrequency; public $frequency; + + /** + * @var int Status + */ public $status; + public $fk_user_author; public $fk_user_mod; public $note; diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 7f9e5a0b383..5aaa2c079ea 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -38,7 +38,11 @@ class Productcustomerprice extends CommonObject */ public $table_element = 'product_customer_price'; + /** + * @var int Entity + */ public $entity; + public $datec = ''; public $tms = ''; public $fk_product; @@ -976,7 +980,11 @@ class PriceByCustomerLine */ public $id; + /** + * @var int Entity + */ public $entity; + public $datec = ''; public $tms = ''; public $fk_product; From 073ec85208cd305199066e3c07ce6bf3c132670c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 5 Oct 2018 15:51:08 +0200 Subject: [PATCH 04/22] Standardize code --- htdocs/fourn/class/fournisseur.commande.dispatch.class.php | 5 +++++ htdocs/hrm/class/establishment.class.php | 6 +++++- htdocs/modulebuilder/template/class/myobject.class.php | 5 +++++ htdocs/product/inventory/class/inventory.class.php | 5 +++++ htdocs/societe/class/companypaymentmode.class.php | 5 +++++ htdocs/societe/class/societeaccount.class.php | 5 +++++ htdocs/website/class/websitepage.class.php | 5 +++++ 7 files changed, 35 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 309c5f2deff..76d3e6e0d96 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -78,7 +78,12 @@ class CommandeFournisseurDispatch extends CommonObject public $datec=''; public $comment; + + /** + * @var int Status + */ public $status; + public $tms=''; public $batch; public $eatby=''; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 457fca3ac21..68ab8f38872 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -71,7 +71,11 @@ class Establishment extends CommonObject public $address; public $zip; public $town; - public $status; // 0=open, 1=closed + + /** + * @var int Status 0=open, 1=closed + */ + public $status; /** * @var int Entity diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 0439f78f3a5..b04dd735e49 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -122,7 +122,12 @@ class MyObject extends CommonObject public $label; public $amount; + + /** + * @var int Status + */ public $status; + public $date_creation; public $tms; public $fk_user_creat; diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 5b0bbb99a65..e1be589ac88 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -117,7 +117,12 @@ class Inventory extends CommonObject public $fk_warehouse; public $date_inventory; public $title; + + /** + * @var int Status + */ public $status; + public $date_creation; public $date_validation; public $tms; diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index f5ef70c2407..537fd5998eb 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -161,7 +161,12 @@ class CompanyPaymentMode extends CommonObject public $preapproval_key; public $total_amount_of_all_payments; public $stripe_card_ref; + + /** + * @var int Status + */ public $status; + public $starting_date; public $ending_date; public $datec; diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 422dd4ddb8e..37195d01a66 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -126,7 +126,12 @@ class SocieteAccount extends CommonObject public $fk_user_creat; public $fk_user_modif; public $import_key; + + /** + * @var int Status + */ public $status; + // END MODULEBUILDER PROPERTIES diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 97aba5e6ac2..4277a03167d 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -64,7 +64,12 @@ class WebsitePage extends CommonObject public $htmlheader; public $content; public $grabbed_from; + + /** + * @var int Status + */ public $status; + public $date_creation; public $date_modification; From bcfdeeea889e3cd22b735cea6f8637d2fad6f30a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 5 Oct 2018 15:55:47 +0200 Subject: [PATCH 05/22] Standardize code --- htdocs/societe/class/companypaymentmode.class.php | 2 +- htdocs/stripe/class/stripe.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index 537fd5998eb..83303a3a41d 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -127,7 +127,7 @@ class CompanyPaymentMode extends CommonObject /** * @var int Thirdparty ID */ - public $fk_soc; + public $fk_soc; /** * @var string company payment mode label diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 901997cef3b..3c07c9ae5f6 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -36,7 +36,7 @@ class Stripe extends CommonObject /** * @var int Thirdparty ID */ - public $fk_soc; + public $fk_soc; public $fk_key; From b3925dd2bda98e9e7976f0355ece1b9298b6d15c Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Fri, 5 Oct 2018 16:04:10 +0200 Subject: [PATCH 06/22] Standardize code --- htdocs/adherents/class/adherent.class.php | 9 +++++++++ htdocs/don/class/don.class.php | 7 ++++++- htdocs/hrm/class/establishment.class.php | 5 +++++ htdocs/product/stock/class/entrepot.class.php | 5 +++++ htdocs/societe/class/address.class.php | 10 ++++++++++ htdocs/societe/class/societe.class.php | 5 +++++ 6 files changed, 40 insertions(+), 1 deletion(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index a4e80d3b626..e1a510152f6 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -65,8 +65,17 @@ class Adherent extends CommonObject public $pass_indatabase_crypted; public $societe; + + /** + * @var Societe $company {@type Societe} + */ public $company; + + /** + * @var string Address + */ public $address; + public $zip; public $town; diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 0723ecb659a..edcd05cca9c 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -59,7 +59,12 @@ class Don extends CommonObject public $date; public $amount; public $societe; - public $address; + + /** + * @var string Address + */ + public $address; + public $zip; public $town; public $email; diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 68ab8f38872..034c4050db9 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -68,7 +68,12 @@ class Establishment extends CommonObject public $rowid; public $name; + + /** + * @var string Address + */ public $address; + public $zip; public $town; diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 59e3f2fb057..575aa2a705d 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -69,7 +69,12 @@ class Entrepot extends CommonObject public $statut; public $lieu; + + /** + * @var string Address + */ public $address; + //! Code Postal public $zip; public $town; diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index 37a350b81ff..63b23d42f9e 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -47,7 +47,12 @@ class Address public $socid; public $name; + + /** + * @var string Address + */ public $address; + public $zip; public $town; public $country_id; @@ -522,7 +527,12 @@ class AddressLine public $label; public $name; + + /** + * @var string Address + */ public $address; + public $zip; public $town; public $country_id; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 81a370dc2b9..eb8f00243eb 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -119,7 +119,12 @@ class Societe extends CommonObject public $name_alias; public $particulier; + + /** + * @var string Address + */ public $address; + public $zip; public $town; From 74c86f477c9655df7cfb622a6ffd81daac3108ce Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 6 Oct 2018 12:01:00 +0200 Subject: [PATCH 07/22] Standardize code --- htdocs/expedition/class/expedition.class.php | 3 +++ htdocs/expensereport/class/expensereport_ik.class.php | 3 +++ htdocs/expensereport/class/expensereport_rule.class.php | 7 +++++-- htdocs/holiday/class/holiday.class.php | 5 +++++ htdocs/user/class/user.class.php | 5 +++++ 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index dee8184ee18..7ed035a545f 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -50,6 +50,9 @@ class Expedition extends CommonObject */ public $element="shipping"; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element="fk_expedition"; /** diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index 425851cb6e4..9eaa8970a5b 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -39,6 +39,9 @@ class ExpenseReportIk extends CoreObject */ public $table_element='expensereport_ik'; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_expense_ik'; /** diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php index 8599cfcc810..6d2a99d2101 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -33,12 +33,15 @@ class ExpenseReportRule extends CoreObject * @var string ID to identify managed object */ public $element='expenserule'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='expensereport_rules'; - + + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_expense_rule'; /** diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 5107ffb09ab..39eb2b023de 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -43,7 +43,12 @@ class Holiday extends CommonObject public $table_element='holiday'; public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element = 'fk_holiday'; + public $picto = 'holiday'; /** diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 9020cd3a4bc..97172214dc6 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -64,7 +64,12 @@ class User extends CommonObject public $skype; public $job; // job position public $signature; + + /** + * @var string Address + */ public $address; + public $zip; public $town; public $state_id; // The state/department From 5890647afd301a64084abef4f22f265c37b2d0bd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 6 Oct 2018 12:04:17 +0200 Subject: [PATCH 08/22] Standardize code --- htdocs/supplier_proposal/class/supplier_proposal.class.php | 3 +++ htdocs/user/class/user.class.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index ecd940fea96..688f6aa1276 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -60,6 +60,9 @@ class SupplierProposal extends CommonObject */ public $table_element_line='supplier_proposaldet'; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_supplier_proposal'; public $picto='propal'; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 97172214dc6..603c73fa33a 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -50,7 +50,11 @@ class User extends CommonObject */ public $table_element='user'; + /** + * @var int Field with ID of parent key if this field has a parent + */ public $fk_element='fk_user'; + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $id=0; From dd9af92020ca661ae671d07d3f250bf505904ff6 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 6 Oct 2018 12:07:24 +0200 Subject: [PATCH 09/22] Standardize code --- htdocs/accountancy/class/accountingjournal.class.php | 6 +++++- htdocs/adherents/class/adherent.class.php | 6 +++++- htdocs/adherents/class/adherent_type.class.php | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 058bdb3dddb..9bd21a4a5c4 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -41,7 +41,11 @@ class AccountingJournal extends CommonObject */ public $fk_element = ''; - public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 0; /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index e1a510152f6..342fcd19796 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -51,7 +51,11 @@ class Adherent extends CommonObject */ public $table_element='adherent'; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; public $mesgs; diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index dffd1446af0..20a85c7bf3e 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -47,7 +47,11 @@ class AdherentType extends CommonObject */ public $picto = 'group'; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; /** * @var string From 83db36f9b25ae25981c787b27fef14711f2f5143 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 6 Oct 2018 12:11:48 +0200 Subject: [PATCH 10/22] Standardize code --- htdocs/asset/class/asset_type.class.php | 6 +++- htdocs/bookmarks/class/bookmark.class.php | 29 ++++++++++++------- .../deplacement/class/deplacement.class.php | 6 +++- htdocs/contact/class/contact.class.php | 6 +++- htdocs/core/class/fiscalyear.class.php | 6 +++- 5 files changed, 39 insertions(+), 14 deletions(-) diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index f1c6f9d771b..8eb915f95eb 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -44,7 +44,11 @@ class AssetType extends CommonObject */ public $picto = 'group'; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; /** * @var string Asset type label diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index b7846cd0864..5422e7d7190 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -29,21 +29,25 @@ class Bookmark extends CommonObject { /** - * @var string ID to identify managed object - */ - public $element='bookmark'; + * @var string ID to identify managed object + */ + public $element='bookmark'; /** * @var string Name of table without prefix where object is stored */ public $table_element='bookmark'; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png - */ - public $picto = 'bookmark'; + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'bookmark'; /** * @var DoliDB Database handler. @@ -56,15 +60,20 @@ class Bookmark extends CommonObject public $id; /** - * @var int User ID - */ - public $fk_user; + * @var int User ID + */ + public $fk_user; public $datec; + public $url; + public $target; // 0=replace, 1=new window + public $title; + public $position; + public $favicon; diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 403988052bd..cf08960d99e 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -51,7 +51,11 @@ class Deplacement extends CommonObject */ public $fk_element = ''; - public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 0; public $datec; // Creation date public $dated; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index b8cadaa4632..7f0dbebaed4 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -47,7 +47,11 @@ class Contact extends CommonObject */ public $table_element='socpeople'; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 4bdcf54b59a..985d67d5cae 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -48,7 +48,11 @@ class Fiscalyear extends CommonObject */ public $fk_element = ''; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; /** * @var int ID From 596dba9ce18abbd14769d57f2cc4edf05aad0253 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 6 Oct 2018 12:14:47 +0200 Subject: [PATCH 11/22] Standardize code --- htdocs/don/class/don.class.php | 6 +++++- htdocs/expedition/class/expedition.class.php | 6 +++++- htdocs/holiday/class/holiday.class.php | 6 +++++- htdocs/hrm/class/establishment.class.php | 7 ++++++- htdocs/product/class/product.class.php | 7 ++++++- htdocs/product/stock/class/productlot.class.php | 4 ++++ 6 files changed, 31 insertions(+), 5 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index edcd05cca9c..ed9c629a50d 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -49,7 +49,11 @@ class Don extends CommonObject */ public $fk_element = 'fk_donation'; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 7ed035a545f..7b764e32093 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -65,7 +65,11 @@ class Expedition extends CommonObject */ public $table_element_line="expeditiondet"; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 39eb2b023de..fe90f85b6a4 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -42,7 +42,11 @@ class Holiday extends CommonObject */ public $table_element='holiday'; - public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 0; /** * @var int Field with ID of parent key if this field has a parent diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 034c4050db9..4153972d27c 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -49,7 +49,12 @@ class Establishment extends CommonObject */ public $fk_element = 'fk_establishment'; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; + public $picto='building'; /** diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 12ddfb9e6d7..050d756ad82 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -59,7 +59,12 @@ class Product extends CommonObject public $fk_element='fk_product'; protected $childtables=array('supplier_proposaldet', 'propaldet','commandedet','facturedet','contratdet','facture_fourn_det','commande_fournisseurdet'); // To test if we can delete object - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; /** * {@inheritdoc} diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php index 7eb3593de35..d7b77cd83ee 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -47,6 +47,10 @@ class Productlot extends CommonObject public $picto='barcode'; + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ public $ismultientitymanaged = 1; /** From 956c7b21e2340f18cf4a9c65c76a40c32da55d41 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 6 Oct 2018 12:18:03 +0200 Subject: [PATCH 12/22] Standardize code --- htdocs/projet/class/project.class.php | 7 ++++++- htdocs/societe/class/societe.class.php | 1 + htdocs/user/class/user.class.php | 6 +++++- htdocs/user/class/usergroup.class.php | 6 +++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 9af52721787..a8b34e9c57d 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -53,7 +53,12 @@ class Project extends CommonObject */ public $fk_element = 'fk_projet'; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; + public $picto = 'projectpub'; /** diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index eb8f00243eb..74bda3d3afc 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -66,6 +66,7 @@ class Societe extends CommonObject * @var int */ public $ismultientitymanaged = 1; + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 603c73fa33a..f3fa431daa0 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -55,7 +55,11 @@ class User extends CommonObject */ public $fk_element='fk_user'; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; public $id=0; public $statut; diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index e3ada6efcac..6f3e333f6f5 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -45,7 +45,11 @@ class UserGroup extends CommonObject */ public $table_element='usergroup'; - public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; public $picto='group'; From 61daff6cb611870ce463aee642a9fd9680d81306 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sat, 6 Oct 2018 12:34:51 +0200 Subject: [PATCH 13/22] Standardize code --- htdocs/core/class/commondocgenerator.class.php | 3 +++ htdocs/core/class/google.class.php | 4 ++-- htdocs/core/class/html.form.class.php | 14 +++++++------- htdocs/core/class/notify.class.php | 10 +++++----- htdocs/core/modules/mailings/modules_mailings.php | 2 +- htdocs/mailmanspip/class/mailmanspip.class.php | 8 ++++---- htdocs/resource/class/html.formresource.class.php | 5 +++-- 7 files changed, 25 insertions(+), 21 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 3792aaf9327..f75ced719a1 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -38,6 +38,9 @@ abstract class CommonDocGenerator */ public $error=''; + /** + * @var DoliDB Database handler. + */ protected $db; diff --git a/htdocs/core/class/google.class.php b/htdocs/core/class/google.class.php index 5756acd90e0..615729ba9c3 100644 --- a/htdocs/core/class/google.class.php +++ b/htdocs/core/class/google.class.php @@ -30,13 +30,13 @@ class GoogleAPI * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ public $error=''; - var $key; + public $key; /** * Constructor diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 16f0a0158a9..a12e496b587 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -58,15 +58,15 @@ class Form */ public $error=''; - var $num; + public $num; // Cache arrays - var $cache_types_paiements=array(); - var $cache_conditions_paiements=array(); - var $cache_availability=array(); - var $cache_demand_reason=array(); - var $cache_types_fees=array(); - var $cache_vatrates=array(); + public $cache_types_paiements=array(); + public $cache_conditions_paiements=array(); + public $cache_availability=array(); + public $cache_demand_reason=array(); + public $cache_types_fees=array(); + public $cache_vatrates=array(); /** diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index d52166659ea..5736fcba681 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -51,11 +51,11 @@ class Notify */ public $errors = array(); - var $author; - var $ref; - var $date; - var $duree; - var $note; + public $author; + public $ref; + public $date; + public $duree; + public $note; /** * @var int Project ID diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index e0316a75390..f7136d4aa63 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -41,7 +41,7 @@ class MailingTargets // This can't be abstract as it is used for some method */ public $error=''; - var $tooltip=''; + public $tooltip=''; /** diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php index 139183e0375..de075eb2dc5 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -48,10 +48,10 @@ class MailmanSpip */ public $error=''; - var $mladded_ok; - var $mladded_ko; - var $mlremoved_ok; - var $mlremoved_ko; + public $mladded_ok; + public $mladded_ko; + public $mlremoved_ok; + public $mlremoved_ko; /** diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index f541a7728cb..c118643aa7d 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -38,8 +38,9 @@ class FormResource */ public $db; - var $substit=array(); - var $param=array(); + public $substit=array(); + + public $param=array(); /** * @var string Error code (or message) From de17977bff3124f262477c0d59f13d60cc92d78b Mon Sep 17 00:00:00 2001 From: ias-ceo Date: Sat, 6 Oct 2018 15:09:06 +0300 Subject: [PATCH 14/22] new malay lang tag --- htdocs/langs/ar_SA/languages.lang | 3 ++- htdocs/langs/en_US/languages.lang | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/ar_SA/languages.lang b/htdocs/langs/ar_SA/languages.lang index 7b27cc35010..4519ef6078d 100644 --- a/htdocs/langs/ar_SA/languages.lang +++ b/htdocs/langs/ar_SA/languages.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - languages Language_ar_AR=العربية -Language_ar_EG=Arabic (Egypt) +Language_ar_EG=العربيه مصر Language_ar_SA=العربية Language_bn_BD=بنغالي Language_bg_BG=البلغارية @@ -86,3 +86,4 @@ Language_uz_UZ=الأوزبكي Language_vi_VN=الفيتنامية Language_zh_CN=الصينية Language_zh_TW=الصينية (التقليدية) +Language_bh_MY=الماليزية diff --git a/htdocs/langs/en_US/languages.lang b/htdocs/langs/en_US/languages.lang index a062883d667..99c9b6486e0 100644 --- a/htdocs/langs/en_US/languages.lang +++ b/htdocs/langs/en_US/languages.lang @@ -86,3 +86,4 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_bh_MY=Malay From 75b9862c1421d9ccc8fbb06be25412544eb4c90e Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 8 Oct 2018 21:01:21 +0200 Subject: [PATCH 15/22] New : Add FEC Export in accountancy --- .../class/accountancyexport.class.php | 181 +++++++++++++----- .../accountancy/class/bookkeeping.class.php | 8 + .../tables/llx_accounting_bookkeeping.sql | 4 +- htdocs/langs/en_US/accountancy.lang | 1 + 4 files changed, 143 insertions(+), 51 deletions(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 40427d68034..83c16e43a72 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -54,6 +54,7 @@ class AccountancyExport public static $EXPORT_TYPE_COGILOG = 8; public static $EXPORT_TYPE_AGIRIS = 9; public static $EXPORT_TYPE_CONFIGURABLE = 10; + public static $EXPORT_TYPE_FEC = 11; /** @@ -78,8 +79,8 @@ class AccountancyExport * * @param DoliDb $db Database handler */ - public function __construct(DoliDB &$db) - { + public function __construct(DoliDB &$db) + { global $conf; $this->db = &$db; @@ -92,8 +93,8 @@ class AccountancyExport * * @return array of type */ - public static function getType() - { + public static function getType() + { global $langs; return array ( @@ -107,6 +108,7 @@ class AccountancyExport self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'), self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'), self::$EXPORT_TYPE_CONFIGURABLE => $langs->trans('Modelcsv_configurable'), + self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'), ); } @@ -115,8 +117,8 @@ class AccountancyExport * * @return array of type */ - public static function getTypeConfig() - { + public static function getTypeConfig() + { global $conf, $langs; return array ( @@ -161,6 +163,10 @@ class AccountancyExport 'ACCOUNTING_EXPORT_ENDLINE' => empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?1:$conf->global->ACCOUNTING_EXPORT_ENDLINE, 'ACCOUNTING_EXPORT_DATE' => empty($conf->global->ACCOUNTING_EXPORT_DATE)?'%d%m%Y':$conf->global->ACCOUNTING_EXPORT_DATE, ), + self::$EXPORT_TYPE_FEC => array( + 'label' => $langs->trans('Modelcsv_FEC'), + 'ACCOUNTING_EXPORT_FORMAT' => 'txt', + ), ), 'cr'=> array ( '1' => $langs->trans("Unix"), @@ -178,8 +184,8 @@ class AccountancyExport * * @return void */ - public static function downloadFile() - { + public static function downloadFile() + { global $conf; $filename = 'general_ledger'; include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; @@ -189,10 +195,10 @@ class AccountancyExport * Function who chose which export to use with the default config * * @param unknown $TData data - * @return void + * @return void */ - public function export(&$TData) - { + public function export(&$TData) + { global $conf, $langs; self::downloadFile(); @@ -228,6 +234,9 @@ class AccountancyExport case self::$EXPORT_TYPE_CONFIGURABLE : $this->exportConfigurable($TData); break; + case self::$EXPORT_TYPE_FEC : + $this->exportFEC($TData); + break; default: $this->errors[] = $langs->trans('accountancy_error_modelnotfound'); break; @@ -241,8 +250,8 @@ class AccountancyExport * * @return void */ - public function exportNormal($objectLines) - { + public function exportNormal($objectLines) + { global $conf; foreach ( $objectLines as $line ) { @@ -266,8 +275,8 @@ class AccountancyExport * * @return void */ - public function exportCegid($objectLines) - { + public function exportCegid($objectLines) + { foreach ( $objectLines as $line ) { $date = dol_print_date($line->doc_date, '%d%m%Y'); $separator = ";"; @@ -292,8 +301,8 @@ class AccountancyExport * * @return void */ - public function exportCogilog($objectLines) - { + public function exportCogilog($objectLines) + { foreach ( $objectLines as $line ) { $date = dol_print_date($line->doc_date, '%d%m%Y'); $separator = ";"; @@ -326,8 +335,8 @@ class AccountancyExport * * @return void */ - public function exportCoala($objectLines) - { + public function exportCoala($objectLines) + { // Coala export $separator = ";"; $end_line = "\n"; @@ -354,8 +363,8 @@ class AccountancyExport * * @return void */ - public function exportBob50($objectLines) - { + public function exportBob50($objectLines) + { // Bob50 $separator = ";"; @@ -393,8 +402,8 @@ class AccountancyExport * * @return void */ - public function exportCiel(&$TData) - { + public function exportCiel(&$TData) + { global $conf; $end_line ="\r\n"; @@ -434,13 +443,13 @@ class AccountancyExport * * @return void */ - public function exportQuadratus(&$TData) - { + public function exportQuadratus(&$TData) + { global $conf; $end_line ="\r\n"; - //We should use dol_now function not time however this is wrong date to transfert in accounting + //We should use dol_now function not time however this is wrong date to transfert in accounting //$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy //$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy foreach ( $TData as $data ) { @@ -454,8 +463,8 @@ class AccountancyExport $Tab['code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2); $Tab['folio'] = '000'; - //We use invoice date $data->doc_date not $date_ecriture which is the transfert date - //maybe we should set an option for customer who prefer to keep in accounting software the tranfert date instead of invoice date ? + //We use invoice date $data->doc_date not $date_ecriture which is the transfert date + //maybe we should set an option for customer who prefer to keep in accounting software the tranfert date instead of invoice date ? //$Tab['date_ecriture'] = $date_ecriture; $Tab['date_ecriture'] = dol_print_date($data->doc_date, '%d%m%y'); $Tab['filler'] = ' '; @@ -463,25 +472,25 @@ class AccountancyExport $Tab['sens'] = $data->sens; // C or D $Tab['signe_montant'] = '+'; - //elarifr le montant doit etre en centimes sans point decimal ! + //elarifr le montant doit etre en centimes sans point decimal ! $Tab['montant'] = str_pad(abs($data->montant*100), 12, '0', STR_PAD_LEFT); // TODO manage negative amount - // $Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount + // $Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount $Tab['contrepartie'] = str_repeat(' ', 8); - // elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting + // elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting if (! empty($data->date_echeance)) //$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE); - $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y' ); // elarifr: format must be ddmmyy + $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y' ); // elarifr: format must be ddmmyy else $Tab['date_echeance'] = '000000'; - //elarifr please keep quadra named field lettrage(2) + codestat(3) instead of fake lettrage(5) + //elarifr please keep quadra named field lettrage(2) + codestat(3) instead of fake lettrage(5) //$Tab['lettrage'] = str_repeat(' ', 5); $Tab['lettrage'] = str_repeat(' ', 2); $Tab['codestat'] = str_repeat(' ', 3); $Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 5), 5); - //elarifr keep correct quadra named field instead of anon filler + //elarifr keep correct quadra named field instead of anon filler //$Tab['filler2'] = str_repeat(' ', 20); $Tab['affaire'] = str_repeat(' ', 10); $Tab['quantity1'] = str_repeat(' ', 10); @@ -490,16 +499,16 @@ class AccountancyExport $Tab['code_journal2'] = str_pad(self::trunc($data->code_journal, 3), 3); $Tab['filler3'] = str_repeat(' ', 3); - //elarifr keep correct quadra named field instead of anon filler libelle_ecriture2 is 30 char not 32 !!!! - //as we use utf8, we must remove accent to have only one ascii char instead of utf8 2 chars for specials that report wrong line size that will exceed import format spec - //todo we should filter more than only accent to avoid wrong line size - //TODO: remove invoice number doc_ref in libelle, - //TODO: we should offer an option for customer to build the libelle using invoice number / name / date in accounting software + //elarifr keep correct quadra named field instead of anon filler libelle_ecriture2 is 30 char not 32 !!!! + //as we use utf8, we must remove accent to have only one ascii char instead of utf8 2 chars for specials that report wrong line size that will exceed import format spec + //todo we should filter more than only accent to avoid wrong line size + //TODO: remove invoice number doc_ref in libelle, + //TODO: we should offer an option for customer to build the libelle using invoice number / name / date in accounting software //$Tab['libelle_ecriture2'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref) . ' ' . dol_string_unaccent($data->label_operation), 30), 30); $Tab['libelle_ecriture2'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 30), 30); $Tab['codetva'] = str_repeat(' ', 2); - //elarifr we need to keep the 10 lastest number of invoice doc_ref not the beginning part that is the unusefull almost same part + //elarifr we need to keep the 10 lastest number of invoice doc_ref not the beginning part that is the unusefull almost same part //$Tab['num_piece3'] = str_pad(self::trunc($data->piece_num, 10), 10); $Tab['num_piece3'] = substr(self::trunc($data->doc_ref, 20), -10); $Tab['filler4'] = str_repeat(' ', 73); @@ -518,8 +527,8 @@ class AccountancyExport * * @return void */ - public function exportEbp($objectLines) - { + public function exportEbp($objectLines) + { $separator = ','; $end_line = "\n"; @@ -551,8 +560,8 @@ class AccountancyExport * * @return void */ - public function exportAgiris($objectLines) - { + public function exportAgiris($objectLines) + { $separator = ';'; $end_line = "\n"; @@ -589,8 +598,8 @@ class AccountancyExport * * @return void */ - public function exportConfigurable($objectLines) - { + public function exportConfigurable($objectLines) + { global $conf; foreach ($objectLines as $line) { @@ -613,15 +622,89 @@ class AccountancyExport } } + /** + * Export format : FEC + * + * @param array $objectLines data + * + * @return void + */ + public function exportFEC($objectLines) + { + $separator = ';'; + $end_line = "\n"; + + foreach ( $objectLines as $line ) { + $date_creation = dol_print_date($line->date_creation, '%d%m%Y'); + $date_doc = dol_print_date($line->doc_date, '%d%m%Y'); + $date_valid = dol_print_date($line->date_validated, '%d%m%Y'); + + // FEC:JournalCode + print $line->code_journal; + + // FEC:JournalLib + print $line->journal_label; + + // FEC:EcritureNum + print $line->piece_num . $separator; + + // FEC:EcritureDate + print $date_creation . $separator; + + // FEC:CompteNum + print $line->numero_compte . $separator + + // FEC:CompteLib + print $line->label_compte . $separator; + + // FEC:CompAuxNum + print $line->subledger_account . $separator; + + // FEC:CompAuxLib + print $line->subledger_label . $separator; + + // FEC:PieceRef + print $line->doc_ref . $separator; + + // FEC:PieceDate + print $date_doc . $separator; + + // FEC:EcritureLib + print $line->label_operation . $separator; + + // FEC:Debit + print price($line->debit) . $separator; + + // FEC:Credit + print price($line->credit) . $separator; + + // FEC:EcritureLet + print $line->lettering_code . $separator; + + // FEC:DateLet + print $line->date_lettering . $separator; + + // FEC:ValidDate + print $date_valid . $separator; + + // FEC:Montantdevise + print $line->multicurrency_amount . $separator; + + // FEC:Idevise + print $line->multicurrency_code; + + print $end_line; + } + } /** * * @param unknown $str data * @param integer $size data - * @return string + * @return string */ - public static function trunc($str, $size) - { + public static function trunc($str, $size) + { return dol_trunc($str, $size, 'right', 'UTF-8', 1); } } diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 5d9572da684..ab6061689e3 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -718,6 +718,10 @@ class BookKeeping extends CommonObject $sql .= " t.credit,"; $sql .= " t.montant,"; $sql .= " t.sens,"; + $sql .= " t.multicurrency_amount,"; + $sql .= " t.multicurrency_code,"; + $sql .= " t.lettering_code,"; + $sql .= " t.date_lettering,"; $sql .= " t.fk_user_author,"; $sql .= " t.import_key,"; $sql .= " t.code_journal,"; @@ -786,6 +790,10 @@ class BookKeeping extends CommonObject $line->credit = $obj->credit; $line->montant = $obj->montant; $line->sens = $obj->sens; + $line->multicurrency_amount = $obj->multicurrency_amount; + $line->multicurrency_code = $obj->multicurrency_code; + $line->lettering_code = $obj->lettering_code; + $line->date_lettering = $obj->date_lettering; $line->fk_user_author = $obj->fk_user_author; $line->import_key = $obj->import_key; $line->code_journal = $obj->code_journal; diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index 4169b858536..af6cd66826d 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -22,8 +22,8 @@ CREATE TABLE llx_accounting_bookkeeping rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- | multi company id doc_date date NOT NULL, -- FEC:PieceDate - doc_type varchar(30) NOT NULL, -- FEC:PieceRef | facture_client/reglement_client/facture_fournisseur/reglement_fournisseur - doc_ref varchar(300) NOT NULL, -- | facture_client/reglement_client/... reference number + doc_type varchar(30) NOT NULL, -- | facture_client/reglement_client/facture_fournisseur/reglement_fournisseur + doc_ref varchar(300) NOT NULL, -- FEC:PieceRef | facture_client/reglement_client/... reference number fk_doc integer NOT NULL, -- | facture_client/reglement_client/... rowid fk_docdet integer NOT NULL, -- | facture_client/reglement_client/... line rowid thirdparty_code varchar(32), -- Third party code (customer or supplier) when record is saved (may help debug) diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index e1fe73d0383..7a7c730f05b 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -263,6 +263,7 @@ Modelcsv_ebp=Export towards EBP Modelcsv_cogilog=Export towards Cogilog Modelcsv_agiris=Export towards Agiris Modelcsv_configurable=Export Configurable +Modelcsv_FEC=Export FEC (Art. L47 A) (Test) ChartofaccountsId=Chart of accounts Id ## Tools - Init accounting account on product / service From 1e706c2e6b4368d2abf5a2eb94945fb3081e314e Mon Sep 17 00:00:00 2001 From: Abbes Bahfir Date: Mon, 8 Oct 2018 23:17:44 +0100 Subject: [PATCH 16/22] Fix: users categories type is Categorie::TYPE_USER --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index dc2437af825..888550a6408 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -2285,7 +2285,7 @@ else { print ''; print '
".dol_print_date($db->jdate($obj->da),"day")."
'.dol_print_date($db->jdate($obj->da),"day").''.$obj->libelle.' '.$obj->label.'
' . $langs->trans("Date") . '
' . fieldLabel( 'Categories', 'usercats' ) . ''; - $cate_arbo = $form->select_all_categories( Categorie::TYPE_CONTACT, null, null, null, null, 1 ); + $cate_arbo = $form->select_all_categories( Categorie::TYPE_USER, null, null, null, null, 1 ); $c = new Categorie( $db ); $cats = $c->containing($object->id, Categorie::TYPE_USER); foreach ($cats as $cat) { From 34da7cc7318fa97f5bde21b6b59d82353477620c Mon Sep 17 00:00:00 2001 From: Abbes Bahfir Date: Tue, 9 Oct 2018 00:25:42 +0100 Subject: [PATCH 17/22] Fix: Searching on employee field disables employee mode --- htdocs/user/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/user/list.php b/htdocs/user/list.php index 088148ba4af..71b9261e402 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -126,6 +126,7 @@ $optioncss = GETPOST('optioncss','alpha'); // Default search if ($search_statut == '') $search_statut='1'; +if(!empty($search_employee))$mode =''; if ($mode == 'employee') $search_employee=1; From ac214a7258f64a678b8a0cc381972e729816b838 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 9 Oct 2018 08:53:08 +0200 Subject: [PATCH 18/22] Standardize code --- htdocs/accountancy/class/accountancysystem.class.php | 4 ++++ htdocs/comm/action/class/actioncommreminder.class.php | 5 +++++ htdocs/expensereport/class/paymentexpensereport.class.php | 3 +++ htdocs/societe/class/societeaccount.class.php | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index 444079f5239..dee3356bfb6 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -38,7 +38,11 @@ class AccountancySystem */ public $error=''; + /** + * @var int ID + */ public $rowid; + public $fk_pcg_version; public $pcg_type; public $pcg_subtype; diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index 15a318b0343..6631d0e375d 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -81,7 +81,12 @@ class ActionCommReminder extends CommonObject 'offsetunit' => array('type'=>'varchar(1)', 'label'=>'OffsetUnit', 'visible'=>1, 'enabled'=>1, 'position'=>57, 'notnull'=>1, 'comment'=>"m, h, d, w",), 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>1, 'default'=>0, 'index'=>0, 'arrayofkeyval'=>array('0'=>'ToDo', '1'=>'Done')), ); + + /** + * @var int ID + */ public $rowid; + public $dateremind; public $typeremind; diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index f2275676049..1dd5048991c 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -45,6 +45,9 @@ class PaymentExpenseReport extends CommonObject */ public $picto = 'payment'; + /** + * @var int ID + */ public $rowid; public $fk_expensereport; diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index 37195d01a66..bcb09675c3d 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -99,6 +99,10 @@ class SocieteAccount extends CommonObject 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'visible'=>-2, 'enabled'=>1, 'position'=>1000, 'notnull'=>-1, 'index'=>1,), 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>1, 'index'=>1, 'default'=>1, 'arrayofkeyval'=>array('1'=>'Active','0'=>'Disabled')), ); + + /** + * @var int ID + */ public $rowid; /** From 6a6df629b2c69dd867160435a63912fae1958846 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 9 Oct 2018 08:56:58 +0200 Subject: [PATCH 19/22] Standardize code --- .../class/expensereport.class.php | 30 +++++++++++-------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index f5d2a4145e2..4fbca221d65 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2416,22 +2416,26 @@ class ExpenseReportLine */ public $error=''; - var $rowid; - var $comments; - var $qty; - var $value_unit; - var $date; + /** + * @var int ID + */ + public $rowid; - var $fk_c_type_fees; - var $fk_c_exp_tax_cat; - var $fk_projet; - var $fk_expensereport; + public $comments; + public $qty; + public $value_unit; + public $date; - var $type_fees_code; - var $type_fees_libelle; + public $fk_c_type_fees; + public $fk_c_exp_tax_cat; + public $fk_projet; + public $fk_expensereport; - var $projet_ref; - var $projet_title; + public $type_fees_code; + public $type_fees_libelle; + + public $projet_ref; + public $projet_title; var $vatrate; var $total_ht; From 6ea115f8289d8c0e37fb99d2ea843b7aacfb5496 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 9 Oct 2018 09:04:27 +0200 Subject: [PATCH 20/22] Standardize code --- .../class/accountancysystem.class.php | 4 +++ .../class/accountingaccount.class.php | 5 ++++ .../accountancy/class/bookkeeping.class.php | 28 +++++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index dee3356bfb6..b70fa7238bb 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -43,7 +43,11 @@ class AccountancySystem */ public $rowid; + /** + * @var int ID + */ public $fk_pcg_version; + public $pcg_type; public $pcg_subtype; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 07918488636..9030e65b049 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -80,7 +80,12 @@ class AccountingAccount extends CommonObject public $rowid; public $datec; // Creation date + + /** + * @var int ID + */ public $fk_pcg_version; + public $pcg_type; public $pcg_subtype; public $account_number; diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 5d9572da684..fe20d64fb76 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -70,8 +70,17 @@ class BookKeeping extends CommonObject public $date_lim_reglement; public $doc_type; public $doc_ref; + + /** + * @var int ID + */ public $fk_doc; + + /** + * @var int ID + */ public $fk_docdet; + public $thirdparty_code; public $subledger_account; public $subledger_label; @@ -82,7 +91,12 @@ class BookKeeping extends CommonObject public $credit; public $montant; public $sens; + + /** + * @var int ID + */ public $fk_user_author; + public $import_key; public $code_journal; public $journal_label; @@ -1871,8 +1885,17 @@ class BookKeepingLine public $doc_date = ''; public $doc_type; public $doc_ref; + + /** + * @var int ID + */ public $fk_doc; + + /** + * @var int ID + */ public $fk_docdet; + public $thirdparty_code; public $subledger_account; public $subledger_label; @@ -1883,7 +1906,12 @@ class BookKeepingLine public $credit; public $montant; public $sens; + + /** + * @var int ID + */ public $fk_user_author; + public $import_key; public $code_journal; public $journal_label; From af0bcb2631daeb10d6830097b3c8a65f901d8072 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 9 Oct 2018 09:40:00 +0200 Subject: [PATCH 21/22] Standardize code --- htdocs/adherents/class/subscription.class.php | 9 +++++++++ htdocs/asset/class/asset.class.php | 9 +++++++++ htdocs/categories/class/categorie.class.php | 3 +++ htdocs/comm/propal/class/propal.class.php | 9 +++++++++ htdocs/commande/class/commande.class.php | 12 ++++++++++++ 5 files changed, 42 insertions(+) diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 1c64560cf79..562b34af2b1 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -51,8 +51,17 @@ class Subscription extends CommonObject public $datem; // Date modification public $dateh; // Subscription start date (date subscription) public $datef; // Subscription end date + + /** + * @var int ID + */ public $fk_adherent; + public $amount; + + /** + * @var int ID + */ public $fk_bank; diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 3f35c063fe9..8eeacdc1964 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -132,8 +132,17 @@ class Asset extends CommonObject public $note_private; public $date_creation; public $tms; + + /** + * @var int ID + */ public $fk_user_creat; + + /** + * @var int ID + */ public $fk_user_modif; + public $import_key; /** diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 8f09710854f..15cb254ed7d 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -161,6 +161,9 @@ class Categorie extends CommonObject */ public $table_element='categorie'; + /** + * @var int ID + */ public $fk_parent; /** diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 263a425ff01..ff8b7c3c6ce 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -168,7 +168,12 @@ class Propal extends CommonObject public $remise = 0; public $remise_percent = 0; public $remise_absolue = 0; + + /** + * @var int ID + */ public $fk_address; + public $address_type; public $address; public $availability_id; @@ -191,7 +196,11 @@ class Propal extends CommonObject public $specimen; // Multicurrency + /** + * @var int ID + */ public $fk_multicurrency; + public $multicurrency_code; public $multicurrency_tx; public $multicurrency_total_ht; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 39b0f0db2ee..c588830d83d 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -111,6 +111,9 @@ class Commande extends CommonOrder public $brouillon; public $cond_reglement_code; + /** + * @var int ID + */ public $fk_account; /** @@ -160,7 +163,12 @@ class Commande extends CommonOrder public $date_commande; public $date_livraison; // Date expected of shipment (date starting shipment, not the reception that occurs some days after) + + /** + * @var int ID + */ public $fk_remise_except; + public $remise_percent; public $remise_absolue; public $info_bits; @@ -180,7 +188,11 @@ class Commande extends CommonOrder public $lines = array(); // Multicurrency + /** + * @var int ID + */ public $fk_multicurrency; + public $multicurrency_code; public $multicurrency_tx; public $multicurrency_total_ht; From b615d03b0b817499c3d99902b7bc144ae074a7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 9 Oct 2018 12:17:51 +0200 Subject: [PATCH 22/22] Update index.php --- htdocs/comm/action/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index b6e02861c9b..4ffa4298d20 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1596,13 +1596,13 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $cachecontacts[$event->contact->id]=$contact; } else $contact=$cachecontacts[$event->contact->id]; - if ($linerelatedto) $linerelatedto.=' / '; + if ($linerelatedto) $linerelatedto.=' '; if (! empty($contact->id)) $linerelatedto.=$contact->getNomUrl(1,'',0); } if (! empty($event->fk_element) && $event->fk_element > 0 && ! empty($event->elementtype) && ! empty($conf->global->AGENDA_SHOW_LINKED_OBJECT)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - if ($linerelatedto) $linerelatedto.=' / '; + if ($linerelatedto) $linerelatedto.='
'; $linerelatedto.=dolGetElementUrl($event->fk_element,$event->elementtype,1); } if ($linerelatedto) print '
'.$linerelatedto;