diff --git a/ChangeLog b/ChangeLog index 4a745ca0e9f..5a1cb1e9260 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,15 +8,19 @@ For users: - New: [ task #867 ] Remove ESAEB external module code from core. - New: Can create proposal from an intervention. - New: Can filter events on a group of users. -- New: Add thirdparty to filter on events. +- New: Can filter events of a thirdparty. +- New: Split Agenda view (month, week, day) into different tabs. - New: Form to add a photo is immediatly available on photo page if permissions are ok (save one click per photo to add). - New: Add option PRODUCT_MAX_VISIBLE_PHOTO to limit number of photos shown on main product card. - New: Add event FICHINTER_CLASSIFY_BILLED into list of possible events to create an automatic event into agenda. -- New: Add new type of event (when type of events are used, not by - default) +- New: Add new type of event (when type of events are used, not by default) +- New: Add country into table of thirdparties type. This will allow to provide + a list of thirdparty types specific to a country (like argentina that + need type A or B). +- New: Can force a specific bank account onto an invoice/order... - Fix: [ bug #1487 ] PAYMENT_DELETE trigger does not intercept trigger action - Fix: [ bug #1470, #1472, #1473] User trigger problem - Fix: [ bug #1489, #1491 ] Intervention trigger problem @@ -44,6 +48,8 @@ For developers: - New: Add country iso code on 3 chars into table of countries. - Qual: Removed hard coded rowid into data init of table llx_c_action_trigger. - LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE, RESOURCE_DELETE trigger called before SQL delete +- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE. +- New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE. WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: @@ -159,6 +165,7 @@ removed. You must now use the 6 parameters way. See file modMyModule.class.php f So check that return value is 0 to keep default standard behaviour after hook, or 1 to disable default standard behaviour. - Properties "civilite_id" were renamed into "civility_id". +- Remove add_photo_web() that is ot used anymore by core code. diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 0aaafa461fb..eff3f85fdf6 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -137,15 +137,15 @@ print "\n"; $var=false; print "
@@ -1041,6 +1039,8 @@ $("#actionagenda_vcal_link").attr("href","/public/agenda/agendaexport.php?format
llxFooter();
+$db->close();
+
/**
* Show event of a particular day
diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php
new file mode 100644
index 00000000000..7bd0edafe69
--- /dev/null
+++ b/htdocs/comm/action/peruser.php
@@ -0,0 +1,480 @@
+
+ * Copyright (C) 2003 Eric Seigne
+
+
+
+
+';
+*/
+
+llxFooter();
+
+$db->close();
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 98653992025..eada82f7f6a 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -78,9 +78,9 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
print '| '.$langs->trans("SearchAProposal").' | ||||
| '.$langs->trans("Ref").': | '; + print ' | : | '; print ' | |
| '.$langs->trans("Other").': | '; + print ' | |||
| : | '; print ' | |||
| '.$langs->trans("SearchAContract").' | ||||
| '.$langs->trans("Ref").': | '; + print ' | : | '; print ' | |
| '.$langs->trans("Other").': | '; + print ' | |||
| : | '; print ' | |||
| '.$langs->trans("SearchATripAndExpense").' | ||||
| ".$langs->trans("Ref").': | '; + print " | : | '; print ' | '; - //print " |
| ".$langs->trans("Other").': | '; + //print " | |||
| : | '; print ' | |||
| '.$langs->trans("SearchACustomerInvoice").' | ||
| ".$langs->trans("Ref").': | '; + print " | |
| : | '; print ' | |
| ".$langs->trans("Other").': | '; + print " | |
| : | '; print ' | |
| '.$langs->trans("SearchASupplierInvoice").' | ||||
| ".$langs->trans("Ref").': | '; + print " | : | '; print ' | |
| ".$langs->trans("RefSupplier").': | '; + print " | |||
| : | '; print ' | |||
| '.$langs->trans("SearchADonation").' | ||||
| ".$langs->trans("Ref").': | '; + print " | : | '; print ' | '; - //print " |
| ".$langs->trans("Other").': | '; + //print " | |||
| : | '; print ' | |||
| '; + print img_object("",$logo); + print ' | '; + print ''.$label.' | '; + print ''.img_object("",$logosoc)." ".$nomsoc.' | '; + print ''.$dateligne.' | '; + print ''.$percentage.' | '; + print '
| global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>> trans('AddNewLine'); ?>trans("FreeZone"); ?> | -trans('VAT'); ?> | -trans('PriceUHT'); ?> | ++ | - | trans('PriceUTTC'); ?> | +- | trans('Qty'); ?> | -trans('ReductionShort'); ?> | ++ | '; if ($conf->global->MARGIN_TYPE == "1") echo $langs->trans('BuyingPrice'); else echo $langs->trans('CostPrice'); + echo ''; ?> | element) && $object->element == 'contrat')?'1':'0').'">'; } else {*/ + echo ''; /* if (empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans("Type"); else if (! empty($forceall) || (! empty($conf->product->enabled) && ! empty($conf->service->enabled))) echo $langs->trans("FreeLineOfType"); @@ -124,6 +128,7 @@ else { echo 'tva_assuj == "0") echo '0'; + if ($seller->tva_assuj == "0") echo '0'; else echo $form->load_tva('tva_tx', (isset($_POST["tva_tx"])?$_POST["tva_tx"]:-1), $seller, $buyer); } ?> @@ -201,9 +207,9 @@ else { | -"> + | "> | -remise_client); ?>" name="remise_percent">% | +remise_client); ?>">% | qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; ?> - + @@ -115,7 +115,7 @@ $coldisplay=-1; // We remove first td
info_bits & 2) != 2) { ?>
- %
+ %
diff --git a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN
index 8bc4e42ed3f..4b9d923de03 100644
--- a/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN
+++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN
@@ -417,6 +417,10 @@ class InterfaceDemo
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
}
+ elseif ($action == 'LINECONTRACT_CREATE')
+ {
+ dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
+ }
elseif ($action == 'LINECONTRACT_UPDATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
@@ -484,6 +488,10 @@ class InterfaceDemo
elseif ($action == 'BILL_SUPPLIER_CREATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
+ }
+ elseif ($action == 'BILL_SUPPLIER_UPDATE')
+ {
+ dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
}
elseif ($action == 'BILL_SUPPLIER_DELETE')
{
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 9feb52a5417..4ceea058b4f 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -600,8 +600,8 @@ class FactureFournisseur extends CommonInvoice
if (! $notrigger)
{
// Call trigger
- //$result=$this->call_trigger('BILL_SUPPLIER_MODIFY',$user);
- //if ($result < 0) $error++;
+ $result=$this->call_trigger('BILL_SUPPLIER_UPDATE',$user);
+ if ($result < 0) $error++;
// End call triggers
}
}
diff --git a/htdocs/install/mysql/data/llx_c_typent.sql b/htdocs/install/mysql/data/llx_c_typent.sql
index 154798cdd4f..918230cc5a3 100644
--- a/htdocs/install/mysql/data/llx_c_typent.sql
+++ b/htdocs/install/mysql/data/llx_c_typent.sql
@@ -27,17 +27,20 @@
--
--
--- Types entreprises
+-- Types of thirdparties
--
delete from llx_c_typent;
-insert into llx_c_typent (id,code,libelle,active) values ( 0, 'TE_UNKNOWN', '-', 1);
-insert into llx_c_typent (id,code,libelle,active) values ( 1, 'TE_STARTUP', 'Start-up', 0);
-insert into llx_c_typent (id,code,libelle,active) values ( 2, 'TE_GROUP', 'Grand groupe', 1);
-insert into llx_c_typent (id,code,libelle,active) values ( 3, 'TE_MEDIUM', 'PME/PMI', 1);
-insert into llx_c_typent (id,code,libelle,active) values ( 4, 'TE_SMALL', 'TPE', 1);
-insert into llx_c_typent (id,code,libelle,active) values ( 5, 'TE_ADMIN', 'Administration',1);
-insert into llx_c_typent (id,code,libelle,active) values ( 6, 'TE_WHOLE', 'Grossiste', 0);
-insert into llx_c_typent (id,code,libelle,active) values ( 7, 'TE_RETAIL', 'Revendeur', 0);
-insert into llx_c_typent (id,code,libelle,active) values ( 8, 'TE_PRIVATE', 'Particulier', 1);
-insert into llx_c_typent (id,code,libelle,active) values (100, 'TE_OTHER', 'Autres', 1);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 0, 'TE_UNKNOWN', '-', NULL, 1);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 1, 'TE_STARTUP', 'Start-up', NULL, 0);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 2, 'TE_GROUP', 'Grand groupe', NULL, 1);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 3, 'TE_MEDIUM', 'PME/PMI', NULL, 1);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 4, 'TE_SMALL', 'TPE', NULL, 1);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 5, 'TE_ADMIN', 'Administration',NULL, 1);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 6, 'TE_WHOLE', 'Grossiste', NULL, 0);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 7, 'TE_RETAIL', 'Revendeur', NULL, 0);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 8, 'TE_PRIVATE', 'Particulier', NULL, 1);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values (100, 'TE_OTHER', 'Autres', NULL, 1);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values (231, 'TE_A_RI', 'Responsable Inscripto', 23, 0);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values (232, 'TE_B_RNI', 'Responsable No Inscripto', 23, 0);
+insert into llx_c_typent (id,code,libelle,fk_country,active) values (233, 'TE_C_FE', 'Consumidor Final/Exento', 23, 0);
diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
index 83bff51229a..a65ef413269 100644
--- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
+++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql
@@ -21,10 +21,15 @@
ALTER TABLE llx_c_paiement ADD COLUMN accountancy_code varchar(32) DEFAULT NULL AFTER active;
-insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (29,'FICHINTER_CLASSIFY_BILLED','Classify intervention as billed','Executed when a intervention is classified as billed (when option FICHINTER_DISABLE_DETAILS is set)','ficheinter',19);
+-- Defined only to have specific list for countries that can't use generic list (like argentina that need type A or B)
+ALTER TABLE llx_c_typent ADD COLUMN fk_country integer NULL AFTER libelle;
+
+INSERT INTO llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (29,'FICHINTER_CLASSIFY_BILLED','Classify intervention as billed','Executed when a intervention is classified as billed (when option FICHINTER_DISABLE_DETAILS is set)','ficheinter',19);
-insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values (11,'AC_INT','system','Intervention on site',NULL, 1, 4);
+INSERT INTO llx_c_actioncomm (id, code, type, libelle, module, active, position) values (11,'AC_INT','system','Intervention on site',NULL, 1, 4);
+
+
ALTER TABLE llx_accountingaccount add column entity integer DEFAULT 1 NOT NULL AFTER rowid;
ALTER TABLE llx_accountingaccount add column datec datetime NOT NULL AFTER entity;
ALTER TABLE llx_accountingaccount add column tms timestamp AFTER datec;
diff --git a/htdocs/install/mysql/tables/llx_c_typent.sql b/htdocs/install/mysql/tables/llx_c_typent.sql
index 62d39cea8ad..06a41727b69 100644
--- a/htdocs/install/mysql/tables/llx_c_typent.sql
+++ b/htdocs/install/mysql/tables/llx_c_typent.sql
@@ -19,9 +19,10 @@
create table llx_c_typent
(
- id integer PRIMARY KEY,
- code varchar(12) NOT NULL,
- libelle varchar(30),
- active tinyint DEFAULT 1 NOT NULL,
- module varchar(32) NULL
+ id integer PRIMARY KEY,
+ code varchar(12) NOT NULL,
+ libelle varchar(30),
+ fk_country integer NULL, -- Defined only to have specific list for countries that can't use generic list (like argentina that need type A or B)
+ active tinyint DEFAULT 1 NOT NULL,
+ module varchar(32) NULL
)ENGINE=innodb;
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index fd3f8979532..00d2521c309 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -296,7 +296,7 @@ CurrentVersion=Dolibarr current version
CallUpdatePage=Go to the page that updates the database structure and datas: %s.
LastStableVersion=Last stable version
GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used: {000000} corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask. {000000+000} same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s. {000000@x} same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required. {dd} day (01 to 31). {mm} month (01 to 12). {yy}, {yyyy} or {y} year over 2, 4 or 1 numbers. -GenericMaskCodes2={cccc} the client code on n characters {cccc000} the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter. {tttt} The code of company type on n characters (see dictionary-company types). +GenericMaskCodes2={cccc} the client code on n characters {cccc000} the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter. {tttt} The code of thirdparty type on n characters (see dictionary-thirdparty types). GenericMaskCodes3=All other characters in the mask will remain intact. Spaces are not allowed. GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany done 2007-01-31: GenericMaskCodes4b=Example on third party created on 2007-03-01: diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index bdaaffdafe3..f35d493a485 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1800,18 +1800,21 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput global $conf,$langs; $ret=''; - $ret.=''; $ret.='\n"; return $ret; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index b3af35d5b3c..1770e046ed3 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -83,17 +83,17 @@ print '
"; diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 3cf38a58b90..766e44cf9a7 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -66,17 +66,17 @@ print '
| |||||||||||||||||||||||||||||||