2
0
forked from Wavyzz/dolibarr

Compare commits

...

893 Commits
4.0.0 ... 4.0

Author SHA1 Message Date
Laurent Destailleur
d7f7f5bf3d Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2020-01-10 19:42:34 +01:00
Laurent Destailleur
7c0a6946a7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2020-01-10 19:42:15 +01:00
Laurent Destailleur
1ecc1afa9e Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2020-01-10 19:41:49 +01:00
Laurent Destailleur
ceb1e699b7 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2020-01-10 19:37:16 +01:00
Laurent Destailleur
c028819cab FIX clone of purchase order 2020-01-10 19:35:49 +01:00
Laurent Destailleur
d59b1bb0c6 Merge 2018-11-23 11:44:07 +01:00
Laurent Destailleur
9d582a53ca Fix compatibility with new mysql versions 2018-11-23 11:28:28 +01:00
Laurent Destailleur
8eac45a762 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2018-11-10 15:48:07 +01:00
Laurent Destailleur
3d85407619 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2018-11-10 15:46:31 +01:00
Laurent Destailleur
ca1e3b4d55 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2018-11-10 15:15:33 +01:00
Laurent Destailleur
94bb1ac511 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2018-11-10 12:49:22 +01:00
Laurent Destailleur
8893d8d59f Fix compatiblity with new version of PHP 2018-11-10 11:56:23 +01:00
Laurent Destailleur
5bab9d59b2 Fix var_dump 2018-09-02 14:19:23 +02:00
Laurent Destailleur
e41b55af13 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2018-09-02 14:10:28 +02:00
Laurent Destailleur
a69c3caf2c Prepare compatibility with phpunit 6.1 2018-09-02 14:10:06 +02:00
Laurent Destailleur
e03d7eba8c Merge pull request #9254 from frederic34/patch-17
Build Badge by branch
2018-08-21 12:48:23 +02:00
Frédéric FRANCE
2aa0956f15 Update README.md 2018-08-16 16:08:04 +02:00
Frédéric FRANCE
bb09bcece4 Update README.md 2018-08-16 16:03:56 +02:00
Laurent Destailleur
94de6efa4b Merge pull request #8291 from ATM-Marc/FIX_order_export_date_livraison
FIX: add planned delivery to order exports
2018-03-07 12:59:32 +01:00
Marc de Lima Lucio
dd208348c4 FIX: add planned delivery to order exports 2018-03-07 12:18:08 +01:00
Laurent Destailleur
c0e719e3d8 Fix package scripts 2018-01-26 01:39:42 +01:00
Laurent Destailleur
5adeaf9d76 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2018-01-11 00:54:30 +01:00
Laurent Destailleur
9253fed754 Revert "Code comment"
This reverts commit 8000777864.
2018-01-11 00:17:32 +01:00
Laurent Destailleur
8000777864 Code comment 2018-01-10 20:43:56 +01:00
Laurent Destailleur
e4725f4248 FIX #7933 2017-12-10 20:55:51 +01:00
Laurent Destailleur
6de3a40546 Merge pull request #7916 from atm-ph/fix_4.0_require_class
Fix include class WorkboardResponse
2017-12-08 10:40:26 +01:00
atm-ph
c90ece1188 Fix include class WorkboardResponse 2017-12-06 14:22:37 +01:00
Laurent Destailleur
c7d0e917fb Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-12-02 14:12:43 +01:00
Laurent Destailleur
42b7d80567 FIX #7824
Conflicts:
	htdocs/product/stock/replenishorders.php
2017-11-17 14:12:53 +01:00
Laurent Destailleur
141df52dd6 Merge pull request #7741 from frederic34/patch-1
swap llxfooter() and $db->close()
2017-11-02 09:53:06 +01:00
Frédéric FRANCE
01a3787664 swap llxfooter() and $db->close() 2017-10-31 13:45:13 +01:00
Laurent Destailleur
783efd1a71 Merge pull request #7722 from fmarcet/4.0
FIX: paid supplier invoices are shown as abandoned
2017-10-28 22:01:30 +02:00
Ferran Marcet
9178d80349 Merge remote-tracking branch 'origin/4.0' into 4.0 2017-10-27 11:52:15 +02:00
Ferran Marcet
bc8127d685 Fix: paid supplier invoices are shown as abandoned on the consumption card. 2017-10-27 11:52:05 +02:00
Laurent Destailleur
9bcf01bf3f Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-10-27 02:30:55 +02:00
Laurent Destailleur
fed0f3d09e Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/core/lib/project.lib.php
	htdocs/projet/class/task.class.php
2017-10-27 02:30:33 +02:00
Laurent Destailleur
c387436a68 Merge pull request #7671 from simnandez/4.0
FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart
2017-10-22 03:20:22 +02:00
Laurent Destailleur
8ac7dd8e9a Merge pull request #7660 from atm-gauthier/fix_project_time_spent
FIX : wrong personnal project time spent
2017-10-22 02:26:34 +02:00
Juanjo Menent
75580f253e FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart 2017-10-20 12:57:32 +02:00
gauthier
3793ae323a FIX : wrong personnal project time spent 2017-10-19 09:46:19 +02:00
Laurent Destailleur
ef61407d95 Merge pull request #7459 from fmarcet/4.0
Fix: #7358 User can't create holiday requests
2017-09-24 21:54:33 +02:00
Laurent Destailleur
5776a948c4 Update card.php 2017-09-24 21:54:26 +02:00
fmarcet
72108c3a4e Fix: #7358 User can't create holiday requests with 'Create/modify your leave requests' rights 2017-09-21 15:59:50 +02:00
Laurent Destailleur
e61bcd03ed Fix travis 2017-09-16 13:03:27 +02:00
Laurent Destailleur
3295498e9e Remove code comment 2017-09-16 12:50:34 +02:00
Laurent Destailleur
e9912c020e Merge pull request #7333 from fappels/4.0_fix_transfer_line_extrafields
FIX transfer of line extrafields from order to invoice
2017-09-11 14:06:50 +02:00
fappels
7c743eb7da Rename $extrafields because already used 2017-09-07 21:04:15 +02:00
Laurent Destailleur
6701ad8b73 Merge pull request #7334 from fappels/4.0_fix_export_missing_sup_discount_qty
FIX missing supplier qty and supplier discount in available fields for product export.
2017-09-07 18:02:58 +02:00
fappels
5a75e14a8a Add supplier qty and supplier discount for export 2017-09-05 22:50:34 +02:00
fappels
f5e14c9d70 Transfer of customer order line extrafield should only transfer fields available in target 2017-09-05 21:41:49 +02:00
fappels
237270a27e Add missing transfer of line extrafields in create invoice from supplier order 2017-09-05 21:40:04 +02:00
Laurent Destailleur
67b5353861 Merge pull request #7327 from marcosgdf/bug-7000
FIX #7000 Dashboard link for late pending payment supplier invoices do not work
2017-09-04 10:54:58 +02:00
Laurent Destailleur
4dd58a94f3 Update list.php 2017-09-04 10:54:50 +02:00
Laurent Destailleur
1821be87e9 Merge pull request #7326 from marcosgdf/bug-7325
FIX #7325 Default VAT rate when editing template invoices is 0%
2017-09-04 10:53:07 +02:00
Laurent Destailleur
1154f871f1 Update fiche-rec.php 2017-09-04 10:52:49 +02:00
Marcos García
eb9e8c9dfc FIX #7000 Dashboard link for late pending payment supplier invoices do not work
Close #7000
2017-09-03 12:42:05 +02:00
Marcos García
ac7f1035e1 FIX #7325 Default VAT rate when editing template invoices is 0%
Close #7325
2017-09-03 12:25:27 +02:00
Laurent Destailleur
9fe1d8462a Merge pull request #7318 from atm-maxime/fix_extrafieldsline_insert
Fix extrafieldsline insert
2017-09-02 00:07:00 +02:00
Maxime Kohlhaas
cf49c274a6 Better fix 2017-09-01 10:38:50 +02:00
Maxime Kohlhaas
1a956cce9a Fix : insert line extrafield 2017-09-01 10:31:22 +02:00
Laurent Destailleur
256f6e410c Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-08-22 11:14:51 +02:00
Laurent Destailleur
d5d337c631 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-08-22 11:14:27 +02:00
Laurent Destailleur
71818da6a5 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2017-08-22 11:13:58 +02:00
Laurent Destailleur
c53aef9955 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.7 2017-08-22 10:51:30 +02:00
Laurent Destailleur
a18995d3dc Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2017-08-22 10:47:47 +02:00
Laurent Destailleur
112a6f7b44 Fix travis 2017-08-17 23:51:35 +02:00
Laurent Destailleur
9ad2a9ac85 Merge pull request #7248 from fappels/4.0_fix_best_buy_price_calculation
FIX Best buy price calculation
2017-08-10 13:51:01 +02:00
Laurent Destailleur
2a59dbbc89 Merge pull request #7243 from altatof/fix_fourcard_hooks
FIX : supplier id was not passed to hooks
2017-08-10 13:44:43 +02:00
fappels
ca3cdfabec FIX Best buy price calculation
Best buy price also depends on buy discount.
2017-08-09 14:15:26 +02:00
Laurent Destailleur
bfa8630feb Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-08-07 20:07:36 +02:00
Laurent Destailleur
0bf4ac6fb3 Add missing field fk_supplier_proposal 2017-08-07 20:06:26 +02:00
altatof
2be75420ca FIX : supplier id was not passed to hooks 2017-08-07 10:21:38 +02:00
Laurent Destailleur
51a3946519 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-08-04 15:29:18 +02:00
Laurent Destailleur
a3beceade2 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-08-04 15:28:55 +02:00
Laurent Destailleur
d345b9503a Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-08-04 15:28:03 +02:00
Laurent Destailleur
f8d6eb0d40 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-08-04 15:25:41 +02:00
Laurent Destailleur
7d9b9f96f0 Merge pull request #7234 from fmarcet/3.9
Fix: Correction in the calculation of the next week
2017-08-04 15:25:05 +02:00
Laurent Destailleur
3017e2b3a0 Merge pull request #7232 from ATM-Marc/FIX_future_accounting
FIX calculate correct remain to pay for planned bank transactions
2017-08-04 15:23:00 +02:00
Ferran Marcet
09c271b7c5 Fix: Correction in the calculation of the next week 2017-08-02 10:31:16 +02:00
Marc de Lima Lucio
adbb41799c FIX: calculate correct remain to pay for planned bank transactions 2017-08-01 11:08:58 +02:00
Laurent Destailleur
cd6a3afc77 Merge pull request #7191 from hregis/4.0_bug3
Fix: run_jobs return always an error !!
2017-07-31 02:21:37 +02:00
Regis Houssin
b932ce6246 Update cronjob.class.php
is better condition for use true or 0

if ($result === false || (! is_bool($result) && $result != 0))
2017-07-26 01:25:15 +02:00
Laurent Destailleur
d81fcd5f66 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-07-25 21:05:35 +02:00
Laurent Destailleur
b7c4f1f086 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/compta/facture.php
2017-07-25 21:05:15 +02:00
Regis Houssin
a52adcad4a Fix: change the condition 2017-07-25 13:52:10 +02:00
Laurent Destailleur
3ec2d6014b Merge pull request #7183 from hregis/4.0_bug2
Fix: wrong values if array used to force entity 0
2017-07-25 13:14:24 +02:00
Laurent Destailleur
585dde6cf5 Fix url 2017-07-23 19:06:47 +02:00
Regis Houssin
c9c375f3b8 Fix: run_jobs return always an error !! 2017-07-23 10:29:45 +02:00
Regis Houssin
2e63393bf2 Fix: wrong values if array used to force entity 0 2017-07-21 19:35:08 +02:00
Laurent Destailleur
1fcc2c4918 Merge pull request #7172 from atm-gauthier/3.9_fix_positivebuyingprice
FIX : Buying prices must always be in positive valueo
2017-07-21 15:13:48 +02:00
Laurent Destailleur
7e1d282b1b Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-07-18 15:12:28 +02:00
Laurent Destailleur
e41b98b5d4 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-07-18 15:12:03 +02:00
Laurent Destailleur
b215940277 Merge pull request #7174 from atm-maxime/fix_user_from_member
Fix : creating user from member was failing due to column size difference
2017-07-18 14:49:33 +02:00
Laurent Destailleur
e19167dffa Merge pull request #7154 from atm-ph/fix_3.9_contrat_updateline_extra
Fix updateline extrafields contrat fail
2017-07-18 14:30:55 +02:00
Maxime Kohlhaas
d35dbdea92 Change column size in sql table creation also 2017-07-18 10:16:59 +02:00
Maxime Kohlhaas
76eac7ce6a Fix : creating user from member was failing due to column size difference 2017-07-18 10:13:10 +02:00
gauthier
ccbeb162cf FIX : Buying prices must always be in positive valueo 2017-07-17 11:27:57 +02:00
phf
f1c23f25f0 Fix updateline extrafields contrat fail 2017-07-13 16:49:58 +02:00
Laurent Destailleur
715280b03a Merge pull request #7131 from atm-maxime/4.0
Fix : script to migrate photo path
2017-07-10 21:27:56 +02:00
Maxime Kohlhaas
f166c96ed5 Fix : script to migrate photo path 2017-07-09 13:09:17 +02:00
Laurent Destailleur
b461d24f52 Merge pull request #7119 from atm-alexis/FIX_situ_pdf_total_VAT
FIX invoice situation VAT total rounding into PDF crabe
2017-07-07 20:11:55 +02:00
Laurent Destailleur
249bfa3412 Merge pull request #7117 from atm-arnaud/FIX_insert_supplierpropale_det
Fix add supplierproposaldet without price (new product)
2017-07-07 20:09:52 +02:00
Laurent Destailleur
fd5f992be4 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-07-07 19:15:18 +02:00
Laurent Destailleur
4c1b485d47 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/compta/facture/list.php
2017-07-07 19:06:25 +02:00
Laurent Destailleur
12a41d7dd2 Merge pull request #7091 from atm-arnaud/FIX_referent_invoice_list_in_product_card
FIX status were wrong on product for invoice referent list
2017-07-07 19:03:19 +02:00
alexis Algoud
3d18c71201 FIX invoice situation VAT total rounding into PDF crabe 2017-07-05 17:21:37 +02:00
arnaud
1a71e9b4a0 FIX add supplierproposaldet without price (new product) 2017-07-05 16:57:03 +02:00
arnaud
ca6ce2ba8b FIX status were wrong on product referent list 2017-06-30 10:38:54 +02:00
Laurent Destailleur
724392a557 Merge pull request #7073 from fmarcet/3.9
FIX: User id correction on holiday request
2017-06-29 02:45:53 +02:00
fmarcet
4283b1ee30 FIX: User id correction on holiday request 2017-06-28 18:31:37 +02:00
Laurent Destailleur
f899408fc9 Merge pull request #7063 from atm-arnaud/FIX_invoice_page_list
FIX invoice page list
2017-06-27 18:37:51 +02:00
arnaud
65b9b70ff8 FIX invoice page list 2017-06-27 15:23:51 +02:00
Laurent Destailleur
a8d7764146 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-06-27 12:06:16 +02:00
Laurent Destailleur
99c7867522 Fix travis 2017-06-27 12:06:01 +02:00
Laurent Destailleur
480587c826 Fix travis errors 2017-06-25 02:28:07 +02:00
Laurent Destailleur
1f83bef1b5 Merge pull request #7035 from fmarcet/3.9
Fix: User id correction on holiday request
2017-06-20 00:57:10 +02:00
Laurent Destailleur
1745d06bb7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-06-19 19:56:16 +02:00
Laurent Destailleur
12d7b92556 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2017-06-19 19:52:49 +02:00
Laurent Destailleur
6fb0fc7b71 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2017-06-19 19:42:56 +02:00
Laurent Destailleur
f694939fc7 Fix migration with pgsql 2017-06-19 19:39:37 +02:00
fmarcet
c4546b6da6 FIX: User id correction on holiday request 2017-06-19 16:23:44 +02:00
Ferran Marcet
03eadcebf1 FIX: User id correction on holiday request 2017-06-19 12:25:00 +02:00
Laurent Destailleur
71641c5743 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-06-19 04:14:07 +02:00
Laurent Destailleur
ebc18cd2d4 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-06-19 04:13:24 +02:00
Laurent Destailleur
d0d9de37f4 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2017-06-19 04:05:40 +02:00
Laurent Destailleur
1bfdc7438a Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2017-06-19 04:03:26 +02:00
Regis Houssin
9352ecca1f Fix: PHP 7 - Fatal error: 'break' not in the 'loop' or 'switch' context 2017-06-19 04:01:34 +02:00
Laurent Destailleur
5cd5986211 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-06-19 02:59:49 +02:00
Laurent Destailleur
39419bb411 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-06-19 02:59:16 +02:00
Laurent Destailleur
774c624687 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2017-06-19 02:58:44 +02:00
Laurent Destailleur
5439390461 Merge branch '3.6' of git@github.com:Dolibarr/dolibarr.git into 3.7 2017-06-19 02:57:12 +02:00
Laurent Destailleur
6fc4dacd42 Fix migration opensurvey 2017-06-19 02:55:33 +02:00
Laurent Destailleur
83a5b8e078 FIX Can set supplier invoice to billed. 2017-06-14 10:13:33 +02:00
Laurent Destailleur
9c482b9f2a FIX CVE-2017-7886 2017-06-10 21:37:27 +02:00
Laurent Destailleur
d037515e37 FIX SQL injection on user/index.php parameter search_statut.
Conflicts:
	htdocs/user/index.php
2017-06-10 20:10:57 +02:00
Laurent Destailleur
cc37a7d848 Fix parenthesis 2017-06-09 13:11:34 +02:00
Laurent Destailleur
24eebfeb61 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-06-09 12:57:14 +02:00
Laurent Destailleur
36a72de080 Merge pull request #6924 from atm-maxime/3.9
Fix : SEPA XML address should also have dolEscapeXML
2017-06-06 10:26:46 +02:00
Maxime Kohlhaas
6787d717f9 Update bonprelevement.class.php 2017-06-03 18:23:19 +02:00
Laurent Destailleur
37a261587e Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-06-03 01:17:03 +02:00
Laurent Destailleur
1f451bf240 Merge pull request #6927 from atm-gauthier/4.0_fix_situation_percent_on_updateline_facture
FIX : situation_progress param default value must be 100 and not 0
2017-06-03 00:59:32 +02:00
gauthier
fb252706f9 FIX : situation_progress param default value must be 100 and not 0 2017-06-01 15:42:19 +02:00
Maxime Kohlhaas
0e175ba373 Fix : SEPA XML address should also have dolEscapeXML 2017-06-01 11:48:14 +02:00
Laurent Destailleur
d55cc58b8b Merge pull request #6914 from atm-maxime/3.9
Fix special char and size limit in SEPA XML
2017-05-31 19:08:05 +02:00
Laurent Destailleur
d70c14a411 Update bonprelevement.class.php 2017-05-31 19:07:39 +02:00
Laurent Destailleur
7c29e286f8 Prepare 4.0.7 2017-05-31 13:31:17 +02:00
Maxime Kohlhaas
510b1aedcf Fix xml SEPA $ListOfFactures not used and was listing all invoices in each XML line 2017-05-30 16:13:49 +02:00
Maxime Kohlhaas
200f4010d8 Fix special char and size limit in SEPA XML 2017-05-30 16:00:39 +02:00
Laurent Destailleur
bd891ea56a Deploy to server works even when cloudflare is active. 2017-05-30 00:26:02 +02:00
Laurent Destailleur
ef83a0c15e Merge 2017-05-29 21:29:17 +02:00
Laurent Destailleur
8edce66c08 Update ChangeLog for 4.0.6 2017-05-29 21:27:35 +02:00
Laurent Destailleur
eea6461369 Update ChangeLog for 4.0.6 2017-05-29 21:27:22 +02:00
Laurent Destailleur
f21ec76bc0 Exclude dir 2017-05-29 21:16:37 +02:00
Laurent Destailleur
86cbf7e35f Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-20 21:38:14 +02:00
Laurent Destailleur
2a9c6d9387 Complete ignore file 2017-05-20 21:11:31 +02:00
Laurent Destailleur
59517a1fa0 Merge pull request #6855 from olsesacl/#6813
FIX: #6813 No numbering model for supplier proposal module
2017-05-18 17:58:10 +02:00
Laurent Destailleur
d4fd222251 Merge pull request #6851 from atm-arnaud/FIX_hook_doactions_invoice_model
FIX doactions hook missing in invoice model page
2017-05-18 17:51:09 +02:00
Sergio Sanchis Climent
1a98886aa3 FIX: #6813 2017-05-17 00:42:29 +02:00
arnaud
c9738aa7ea FIX doactions hook missing in invoice model page 2017-05-16 11:34:00 +02:00
Laurent Destailleur
dec602a27b Merge pull request #6838 from atm-ph/fix_invoice_credit_note_standalone
Fix feature INVOICE_CREDIT_NOTE_STANDALONE doesn't work
2017-05-13 19:45:42 +02:00
Laurent Destailleur
419c15ee8e Fix escaping class 2017-05-12 15:28:10 +02:00
phf
b092b6861a Fix feature INVOICE_CREDIT_NOTE_STANDALONE doesn't work 2017-05-11 12:48:47 +02:00
Laurent Destailleur
ef5fd503cd Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-10 23:43:08 +02:00
Laurent Destailleur
b2e9d4cc21 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-10 23:42:49 +02:00
Laurent Destailleur
d7b142beb7 Merge pull request #6830 from jfefe/patch-12
Fix #6504: CVE-2017-7886
2017-05-10 23:41:19 +02:00
Laurent Destailleur
61a4382bd8 Merge pull request #6814 from fmarcet/3.9
FIX: Correction with author and validator user on orders
2017-05-10 23:11:21 +02:00
jfefe
d410a320d7 WIP #6504: CVE-2017-7886
'defaultlang' attribute was not filtered before database request which cause an SQL injection.
2017-05-10 20:32:54 +02:00
Ferran Marcet
dbcb60433b FIX: Correction with author and validator user on orders 2017-05-09 13:31:20 +02:00
Laurent Destailleur
4b42a5fd86 Merge pull request #6775 from marcosgdf/bug-6677
FIX #6677 Expired contracts dashboard box does not show the name of the thirdparty
2017-05-05 17:05:06 +02:00
Laurent Destailleur
e830ea6714 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-05 14:02:10 +02:00
Laurent Destailleur
8a37eeea74 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-05 14:02:02 +02:00
Laurent Destailleur
938d33941d Merge pull request #6780 from marcosgdf/php7-warnings
Corrected PHP7 warnings for several pages
2017-05-05 09:59:25 +02:00
Laurent Destailleur
9785e9b298 Update commonobject.class.php 2017-05-05 09:57:51 +02:00
Laurent Destailleur
db8c4a5ac4 Merge pull request #6760 from fappels/4.0_fix_download_delivery_doc
Fix download delivery and donation document
2017-05-05 09:21:19 +02:00
Laurent Destailleur
0c9f268f99 Merge pull request #6759 from ATM-Marc/FIX_supplier_order_rang
FIX supplier order line creation with rang = 0
2017-05-04 21:06:58 +02:00
Laurent Destailleur
1096177cce Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-04 09:57:57 +02:00
Laurent Destailleur
ee039c69a8 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-05-04 09:57:45 +02:00
Laurent Destailleur
4adfe6de70 Merge pull request #6725 from atm-gauthier/FIX_restrictedarea_document_contact
FIX : forgotten parameter for right multicompany use
2017-05-04 09:37:24 +02:00
Marcos García de La Fuente
7ae405a254 Corrected PHP7 warnings for several PDF document models 2017-05-02 14:08:20 +02:00
Marcos García de La Fuente
6e7fddee7d Corrected PHP7 warnings for function pdf_einstein::write_file 2017-05-02 14:07:04 +02:00
Marcos García de La Fuente
166f2d262d Corrected PHP7 warnings for function CommonObject::getTotalWeightVolume 2017-05-02 14:00:27 +02:00
Marcos García de La Fuente
d658a833c9 FIX #6677 Expired contracts dashboard box does not show the name of the thirdparty
Close #6677
2017-05-01 12:05:52 +02:00
Laurent Destailleur
fd72977505 Merge pull request #6690 from atm-gauthier/FIX_dateSelector
FIX : global $dateSelector isn't the good one, then date selector on …
2017-04-29 21:20:54 +02:00
Laurent Destailleur
50d65e3a9f Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/install/mysql/migration/repair.sql
2017-04-29 17:40:47 +02:00
fappels
18981ab0c9 Fix download donation document 2017-04-28 11:39:33 +02:00
fappels
c69a1205c0 Fix download delivery document 2017-04-26 19:06:41 +02:00
Marc de Lima Lucio
56e749df9f FIX: supplier order line were always created with rang = 0 2017-04-26 16:12:27 +02:00
Laurent Destailleur
a2287fd183 Add example of sql request to fix llx_product_price 2017-04-24 13:46:41 +02:00
Laurent Destailleur
587f5a76e6 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-04-24 12:59:51 +02:00
Laurent Destailleur
cd099bf3b1 Fix bad update of prices 2017-04-24 12:42:54 +02:00
Juanjo Menent
9bbfeed1bc Merge pull request #6722 from Christian-Seiler/3.9
Fix #5911 Added missing Slashes
2017-04-16 12:23:52 +02:00
Christian Seiler
e23a44bcdf Added missing Slashes
fixed line where two slashes were missing, that caused an error when creating barcodes.
2017-04-16 11:09:18 +02:00
Juanjo Menent
3a8608db19 Merge pull request #6697 from atm-maxime/fix_supp_prop_subprice
Fix Subprice was null in supplier proposal and line was not transfered to…
2017-04-16 11:08:41 +02:00
Laurent Destailleur
d2173c1fa4 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-04-15 16:24:42 +02:00
Laurent Destailleur
7fe66581f1 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-04-15 16:24:30 +02:00
Laurent Destailleur
72ff353e9f Fix repair of product_stock 2017-04-15 16:22:15 +02:00
Laurent Destailleur
2e759d5156 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-04-15 16:19:02 +02:00
Laurent Destailleur
086fa4385f Fix clean of product_batch 2017-04-15 16:17:22 +02:00
Laurent Destailleur
6f4ce8dc2f Merge remote-tracking branch 'origin/3.9' into 4.0 2017-04-12 14:22:47 +02:00
Maxime Kohlhaas
396ea54894 Subprice was null in supplier proposal and line was not transfered to supplier order 2017-04-12 11:09:49 +02:00
gauthier
8a373b25ba FIX : global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden 2017-04-11 12:41:19 +02:00
gauthier
30d58f77db FIX : forgotten parameter for right multicompany use 2017-04-11 11:33:05 +02:00
Laurent Destailleur
17da4f64a7 Merge pull request #6683 from marcosgdf/bug-6679
FIX #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
2017-04-11 11:21:14 +02:00
Laurent Destailleur
4d72165288 Merge pull request #6681 from marcosgdf/bug-6680
FIX #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
2017-04-11 11:20:52 +02:00
Laurent Destailleur
a7ccb175e5 Merge pull request #6676 from marcosgdf/bug-6675
FIX #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
2017-04-11 11:17:45 +02:00
Laurent Destailleur
5ae1b5457b Merge pull request #6674 from marcosgdf/bug-6673
FIX #6673 Missing "nature" table header in thirdparty list
2017-04-11 11:17:21 +02:00
Laurent Destailleur
fc735eaa4f Merge pull request #6672 from marcosgdf/bug-6671
FIX #6671 Cannot remove thirdparty type with "#" in its name
2017-04-11 11:16:58 +02:00
Laurent Destailleur
eb4236011b Merge pull request #6670 from marcosgdf/bug-6669
FIX #6669 User with no permission to edit customer invoices can see a edit button in project entry
2017-04-11 11:15:16 +02:00
Laurent Destailleur
50dbe39cda Merge pull request #6668 from marcosgdf/bug-6613
FIX #6613 Default subject for Supplier proposal emails is filled with a non-existing key
2017-04-11 11:14:47 +02:00
Laurent Destailleur
cd90dcb1e1 Merge pull request #6667 from marcosgdf/bug-6623
FIX #6623 User card shows "Return to list" link even if the user has no rights to list users
2017-04-11 11:14:25 +02:00
Laurent Destailleur
d4de81ed6d Merge pull request #6659 from altatof/fix_incoterm
FIX: dont get empty "Incoterms : - " string if no incoterm
2017-04-11 11:08:17 +02:00
Laurent Destailleur
e357aed3e1 Merge pull request #6655 from altatof/fix_reffourn
FIX: dont lose supplier ref if no supplier price in database
2017-04-11 11:01:43 +02:00
Laurent Destailleur
abf87a6946 Merge branch '4.0' into fix_reffourn 2017-04-11 11:00:35 +02:00
Laurent Destailleur
a6b7c812f2 Merge pull request #6684 from marcosgdf/recurring
Corrected translation errors and little bug showing a non-available button to a restricted user
2017-04-11 10:59:06 +02:00
Marcos García de La Fuente
996b5e9f87 Corrected translation errors and little bug showing a non-available button to a restricted user 2017-04-09 18:17:46 +02:00
Marcos García de La Fuente
12df7b6ab9 FIX #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
Close #6679
2017-04-09 18:09:08 +02:00
Marcos García de La Fuente
59fa5c2fe6 FIX #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
Close #6680
2017-04-09 17:38:59 +02:00
Marcos García de La Fuente
2057613ad9 FIX #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
Close #6675
2017-04-09 15:18:02 +02:00
Marcos García de La Fuente
2d83efc7e3 FIX #6673 Missing "nature" table header in thirdparty list
Close #6673
2017-04-09 15:03:02 +02:00
Marcos García de La Fuente
da0af36086 FIX #6671 Cannot remove thirdparty type with "#" in its name
Close #6671
2017-04-09 14:51:15 +02:00
Marcos García de La Fuente
411d276ed2 FIX #6669 User with no permission to edit customer invoices can see a edit button in project entry
Close #6669
2017-04-09 14:29:40 +02:00
Marcos García de La Fuente
a8da077613 FIX #6613 Default subject for Supplier proposal emails is filled with a non-existing key
Close #6613
2017-04-09 14:13:04 +02:00
Marcos García de La Fuente
74f0ae5bbb FIX #6623 User card shows "Return to list" link even if the user has no rights to list users
Close #6623
2017-04-09 14:09:33 +02:00
altatof
d892a89f45 FIX: dont get empty "Incoterms : - " string if no incoterm 2017-04-07 14:15:51 +02:00
altatof
919633b2be escape supplier ref 2017-04-07 12:10:01 +02:00
altatof
a6ec22d7fe FIX: dont lose supplier ref if no supplier price in database 2017-04-07 12:06:15 +02:00
Laurent Destailleur
fe4f71296f FIX #6636 Complete fix 2017-04-06 21:55:23 +02:00
Laurent Destailleur
5d099d24ee Merge pull request #6636 from defrance/patch-3
FIX : Categories Bank vs categories transactions
2017-04-06 21:48:14 +02:00
Laurent Destailleur
44302f1aea Merge pull request #6650 from atm-arnaud/FIX_total_line_on_list_facture
Fix total line on list facture
2017-04-06 21:11:32 +02:00
arnaud
6b2d8a3c34 FIX limit+1 dosn't show Total line 2017-04-06 11:14:15 +02:00
arnaud
ef7a334414 Merge branch '3.9' of github.com:Dolibarr/dolibarr into 3.9_dolibarr 2017-04-04 14:56:33 +02:00
BENKE Charlie
5b5380659e ERROR Categories Bank vs categories transactions
PB since 4.0, present in 5.0 and develop version
There is a confusion between the categorization function of bank accounts and the categorization function of the records. The categorization of the entries has been removed or it is not replaced by the categorization of the bank accounts.
I propose for the moment to restore the old category of writings but to envisage the creation of a new type of category "bank records" (or if it is not necessary with the new account) to leave so
2017-04-03 15:58:48 +02:00
Laurent Destailleur
00d485b2c5 Start 4.0.6 2017-04-02 22:09:06 +02:00
Laurent Destailleur
4d7b059eb3 Release 4.0.5 2017-04-02 18:50:34 +02:00
Laurent Destailleur
2164d93f36 Merge pull request #6622 from marcosgdf/bug-6505
FIX #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled
2017-03-31 19:22:49 +02:00
Laurent Destailleur
7b0c6ea940 Merge pull request #6620 from marcosgdf/bug-6619
FIX #6619 Template invoices list do not respect restricted thirdparty user rights
2017-03-31 18:41:46 +02:00
Laurent Destailleur
93b5801592 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-03-31 18:30:56 +02:00
Laurent Destailleur
911d5832c6 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-03-31 18:30:41 +02:00
Laurent Destailleur
b44143d24d Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-03-31 18:29:15 +02:00
Laurent Destailleur
b970596310 Merge pull request #6481 from Hugome/fix-agenda-merge
FIX : Agenda getCalendarEvents hook
2017-03-31 18:26:45 +02:00
Laurent Destailleur
b642a8fe51 Merge pull request #6609 from atm-ph/fix_4.0_photo_jpeg_not_show
Fix picture with jpeg extension are not visible
2017-03-31 17:43:46 +02:00
Marcos García de La Fuente
cd5b074a48 FIX #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled 2017-03-30 15:21:20 +02:00
Marcos García de La Fuente
2448b9ee55 FIX #6619 Template invoices list do not respect restricted thirdparty user rights 2017-03-30 14:52:26 +02:00
phf
2dc721c538 Fix picture with jpeg extension are not visible 2017-03-29 16:10:59 +02:00
Laurent Destailleur
90a90e1a3c FIX #6533 #6590 2017-03-28 12:45:09 +02:00
Laurent Destailleur
61031f1633 FIX Missing total on project overview. 2017-03-21 19:10:43 +01:00
Laurent Destailleur
e7e51d9e4f Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/projet/class/project.class.php
2017-03-21 17:19:30 +01:00
Laurent Destailleur
43e70830ed Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-03-21 17:18:41 +01:00
Laurent Destailleur
9e545e9628 Merge pull request #6538 from hregis/4.0_bug3
FIX wrong user fetch when same login in different entity
2017-03-18 03:55:20 +01:00
Regis Houssin
f03bdb91a4 Merge remote-tracking branch 'origin/4.0' into 4.0_bug3 2017-03-17 12:42:54 +01:00
Regis Houssin
9e944e4525 Fix: wrong user fetch when same login in different entity 2017-03-17 12:41:56 +01:00
Laurent Destailleur
9827887643 Merge pull request #6519 from marcosgdf/bug-multiprices
FIX Corrected bug where product multiprices admin page would not render properly due to a PHP fatal error
2017-03-14 10:45:47 +01:00
Laurent Destailleur
60a9268ff5 Merge pull request #6518 from marcosgdf/bug-6505
FIX #6505 Project elements page shows greyed-out links even if the option to show actions not available is disabled
2017-03-14 10:45:09 +01:00
Laurent Destailleur
214350a8f5 Merge pull request #6509 from marcosgdf/bug-6507
FIX #6507: Statistics counter show wrong total Contract numbers when the user does not have full access
2017-03-14 10:30:25 +01:00
Laurent Destailleur
53abc326b6 Merge pull request #6508 from marcosgdf/bug-6503
FIX #6503: SQL error in "Last pending payment invoices"
2017-03-14 10:25:59 +01:00
Laurent Destailleur
9e7230e63a Merge pull request #6484 from fmarcet/3.9
Fix: Error when references are numeric
2017-03-14 10:24:44 +01:00
Marcos García de La Fuente
15d0e6abc5 Corrected bug where product multiprices admin page would not render properly due to a PHP fatal error 2017-03-13 20:33:21 +01:00
Marcos García de La Fuente
cd349ab6cc FIX #6505 Project elements page shows greyed-out links even if the option to show actions not available is disabled
Close #6505
2017-03-13 20:17:31 +01:00
hugome
38ccf7ffdd Fix : Agenda getCalendarEvents hook
Return of getCalendarEvents on agenda page :
The array_merge change key of merged array.
2017-03-13 11:35:49 +01:00
Laurent Destailleur
6aeae12775 Fix medias could not be loaded 2017-03-13 02:28:58 +01:00
Marcos García de La Fuente
e9d5b44009 Fixed Project counter showing total amount of projects instead of just the projects current user can see 2017-03-12 15:31:39 +01:00
Marcos García de La Fuente
f15c6da887 Typo 2017-03-11 19:24:05 +01:00
Marcos García de La Fuente
e9c7b02049 FIX #6507: Statistics counter show wrong total Contract numbers when the user does not have full access
Close #6507
2017-03-11 19:22:01 +01:00
Marcos García de La Fuente
a39dccad19 FIX #6503: SQL error in "Last pending payment invoices"
Close #6503
2017-03-11 19:00:44 +01:00
Laurent Destailleur
277fa7dbe1 FIX #6444 2017-03-10 14:08:53 +01:00
Laurent Destailleur
fbbcec2ba3 FIX #6444 2017-03-10 14:04:06 +01:00
Laurent Destailleur
86d8fe1285 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-03-10 13:41:55 +01:00
Laurent Destailleur
1a57d1864a FIX #6443 2017-03-10 13:39:11 +01:00
Laurent Destailleur
427f656bac Merge pull request #6500 from atm-florian/4.0
FIX : Can use quote into supplier ref on order line add
2017-03-10 12:49:36 +01:00
Laurent Destailleur
6977daf76a Merge pull request #6491 from atm-gauthier/4.0_fix_supplierinvoiceline_fetch
FIX : forgotten fk_facture_fourn attribute on supplierinvoice line ob…
2017-03-10 12:31:20 +01:00
Laurent Destailleur
66d30344f9 Merge pull request #6490 from atm-gauthier/4.0_fix_fetch_infos_multicurrency
FIX : load multicurrency informations on supplier order and bill line…
2017-03-10 12:30:56 +01:00
Laurent Destailleur
bf34543085 FIX #6443 2017-03-10 12:19:50 +01:00
florian HENRY
9b10c9f6d1 FIX : Can use quote into supplier ref on order line add 2017-03-10 09:19:42 +01:00
gauthier
9eb3975803 FIX : forgotten fk_facture_fourn attribute on supplierinvoice line object 2017-03-07 15:18:20 +01:00
gauthier
b192b6cd50 FIX : multicurrency_subprice 2017-03-07 11:33:18 +01:00
gauthier
6e0589ce2c FIX : load multicurrency informations on supplier order and bill lines fetch 2017-03-07 10:55:17 +01:00
Laurent Destailleur
ee25a412dd Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/commande/list.php
2017-03-05 22:02:16 +01:00
Laurent Destailleur
3ff456d8ef Merge pull request #6472 from atm-gauthier/FIX_param_billed
FIX : param billed when we change page
2017-03-05 21:33:42 +01:00
fmarcet
e1f459d67a Fix: Error when references are numeric 2017-03-03 12:57:52 +01:00
gauthier
9cd807af1a FIX : param billed when we change page 2017-02-28 12:31:45 +01:00
Laurent Destailleur
f579fc6b2d Code comment 2017-02-27 12:07:38 +01:00
Laurent Destailleur
1be389fd3e FIX deletion of bank tag 2017-02-27 12:06:45 +01:00
Laurent Destailleur
10838983b5 FIX error management in bank account deletion. 2017-02-27 11:38:19 +01:00
Laurent Destailleur
024cecec29 FIX Error management during bank account creation 2017-02-27 11:16:46 +01:00
Laurent Destailleur
0f8a8869cb FIX Error management during bank account creation 2017-02-27 11:15:59 +01:00
Laurent Destailleur
cff284b2f3 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/compta/bank/categ.php
2017-02-27 10:55:18 +01:00
Laurent Destailleur
9ecc56ad4d Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-02-27 10:48:36 +01:00
Laurent Destailleur
e559834379 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-02-25 11:54:28 +01:00
Laurent Destailleur
08915d88d0 FIX the dolCopyDir fails if target dir does not exists. 2017-02-25 11:53:50 +01:00
Laurent Destailleur
b32c552fbc Merge pull request #6447 from aternatik/fix_6446
Fix #6446 : Event status lost after assign or remouve user
2017-02-22 14:21:50 +01:00
Laurent Destailleur
daf1dbb3a1 FIX #6453 2017-02-22 14:09:19 +01:00
Laurent Destailleur
32678015c9 FIX protection against infinite loop on hierarchy 2017-02-21 23:52:13 +01:00
Laurent Destailleur
089aa1df33 FIX If bank module on, field must be required to register payment of
expense report.
2017-02-21 17:10:32 +01:00
jfefe
0a9ffa58c1 FIX : event status is not modified when assign an user 2017-02-20 09:54:20 +01:00
Laurent Destailleur
d3eff46305 Merge pull request #6423 from atm-florian/4.0
FIX #6411
2017-02-17 10:45:24 +01:00
Laurent Destailleur
45eba9f62e Merge pull request #6420 from fmarcet/4.0
Fix: Bad code makes don't work for external modules numeration model
2017-02-17 10:33:48 +01:00
Laurent Destailleur
efd2e85f12 Merge pull request #6416 from laudeco/fix/password_forgotten
[mail; password; forgotten][#6334] - Fix mail url
2017-02-17 10:19:40 +01:00
fmarcet
c175dfe68b Fix: Bad code makes don't work for external modules numeration model 2017-02-15 09:47:18 +01:00
florian HENRY
89e6d86bf7 FIX #6411 2017-02-15 09:08:27 +01:00
fmarcet
e903bf2b5c Fix: Bad code makes don't work for external modules numeration model 2017-02-14 18:55:39 +01:00
De Coninck Laurent
294517a8e0 use already existing variable 2017-02-13 16:49:10 +01:00
Laurent Destailleur
25e8caa64e Fix reversing test for a test 2017-02-13 01:37:12 +01:00
Laurent Destailleur
bf32acaadd Fix control of module format. 2017-02-13 01:13:41 +01:00
Laurent Destailleur
290caba160 Merge pull request #6413 from atm-gauthier/3.8_FIX_delete_bank_class_when_delete_bank_categ
FIX : delete bank class lines when we delete bank_categ
2017-02-12 20:45:57 +01:00
De Coninck Laurent
b356c34dc4 [mail; password; forgotten][#6334] - Fix mail url
Fix the mail url  on password generation
2017-02-12 17:22:06 +01:00
Laurent Destailleur
a4f2325902 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-02-10 17:28:49 +01:00
Laurent Destailleur
a4d9f7dbbe Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-02-10 17:27:47 +01:00
Laurent Destailleur
d463511cff Fix: no way to know type of invoice. 2017-02-10 17:24:47 +01:00
gauthier
c01988ba43 FIX : delete bank class lines when we delete bank_categ 2017-02-09 17:28:37 +01:00
Laurent Destailleur
e74927a54c Merge pull request #6400 from atm-florian/4.0
FIX #6234
2017-02-08 19:22:46 +01:00
florian HENRY
ab0783edcc FIX #6234 2017-02-08 17:18:06 +01:00
Laurent Destailleur
882423f935 Merge pull request #6390 from fmarcet/3.9
Fix: Wrong vat calculation when split discounts
2017-02-08 11:01:08 +01:00
fmarcet
d5978a5092 Fix: Wrong vat calculation when split discounts 2017-02-07 14:02:27 +01:00
Laurent Destailleur
df6983b3c5 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-02-07 02:13:54 +01:00
Laurent Destailleur
d56b5f30c8 FIX #6330 2017-02-07 01:34:21 +01:00
Laurent Destailleur
b447501d72 Merge pull request #6371 from atm-arnaud/4.0_fix_trad_project_filter
Fix project filter traduction
2017-02-06 20:25:45 +01:00
arnaud
480d099d81 Fix project filter traduction 2017-02-03 16:19:13 +01:00
Laurent Destailleur
d7060b0c4b FIX #6360 2017-02-02 03:14:21 +01:00
Laurent Destailleur
09ebb1dcdc Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-02-02 02:23:58 +01:00
Laurent Destailleur
f31eaef0d9 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-02-02 01:21:58 +01:00
Laurent Destailleur
68a6a08a01 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2017-02-02 01:20:45 +01:00
Laurent Destailleur
797b68fc20 Merge pull request #6351 from atm-maxime/fix_banklink_expensereport
Fix : link to user in bank was wrong regarding expensereport payment
2017-02-02 01:18:04 +01:00
Laurent Destailleur
cfb317abdd Merge pull request #6348 from atm-arnaud/FIX_project_filter_supplier_order
FIX Supplier Order list filter by project
2017-02-02 01:14:04 +01:00
Laurent Destailleur
18f3e11c10 Merge pull request #6339 from atm-maxime/fix_numbering_display_error
Fix numbering was disaplying technical error instead of error message
2017-02-02 00:49:18 +01:00
Maxime Kohlhaas
90e8f062e9 Fix : link to user in bank was wrong regarding expensereport payment 2017-01-31 10:23:03 +01:00
arnaud
c79137d14c FIX Supplier Order list filter by project 2017-01-30 17:29:01 +01:00
Laurent Destailleur
4f76626f51 FIX Creation of credit note on invoice with deposit stole the discount. 2017-01-28 15:55:44 +01:00
Laurent Destailleur
2c07d2df22 Add comments 2017-01-28 15:08:46 +01:00
Laurent Destailleur
c88e63ecc9 FIX #6259 2017-01-28 15:01:17 +01:00
Laurent Destailleur
e2ce31e1a7 Add code comment 2017-01-28 14:54:51 +01:00
Laurent Destailleur
1e78c4c418 FIX Change the customer code only if error on duplicate 2017-01-28 14:54:06 +01:00
Laurent Destailleur
4bce208035 FIX detail of deposit and credit not was not visible into final invoice 2017-01-28 12:42:02 +01:00
Maxime Kohlhaas
7b6488b1c7 Fix numbering was disaplying technical error instead of error message 2017-01-27 10:05:57 +01:00
Laurent Destailleur
025036595d Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-01-27 01:23:56 +01:00
Laurent Destailleur
8a4e957554 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-01-27 01:23:44 +01:00
Laurent Destailleur
dae3e03603 Merge pull request #6323 from fappels/Fix_3.9_elephant_code_verif
Fix verify of elephant code model for services
2017-01-27 00:53:56 +01:00
Laurent Destailleur
1239e8600a Merge pull request #6326 from altatof/fix_entity_thirdpart_files
Fix entity thirdparty files links
2017-01-27 00:30:03 +01:00
Laurent Destailleur
4839d06fc3 Fix log 2017-01-26 12:48:32 +01:00
Laurent Destailleur
eac6ac0247 Fix fields into projet export 2017-01-26 10:41:02 +01:00
altatof
09dde659d5 FIX: add entity param to document link 2017-01-25 09:26:26 +01:00
altatof
d65cb29536 FIX: use param for http links 2017-01-25 09:25:06 +01:00
Laurent Destailleur
fd55ded996 Prepare 4.0.4 version 2017-01-24 18:45:57 +01:00
Laurent Destailleur
755d353dfa Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/core/class/html.formprojet.class.php
2017-01-24 18:41:29 +01:00
Laurent Destailleur
84fec7c5c7 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9
Conflicts:
	htdocs/core/class/html.formprojet.class.php
2017-01-24 18:40:01 +01:00
fappels
2be6011069 Fix product elephant verify for service 2017-01-23 20:59:32 +01:00
fappels
fcf99c9bc2 Merge remote-tracking branch 'refs/remotes/Dolibarr/3.9' into 3.9 2017-01-23 20:52:32 +01:00
Laurent Destailleur
eb09519a26 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-01-20 20:44:30 +01:00
Laurent Destailleur
9ebe383beb Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-01-20 20:44:19 +01:00
Laurent Destailleur
a47f3cb0e5 Merge pull request #6309 from atm-arnaud/FIX_calcul_marge_by_user_with_multicompany
FIX bug margin calcul by user with multicompany
2017-01-20 17:46:56 +01:00
arnaud
2cedcfece2 FIX bug margin calcul by user with multicompany 2017-01-20 12:01:20 +01:00
arnaud
ddbd6c371d MERGE DEGUEU 2017-01-20 11:58:30 +01:00
Laurent Destailleur
03c1521cde Merge pull request #6271 from altatof/fix_extra_input
FIX: extrafield input for varchar was not working with special char
2017-01-18 16:53:43 +01:00
Laurent Destailleur
f49552f6b7 Merge pull request #6297 from atm-arnaud/FIX_ajax_project_list_where
FIX all dolibarr versions about project list and ajax completion bug
2017-01-18 16:33:23 +01:00
arnaud
39f35bbaab FIX all dolibarr versions about project list and ajax completion bug 2017-01-17 11:17:40 +01:00
Laurent Destailleur
d21bb1e6b1 FIX #6237 2017-01-16 13:10:54 +01:00
Laurent Destailleur
fdbe4051f1 FIX #6230 2017-01-16 12:54:51 +01:00
Laurent Destailleur
9c60474953 FIX #6277 2017-01-16 11:06:17 +01:00
altatof
3dd160c663 use dol_escape_htmltag 2017-01-16 09:17:37 +01:00
Laurent Destailleur
9f17e56923 Merge pull request #6279 from hregis/4.0_bug3
Fix: search problem if name contains accents
2017-01-16 00:44:56 +01:00
Laurent Destailleur
25958c241b Merge pull request #6278 from hregis/4.0_bug2
Fix: avoid foreach error
2017-01-16 00:43:41 +01:00
Laurent Destailleur
ed6e3fe8a0 Merge pull request #6275 from hregis/4.0_bug
Fix: preview image not show with multicompany product sharing
2017-01-16 00:41:15 +01:00
Regis Houssin
f9ed1592e1 Fix: search problem if name contains accents 2017-01-15 16:07:04 +01:00
Regis Houssin
c3997194b2 Fix: avoid foreach error 2017-01-15 15:17:32 +01:00
Regis Houssin
fd4a19855d Fix: preview image not show with multicompany product sharing 2017-01-15 12:09:26 +01:00
Laurent Destailleur
1fd9f5e1fb Fix: host was twice into message id for smtp driver and swiftmailer was
not using dol_getprefix() to build host.
2017-01-14 13:27:44 +01:00
altatof
55c0a99bce fix was not at the right place 2017-01-13 15:42:07 +01:00
altatof
487b5b25db FIX: extrafield input for varchar was not working with special char
within (ie double quotes)
2017-01-13 15:37:33 +01:00
Laurent Destailleur
31818e8816 Fix missing translation 2017-01-13 15:32:20 +01:00
Laurent Destailleur
3a2f44adac Fix security permissions to edit/delete time spent 2017-01-13 14:24:39 +01:00
Laurent Destailleur
380b61a0e9 FIX Can make a stock transfert on product not on sale/purchase. 2017-01-12 21:56:50 +01:00
Laurent Destailleur
edb79de54e FIX javascript error 2017-01-12 18:07:19 +01:00
Laurent Destailleur
f185a09693 FIX Security access problem with external users on projects/tasks 2017-01-12 15:26:00 +01:00
Laurent Destailleur
8d5c853267 FIX Protection so even if link is output for external user, links is
disabled.
2017-01-12 15:12:53 +01:00
Laurent Destailleur
e82aa97d0e Merge pull request #6266 from simnandez/4.0
FIX #6245 Thirdparty link in supplier invoices list, links to "comm/card" instead of "fourn/card" page
2017-01-12 11:13:14 +01:00
Laurent Destailleur
5e71ff816f Increase limit for better backward compatibility without loosing minimum
security.
2017-01-12 10:51:31 +01:00
Laurent Destailleur
351c416ed8 Merge pull request #6265 from hregis/4.0_bug
Fix: avoid errors if constants values not exists
2017-01-12 10:49:23 +01:00
Laurent Destailleur
f408c886b6 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2017-01-12 10:16:32 +01:00
Laurent Destailleur
3d8c5b377b Fix string not translated 2017-01-12 10:16:19 +01:00
Laurent Destailleur
7a8a95c815 Merge pull request #6249 from KiteAtao/4.0
Fix #6247 #6248 Contact and Commands REST WebServices failed
2017-01-12 10:08:32 +01:00
Laurent Destailleur
94f14f529b Fix pb with double quote 2017-01-11 22:02:08 +01:00
Juanjo Menent
bcba4a1a38 FIX #6253 Supplier invoice list filter does not respect "thirdparty" filter 2017-01-11 20:48:32 +01:00
Juanjo Menent
ac58fd91af FIX #6253 Supplier invoice list filter does not respect "thirdparty" filter 2017-01-11 20:46:50 +01:00
Juanjo Menent
eb2ea07c76 FIX #6245 Thirdparty link in supplier invoices list, links to "comm/card" instead of "fourn/card" page 2017-01-11 20:32:39 +01:00
Regis Houssin
5898d27609 Fix: avoid errors if constants values not exists 2017-01-11 16:47:17 +01:00
Laurent Destailleur
1559c45a61 FIX link for not found photo when using gravatar. Must use external url 2017-01-10 09:24:55 +01:00
Laurent Destailleur
70e6c2d41f Fix bad count of nb of contacts in statistics 2017-01-10 00:42:28 +01:00
KiteAtao
5c76229cdf Fix Commands Api for REST WebServices 2017-01-07 21:46:49 +01:00
KiteAtao
3bb1756a13 Fix Contact Api for REST WebServices 2017-01-07 21:37:45 +01:00
Laurent Destailleur
983efdd6ee FIX repair tool was ko to restore extrafields with type select. 2017-01-04 18:13:36 +01:00
Laurent Destailleur
2aae4ea6ea FIX We must not drop column if there is still record on other entities. 2017-01-04 15:05:13 +01:00
Laurent Destailleur
157b17b6d5 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/filefunc.inc.php
	htdocs/langs/en_US/errors.lang
2017-01-03 01:31:58 +01:00
Laurent Destailleur
ecab8d874b Merge changelog 2017-01-03 01:30:07 +01:00
Laurent Destailleur
c953ae2a3d Merge pull request #6228 from marcosgdf/bug-6227
FIX #6227 Document models table header "Unit" is shown in 2 lines in Spanish
2016-12-31 16:35:00 +01:00
Marcos García de La Fuente
98599b0bbf FIX #6227 Document models table header "Unit" is shown in 2 lines in Spanish 2016-12-27 12:56:49 +01:00
Laurent Destailleur
635157be4c Fix bad translation 2016-12-26 12:36:30 +01:00
Laurent Destailleur
e297b64722 Several security fix in using mailings. 2016-12-26 12:35:10 +01:00
Laurent Destailleur
b2fbef4a91 Prepare 4.0.3 2016-12-25 23:04:59 +01:00
Laurent Destailleur
cdcbf58ca8 Prepare 3.9.5 2016-12-23 17:33:54 +01:00
Laurent Destailleur
9cc2a74221 Update changelog 2016-12-23 16:29:15 +01:00
Laurent Destailleur
a9beeec0b3 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-12-23 16:03:09 +01:00
Laurent Destailleur
8ce5ed0192 Fix position of discount on PDF with US letter format 2016-12-23 15:57:31 +01:00
Laurent Destailleur
99a501fcfb Merge pull request #6207 from aspangaro/4.0-p1
Fix: Accountancy - Problem on quadratus export
2016-12-23 00:52:47 +01:00
Laurent Destailleur
792da7f56d Merge pull request #6205 from fmarcet/4.0
FIX: Deposits and credit notes weren't added in column invoices list
2016-12-23 00:51:59 +01:00
Laurent Destailleur
293560f9c1 Fix missing ref is object is supplier object 2016-12-22 17:41:58 +01:00
Laurent Destailleur
39bd9a69ec Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-12-22 17:30:50 +01:00
Laurent Destailleur
b4ed0a1e12 Fix nb of lat approvals wrong 2016-12-22 17:30:39 +01:00
Laurent Destailleur
574f84bb84 Fix warning for approval delay. 2016-12-22 15:49:06 +01:00
aspangaro
d53a238b49 Fix: Accountancy - Problem on quadratus export 2016-12-22 06:12:42 +01:00
Ferran Marcet
ae7f49b5d8 FIX: Deposits and credit notes weren't added in the received and pending columns 2016-12-21 18:40:05 +01:00
Laurent Destailleur
f7e5898b4a Fix show a more accurate translation 2016-12-20 10:58:31 +01:00
Laurent Destailleur
94eeaf9ed0 Fix typo error 2016-12-19 18:47:21 +01:00
Laurent Destailleur
3f5d67d4d6 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-12-19 02:35:16 +01:00
Laurent Destailleur
0d1d68d5d9 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/admin/dict.php
	htdocs/product/price.php
2016-12-19 02:34:29 +01:00
Laurent Destailleur
876722733a Better fix to get localtax 2016-12-19 02:33:54 +01:00
Laurent Destailleur
74e00c4d80 More comment and hidden option to solve problems when sending emails. 2016-12-19 01:04:17 +01:00
Laurent Destailleur
dbf96b8f59 Log at wrong place 2016-12-18 23:32:31 +01:00
Laurent Destailleur
0e7da2cd22 FIX Label of project is in field title not label. 2016-12-18 11:55:30 +01:00
Laurent Destailleur
a37b1fb6c1 Merge pull request #6171 from fmarcet/4.0
FIX: Setting supplier as client when accept a supplier proposal
2016-12-18 11:09:33 +01:00
Laurent Destailleur
e0db9a8ca7 Merge pull request #6169 from atm-gauthier/FIX_ttc_and_ht_must_always_be_available
FIX : HT and TTC price should always be displayed together
2016-12-18 11:08:33 +01:00
Laurent Destailleur
47bf442c84 Merge pull request #6167 from atm-florian/4.0
GETPOST instead of $_GET
2016-12-18 10:59:27 +01:00
Laurent Destailleur
b3d5f40f37 Merge pull request #6166 from atm-gauthier/3.9_fix_wrong_test
FIX : wrong test on dict.php
2016-12-18 10:58:32 +01:00
Laurent Destailleur
27785323ae Merge pull request #6164 from hregis/4.0_bug
Fix: missing date locale and date rfc
2016-12-18 10:57:29 +01:00
Laurent Destailleur
c36d4b9894 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-12-18 02:17:21 +01:00
Laurent Destailleur
394e284a4a Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/core/class/CMailFile.class.php
	htdocs/langs/en_US/errors.lang
2016-12-18 02:16:40 +01:00
Laurent Destailleur
6830fdca98 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9
Conflicts:
	htdocs/product/class/product.class.php
2016-12-18 02:12:34 +01:00
Laurent Destailleur
321933f267 Fix deletion of product 2016-12-18 02:10:26 +01:00
Laurent Destailleur
73e6663230 Fix help/messages for emailing to warn users. 2016-12-17 14:47:06 +01:00
Laurent Destailleur
c5db333af8 Fix translation of error message when sending email 2016-12-17 14:00:39 +01:00
Laurent Destailleur
d8e394d3aa FIX Missing field 2016-12-16 17:09:15 +01:00
Laurent Destailleur
929904041d Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/conf/conf.php.example
	htdocs/langs/en_US/mails.lang
2016-12-16 13:53:34 +01:00
Laurent Destailleur
534e2b1282 FIX Security to restrict email sending was not efficient 2016-12-16 13:46:39 +01:00
Laurent Destailleur
7fdd6ccbd2 Prepare 4.0.3 2016-12-15 22:50:20 +01:00
Laurent Destailleur
8f3ce46c50 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-12-15 12:12:36 +01:00
Laurent Destailleur
2c4c48ad6f Better fix to add server name into email id. 2016-12-15 12:11:39 +01:00
Laurent Destailleur
d32fd7aa11 FIX javascript xss injection and a translation 2016-12-15 11:55:33 +01:00
Ferran Marcet
2777c4d4a5 FIX: Setting supplier as client when accept a supplier proposal 2016-12-14 18:35:59 +01:00
gauthier
1f1c75adfb FIX : HT and TTC price should always be displayed together 2016-12-14 15:50:50 +01:00
Laurent Destailleur
d2e4888bdd Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-12-14 12:21:33 +01:00
Laurent Destailleur
e4dd020887 Fix bad concat 2016-12-14 11:23:55 +01:00
Laurent Destailleur
af407a094a FIX Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of
tracking email.
2016-12-14 11:20:44 +01:00
Laurent Destailleur
56b3f2c011 FIX Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of
tracking email.
2016-12-14 10:36:11 +01:00
Laurent Destailleur
530d3503f5 FIX Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of
tracking email.
2016-12-14 10:32:31 +01:00
Regis Houssin
cb21ad2cc5 Merge remote-tracking branch 'origin/4.0' into 4.0_bug 2016-12-13 16:52:36 +01:00
florian HENRY
3992a92dd4 Merge branch '4.0' of https://github.com/Dolibarr/dolibarr.git into 4.0 2016-12-13 13:34:05 +01:00
Laurent Destailleur
43d18cd70c FIX if a supplier price reference is changed after creating an order, we
can't clone order.
2016-12-13 13:22:24 +01:00
gauthier
4dd740fe2f FIX : wrong test on dict.php 2016-12-13 11:41:26 +01:00
Regis Houssin
337509d40f Fix: missing date locale and date rfc 2016-12-13 09:40:08 +01:00
Juanjo Menent
5c4ab99a9a Merge pull request #6132 from simnandez/3.9
Fix #5646 Error editing Sell Price on products/services
2016-12-11 14:32:00 +01:00
Laurent Destailleur
95d8faef04 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/product/class/product.class.php
2016-12-11 10:51:15 +01:00
Laurent Destailleur
7fd75c793a FIX Regression when deleting product 2016-12-11 10:39:48 +01:00
Laurent Destailleur
9b436ce871 Merge remote-tracking branch 'origin/3.9' into 4.0
Conflicts:
	htdocs/product/class/product.class.php
2016-12-11 02:51:32 +01:00
Laurent Destailleur
b42a2616bc Merge remote-tracking branch 'origin/3.8' into 3.9
Conflicts:
	htdocs/install/mysql/migration/3.8.0-3.9.0.sql
2016-12-11 02:34:59 +01:00
Juanjo Menent
56aafa4660 Fix #5646 Error editing Sell Price on products/services 2016-12-10 23:25:13 +01:00
Laurent Destailleur
6e9d6b4e49 Merge pull request #6128 from simnandez/3.9
FIX #5853 $conf->global->$calc==0 || $conf->global->$calc==1
2016-12-10 23:17:33 +01:00
Juanjo Menent
5a2b8ff53c FIX #5853 $conf->global->$calc==0 || $conf->global->$calc==1 2016-12-10 22:41:53 +01:00
Laurent Destailleur
f49d332b73 Merge pull request #6113 from atm-maxime/3.8
Fix : delete product was not possible if batch stock
2016-12-10 13:16:50 +01:00
Laurent Destailleur
46d84f8f11 Merge pull request #6111 from simnandez/3.8
Fix: Delete surplus migration file
2016-12-10 13:16:16 +01:00
Maxime Kohlhaas
97e21cb775 Fix : delete product was not possible if batch stock 2016-12-10 13:05:46 +01:00
Juanjo Menent
829ff2299e Fix: Delete surplus migration file 2016-12-10 12:46:26 +01:00
Laurent Destailleur
08f27a5c28 Merge pull request #6076 from olsesacl/#6062
FIX: #6062 Can't add images to the description when edit product
2016-12-10 12:13:44 +01:00
florian HENRY
0f0db5a3fb fix: uniformize 2016-12-10 12:06:18 +01:00
Laurent Destailleur
45783e6bc5 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-12-10 12:04:56 +01:00
Laurent Destailleur
a45915e4a0 Better message after report on #5933 2016-12-10 12:04:13 +01:00
Laurent Destailleur
668937d7c9 Merge pull request #6097 from hregis/4.0_bug
Fix: contract use "total_vat" instead "total_tva"
2016-12-10 11:41:09 +01:00
Regis Houssin
239e42faa0 Fix: contract use "total_vat" instead "total_tva" 2016-12-09 13:04:05 +01:00
Laurent Destailleur
7a8ac224ed FIX A draft can be deleted by a user with create permission. 2016-12-09 00:18:27 +01:00
Sergio Sanchis Climent
79d6fa334b FIX: Consistent description for add or edit product 2016-12-08 13:12:10 +01:00
Sergio Sanchis Climent
863e569593 Merge branch '4.0' of https://github.com/Dolibarr/dolibarr into #6062 2016-12-08 13:11:07 +01:00
Laurent Destailleur
c2bee0f937 FIX #6088 2016-12-07 12:44:56 +01:00
Laurent Destailleur
b6463c52b6 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-12-07 11:54:57 +01:00
Laurent Destailleur
c75a00e683 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-12-07 11:54:41 +01:00
Laurent Destailleur
ad467989bf Merge pull request #6065 from atm-florian/3.9
FIX : delete contract extrafields on contract deletion
2016-12-07 11:54:04 +01:00
Laurent Destailleur
93764b7310 Merge pull request #6079 from jfefe/patch-11
Fix : bad function name in skeletons list
2016-12-07 11:52:21 +01:00
Laurent Destailleur
cfff6a8cb8 FIX Export of opportunity status must be code, not id. 2016-12-06 14:05:43 +01:00
Laurent Destailleur
0d7ab3301b FIX in export. Error when using a separate extrafields. 2016-12-06 11:52:07 +01:00
Laurent Destailleur
4abd417a6a Corrupted data must be fixed by repair not by code hack. 2016-12-03 19:50:52 +01:00
Laurent Destailleur
9c47f3d3fd Restore protection to avoid errors 2016-12-03 19:41:03 +01:00
Laurent Destailleur
6e5a8b6787 FIX Some statistics not compatible with multicompany module. 2016-12-03 19:14:16 +01:00
Laurent Destailleur
b0ac0624db FIX bad permission to see contract statistics 2016-12-03 18:21:55 +01:00
Laurent Destailleur
80f2623f9f FIX bad permission to see contract on home page 2016-12-03 18:20:57 +01:00
Laurent Destailleur
fe54673a87 FIX List of people able to validate an expense report was not complete. 2016-12-03 18:13:23 +01:00
Laurent Destailleur
69b5baebc5 FIX rendering of output of estimated amount on project overview page. 2016-12-03 15:54:06 +01:00
Laurent Destailleur
7a3b309013 Fix width 2016-12-03 15:22:26 +01:00
Laurent Destailleur
a75577516d Fix pb with multicompany on expense report 2016-12-03 15:13:04 +01:00
jfefe
64f76d8cab Fix : bad function name 2016-12-02 17:02:49 +01:00
Laurent Destailleur
b5453d5b73 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-12-02 14:52:54 +01:00
Laurent Destailleur
411e82b7a3 Fix button set to paid not always visible when it should. 2016-12-02 14:52:38 +01:00
florian HENRY
de5ad57af4 FIX : export extrafields must not include separe type 2016-12-02 12:02:08 +01:00
florian HENRY
191474a5db FIX : Update intervention lline crash with PgSQL 2016-12-02 11:35:12 +01:00
Sergio Sanchis Climent
6dfeaabad5 FIX: #6062 2016-12-01 22:28:29 +01:00
Laurent Destailleur
628d3ea6fa Merge pull request #6067 from atm-arnaud/FIX_propal_updateline_oldcopy_extrafields
Fix propal updateline oldcopy extrafields
2016-12-01 21:50:09 +01:00
arnaud
c17d354367 Fix propal updateline oldcopy extrafields 2016-11-30 16:48:27 +01:00
florian HENRY
5b6d5df159 FIX : delete contract extrafields on contract deletion 2016-11-30 16:02:55 +01:00
Laurent Destailleur
e846d74654 Fix sort on invlice list 2016-11-30 15:19:16 +01:00
Laurent Destailleur
711961ed18 Fix missing translation 2016-11-29 17:24:40 +01:00
Laurent Destailleur
f6734be1a1 Fix security hole. Add quick and fast hack to fix it 2016-11-29 17:08:44 +01:00
Laurent Destailleur
6e43910932 FIX Filter was wrong or lost during navigation 2016-11-28 18:38:48 +01:00
Laurent Destailleur
5e012bcc13 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-11-28 16:40:57 +01:00
Laurent Destailleur
196428edf5 FIX #6051 2016-11-28 16:34:38 +01:00
Laurent Destailleur
b2ed3f3053 Fix translation 2016-11-28 16:32:14 +01:00
Laurent Destailleur
8b569f9dfe Try a fix for #6024 2016-11-27 17:17:29 +01:00
Laurent Destailleur
ad912bed04 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-11-27 17:10:25 +01:00
Laurent Destailleur
c362e7cf2d FIX #6043 - Payment mode not visible on supplier invoice list 2016-11-27 17:10:07 +01:00
Laurent Destailleur
66901e8602 Merge pull request #6036 from hregis/4.0_bug
Fix: use string instead integer
2016-11-27 15:11:02 +01:00
Laurent Destailleur
1e647b082c Merge pull request #6034 from aternatik/api_rest_allow_post
FIX Minor fixes for REST API
2016-11-27 15:10:03 +01:00
Laurent Destailleur
b63ad019ce Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-11-26 15:49:11 +01:00
Laurent Destailleur
423391f12d Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-11-26 15:46:55 +01:00
Laurent Destailleur
e539842c28 Fix eatdate and selldate not correctly set. 2016-11-26 15:46:41 +01:00
Regis Houssin
0322104e8e Fix: use string instead integer 2016-11-24 17:27:32 +01:00
jfefe
b436df3202 Allow HTTP POST request for login API method.
This is more secure than do the request with sensitive value like password into URL parameters.
2016-11-22 23:44:10 +01:00
jfefe
3830c405a8 Disable CSRF check for REST API
This allow to do POST requests from another website.
2016-11-22 23:41:46 +01:00
Laurent Destailleur
5b49b7bca0 FIX #6010 2016-11-22 21:06:44 +01:00
Laurent Destailleur
cbd85f7b82 FIX #5958 no discount on supplier command made by replenishment 2016-11-22 20:50:13 +01:00
Laurent Destailleur
cad4acffd2 FIX #6029 2016-11-22 20:40:45 +01:00
Laurent Destailleur
15468d88a0 FIX #6007 2016-11-22 20:36:01 +01:00
Laurent Destailleur
b10567f3b4 Fix bad css 2016-11-22 19:55:51 +01:00
Laurent Destailleur
cf0a9e8eb1 Push also intermediate debian files on debian package dir 2016-11-22 16:34:59 +01:00
Laurent Destailleur
fa3a8deade Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-11-20 15:39:05 +01:00
Laurent Destailleur
e3c529d483 FIX javascript error when using on mobile/smartphone 2016-11-20 15:38:48 +01:00
Laurent Destailleur
ef18964d3c Merge pull request #6004 from atm-gauthier/FIX_wrong_var_name
FIX : wrong var name
2016-11-19 20:58:21 +01:00
Laurent Destailleur
b538f13efb FIX Module gravatar was not triggered on thirdparty and contact card 2016-11-19 19:43:55 +01:00
Laurent Destailleur
b3b395df42 Backport a file to make migration easier 2016-11-17 19:28:19 +01:00
Laurent Destailleur
2d7d240c86 FIX the time spent on project was not visible in its overwiew 2016-11-17 17:03:50 +01:00
gauthier
8e7c0fa353 FIX : wrong var name 2016-11-17 14:21:19 +01:00
Laurent Destailleur
7d27e011a5 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-11-13 17:57:55 +01:00
Laurent Destailleur
502819db76 Fix solve warning 2016-11-13 17:57:18 +01:00
Laurent Destailleur
a5eb445a49 Merge pull request #5978 from aspangaro/4.0-p4
Fix #5973: EBP export uses simple cote instead of double cote
2016-11-12 11:02:27 +01:00
Laurent Destailleur
ae36daefbe Merge pull request #5981 from hregis/3.9_bug
Fix: missing encrypt data for llx_const
2016-11-12 11:01:47 +01:00
Regis Houssin
a1cccc021e Fix: missing encrypt data for llx_const 2016-11-12 09:48:34 +01:00
Laurent Destailleur
7ccc70e00d Fix as suggested for #5960 2016-11-11 15:29:48 +01:00
Laurent Destailleur
60e0b93ec1 FIX #5972 #5734 2016-11-11 15:29:41 +01:00
Laurent Destailleur
a605e0b972 Fix phpcs 2016-11-11 15:06:31 +01:00
Laurent Destailleur
e4617ec76c Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/core/filemanagerdol/connectors/php/config.php
	htdocs/viewimage.php
2016-11-11 15:03:05 +01:00
Laurent Destailleur
fd1c0f404c Merge pull request #5864 from hregis/4.0_bug
Fix: add possibility to change width type to prevent some display issues
2016-11-11 14:55:28 +01:00
Laurent Destailleur
f7e780fa9e Merge pull request #5967 from marcosgdf/bug-5966
FIX #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
2016-11-11 14:07:10 +01:00
aspangaro
fd09bdfb15 Fix #5973: EBP export uses simple cote instead of double cote 2016-11-11 14:06:33 +01:00
Laurent Destailleur
94544fb9ae Merge pull request #5968 from philazerty/patch-6
Update companies.lang
2016-11-11 14:06:21 +01:00
Laurent Destailleur
2b2bd03eda Merge pull request #5971 from atm-florian/4.0
FIX : translation missing
2016-11-11 14:05:59 +01:00
Laurent Destailleur
c2ce5c4eeb FIX False positive on services not activated 2016-11-10 11:54:02 +01:00
florian HENRY
9daac25519 Fix translation for CRON 2016-11-10 08:31:08 +01:00
Laurent Destailleur
71a573df61 FIX Pb in management of date end of projects 2016-11-09 17:46:30 +01:00
Laurent Destailleur
ff4eddb8dc Fix warning on project late 2016-11-09 17:37:58 +01:00
philazerty
24c12df356 Update companies.lang
Ajout du Gabon
2016-11-09 12:16:41 +01:00
Marcos García de La Fuente
c6f96a81d1 Little correction 2016-11-09 11:30:55 +01:00
Marcos García de La Fuente
0b594eab59 FIX #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them 2016-11-09 11:28:05 +01:00
Laurent Destailleur
e30622cbd8 FIX Bcc must not appears to recipient when using SMTPs lib 2016-11-09 00:10:02 +01:00
Laurent Destailleur
c45c24f80c FIX Must use external link into a forged email content. 2016-11-08 23:18:43 +01:00
Laurent Destailleur
f0151c5a4c Merge pull request #5955 from hregis/3.9_bug
FIX external access of fckeditor image (external emailing)
2016-11-08 14:29:52 +01:00
Laurent Destailleur
bb5df3beeb Fix missing tab 2016-11-07 04:02:16 +01:00
Laurent Destailleur
961f7a4e48 Fix label on tab 2016-11-07 00:32:28 +01:00
Laurent Destailleur
84ed82bb08 Better error message 2016-11-07 00:20:30 +01:00
Laurent Destailleur
90881f2fa9 FIX Sanitize title of ajax_dialog 2016-11-07 00:15:58 +01:00
Laurent Destailleur
15351a5a51 Fxi firstadmin param must take first active admin 2016-11-06 18:20:27 +01:00
Laurent Destailleur
f5d76ac0c7 Fix count of contact was not complete 2016-11-06 17:20:21 +01:00
Laurent Destailleur
9b64fbaa98 Fix having the css of extrafield on td is not enough to detect it. We
must have it on tr too.
2016-11-06 16:26:18 +01:00
Laurent Destailleur
fda5e1e2b2 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-11-06 14:13:57 +01:00
Laurent Destailleur
75cc6bcf75 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-11-06 14:12:57 +01:00
Laurent Destailleur
f516660c0f Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2016-11-06 14:10:37 +01:00
Laurent Destailleur
73f0159578 Fix phpunit 2016-11-06 14:08:55 +01:00
Regis Houssin
e33654cc45 Merge remote-tracking branch 'origin/3.9' into 3.9_bug 2016-11-04 10:22:43 +01:00
Regis Houssin
718adef600 Fix: external access of fkeditor image with multicompany 2016-11-04 10:21:20 +01:00
Regis Houssin
8b16eeb554 Fix: no login are required for fckeditor (external emailing) 2016-11-04 10:06:53 +01:00
Laurent Destailleur
73b5bad2da Fix missing hook init 2016-11-01 20:53:05 +01:00
Laurent Destailleur
6f061fc366 Fix css 2016-10-31 21:53:39 +01:00
Laurent Destailleur
ffe4ae5915 Fix php7 compatibility 2016-10-31 21:24:23 +01:00
Laurent Destailleur
3882fa0c3d Fix dol_buildpath with parameter 3. Add phpunit tests 2016-10-31 10:37:58 +01:00
Laurent Destailleur
090f13afa4 Fix missing id param 2016-10-30 22:10:00 +01:00
Laurent Destailleur
b4303470f8 Fix do not update instance status if method used to update other element 2016-10-30 15:42:43 +01:00
Laurent Destailleur
3ff8a49e4f Fix english 2016-10-30 14:50:17 +01:00
Laurent Destailleur
f3a35c0045 Fix: do not publish files 'none' to Sourceforge 2016-10-30 14:14:10 +01:00
Laurent Destailleur
de52106265 Fix: do not publish files 'none' to Sourceforge 2016-10-30 14:11:08 +01:00
Laurent Destailleur
f605f0dc77 Prepare 4.0.2 2016-10-30 02:35:20 +02:00
Laurent Destailleur
2b873e34ce Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-10-29 19:01:19 +02:00
Laurent Destailleur
17c1b3f1d2 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2016-10-29 19:00:43 +02:00
Laurent Destailleur
b8f8b6dcde Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-10-29 18:45:19 +02:00
Laurent Destailleur
78eaeab168 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-10-29 18:44:55 +02:00
Laurent Destailleur
7c75d98f9a FIX #5866 2016-10-29 18:43:12 +02:00
Laurent Destailleur
7c3356baff Merge pull request #5938 from hregis/3.9_bug
Fix: missing path of user photo
2016-10-29 17:58:57 +02:00
Laurent Destailleur
d675602291 Merge pull request #5925 from atm-ph/fix_4.0_fetch_multicurrency_by_code
Fix fetch multicurrency object from code must be filter by entity
2016-10-29 17:56:21 +02:00
Regis Houssin
d0bd1d5d36 Fix: missing path of user photo 2016-10-28 14:22:06 +02:00
Juanjo Menent
7acc14903c Merge pull request #5937 from atm-maxime/fix_supporder_vars_set
Fix : vars were not set after commande function
2016-10-28 11:18:15 +02:00
Juanjo Menent
57a8e053b4 Merge pull request #5936 from atm-maxime/fix_pdfmuscadet_hook_call
Fix bad parameter in hook call
2016-10-28 11:17:21 +02:00
Maxime Kohlhaas
3dbab863a7 Fix : vars were not set after commande function 2016-10-28 10:24:31 +02:00
Maxime Kohlhaas
be493fcf09 Fix bad parameter in hook call 2016-10-28 10:16:58 +02:00
Laurent Destailleur
413796f1ee Merge pull request #5926 from atm-ph/fix_4.0_create_first_currency
Fix on first activate module it must create if needed the first curre…
2016-10-26 10:58:02 +02:00
Laurent Destailleur
5e7c72068d Merge pull request #5923 from olsesacl/#5907
FIX: #5907 No translation string for PDF Proposal
2016-10-26 10:56:15 +02:00
phf
3e2f39fbc0 Fix on first activate module it must create if needed the first currency rate from general settings 2016-10-25 13:31:36 +02:00
phf
a947ac55f9 Fix get multicurrency rowid from code must be filtered by entity 2016-10-25 12:45:23 +02:00
phf
1dc0dfc065 Fix fetch multicurrency object from code must be filter by entity 2016-10-25 12:07:34 +02:00
Sergio Sanchis Climent
2a4517e1bc FIX: #5907 2016-10-24 19:21:41 +02:00
Laurent Destailleur
6bd219b117 Fix column task ref/label 2016-10-24 17:47:31 +02:00
Laurent Destailleur
e4da87d31c Merge pull request #5903 from atm-gauthier/FIX_thirdparty_margin
FIX : margin tab on customer card must filter on current entity invoices
2016-10-24 03:18:37 +02:00
Laurent Destailleur
9560ec54cc Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/compta/facture/list.php
2016-10-24 02:15:12 +02:00
Laurent Destailleur
acf8874c6a Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9
Conflicts:
	htdocs/core/lib/functions.lib.php
2016-10-24 02:11:49 +02:00
Laurent Destailleur
a6c2758ca2 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9
Conflicts:
	htdocs/core/lib/functions.lib.php
2016-10-24 02:10:17 +02:00
Laurent Destailleur
2f77549d2b Merge pull request #5897 from olsesacl/4-search-forun
FIX: Search provider by price
2016-10-24 02:04:01 +02:00
Laurent Destailleur
7dd3beaa5f Merge pull request #5893 from olsesacl/task_reference
FIX: Documents no change directory if change reference of the task.
2016-10-24 01:12:26 +02:00
Laurent Destailleur
8340316141 Merge pull request #5888 from olsesacl/trigger_expedition
Fix: Need declare $user for call trigger
2016-10-24 01:01:54 +02:00
Laurent Destailleur
adb05ec05b Merge pull request #5887 from simnandez/3.9
Fix: Bad localtaxes calc for Spain if VAT is 0. For >= 3.9.x
2016-10-24 01:01:42 +02:00
Laurent Destailleur
fe71c0cb2d Merge pull request #5886 from simnandez/3.8
Fix: Bad localtaxes calc for Spain if VAT is 0
2016-10-24 01:01:04 +02:00
Laurent Destailleur
6806bec859 Merge pull request #5882 from EuskalMoneta/bug-5849
FIX #5849 Loosing field company on member change
2016-10-24 00:12:25 +02:00
Laurent Destailleur
f0a183a8c7 Merge pull request #5905 from grandoc/4.0
Fix : Fatal error: Call to a member function fetch() on null for intervention
2016-10-24 00:11:51 +02:00
Laurent Destailleur
0b63cd867e Merge pull request #5913 from oldenboom/4.0
Fix donation list
2016-10-24 00:09:34 +02:00
Rembert Oldenboom
3304593c4d Merge branch 'fix_don_list' into 4.0 2016-10-23 17:12:30 +02:00
Rembert Oldenboom
246d09f979 Fix paging donations list 2016-10-23 17:11:55 +02:00
Rembert Oldenboom
25a29c8982 Revert "Cleanup"
This reverts commit 070980f5a6.
2016-10-23 17:04:43 +02:00
Rembert Oldenboom
65b986d9ec Revert "Cleanup"
This reverts commit 070980f5a6.
2016-10-23 17:04:21 +02:00
Rembert Oldenboom
070980f5a6 Cleanup 2016-10-23 16:59:57 +02:00
Rembert Oldenboom
9c6933a796 Fix pager 2016-10-23 16:53:45 +02:00
Laurent Destailleur
7ceb3cb62a FIX Avoid error 500 if phpexcel is disabled 2016-10-22 16:53:22 +02:00
Laurent Destailleur
ffcfe30529 FIX Avoid errors on debian 2016-10-22 16:51:54 +02:00
Laurent Destailleur
1c59721294 FIX Solve backup when using mysqldump that return warning 2016-10-22 16:20:51 +02:00
Laurent Destailleur
629af89986 FIX Solve backup when using mysqldump that return warning 2016-10-22 16:18:28 +02:00
philippe grand
14227549a8 Fix : Fatal error: Call to a member function fetch() on null 2016-10-21 16:03:56 +02:00
philippe grand
12af0de9f1 Merge remote-tracking branch 'upstream/4.0' into 4.0 2016-10-21 15:57:35 +02:00
Laurent Destailleur
c44aa8f4d7 Fix warnings 2016-10-21 13:23:39 +02:00
gauthier
a814e02d53 FIX : margin tab on customer card must filter on current entity invoices 2016-10-21 12:40:19 +02:00
Laurent Destailleur
3ca3b7ab78 Fix code comment 2016-10-21 10:36:11 +02:00
Sergio Sanchis Climent
78f1b428b0 FIX: Search provider by price 2016-10-19 21:42:53 +02:00
Sergio Sanchis Climent
4800918323 FIX: Documents no change directory if change reference of the task. 2016-10-18 23:17:45 +02:00
Laurent Destailleur
24ee2bce14 FIX Can edit the customer ref even if order is not draft. 2016-10-18 12:57:30 +02:00
Sergio Sanchis
81a31e8390 Fix: Need declare $user for call trigger 2016-10-18 10:52:07 +02:00
Juanjo Menent
f28c7bbc6d Fix: Bad localtaxes calc for Spain if VAT is 0. For >= 3.9.x 2016-10-18 10:20:09 +02:00
Juanjo Menent
6a944bb6a3 Fix: Bad localtaxes calc for Spain if VAT is 0 2016-10-18 10:11:42 +02:00
Laurent Destailleur
46c985d8cc FIX Hidden option PRODUCT_MAX_VISIBLE_PHOTO 2016-10-17 15:16:21 +02:00
Laurent Destailleur
47ed731242 Fix group by 2016-10-17 10:37:01 +02:00
Laurent Destailleur
2db38b4bcc Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/categories/class/categorie.class.php
	htdocs/societe/list.php
2016-10-16 19:02:36 +02:00
Laurent Destailleur
ab34885a89 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-10-16 18:34:31 +02:00
Laurent Destailleur
3d1ddbb923 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-10-16 18:34:20 +02:00
Laurent Destailleur
8edb51a017 FIX Extra fields of task not copied on project cloning 2016-10-16 18:27:39 +02:00
Xebax
ae249a964b FIX #5849 Verification du champ Societe sur une modification adherent 2016-10-16 13:19:36 +02:00
Laurent Destailleur
4c58793587 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-10-16 11:42:57 +02:00
Laurent Destailleur
2695f35284 Fix to avoid scroll on confirm popup 2016-10-16 11:40:10 +02:00
Juanjo Menent
f9a5074f2d Merge pull request #5879 from aspangaro/4.0-p3
Fix: Some problems with loan module
2016-10-16 10:37:39 +02:00
aspangaro
9ab0bfe905 Fix: Add another key for bank rather than to modify one 2016-10-16 06:50:13 +02:00
Juanjo Menent
87e8ac51be Merge pull request #5843 from simnandez/3.8
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
2016-10-15 17:18:35 +02:00
aspangaro
df581d8973 Fix: In payment card, only the capital is considered as a payment, interest and insurance are tax 2016-10-15 08:07:01 +02:00
aspangaro
25ba5074a7 Fix: Problem of presentation 2016-10-15 08:00:31 +02:00
aspangaro
1beaf003f0 Fix #5875: Links to loans are incorrect in the bank account transactions tab 2016-10-15 07:45:10 +02:00
aspangaro
380ab8bfa5 Fix: Show Ref/rowid of loan 2016-10-15 07:05:53 +02:00
aspangaro
49e2b1ffdb Fix: Error with language key 2016-10-15 06:56:38 +02:00
Laurent Destailleur
ac60dfa883 Merge pull request #5873 from olsesacl/facture_list_sql_mode
FIX: Error show list invoice when sql_mode=only_full_group_by
2016-10-15 02:22:20 +02:00
Laurent Destailleur
cec792f142 Merge pull request #5867 from aspangaro/4.0-p2
Fix: Missing language key
2016-10-15 02:16:14 +02:00
Laurent Destailleur
dda248cb57 Merge pull request #5870 from olsesacl/#5340
FIX: #5340 Importing Tiers problem with capital field
2016-10-15 02:16:00 +02:00
Laurent Destailleur
4fb66cf7a4 Better explanation for ftp module setup to avoid error with FTPS/SFTP. 2016-10-15 02:11:49 +02:00
Sergio Sanchis
63a7b506b1 Fix: Error if exist extrafield 2016-10-14 10:55:54 +02:00
Sergio Sanchis Climent
567f7e5365 FIX: #5340 2016-10-14 00:43:10 +02:00
aspangaro
0b08db16a1 Fix: Missing language key 2016-10-13 06:31:09 +02:00
Regis Houssin
6423b23fb3 Fix: use parameter instead constant 2016-10-12 15:36:51 +02:00
Regis Houssin
d848e98759 Fix: add possibility to change width type to prevent some display issues 2016-10-12 15:33:33 +02:00
Laurent Destailleur
24420edd46 Prepare 4.0.2 2016-10-11 14:36:13 +02:00
Laurent Destailleur
3eb8a667bc Fix clean of search criteria 2016-10-11 12:34:21 +02:00
Laurent Destailleur
b91b8c64b5 Fix sql error if we use separator extra field 2016-10-11 12:27:20 +02:00
Laurent Destailleur
789eab6098 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-10-11 12:21:16 +02:00
Laurent Destailleur
b2afe98060 Fix option unique of extrafields not saved 2016-10-11 12:20:14 +02:00
philippe grand
c46f76c0f2 better help 2016-10-09 11:32:48 +02:00
Juanjo Menent
ffd486e3d6 Fix #5843 best way fixing 2016-10-07 22:54:08 +02:00
Juanjo Menent
45dfb8ca62 Fix #5843 best way fixing 2016-10-07 22:32:11 +02:00
Juanjo Menent
298e5cee61 Fix #5843 best way fixing 2016-10-07 22:21:50 +02:00
Laurent Destailleur
6eca563131 Merge pull request #5846 from hregis/4.0_bug
Fix: remove pdfmake for avoid errors
2016-10-07 13:44:37 +02:00
Regis Houssin
bac21be15a Fix: remove for avoid errors 2016-10-07 13:32:34 +02:00
Regis Houssin
9e8d8c5f5c Fix: pdfmake is not present 2016-10-07 13:16:33 +02:00
Juanjo Menent
b7b18e3355 FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object 2016-10-07 10:12:25 +02:00
Laurent Destailleur
b787b1a3d2 Merge pull request #5828 from olsesacl/contracdet_add_edit
FIX: Contract Error insert or edit empty value MYSQL 5.7
2016-10-07 00:02:45 +02:00
Laurent Destailleur
a7fbb1e308 Merge pull request #5829 from olsesacl/#5779
FIX: #5779 Field 'File' is required
2016-10-06 23:59:02 +02:00
Laurent Destailleur
b19b624908 Merge pull request #5834 from simnandez/3.8
FIX: only show projects of related third if external user
2016-10-06 23:58:24 +02:00
Laurent Destailleur
02f4f6d039 Merge pull request #5839 from atm-florian/3.9
FIX : missing column into SQL on thridparty list
2016-10-06 23:56:18 +02:00
florian HENRY
ee20704a8a FIX : missing column into SQL on thridparty list 2016-10-05 17:20:56 +02:00
Laurent Destailleur
c1e10fa4e6 FIX Sql error in widget of product for stock alerts 2016-10-04 20:54:51 +02:00
Laurent Destailleur
6efbae0731 Fix title 2016-10-04 19:52:00 +02:00
Juanjo Menent
56245e2c9a FIX: only show projects of related third if external user 2016-10-04 16:51:44 +02:00
Sergio Sanchis Climent
ad52957439 FIX: #5779 2016-10-04 00:56:35 +02:00
Sergio Sanchis Climent
9024c225fd FIX: updateligne if $txlocaltax1 is null 2016-10-04 00:33:34 +02:00
Sergio Sanchis Climent
1dbb8d697e FIX: addline if $txlocaltax1 is empty 2016-10-04 00:26:39 +02:00
Laurent Destailleur
4f27ee4018 Add log 2016-10-03 12:40:04 +02:00
Laurent Destailleur
2cf9bf170e FIX Link on supplier invoice in widget was not clickable 2016-10-03 12:24:14 +02:00
Laurent Destailleur
6124c60157 FIX Nber of attached files were not reported in event report of email
sent
2016-10-03 00:44:01 +02:00
Laurent Destailleur
9fbe96dd38 Fix name of agenda tab 2016-10-02 21:31:32 +02:00
Laurent Destailleur
c0ea95df3e Enhance packager 2016-10-01 19:56:06 +02:00
Laurent Destailleur
49ea876b4a Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-10-01 19:24:29 +02:00
Laurent Destailleur
2c4a04ac8a FIX #5818 2016-10-01 19:23:44 +02:00
Laurent Destailleur
56ae7bf328 Merge pull request #5822 from aspangaro/4.0-p1
Fix: Not remove expensereport from menu. Menu of the module still in module file descriptor
2016-10-01 19:00:41 +02:00
Laurent Destailleur
6f26a7390e FIX #5752 Bug VAT NPR not propagated during proposal cloning 2016-10-01 18:33:37 +02:00
Laurent Destailleur
ea0687f613 FIX Vat not visible in dictionnary 2016-10-01 18:22:39 +02:00
Laurent Destailleur
4dfdf29a55 FIX #5742 error on project list if an extra field separator is added. 2016-10-01 18:00:17 +02:00
Laurent Destailleur
521008a698 FIX #5746 chrome php
Try a fix. Not sure it solved all problems reported
2016-10-01 17:27:52 +02:00
Laurent Destailleur
b45ea754ec FIX #5748 Bug: Error updating to 4.0.1 with Postgresql. Field must be
varchar.
2016-10-01 16:58:35 +02:00
Laurent Destailleur
cf7327a2a2 FIX #5750 Bug: CmailFile::server_parse enters an infinite loop if
$server_response is false
2016-10-01 16:41:12 +02:00
Laurent Destailleur
43da410b95 FIX #5763 Bug: Cannot Create Supplier Price Request 2016-10-01 16:36:01 +02:00
Laurent Destailleur
538274998b FIX #5770 Dolibarr doesn't modify correctly the hour of a task 2016-10-01 14:09:41 +02:00
Laurent Destailleur
91a9cb4178 Fix solution to avoid the .noexe 2016-10-01 14:02:24 +02:00
Laurent Destailleur
03c60f1b7d FIX #5802 Incoterms not set 2016-10-01 13:55:07 +02:00
Laurent Destailleur
d079247b2b FIX #5813 Bug: Incoterms not being read correctly 2016-10-01 13:32:24 +02:00
aspangaro
34cad213da Fix: Not remove expensereport from menu. Menu of the module still in module file descriptor. 2016-10-01 07:37:26 +02:00
Laurent Destailleur
aae4524fe2 Debug module accountancy 2016-09-30 18:38:48 +02:00
Laurent Destailleur
7bf1d6cc9c Push file signature on server 2016-09-30 16:05:33 +02:00
Laurent Destailleur
5d26565199 Package add version into xml integrity file. 2016-09-30 15:41:08 +02:00
Laurent Destailleur
2a6d8e77db FIX Lost filter on opportunities 2016-09-30 11:45:36 +02:00
Laurent Destailleur
8d2ae73663 FIX Menu users not visible on dolidroid. 2016-09-30 10:56:35 +02:00
Laurent Destailleur
17d9c15825 Better error message 2016-09-29 14:02:54 +02:00
Laurent Destailleur
2b8255590a Better error message 2016-09-29 13:55:46 +02:00
Laurent Destailleur
e6503c0d36 Better explanation 2016-09-29 12:52:28 +02:00
Laurent Destailleur
bac1f95e30 Fix consistency on permission. Missing the getLibStatut function. 2016-09-29 12:11:57 +02:00
Laurent Destailleur
214dc2cba0 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-09-29 10:49:00 +02:00
Laurent Destailleur
0b49d6316e Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-29 10:48:14 +02:00
Laurent Destailleur
ccd7100b7f Minor code fix 2016-09-29 10:43:53 +02:00
Laurent Destailleur
78c0945fe7 Fix menu switch on accountancy and picto of product not using correct
type.
2016-09-28 23:59:47 +02:00
Laurent Destailleur
ce910171c1 Merge pull request #5792 from fappels/4.0_fix_lot_delivery
FIX stock decrement of lot qty, only product stock qty was decremented
2016-09-28 20:21:20 +02:00
Laurent Destailleur
a90111cbf3 Merge pull request #5804 from simnandez/3.8
FIX: Failed to export contact categories with contact extra fields
2016-09-28 18:18:29 +02:00
Laurent Destailleur
bfd5bb37c5 Code comment 2016-09-28 18:07:31 +02:00
Juanjo Menent
30050b51f0 FIX: Failed to export contact categories with contact extra fields 2016-09-28 10:15:41 +02:00
fappels
3d58b0aef6 Fix livraison eatby and sellby parameters are dates 2016-09-28 00:22:29 +02:00
fappels
acbd00286c Fix stock decrement of lot qty on delivery 2016-09-26 17:31:55 +02:00
Laurent Destailleur
b50d92e712 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/compta/localtax/index.php
2016-09-26 14:16:53 +02:00
Laurent Destailleur
5d7f182f59 Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-26 14:14:56 +02:00
Laurent Destailleur
8775a51cec Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.8 2016-09-26 14:14:26 +02:00
Laurent Destailleur
67a1bf2b59 Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.8 2016-09-26 14:13:26 +02:00
Laurent Destailleur
e60d2b0ae5 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/core/actions_sendmails.inc.php
2016-09-26 14:10:39 +02:00
Laurent Destailleur
fac946dbb8 FIX The email test sender in email setup was broken 2016-09-26 14:08:14 +02:00
Laurent Destailleur
e531735444 Merge pull request #5777 from atm-florian/4.0_fixODTwithextrafieldsCheckbox
FIX : #5776
2016-09-26 00:49:02 +02:00
Laurent Destailleur
8829db7d65 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-25 16:45:16 +02:00
Laurent Destailleur
4cccaae831 Fix warning 2016-09-25 16:44:55 +02:00
florian HENRY
984a56adc5 FIX : #5776 2016-09-23 10:51:31 +02:00
Laurent Destailleur
dc45776d31 FIX Date visible on project overview 2016-09-23 10:32:19 +02:00
Laurent Destailleur
c6ef3778b7 FIX Creation of donation should go back on card after creation 2016-09-23 09:55:49 +02:00
Laurent Destailleur
039bf4aae9 Fix date 2016-09-22 19:16:29 +02:00
Laurent Destailleur
47b1f79030 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-09-22 18:48:34 +02:00
Laurent Destailleur
1642d7c23b Trans 2016-09-22 18:48:17 +02:00
Laurent Destailleur
8791a9f5f1 Fix date on Purchase Orders 2016-09-22 18:47:31 +02:00
Laurent Destailleur
448acbf7a1 Merge pull request #5766 from atm-florian/4.0
fix customer accountancy lines ventilaled bad href link
2016-09-22 09:15:52 +02:00
Laurent Destailleur
b2271bced1 Merge pull request #5768 from aspangaro/4.0-p49
Fix: Accountancy - Problem on Cegid Export Format & presentation
2016-09-22 09:15:19 +02:00
Laurent Destailleur
f9f95dec42 Merge pull request #5765 from hregis/3.9_bug
Fix: Using $this when not in object context
2016-09-22 09:10:56 +02:00
Laurent Destailleur
9c12444a03 Fix size of warehouse and height of confirm box 2016-09-21 18:20:18 +02:00
Laurent Destailleur
494d4783a7 Fix tab works when editing prices 2016-09-21 18:13:27 +02:00
Laurent Destailleur
1c15539bb4 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-09-21 01:27:25 +02:00
Laurent Destailleur
2c42697cae Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-21 01:26:22 +02:00
Laurent Destailleur
f1bb69eecf Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-21 01:26:03 +02:00
aspangaro
9a3305abf9 Fix: Accountancy - Problem on Cegid Export Format & presentation 2016-09-20 21:12:28 +02:00
florian HENRY
278bef8767 fix customer accountancy lines ventilaled bad href link 2016-09-20 16:48:32 +02:00
Regis Houssin
937f1fd3ee Fix: Using $this when not in object context 2016-09-20 12:19:17 +02:00
Laurent Destailleur
891297d165 Fix alignement 2016-09-19 17:12:53 +02:00
Laurent Destailleur
64dc44b796 FIX Value of payment term and project are not set on correct default
value when invoice generated from template.
2016-09-19 16:27:01 +02:00
Laurent Destailleur
079ed88119 Fix missing css 2016-09-19 13:57:18 +02:00
Laurent Destailleur
0c342284f0 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-09-18 22:01:14 +02:00
Laurent Destailleur
5fb55cc9de Fix css 2016-09-18 22:00:59 +02:00
Laurent Destailleur
a4c3a4588d FIX link "back to list" was not visible. 2016-09-18 14:12:49 +02:00
Laurent Destailleur
bef5c2748c Merge pull request #5756 from atm-maxime/fix_pgsql_supplierorder_list
FIX No ORDER BY needed for a COUNT sql, causes PGSQL error
2016-09-17 17:49:19 +02:00
Juanjo Menent
d0d14ea959 Merge pull request #5753 from olsesacl/4.0
FIX: #5699 Error when creating database backup dump file
2016-09-16 17:08:48 +02:00
Maxime Kohlhaas
5840ed8258 No ORDER BY needed for a COUNT sql, causes PGSQL error 2016-09-15 12:08:47 +02:00
Sergio Sanchis Climent
93b216e628 FIX: #5699 2016-09-15 05:18:08 +02:00
Juanjo Menent
b69f037dd3 Merge pull request #5740 from GPCsolutions/3.9-lineedit
Fixed product description field name in line edit.
2016-09-14 16:32:21 +02:00
Juanjo Menent
abe7d91bb5 Merge pull request #5739 from atm-ph/fix_4.0_clone_object
Fix clone object with "link" as extrafield
2016-09-14 16:31:36 +02:00
Juanjo Menent
8b13c36670 Merge pull request #5735 from atm-ph/fix_4.0_error_sql
Fix bad query
2016-09-14 16:27:51 +02:00
Raphaël Doursenaud
1d95720644 Fixed product description field name in line edit.
The POST value 'desc' was never evaluated and caused fields to blank
out on update action.
2016-09-13 11:38:57 +02:00
phf
0cf5ee2f28 Fix clone object with "link" as extrafield 2016-09-13 10:12:55 +02:00
Laurent Destailleur
20141ec9bc Fix default value of new table 2016-09-12 17:31:36 +02:00
phf
bd734de437 Fix bad query 2016-09-12 09:52:35 +02:00
Laurent Destailleur
4096981378 FIX #3128 2016-09-12 03:10:18 +02:00
Laurent Destailleur
34c19f9cf1 On non public page, access with a bad fetch id can return error 2016-09-12 02:50:50 +02:00
Laurent Destailleur
ac509d6565 FIX #2991 2016-09-12 02:47:36 +02:00
Laurent Destailleur
d6ea6d1725 Fix deprecated option should be on 2016-09-12 02:30:21 +02:00
Laurent Destailleur
3d8722ee69 FIX #2853 2016-09-12 02:19:25 +02:00
Laurent Destailleur
dbc017ae45 Fix bad merge 2016-09-12 02:05:09 +02:00
Laurent Destailleur
1fbf233f95 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/comm/propal/list.php
	htdocs/commande/list.php
	htdocs/compta/facture/list.php
	htdocs/contact/list.php
	htdocs/contrat/list.php
	htdocs/expedition/list.php
	htdocs/expensereport/list.php
	htdocs/fichinter/list.php
	htdocs/fourn/commande/list.php
	htdocs/product/reassort.php
	htdocs/product/reassortlot.php
	htdocs/product/stock/list.php
	htdocs/societe/list.php
	htdocs/supplier_proposal/list.php
	htdocs/theme/eldy/style.css.php
2016-09-12 01:50:38 +02:00
Laurent Destailleur
da41c3ffa7 Fix better fix to increase size of login_block to allow external icon. 2016-09-12 01:34:37 +02:00
Laurent Destailleur
4ea5068966 FIX Clean of search fields 2016-09-12 00:15:27 +02:00
Laurent Destailleur
828fe984e8 FIX #5734 2016-09-12 00:09:46 +02:00
Laurent Destailleur
1bb278a587 Fix #5712 2016-09-11 23:01:04 +02:00
Laurent Destailleur
08dc7ade3b Fix list of supplier price must show price compared to quantity. 2016-09-11 14:04:03 +02:00
Laurent Destailleur
9709c8bbbf FIX inversion customer/supplier price 2016-09-11 13:48:45 +02:00
Laurent Destailleur
79f19f5c66 Fix missing a filter billed=0 into link of billable orders 2016-09-10 17:48:57 +02:00
Laurent Destailleur
926e3fc6f9 Fix date must be with standard format 2016-09-10 17:43:28 +02:00
Laurent Destailleur
399addebfb FIX alignement of intervention status 2016-09-10 17:38:26 +02:00
Laurent Destailleur
530ae91e82 Fix missing information on main supplier proposal card, not on note tab. 2016-09-10 17:35:08 +02:00
Laurent Destailleur
9153400195 Merge pull request #5710 from fappels/4.0_debug_product_lot
FIX create shipment with lot and extrafield
2016-09-10 14:39:01 +02:00
Laurent Destailleur
f5884999a9 Merge pull request #5716 from hregis/3.9_bug
Fix: increase max-width when use externals modules
2016-09-10 14:33:13 +02:00
Laurent Destailleur
87fb00c293 Merge pull request #5727 from fmarcet/3.9
Fix: Search all  is lost on lists when pagination or when the columns…
2016-09-10 14:25:16 +02:00
Laurent Destailleur
3ecc82b770 Fix error message not reported 2016-09-10 13:00:31 +02:00
Laurent Destailleur
e10c89fba8 More log to help debug 2016-09-10 12:30:01 +02:00
Laurent Destailleur
8d3adfd1c9 Fix 2016-09-10 12:22:23 +02:00
Laurent Destailleur
41545e0d60 Fix compatibility of recurring invoices with postgresql 2016-09-10 05:26:31 +02:00
Laurent Destailleur
7c9996c840 Fix when creating recurring invoice, date next gen was not set 2016-09-10 05:25:07 +02:00
Laurent Destailleur
d821df070b Fix multicompany: recurring invoice must be in same env than template. 2016-09-10 04:33:23 +02:00
Laurent Destailleur
c28a62e051 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-09-10 02:59:10 +02:00
Laurent Destailleur
66cf9e333e Fix option MAIN_BUTTON_HIDE_UNAUTHORIZED 2016-09-10 02:58:46 +02:00
Juanjo Menent
d8f50f9acd Merge remote-tracking branch 'upstream/3.9' into 4.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2016-09-09 16:34:02 +02:00
Ferran Marcet
4777faf49b Fix: Search all is lost on lists when pagination or when the columns are sorted 2016-09-09 14:02:27 +02:00
Ferran Marcet
b5db70342b Fix: Search all is lost on lists when pagination or when the columns are sorted 2016-09-09 13:58:41 +02:00
Laurent Destailleur
efde12b489 Fix minor css 2016-09-09 09:21:27 +02:00
Juanjo Menent
e3c2299c67 Merge remote-tracking branch 'upstream/3.8' into 3.9
Conflicts:
	htdocs/admin/dict.php
	htdocs/fourn/class/fournisseur.commande.class.php
2016-09-08 18:52:44 +02:00
Laurent Destailleur
87165cd859 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-09-08 18:21:10 +02:00
Juanjo Menent
65ba409add Merge pull request #5724 from grandoc/4.0
fix : bad name
2016-09-08 18:17:39 +02:00
Laurent Destailleur
52801b13d9 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-09-08 18:16:50 +02:00
Juanjo Menent
ecfd3a0af5 Merge pull request #5722 from atm-ph/fix_4.0_multicurrency_rate_entity
Fix miss entity column in llx_multicurrency_rate
2016-09-08 18:16:21 +02:00
Juanjo Menent
fc8fe394db Merge pull request #5714 from aspangaro/4.0-p48
FIX: Problem of presentation with index supplier command
2016-09-08 18:13:47 +02:00
Laurent Destailleur
4fe4907b44 FIX Mandatory field payment term was not css highlighted. 2016-09-08 18:13:23 +02:00
Juanjo Menent
bdb55895fa Merge pull request #5713 from sanser/4.0
FIX: fileconf.php redundant else blocks
2016-09-08 18:11:44 +02:00
Juanjo Menent
ff632718fa Merge pull request #5719 from philippe-opendsi/3.8_patch_1
FIX #5705 Supplier Order's lines array initalisation
2016-09-08 18:06:25 +02:00
Juanjo Menent
b72794216e Merge pull request #5702 from simnandez/3.8
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
2016-09-08 18:05:57 +02:00
Laurent Destailleur
c3bb4a89e4 Fix late satus on contract service line 2016-09-08 17:53:04 +02:00
Laurent Destailleur
417b2f566f FIX Translation of "Name" is not a good choice for floow-up. 2016-09-08 17:31:42 +02:00
philippe grand
6fd14128ba fix : bad name 2016-09-08 16:37:30 +02:00
phf
7229b572dc Default entity 1 in llx_multicurrency_rate 2016-09-08 14:59:16 +02:00
phf
7917169961 Fix miss entity column in llx_multicurrency_rate 2016-09-08 14:53:59 +02:00
Laurent Destailleur
71cef95dda FIX Execute a dedicated job from its id may results of launching other
jobs too.
2016-09-08 13:01:50 +02:00
Laurent Destailleur
9aa6c72a11 FIX Update of maxnbrun on job list failed. 2016-09-08 12:37:51 +02:00
Philippe
972a2db3a3 No initialisation of the array before filling it. May cause some trouble when fetch is call several times and lines added or deleted 2016-09-08 11:40:39 +02:00
Laurent Destailleur
9affdc0886 Prepare 4.0.1 2016-09-08 11:23:26 +02:00
Laurent Destailleur
35145b7426 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-09-08 11:15:16 +02:00
Laurent Destailleur
2b7ef01e42 FIX SEC for HTB23302 2016-09-08 11:09:38 +02:00
Regis Houssin
5de88f6af1 Fix: increase max-width when use externals modules 2016-09-08 10:09:14 +02:00
aspangaro
2b43eb934f Fix: Problem of presentation with index supplier command 2016-09-07 22:25:37 +02:00
Sergiu Sandu
02698c5abb fileconf.php redundant else statements
Is it ok the 2 else blocks are the same?
2016-09-07 17:02:41 +01:00
Juanjo Menent
7bce5a354f Merge pull request #5703 from hregis/4.0_bug
Fix: Warning: preg_match(): No ending delimiter '/' found
2016-09-07 16:58:00 +02:00
fappels
7c772b7608 Fix insert expeditiondet_batch with extrafield
Line id of extraflied was used iso expeditiondet
2016-09-07 14:07:29 +02:00
fappels
6574ebcbff Replace non existing ref parameter
Replace non existing ref parameter with product_id and batch to fetch a
specific batch from a product.
Remove unused sceleton methods.
2016-09-07 12:40:15 +02:00
fappels
2f73409360 Merge remote-tracking branch 'refs/remotes/Dolibarr/4.0' into 4.0_debug_product_lot 2016-09-07 12:37:38 +02:00
Regis Houssin
36110da4bf Fix: Warning: preg_match(): No ending delimiter '/' found 2016-09-06 17:22:56 +02:00
Juanjo Menent
3078e6fa4b FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15) 2016-09-06 13:44:07 +02:00
Juanjo Menent
d2ef56f3f1 Merge remote-tracking branch 'origin/3.9' into 3.9 2016-09-06 13:03:27 +02:00
Juanjo Menent
4e5105c220 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-09-06 13:03:01 +02:00
Laurent Destailleur
666c62af04 Fix http into https 2016-09-06 00:59:31 +02:00
Laurent Destailleur
e07f65721a Fix css 2016-09-06 00:58:37 +02:00
Laurent Destailleur
d4c35b7131 Fix bad translation 2016-09-04 23:45:14 +02:00
Laurent Destailleur
f440e78fa6 FIX quick search boxes when nojs or when using smartphone 2016-09-03 12:56:49 +02:00
Laurent Destailleur
acdce83f9c Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/product/price.php
2016-09-02 22:37:01 +02:00
Laurent Destailleur
aab3b2837a FIX #5589 2016-09-02 22:34:37 +02:00
Laurent Destailleur
dc1bc33343 sql syntax 2016-09-02 21:48:02 +02:00
Laurent Destailleur
e19743519b FIX #5660 2016-09-02 21:44:52 +02:00
Laurent Destailleur
78b2e9e4bf FIX #5651 2016-09-02 21:40:07 +02:00
Laurent Destailleur
8c4324d912 FIX #5674 2016-09-02 21:15:48 +02:00
Laurent Destailleur
dc9c2f0ed7 FIX #5687 2016-09-02 21:10:46 +02:00
Laurent Destailleur
4fa94e3a25 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-09-02 19:25:04 +02:00
Laurent Destailleur
ba76f12a28 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 4.0
Conflicts:
	htdocs/product/price.php
	htdocs/product/stock/class/mouvementstock.class.php
2016-09-02 19:24:28 +02:00
Laurent Destailleur
9c8145eb88 Better fix for 416a0892d7 2016-09-02 19:19:13 +02:00
Laurent Destailleur
696b54c6c3 Merge branch '3.9' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-02 19:03:50 +02:00
Laurent Destailleur
70de814c3c Merge branch '3.8' of git@github.com:Dolibarr/dolibarr.git into 3.9 2016-09-02 19:03:31 +02:00
Laurent Destailleur
f4ada7f18e Merge pull request #5695 from fappels/4.0_delete_product_lot
FIX Delete product_lot data when product deleted
2016-09-02 18:44:21 +02:00
Laurent Destailleur
5c2af9b7bd Merge pull request #5694 from atm-ph/fix_3.8_address_empty
Fix lost value if use double quote
2016-09-02 18:42:32 +02:00
Laurent Destailleur
d6a4b58a68 Merge pull request #5685 from atm-gauthier/3.8_fix_header_title_commercial_area
FIX : header title in commercial area
2016-09-02 18:36:47 +02:00
Laurent Destailleur
570c228ee1 Merge pull request #5692 from fmarcet/3.9
Fix: An empty variable is used to update multiprice
2016-09-02 18:24:09 +02:00
Laurent Destailleur
5dc7c9c6e5 Merge pull request #5691 from fappels/3.9_fix_check_lot_dates
FIX #5642 Ignore time when checking lot dates
2016-09-02 18:23:04 +02:00
fappels
aedd813236 Delete product_lot when product deleted 2016-09-02 18:13:25 +02:00
phf
fcd5e1fb2c Fix lost value if use double quote 2016-09-02 15:30:42 +02:00
Juanjo Menent
328937e97a Merge pull request #5690 from aspangaro/4.0-p47
Fix: Info tab on product card - Double header
2016-09-02 13:46:14 +02:00
Juanjo Menent
fc6febee53 Merge pull request #5688 from grandoc/4.0
Fix: internationalized comments
2016-09-02 13:44:06 +02:00
Ferran Marcet
416a0892d7 Fix: An empty variable is used to update multiprice 2016-09-02 12:32:14 +02:00
fappels
1c626c01ee Ignore time when checking lot dates 2016-09-02 11:29:28 +02:00
aspangaro
a54784588b Fix: Info tab on product card - Double header 2016-09-01 22:39:01 +02:00
philippe grand
959f4d0ba0 internationalized comments 2016-09-01 19:44:49 +02:00
Laurent Destailleur
0961ce2a2c FIX Missing filter on environment 2016-09-01 01:08:01 +02:00
Laurent Destailleur
bf7a6380c9 Fix sort on wrong field 2016-09-01 01:00:28 +02:00
Laurent Destailleur
ec5bd2a8f8 Fix button create contract from order not visible sometimes 2016-09-01 00:40:48 +02:00
Laurent Destailleur
10ced563b3 Fix var $conf not defined 2016-08-31 19:39:12 +02:00
Laurent Destailleur
292993c14f Fix var $conf not defined 2016-08-31 19:37:34 +02:00
Laurent Destailleur
1360372a3c Fix hrm module 2016-08-31 18:57:27 +02:00
Laurent Destailleur
f04a3bf0c8 Fix sql error 2016-08-31 18:46:47 +02:00
Laurent Destailleur
56d6510472 Fix Quick hack to solve legal problem in some countries. 2016-08-31 18:36:32 +02:00
Laurent Destailleur
45fceaeea5 Fix another field not responsive 2016-08-31 16:14:31 +02:00
Laurent Destailleur
c4ae712bac Fix responsive design 2016-08-31 16:09:56 +02:00
Laurent Destailleur
95c2133b07 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-31 12:39:17 +02:00
Laurent Destailleur
8cfac3b5c3 FIX Several problems when using smartphone 2016-08-31 12:38:54 +02:00
gauthier
18cf2f8f8b FIX : header title in commercial area 2016-08-31 10:19:40 +02:00
Juanjo Menent
8fb70bd0ef Merge pull request #5681 from simnandez/4.0
Fix #5641 Dolibarr 4.0 RC2 bug when create new contract
2016-08-31 10:04:39 +02:00
Juanjo Menent
bc09fb1154 Merge remote-tracking branch 'upstream/4.0' into 4.0 2016-08-31 02:50:16 +02:00
Juanjo Menent
9e6429320a Fix #5641 Dolibarr 4.0 RC2 bug when create new contract 2016-08-31 02:47:42 +02:00
Juanjo Menent
ea6daeebbb Merge pull request #5675 from aspangaro/4.0-p46
Fix: VAT Area - Problem of presentation
2016-08-31 02:12:19 +02:00
Juanjo Menent
b1401d6566 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-08-31 01:50:04 +02:00
Laurent Destailleur
c2b503d90f Fix missing filter 2016-08-31 00:15:09 +02:00
Laurent Destailleur
42293089a0 Fix several fix into tab management of tasks 2016-08-30 20:16:58 +02:00
Laurent Destailleur
b06cc18568 Fix sort on amount 2016-08-30 11:53:42 +02:00
aspangaro
b85e9938e8 Fix: VATArea - Problem of presentation 2016-08-30 05:17:27 +02:00
Laurent Destailleur
216f7dbaee Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-30 00:21:56 +02:00
Laurent Destailleur
d7007bd16b Fix lang not loaded 2016-08-30 00:21:26 +02:00
Laurent Destailleur
ff0b424f74 Merge branch '4.0' of git@github.com:Dolibarr/dolibarr.git into 4.0 2016-08-29 18:18:35 +02:00
Laurent Destailleur
6b7d509e44 Fix css 2016-08-29 18:12:53 +02:00
Laurent Destailleur
b43bd371fd Merge pull request #5666 from aspangaro/4.0-p45
Fix: Wrong language key
2016-08-29 17:47:49 +02:00
Laurent Destailleur
13f61f2a63 Fix css 2016-08-29 17:36:18 +02:00
Laurent Destailleur
9c1ba67169 Fix css 2016-08-29 16:40:51 +02:00
Laurent Destailleur
8b959a09f2 Fix missing /form 2016-08-29 16:12:56 +02:00
Laurent Destailleur
2ba920a4cb Fix for jmobile 2016-08-29 11:33:48 +02:00
aspangaro
7cb4f85f6b Fix: Wrong language key 2016-08-29 07:30:39 +02:00
Laurent Destailleur
af070dad94 Fix sort of fields 2016-08-28 23:53:13 +02:00
Laurent Destailleur
385aca8bf2 Fix sort of list and number of records 2016-08-28 23:25:24 +02:00
Laurent Destailleur
a9e5668ea4 Fix for jmobile 2016-08-28 16:31:22 +02:00
Juanjo Menent
1253b73879 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-08-04 17:24:43 +02:00
Juanjo Menent
aadf52fe59 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-08-03 10:11:37 +02:00
Juanjo Menent
9e67249b98 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-07-25 12:43:44 +02:00
Juanjo Menent
600a10fa16 Merge remote-tracking branch 'upstream/3.9' into 3.9 2016-07-25 10:25:07 +02:00
fappels
8b275c6e5c Merge remote-tracking branch 'refs/remotes/Dolibarr/3.9' into 3.9 2016-06-22 13:03:51 +02:00
fappels
bd002656cd Merge remote-tracking branch 'refs/remotes/Dolibarr/3.9' into 3.9 2016-04-25 16:29:19 +02:00
fappels
f68d956eaa Merge remote-tracking branch 'refs/remotes/upstream/3.9' into 3.9 2016-03-14 17:50:18 +01:00
fappels
e020a859f0 Merge remote-tracking branch 'refs/remotes/upstream/3.9' into 3.9 2016-01-22 11:02:57 +01:00
430 changed files with 6146 additions and 3910 deletions

View File

@@ -2,6 +2,7 @@
# from Dolibarr GitHub repository.
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
dist: precise
sudo: required
language: php
@@ -10,7 +11,7 @@ php:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '5.6.29'
- '7.0'
- nightly
@@ -130,10 +131,10 @@ before_script:
echo "Set timezone"
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
echo
echo "Enabling APC for PHP <= 5.4"
#echo
#echo "Enabling APC for PHP <= 5.4"
# Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6!
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
#echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
echo
echo "Enabling Memcached for PHP <= 5.4"
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly!

294
ChangeLog
View File

@@ -12,6 +12,189 @@ Upgrading to any other version or any other database system is abolutely require
make a Dolibarr upgrade.
***** ChangeLog for 4.0.6 to 4.0.5 *****
FIX: #6613 Default subject for Supplier proposal emails is filled with a non-existing key
FIX: #6623 User card shows "Return to list" link even if the user has no rights to list users
FIX: #6636 Complete fix
FIX: #6669 User with no permission to edit customer invoices can see a edit button in project entry
FIX: #6671 Cannot remove thirdparty type with "#" in its name
FIX: #6673 Missing "nature" table header in thirdparty list
FIX: #6675 Restricted user with no agenda permissions can see a button to create appointment in thirdparty contact list
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty
FIX: #6679 User with restricted supplier invoice permissions can edit project, payment conditions, payment mode
FIX: #6680 User with restricted supplier invoice permissions sees "reopen" button even if he has no permission to do it
FIX: #6813
FIX: Correction with author and validator user on orders
FIX: doactions hook missing in invoice model page
FIX: dont get empty "Incoterms : - " string if no incoterm
FIX: dont lose supplier ref if no supplier price in database
FIX: forgotten parameter for right multicompany use
FIX: global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden
FIX: limit+1 dosn't show Total line
FIX: supplier order line were always created with rang = 0
***** ChangeLog for 4.0.5 to 4.0.4 *****
FIX: #6234
FIX: #6259
FIX: #6330
FIX: #6360
FIX: #6411
FIX: #6443
FIX: #6444
FIX: #6453
FIX: #6503: SQL error in "Last pending payment invoices"
FIX: #6505 Project elements page shows greyed-out links even if the option to show actions not available is disabled
FIX: #6507: Statistics counter show wrong total Contract numbers when the user does not have full access
FIX: #6533 #6590
FIX: #6619 Template invoices list do not respect restricted thirdparty user rights
FIX: #6621 Documents tab shows greyed out upload form even if the option to show actions not available is disabled
FIX: add entity param to document link
FIX: Can use quote into supplier ref on order line add
FIX: Change the customer code only if error on duplicate
FIX: Creation of credit note on invoice with deposit stole the discount.
FIX: delete bank class lines when we delete bank_categ
FIX: deletion of bank tag
FIX: detail of deposit and credit not was not visible into final invoice
FIX: Error management during bank account creation
FIX: error management in bank account deletion.
FIX: event status is not modified when assign an user
FIX: forgotten fk_facture_fourn attribute on supplierinvoice line object
FIX: If bank module on, field must be required to register payment of expense report.
FIX: load multicurrency informations on supplier order and bill lines fetch
FIX: Missing total on project overview.
FIX: multicurrency_subprice
FIX: param billed when we change page
FIX: protection against infinite loop on hierarchy
FIX: Supplier Order list filter by project
FIX: the dolCopyDir fails if target dir does not exists.
FIX: use param for http links
***** ChangeLog for 4.0.4 to 4.0.3 *****
FIX: #6227 Document models table header "Unit" is shown in 2 lines in Spanish
FIX: #6230
FIX: #6237
FIX: #6245 Thirdparty link in supplier invoices list, links to "comm/card" instead of "fourn/card" page
FIX: #6253 Supplier invoice list filter does not respect "thirdparty" filter
FIX: #6277
FIX: project list and ajax completion return wrong list.
FIX: bug margin calculation by user with multicompany
FIX: Can make a stock transfert on product not on sale/purchase.
FIX: extrafield input for varchar was not working with special char within (ie double quotes)
FIX: javascript error
FIX: link for not found photo when using gravatar. Must use external url.
FIX: Protection so even if link is output for external user, links is disabled.
FIX: repair tool was ko to restore extrafields with type select.
FIX: Security access problem with external users on projects/tasks
FIX: We must not drop extrafield column if there is still record on other entities.
FIX: regression with sedning email when introducing security options to restrict nb of email sending.
t
***** ChangeLog for 4.0.3 to 4.0.2 *****
FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
FIX: #5958 no discount on supplier command made by replenishment
FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
FIX: #5972 #5734
FIX: #6007
FIX: #6010
FIX: #6029
FIX: #6043 - Payment mode not visible on supplier invoice list
FIX: #6051
FIX: #6062
FIX: #6088
FIX: A draft can be deleted by a user with create permission.
FIX: bad permission to see contract on home page
FIX: bad permission to see contract statistics
FIX: Bcc must not appears to recipient when using SMTPs lib
FIX: Consistent description for add or edit product
FIX: delete contract extrafields on contract deletion
FIX: Deposits and credit notes weren't added in the received and pending columns
FIX: export extrafields must not include separe type
FIX: Export of opportunity status must be code, not id.
FIX: False positive on services not activated
FIX: Filter was wrong or lost during navigation
FIX: HT and TTC price should always be displayed together
FIX: if a supplier price reference is changed after creating an order, we can't clone order.
FIX: in export. Error when using a separate extrafields.
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
FIX: javascript error when using on mobile/smartphone
FIX: javascript xss injection and a translation
FIX: Label of project is in field title not label.
FIX: List of people able to validate an expense report was not complete.
FIX: Missing field
FIX: Module gravatar was not triggered on thirdparty and contact card
FIX: Must use external link into a forged email content.
FIX: Pb in management of date end of projects
FIX: Regression when deleting product
FIX: rendering of output of estimated amount on project overview page.
FIX: Sanitize title of ajax_dialog
FIX: Security to restrict email sending was not efficient
FIX: Setting supplier as client when accept a supplier proposal
FIX: Some statistics not compatible with multicompany module.
FIX: the time spent on project was not visible in its overwiew
FIX: Update intervention lline crash with PgSQL
FIX: wrong test on dict.php
FIX: wrong var name
***** ChangeLog for 4.0.2 compared to 4.0.1 *****
FIX: #5340
FIX: #5779
FIX: #5849
FIX: #5866
FIX: #5907
FIX: Addline if $txlocaltax1 is empty
FIX: Avoid error 500 if phpexcel is disabled
FIX: Avoid errors on debian
FIX: Can edit the customer ref even if order is not draft.
FIX: Documents not moved in new directory if we change reference of the task.
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is child of an already linked to object
FIX: Extra fields of task not copied on project cloning
FIX: Hidden option PRODUCT_MAX_VISIBLE_PHOTO
FIX: Link on supplier invoice in widget was not clickable
FIX: margin tab on customer card must filter on current entity invoices
FIX: missing column into SQL on thirdparty list
FIX: Nber of attached files were not reported in event report of email sent
FIX: only show projects of related third if external user
FIX: Search provider by price
FIX: Solve backup when using mysqldump that return warning
FIX: Sql error in widget of product for stock alerts
FIX: updateligne if $txlocaltax1 is null
***** ChangeLog for 4.0.1 compared to 4.0.0 *****
FIX: #2853
FIX: #2991
FIX: #3128
FIX: #5699
FIX: #5734
FIX: #5742 error on project list if an extra field separator is added.
FIX: #5746 chrome php Try a fix. Not sure it solved all problems reported
FIX: #5748 Bug: Error updating to 4.0.1 with Postgresql. Field must be varchar.
FIX: #5750 Bug: CmailFile::server_parse enters an infinite loop if $server_response is false
FIX: #5752 Bug VAT NPR not propagated during proposal cloning
FIX: #5763 Bug: Cannot Create Supplier Price Request
FIX: #5770 Dolibarr doesn't modify correctly the hour of a task
FIX: #5776
FIX: #5802 Incoterms not set
FIX: #5813 Bug: Incoterms not being read correctly
FIX: #5818
FIX: alignement of intervention status
FIX: Clean of search fields
FIX: Creation of donation should go back on card after creation
FIX: Date visible on project overview
FIX: Execute a dedicated job from its id may results of launching other jobs too.
FIX: Failed to export contact categories with contact extra fields
FIX: inversion customer/supplier price
FIX: link "back to list" was not visible.
FIX: Lost filter on opportunities
FIX: Mandatory field payment term was not css highlighted.
FIX: Menu users not visible on dolidroid.
FIX: SEC for HTB23302
FIX: The email test sender in email setup was broken
FIX: Translation of "Name" is not a good choice for floow-up.
FIX: Update of maxnbrun on job list failed.
FIX: Value of payment term and project are not set on correct default value when invoice generated from template.
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
FIX: Vat not visible in dictionnary
***** ChangeLog for 4.0.0 compared to 3.9.* *****
For users:
@@ -55,7 +238,7 @@ NEW: Add hidden option to hide column qty ordered on shipments.
NEW: Add view of virtual stock into product list (when appropriate)
NEW: Add warning on tasks when they are late (add also the warning tolerance parameter)
NEW: Add weight/volume for one product into shipment export
NEW: Add width and height on product card
NEW: Add width and height on product table
NEW: allow a document to be linked to project from another customer on config
NEW: allow project to be shared across entities (for multicompany module)
NEW: All variant of ckeditor config can be tested into the setup page of module.
@@ -161,6 +344,115 @@ So if you included it into your module, change your code like this to be compati
if (! $res) include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
***** ChangeLog for 3.9.4 compared to 3.9.3 *****
FIX: #2853
FIX: #3128
FIX: #4447
FIX: #5128 if create method return duplicated code error not use GETPOST in order to get a new code
FIX: #5340
FIX: #5473
FIX: #5474 Country_id of "Don" object is still empty
FIX: #5534
FIX: #5535 bad dependency.
FIX: #5537 AJAX project search does not work properly
FIX: #5540 getFormMail is not registered as addReplace hook
FIX: #5544 Disabled Contact still appear in lists to send emails
FIX: #5549 getNomUrl tooltips show Order info even if user has no rights to read them
FIX: #5568
FIX: #5594
FIX: #5629 PgSQL Interger string stylish error
FIX: #5651
FIX: #5660
FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
FIX: #5907
FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
FIX: #6051
FIX: #6088
FIX: Can correct stock of lot using eatby or sell by date
FIX: Can make a movement on "out of sell" products
FIX: cannot update bank account on invoice if module order not activated
FIX: Can't create withdrawal document
FIX: delete contract extrafields on contract deletion
FIX: Direction of movement lost if an error occurs
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
FIX: export extrafields must not include separe type
FIX: External user must not be able to edit its discounts
FIX: Failed to export contact categories with contact extra fields
FIX: header title in commercial area
FIX: HT and TTC price should always be displayed together
FIX: incoterms
FIX: incoterms do not output into crabe invoice PDF
FIX: in PgSQL no quote "word style" is permitted around column name
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
FIX: margin tab on customer card must filter on current entity invoices
FIX: missing column into SQL on thridparty list
FIX: only show projects of related third if external user
FIX: PgSQL Module Ressource list crash #5637
FIX: php Strict
FIX: Regression when deleting product
FIX: Security to restrict email sending was not efficient
FIX: tag for date rfc in odt substitution
FIX: Update intervention lline crash with PgSQL
FIX: update limit stock on product stock
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
FIX: wrong test on dict.php
***** ChangeLog for 3.9.4 compared to 3.9.3 *****
FIX: #2853
FIX: #3128
FIX: #4447
FIX: #5128 if create method return duplicated code error not use GETPOST in order to get a new code
FIX: #5340
FIX: #5473
FIX: #5474 Country_id of "Don" object is still empty
FIX: #5534
FIX: #5535 bad dependency.
FIX: #5537 AJAX project search does not work properly
FIX: #5540 getFormMail is not registered as addReplace hook
FIX: #5544 Disabled Contact still appear in lists to send emails
FIX: #5549 getNomUrl tooltips show Order info even if user has no rights to read them
FIX: #5568
FIX: #5594
FIX: #5629 PgSQL Interger string stylish error
FIX: #5651
FIX: #5660
FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1
FIX: #5907
FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them
FIX: #6051
FIX: #6088
FIX: Can correct stock of lot using eatby or sell by date
FIX: Can make a movement on "out of sell" products
FIX: cannot update bank account on invoice if module order not activated
FIX: Can't create withdrawal document
FIX: delete contract extrafields on contract deletion
FIX: Direction of movement lost if an error occurs
FIX: Error when CATEGORIE_RECURSIV_ADD is enabled and new category is daughter of an already linked to object
FIX: export extrafields must not include separe type
FIX: External user must not be able to edit its discounts
FIX: Failed to export contact categories with contact extra fields
FIX: header title in commercial area
FIX: HT and TTC price should always be displayed together
FIX: incoterms
FIX: incoterms do not output into crabe invoice PDF
FIX: in PgSQL no quote "word style" is permitted around column name
FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email.
FIX: margin tab on customer card must filter on current entity invoices
FIX: missing column into SQL on thridparty list
FIX: only show projects of related third if external user
FIX: PgSQL Module Ressource list crash #5637
FIX: php Strict
FIX: Regression when deleting product
FIX: Security to restrict email sending was not efficient
FIX: tag for date rfc in odt substitution
FIX: Update intervention lline crash with PgSQL
FIX: update limit stock on product stock
FIX: vat dictionary should allow enter and edit multiple values for localtaxes, separated by: (ex -19:-15)
FIX: wrong test on dict.php
***** ChangeLog for 3.9.3 compared to 3.9.2 *****
FIX: #4383 $userid not defined
FIX: #4448 $filebonprev is not used, $this->filename now

View File

@@ -1,6 +1,6 @@
# DOLIBARR ERP & CRM
![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg) ![Downloads per day](https://img.shields.io/sourceforge/dm/dolibarr.svg)
![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/4.0.svg) ![Downloads per day](https://img.shields.io/sourceforge/dm/dolibarr.svg)
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda, ...).

View File

@@ -222,7 +222,13 @@ $dolibarr_main_prod='0';
# $dolibarr_main_limit_users='0';
# dolibarr_mailing_limit_sendbyweb
# Can set a limit for mailing send by web, can be used for a restricted mode.
# Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level.
# Default value: 0 (use database value if exist)
# Examples:
# $dolibarr_mailing_limit_sendbyweb='0';
# dolibarr_mailing_limit_sendbycli
# Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level.
# Default value: 0 (use database value if exist)
# Examples:
# $dolibarr_mailing_limit_sendbycli='0';

View File

@@ -1,7 +1,7 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Dolibarr
Upstream-Contact: Laurent Destailleur <eldy@users.sourceforge.net>
Source: http://www.dolibarr.org/files/stable/standard/
Source: https://www.dolibarr.org/files/stable/standard/
Files: *
Copyright: 2002-2009, Rodolphe Quiedeville <rodolphe@quiedeville.org>

View File

@@ -1,5 +1,10 @@
# Remove warning, we want to keep both standard and minified sources.
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jquery/*
# This is a textual data file
source-is-missing htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jsgantt/*
dolibarr: source-contains-prebuilt-javascript-object htdocs/includes/jstz/*
# Those are false positives, the files are their own sources since
# they are not minified
source-is-missing htdocs/includes/jsgantt/jsgantt.js *
source-is-missing htdocs/includes/jquery/plugins/colorpicker/jquery.colorpicker.js *
source-is-missing htdocs/includes/jquery/plugins/select2/select2.js *
source-is-missing htdocs/includes/jquery/plugins/select2/select2_locale_ar.js *

View File

@@ -353,10 +353,12 @@ begin
begin
// TODO Copy file or ask to install package ?
//CustomMessage('YouWillInstallDoliWamp')+#13#13
MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from <a href="http://ccc">http://www.microsoft.com/en-us/download/details.aspx?id=30679</a> then restart DoliWamp installation/upgrade.',mbInformation,MB_OK);
MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=30679">http://www.microsoft.com/en-us/download/details.aspx?id=30679</a> then restart DoliWamp installation/upgrade.',mbInformation,MB_OK);
end;
// Pb seems similar with msvcp110.dll
//vcredist_x64.exe
// If we have a new database version, we should only copy old my.ini file into new directory
// and change only all basedir= strings to use new version. Like this, data dir is still correct.
// Install of service and stop/start scripts are already rebuild by installer.

View File

@@ -32,11 +32,33 @@ if (substr($sapi_type, 0, 3) == 'cgi') {
exit;
}
require_once($path."../htdocs/master.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
// Main
/*
* Main
*/
if (empty($argv[1]))
{
print "Usage: ".$script_file." release=x.y.z\n";
exit -1;
}
parse_str($argv[1]);
if ($release != DOL_VERSION)
{
print 'Error: release is not version declared into filefunc.in.php.'."\n";
exit -1;
}
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
$outputfile=dirname(__FILE__).'/../htdocs/install/filelist.xml';
$outputdir=dirname(__FILE__).'/../htdocs/install';
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
dol_delete_file($outputdir.'/filelist*.xml',0,1,1);
$outputfile=$outputdir.'/filelist-'.$release.'.xml';
$fp = fopen($outputfile,'w');
fputs($fp, '<?xml version="1.0" encoding="UTF-8" ?>'."\n");
fputs($fp, '<checksum_list version="'.$release.'">'."\n");

View File

@@ -19,7 +19,7 @@ use Cwd;
# Change this to defined target for option 98 and 99
$PROJECT="dolibarr";
$PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr";
$PUBLISHBETARC="ldestailleur\@asso.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files";
#@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
@@ -159,6 +159,7 @@ $REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
$FILENAMETGZ2="$PROJECT-$MAJOR.$MINOR.$REL1";
$FILENAMERPM=$FILENAMETGZ2."-".$RPMSUBVERSION.".".$ARCH.".rpm";
$FILENAMERPMSRC=$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm";
# For Deb
$newbuild = $BUILD;
$newbuild =~ s/(dev|alpha)/1/gi; # dev
@@ -317,8 +318,13 @@ print "\n";
if ($CHOOSEDTARGET{'-CHKSUM'})
{
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filecheck_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
$ret=`php $SOURCE/build/generate_filecheck_xml.php release=$MAJOR.$MINOR.$BUILD`;
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
print $ret."\n";
# Copy to final dir
$NEWDESTI=$DESTI;
print "Copy \"$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml\" to $NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml\n";
use File::Copy qw(copy);
copy "$SOURCE/htdocs/install/filelist-$MAJOR.$MINOR.$BUILD.xml", "$NEWDESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml";
}
@@ -363,20 +369,23 @@ if ($nboftargetok) {
if (! $ret)
{
print "Error: The ChangeLogFile was not updated. Run the following command before building package for $MAJOR.$MINOR.$BUILD:\n";
if (! $BUILD || $BUILD eq '0-rc') # For a major version
{
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
else # For a maintenance release
{
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
print "\n";
exit;
}
else
{
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog'\n";
print "ChangeLog for $MAJOR.$MINOR\.$BUILD was found into '$SOURCE/ChangeLog. But you can regenerate it with commande:'\n";
}
if (! $BUILD || $BUILD eq '0-rc') # For a major version
{
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log `git rev-list --boundary '.$MAJOR.'.'.$MINOR.'..origin/develop | grep ^- | cut -c2- | head -n 1`.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
else # For a maintenance release
{
print 'cd ~/git/dolibarr_'.$MAJOR.'.'.$MINOR.'; git log '.$MAJOR.'.'.$MINOR.'.'.($BUILD-1).'.. --no-merges --pretty=short --oneline | sed -e "s/^[0-9a-z]* //" | grep -e \'^FIX\|NEW\' | sort -u | sed \'s/FIXED:/FIX:/g\' | sed \'s/FIXED :/FIX:/g\' | sed \'s/FIX :/FIX:/g\' | sed \'s/FIX /FIX: /g\' | sed \'s/NEW :/NEW:/g\' | sed \'s/NEW /NEW: /g\' > /tmp/aaa';
}
print "\n";
if (! $ret)
{
exit;
}
print 'Run git tag -a -m "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'" "'.$MAJOR.'.'.$MINOR.'.'.$BUILD.'"'."\n";
@@ -509,6 +518,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimed*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/dolimod*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/factory*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/forceproject*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/lead*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/management*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
@@ -725,8 +735,8 @@ if ($nboftargetok) {
print "Remove target ".$FILENAMERPM."...\n";
unlink("$NEWDESTI/".$FILENAMERPM);
print "Remove target ".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm...\n";
unlink("$NEWDESTI/".$FILENAMETGZ2."-".$RPMSUBVERSION.".src.rpm");
print "Remove target ".$FILENAMERPMSRC."...\n";
unlink("$NEWDESTI/".$FILENAMERPMSRC);
print "Create directory $BUILDROOT/$FILENAMETGZ2\n";
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2`;
@@ -1132,16 +1142,27 @@ if ($nboftargetok) {
print "\nList of files to publish (BUILD=$BUILD)\n";
%filestoscansf=(
"$DESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml"=>'none', # none means it won't be published on SF
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'Dolibarr installer for Fedora-Redhat-Mandriva-Opensuse (DoliRpm)',
"$DESTI/package_rpm_generic/$FILENAMERPMSRC"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'none', # none means it won't be published on SF
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'none', # none means it won't be published on SF
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'Dolibarr installer for Windows (DoliWamp)',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'Dolibarr ERP-CRM',
"$DESTI/standard/$FILENAMETGZ.zip"=>'Dolibarr ERP-CRM'
);
%filestoscanstableasso=(
"$DESTI/signatures/filelist-$MAJOR.$MINOR.$BUILD.xml"=>'signatures',
"$DESTI/package_rpm_generic/$FILENAMERPM"=>'package_rpm_generic',
"$DESTI/package_rpm_generic/$FILENAMERPMSRC"=>'package_rpm_generic',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_amd64.changes"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.dsc"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}.debian.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_debian-ubuntu/${FILENAMEDEBSHORT}.orig.tar.gz"=>'package_debian-ubuntu',
"$DESTI/package_windows/$FILENAMEEXEDOLIWAMP.exe"=>'package_windows',
"$DESTI/standard/$FILENAMETGZ.tgz"=>'standard',
@@ -1202,9 +1223,10 @@ if ($nboftargetok) {
my $filesize = -s $file;
if (! $filesize) { next; }
print "\n";
if ($target eq 'SF' && $filestoscan{$file} ne 'none') {
if ($target eq 'SF') {
if ($filestoscan{$file} eq 'none') {
next;
}
$destFolder="$NEWPUBLISH/$filestoscan{$file}/".$MAJOR.'.'.$MINOR.'.'.$BUILD;
}
elsif ($target eq 'ASSO' and $NEWPUBLISH =~ /stable/) {
@@ -1221,6 +1243,8 @@ if ($nboftargetok) {
$filenameonly =~ s/.*\/[^\/]+\/([^\/])+$/$1/;
$destFolder="$NEWPUBLISH/$dirnameonly";
}
print "\n";
print "Publish file ".$file." to ".$destFolder."\n";
# mkdir

View File

@@ -34,7 +34,7 @@ AutoReqProv: no
%description
An easy to use CRM & ERP open source/free software for small
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities.

View File

@@ -75,7 +75,7 @@ AutoReqProv: no
%description
An easy to use CRM & ERP open source/free software for small
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities.

View File

@@ -33,7 +33,7 @@ AutoReqProv: no
%description
An easy to use CRM & ERP open source/free software for small
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities.

View File

@@ -36,7 +36,7 @@ AutoReqProv: no
%description
An easy to use CRM & ERP open source/free software for small
An easy to use CRM & ERP open source/free software package for small
and medium companies, foundations or freelances. It includes different
features for Enterprise Resource Planning (ERP) and Customer Relationship
Management (CRM) but also for different other activities.

View File

@@ -162,7 +162,7 @@ export res=$?
# ---------------------------- copy demo files
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" `
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
if [ "x$documentdir" != "x" ]
then
echo cp -pr $mydir/documents_demo/* "$documentdir/"
@@ -174,7 +174,7 @@ then
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
else
echo Detection of documents directory failed so demo files were not copied.
echo Detection of documents directory from $mydir failed so demo files were not copied.
fi

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) ---Put here your own copyright and developer email---
* Copyright (C) 2016 Jean-François Ferry <jfefe@aternatik.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -220,7 +220,7 @@ $sql.= " t.rowid,";
$sql.= " t.field1,";
$sql.= " t.field2";
// Add fields for extrafields
foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key;
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
// Add fields from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
@@ -301,7 +301,7 @@ if ($resql)
$moreforfilter = '';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escpae_htmltag($search_myfield).'">';
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
$moreforfilter.= '</div>';
if (! empty($moreforfilter))

1
htdocs/.gitignore vendored
View File

@@ -4,6 +4,7 @@
/dolimed*
/ecommerce*
/extensions*
/forceproject*
/google*
/lead
/multicompany*

View File

@@ -43,13 +43,13 @@ $rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel');
// Security check
if (! $user->admin)
accessforbidden();
$object = new AccountingAccount($db);
// Action
if ($action == 'add') {
if ($action == 'add' && $user->rights->accounting->chartofaccount)
{
if (! $cancel) {
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
@@ -97,7 +97,7 @@ if ($action == 'add') {
}
header("Location: account.php");
exit;
} else if ($action == 'edit') {
} else if ($action == 'edit' && $user->rights->accounting->chartofaccount) {
if (! $cancel) {
$result = $object->fetch($id);
@@ -145,7 +145,7 @@ if ($action == 'add') {
header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id);
exit();
}
} else if ($action == 'delete') {
} else if ($action == 'delete' && $user->rights->accounting->chartofaccount) {
$result = $object->fetch($id);
if (! empty($object->id)) {
@@ -329,14 +329,14 @@ if ($action == 'create') {
print '<td colspan="2">' . $object->pcg_subtype . '</td></tr>';
// Active
print '<tr><td>' . $langs->trans("Activated") . '</td>';
print '<tr><td>' . $langs->trans("Status") . '</td>';
print '<td colspan="2">';
if (empty($object->active)) {
print $object->getLibStatut(4);
/*if (empty($object->active)) {
print img_picto($langs->trans("Disabled"), 'switch_off');
} else {
print img_picto($langs->trans("Activated"), 'switch_on');
}
}*/
print '</td></tr>';
@@ -350,13 +350,13 @@ if ($action == 'create') {
print '<div class="tabsAction">';
if ($user->admin) {
if (! empty($user->rights->accounting->chartofaccount)) {
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=update&id=' . $id . '">' . $langs->trans('Modify') . '</a>';
} else {
print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('Modify') . '</a>';
}
if ($user->admin) {
if (! empty($user->rights->accounting->chartofaccount)) {
print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
} else {
print '<a class="butActionRefused" href="#" title="' . dol_escape_htmltag($langs->trans("NotAllowed")) . '">' . $langs->trans('Delete') . '</a>';

View File

@@ -80,8 +80,8 @@ $max = 100;
$form = new Form($db);
$title = $langs->trans('FiscalYears');
llxHeader('', $title, LOG_ERR);
$helpurl = "";
llxHeader('', $title, $helpurl);
$sql = "SELECT f.rowid, f.label, f.date_start, f.date_end, f.statut, f.entity";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_fiscalyear as f";

View File

@@ -64,7 +64,7 @@ $formventilation = new FormVentilation($db);
$formother = new FormOther($db);
$form = new Form($db);
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
$search_accountancy_code_start = '';
$search_accountancy_code_end = '';

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,8 +19,8 @@
*/
/**
* \file htdocs/accountancy/bookkeeping/list.php
* \ingroup Advanced accountancy
* \file htdocs/accountancy/bookkeeping/list.php
* \ingroup Advanced accountancy
* \brief List operation of book keeping
*/
require '../../main.inc.php';
@@ -277,7 +277,7 @@ if ($result < 0) {
}
if ($action == 'delmouv') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvtPartial'), 'delmouvconfirm', '', 0, 1);
print $formconfirm;
}
if ($action == 'delbookkeepingyear') {

View File

@@ -1,10 +1,11 @@
<?php
/*
* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -21,7 +22,9 @@
*/
/**
* \file htdocs/accountancy/class/accountancyexport.class.php
* \file htdocs/accountancy/class/accountancyexport.class.php
* \ingroup Advanced accountancy
* \brief Class accountancy export
*/
/**
@@ -157,7 +160,7 @@ class AccountancyExport
*/
public function exportNormal($objectLines) {
global $conf;
foreach ( $objectLines as $line ) {
// Std export
$date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
@@ -182,15 +185,16 @@ class AccountancyExport
public function exportCegid($objectLines) {
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d%m%Y');
$separator = ";";
print $date . $this->separator;
print $line->code_journal . $this->separator;
print length_accountg($line->numero_compte) . $this->separator;
print ' ' . $this->separator;
print $line->sens . $this->separator;
print price($line->montant) . $this->separator;
print dol_trunc($line->label_compte, 32) . $this->separator;
print $line->doc_ref . $this->separator;
print $date . $separator;
print $line->code_journal . $separator;
print length_accountg($line->numero_compte) . $separator;
print length_accounta($line->code_tiers) . $separator;
print $line->sens . $separator;
print price($line->montant) . $separator;
print $line->label_compte . $separator;
print $line->doc_ref;
print $this->end_line;
}
}
@@ -353,7 +357,7 @@ class AccountancyExport
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 20), 20);
$Tab['sens'] = $data->sens; // C or D
$Tab['signe_montant'] = '+';
$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['contrepartie'] = str_repeat(' ', 8);
if (! empty($data->date_echeance))
$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
@@ -398,7 +402,7 @@ class AccountancyExport
print length_accountg($line->numero_compte) . $this->separator;
print substr(length_accountg($line->numero_compte),0,2) . $this->separator;
print '"'.dol_trunc($line->label_compte,40,'right','UTF-8',1).'"' . $this->separator;
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1)."'".$this->separator;
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$this->separator;
print price2num($line->montant).$this->separator;
print $line->sens.$this->separator;
print $date . $this->separator;

View File

@@ -45,7 +45,8 @@ class AccountingAccount extends CommonObject
var $label;
var $fk_user_author;
var $fk_user_modif;
var $active;
var $active; // duplicate with status
var $status;
/**
* Constructor
@@ -103,6 +104,7 @@ class AccountingAccount extends CommonObject
$this->fk_user_author = $obj->fk_user_author;
$this->fk_user_modif = $obj->fk_user_modif;
$this->active = $obj->active;
$this->status = $obj->active;
return $this->id;
} else {
@@ -465,4 +467,61 @@ class AccountingAccount extends CommonObject
return - 1;
}
}
/**
* Retourne le libelle du statut d'un user (actif, inactif)
*
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status
*/
function getLibStatut($mode=0)
{
return $this->LibStatut($this->status,$mode);
}
/**
* Renvoi le libelle d'un statut donne
*
* @param int $statut Id statut
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status
*/
function LibStatut($statut,$mode=0)
{
global $langs;
$langs->load('users');
if ($mode == 0)
{
$prefix='';
if ($statut == 1) return $langs->trans('Enabled');
if ($statut == 0) return $langs->trans('Disabled');
}
if ($mode == 1)
{
if ($statut == 1) return $langs->trans('Enabled');
if ($statut == 0) return $langs->trans('Disabled');
}
if ($mode == 2)
{
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
}
if ($mode == 3)
{
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4');
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5');
}
if ($mode == 4)
{
if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled');
if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled');
}
if ($mode == 5)
{
if ($statut == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4');
if ($statut == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
}
}
}

View File

@@ -62,17 +62,16 @@ class FormVentilation extends Form
/**
* Return list of accounts with label by chart of accounts
*
* @param string $selectid Preselected chart of accounts
* @param string $htmlname Name of field in html form
* @param int $showempty Add an empty field
* @param array $event Event options
* @param int $select_in $selectid value is a aa.rowid (0 default) or aa.account_number (1)
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
* @param int $aabase set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
*
* @param string $selectid Preselected chart of accounts
* @param string $htmlname Name of field in html form
* @param int $showempty Add an empty field
* @param array $event Event options
* @param int $select_in selectid value is a aa.rowid (0 default) or aa.account_number (1)
* @param int $select_out set value returned by select 0=rowid (default), 1=account_number
* @param string $morecss More css non HTML object
* @return string String with HTML select
*/
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') {
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone') {
global $conf;
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
@@ -123,7 +122,7 @@ class FormVentilation extends Form
$options[$select_value_out] = $label;
}
$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', 'maxwidth300');
$out .= Form::selectarray($htmlname, $options, $selected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss);
$this->db->free($resql);
return $out;
}
@@ -308,14 +307,16 @@ class FormVentilation extends Form
/**
* Return HTML combo list of years existing into book keepping
*
* @param string $selected Preselected value
* @param string $htmlname Name of HTML select object
* @param int $useempty Affiche valeur vide dans liste
* @param string $output_format (html/opton (for option html only)/array (to return options arrays
* @param string $selected Preselected value
* @param string $htmlname Name of HTML select object
* @param int $useempty Affiche valeur vide dans liste
* @param string $output_format Html/option (for option html only)/array (to return options arrays
* @return string/array
*/
function selectjournal_accountancy_bookkepping($selected = '', $htmlname = 'journalid', $useempty = 0, $output_format = 'html')
{
global $langs;
$out_array = array();
$sql = "SELECT DISTINCT code_journal";
@@ -330,7 +331,7 @@ class FormVentilation extends Form
return -1;
}
while ($obj = $this->db->fetch_object($resql)) {
$out_array[$obj->code_journal] = $obj->code_journal;
$out_array[$obj->code_journal] = $obj->code_journal?$obj->code_journal:$langs->trans("NotDefined"); // TODO Not defined is accepted ? We should avoid this, shouldn't we ?
}
$this->db->free($resql);

View File

@@ -85,7 +85,7 @@ if ($action == 'validatehistory') {
setEventMessages($db->lasterror(), null, 'errors');
} else {
$db->commit();
setEventMessages($langs->trans('Dispatched'), null, 'mesgs');
setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs');
}
} elseif ($action == 'fixaccountancycode') {
$error = 0;
@@ -133,9 +133,11 @@ if ($action == 'validatehistory') {
}
}
/*
* View
*/
llxHeader('', $langs->trans("CustomersVentilation"));
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
@@ -143,11 +145,14 @@ $textnextyear = '&nbsp;<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_cur
print load_fiche_titre($langs->trans("CustomersVentilation") . " " . $textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear);
print '<b>' . $langs->trans("DescVentilCustomer") . '</b>';
print $langs->trans("DescVentilCustomer") . '<br>';
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToDispatch")) . '<br>';
print '<br>';
print '<div class="inline-block divButAction">';
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
// TODO Remove this. Should be done always.
print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
print '</div>';
$sql = "SELECT count(*) FROM " . MAIN_DB_PREFIX . "facturedet as fd";
@@ -171,9 +176,9 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
@@ -220,9 +225,9 @@ print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,";
for($i = 1; $i <= 12; $i ++) {
@@ -264,9 +269,9 @@ if (! empty($conf->margin->enabled)) {
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,";
for($i = 1; $i <= 12; $i ++) {
@@ -291,9 +296,9 @@ if (! empty($conf->margin->enabled)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
print '<td align="right">' . price(price2num($row[$i])) . '</td>';
}
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
print '<td align="right"><b>' . price(price2num($row[13])) . '</b></td>';
print '</tr>';
}
$db->free($resql);

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2014-2015 Ari Elbaz (elarifr) <github@accedinfo.com>
* Copyright (C) 2014-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -87,6 +87,11 @@ if (! $user->rights->accounting->ventilation->dispatch)
$formventilation = new FormVentilation($db);
/*
* Actions
*/
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
@@ -103,13 +108,13 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
if (is_array($changeaccount) && count($changeaccount) > 0) {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as l";
$sql1 .= " SET l.fk_code_ventilation=" . $account_parent;
$sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')';
dol_syslog('accountancy/customer/lines.php::changeaccount sql= ' . $sql1);
$resql1 = $db->query($sql1);
if (! $resql1) {
@@ -148,10 +153,6 @@ print '<script type="text/javascript">
});
</script>';
/*
* Action
*/
/*
* Customer Invoice lines
*/
@@ -223,7 +224,7 @@ $result = $db->query($sql);
if ($result) {
$num_lines = $db->num_rows($result);
$i = 0;
$param = "";
if ($search_invoice)
$param .= "&search_invoice=" . $search_invoice;
@@ -242,17 +243,17 @@ if ($result) {
if ($search_tvaintra)
$param .= "&search_tvaintra=" . $search_tvaintra;
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords);
print '<td align="left"><b>' . $langs->trans("DescVentilDoneCustomer") . '</b></td>';
print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
print '<table class="noborder" width="100%">';
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
print $formventilation->select_account($account_parent, 'account_parent', 1);
print '<input type="submit" class="butAction" value="' . $langs->trans("Validate") . '"/></div>';
print '<input type="submit" class="button" value="' . $langs->trans("Validate") . '"/></div>';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Ref"), $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
@@ -262,50 +263,50 @@ if ($result) {
print_liste_field_titre($langs->trans("VATRate"), $_SERVER["PHP_SELF"], "fd.tva_tx", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Account"), $_SERVER["PHP_SELF"], "aa.account_number", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Country"), $_SERVER["PHP_SELF"], "co.label", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("IntracommunityVATNumber"), $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("VATIntra"), $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($langs->trans("Ventilate") . '<br><label id="select-all">' . $langs->trans('All') . '</label>/<label id="unselect-all">' . $langs->trans('None') . '</label>', '', '', '', '', 'align="center"');
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre"><input type="text" class="flat" name="search_invoice" size="10" value="' . $search_invoice . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_ref" value="' . $search_ref . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_desc" value="' . $search_desc . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="8" name="search_amount" value="' . $search_amount . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="5" name="search_vat" value="' . $search_vat . '">%</td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="6" name="search_amount" value="' . $search_amount . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '">%</td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_country" value="' . $search_country . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_tavintra" value="' . $search_tavintra . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_country" value="' . $search_country . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" name="search_tavintra" value="' . $search_tavintra . '"></td>';
print '<td class="liste_titre" align="center"><input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
print "</td></tr>\n";
$facture_static = new Facture($db);
$product_static = new Product($db);
$var = True;
while ( $objp = $db->fetch_object($result) ) {
$var = ! $var;
$codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte;
print '<tr'. $bc[$var].'>';
// Ref Invoice
$facture_static->ref = $objp->facnumber;
$facture_static->id = $objp->facid;
$facture_static->id = $objp->rowid;
print '<td>' . $facture_static->getNomUrl(1) . '</td>';
// Ref Product
$product_static->ref = $objp->product_ref;
$product_static->id = $objp->product_id;
$product_static->type = $objp->type;
$product_static->type = $objp->product_type;
print '<td>';
if ($product_static->id)
print $product_static->getNomUrl(1);
else
print '&nbsp;';
print '</td>';
print '<td>' . dol_trunc($objp->product_label, 24) . '</td>';
print '<td>' . nl2br(dol_trunc($objp->description, 32)) . '</td>';
print '<td align="right">' . price($objp->total_ht) . '</td>';
@@ -316,7 +317,7 @@ if ($result) {
print '<td align="right">' . $objp->country .'</td>';
print '<td align="center">' . $objp->tva_intra . '</td>';
print '<td align="center"><input type="checkbox" name="changeaccount[]" value="' . $objp->fdid . '"/></td>';
print "</tr>";
$i ++;
}

View File

@@ -103,9 +103,12 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) {
$search_vat = '';
}
/*
* View
*/
llxHeader('', $langs->trans("Ventilation"));
print '<script type="text/javascript">

View File

@@ -4,9 +4,9 @@
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -424,7 +424,7 @@ if ($action == 'export_csv') {
}
if ($reflabel == '(CustomerInvoicePayment)') {
$reflabel = $langs->trans('Customer');
}
}
if ($reflabel == '(SocialContributionPayment)') {
$reflabel = $langs->trans('SocialContribution');
}
@@ -577,9 +577,13 @@ else {
'action' => ''
), '', $varlink);
print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans('Export') . '" disabled="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
}
print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '
<script type="text/javascript">

View File

@@ -426,12 +426,12 @@ if ($action == 'export_csv') {
));
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabeld="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabled="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="button" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
}
print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '
<script type="text/javascript">

View File

@@ -7,7 +7,7 @@
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2014 Rapha<EFBFBD>l Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,9 +24,9 @@
*/
/**
* \file htdocs/accountancy/journal/sellsjournal.php
* \ingroup Advanced accountancy
* \brief Page with sells journal
* \file htdocs/accountancy/journal/sellsjournal.php
* \ingroup Advanced accountancy
* \brief Page with sells journal
*/
require '../../main.inc.php';
@@ -444,12 +444,12 @@ if ($action == 'export_csv') {
));
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) {
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabeld="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
print '<input type="button" class="butActionRefused" style="float: right;" value="' . $langs->trans("Export") . '" disabled="disabled" title="' . $langs->trans('ExportNotSupported') . '"/>';
} else {
print '<input type="button" class="butAction" style="float: right;" value="' . $langs->trans("Export") . '" onclick="launch_export();" />';
}
print '<input type="button" class="button" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
print '
<script type="text/javascript">

View File

@@ -81,7 +81,7 @@ if ($action == 'validatehistory') {
setEventMessages($db->lasterror(), null, 'errors');
} else {
$db->commit();
setEventMessages($langs->trans('Dispatched'), null, 'mesgs');
setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs');
}
} elseif ($action == 'fixaccountancycode') {
$error = 0;
@@ -140,11 +140,15 @@ $textnextyear = '&nbsp;<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_cur
print load_fiche_titre($langs->trans("SuppliersVentilation") . "&nbsp;" . $textprevyear . "&nbsp;" . $langs->trans("Year") . "&nbsp;" . $year_start . "&nbsp;" . $textnextyear);
print '<b>' . $langs->trans("DescVentilSupplier") . '</b>';
print $langs->trans("DescVentilSupplier") . '<br>';
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToDispatch")) . '<br>';
print '<br>';
print '<div class="inline-block divButAction">';
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
// TODO Remove this. Should be done always.
print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
print '</div>';
$y = $year_current;
@@ -155,9 +159,9 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
@@ -205,9 +209,9 @@ print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("CAHTF") . "' AS label,";
for($i = 1; $i <= 12; $i ++) {
@@ -247,4 +251,4 @@ if ($resql) {
print "</table>\n";
llxFooter();
$db->close();
$db->close();

View File

@@ -85,6 +85,11 @@ if (! $user->rights->accounting->ventilation->dispatch)
$formventilation = new FormVentilation($db);
/*
* Actions
*/
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
@@ -121,6 +126,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
}
}
/*
* View
*/
@@ -198,7 +204,7 @@ if ($result) {
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
print $formventilation->select_account(GETPOST('account_parent'), 'account_parent', 1);
print '<input type="submit" class="butAction" value="' . $langs->trans("Validate") . '" /></div>';
print '<input type="submit" class="button" value="' . $langs->trans("Validate") . '" /></div>';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
@@ -217,9 +223,9 @@ if ($result) {
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_ref" value="' . $search_ref . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="' . $search_label . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="15" name="search_desc" value="' . $search_desc . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="8" name="search_amount" value="' . $search_amount . '"></td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="5" name="search_vat" value="' . $search_vat . '">%</td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="15" name="search_account" value="' . $search_account . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="6" name="search_amount" value="' . $search_amount . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat" size="3" name="search_vat" value="' . $search_vat . '">%</td>';
print '<td class="liste_titre" align="center"><input type="text" class="flat" size="10" name="search_account" value="' . $search_account . '"></td>';
print '<td class="liste_titre" colspan="2">&nbsp;</td>';
print '<td class="liste_titre" align="right">';
$searchpitco=$form->showFilterAndCheckAddButtons(0);

View File

@@ -253,6 +253,7 @@ if (empty($reshook))
}
$lastname=$_POST["lastname"];
$firstname=$_POST["firstname"];
$societe=$_POST["societe"];
$morphy=$_POST["morphy"];
$login=$_POST["login"];
if ($morphy != 'mor' && empty($lastname)) {

View File

@@ -433,18 +433,18 @@ class Adherent extends CommonObject
$sql.= ", town=" .($this->town?"'".$this->db->escape($this->town)."'":"null");
$sql.= ", country=".($this->country_id>0?"'".$this->country_id."'":"null");
$sql.= ", state_id=".($this->state_id>0?"'".$this->state_id."'":"null");
$sql.= ", email='".$this->email."'";
$sql.= ", skype='".$this->skype."'";
$sql.= ", email='".$this->db->escape($this->email)."'";
$sql.= ", skype='".$this->db->escape($this->skype)."'";
$sql.= ", phone=" .($this->phone?"'".$this->db->escape($this->phone)."'":"null");
$sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null");
$sql.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null");
$sql.= ", note_private=" .($this->note_private?"'".$this->db->escape($this->note_private)."'":"null");
$sql.= ", note_public=" .($this->note_private?"'".$this->db->escape($this->note_public)."'":"null");
$sql.= ", photo=" .($this->photo?"'".$this->photo."'":"null");
$sql.= ", public='".$this->public."'";
$sql.= ", public='".$this->db->escape($this->public)."'";
$sql.= ", statut=" .$this->statut;
$sql.= ", fk_adherent_type=".$this->typeid;
$sql.= ", morphy='".$this->morphy."'";
$sql.= ", morphy='".$this->db->escape($this->morphy)."'";
$sql.= ", birth=" .($this->birth?"'".$this->db->idate($this->birth)."'":"null");
if ($this->datefin) $sql.= ", datefin='".$this->db->idate($this->datefin)."'"; // Ne doit etre modifie que par effacement cotisation
if ($this->datevalid) $sql.= ", datevalid='".$this->db->idate($this->datevalid)."'"; // Ne doit etre modifie que par validation adherent
@@ -643,7 +643,7 @@ class Adherent extends CommonObject
// Search for last subscription id and end date
$sql = "SELECT rowid, datec as dateop, dateadh as datedeb, datef as datefin";
$sql.= " FROM ".MAIN_DB_PREFIX."cotisation";
$sql.= " WHERE fk_adherent='".$this->id."'";
$sql.= " WHERE fk_adherent=".$this->id;
$sql.= " ORDER by dateadh DESC"; // Sort by start subscription date
dol_syslog(get_class($this)."::update_end_date", LOG_DEBUG);

View File

@@ -420,7 +420,7 @@ if ($resql)
if (! empty($arrayfields['d.firstname']['checked']))
{
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="search_ref" value="'.$search_firstname.'" size="6"></td>';
print '<input class="flat" type="text" name="search_firstname" value="'.$search_firstname.'" size="6"></td>';
}
if (! empty($arrayfields['d.lastname']['checked']))

View File

@@ -87,14 +87,14 @@ else if ($action == 'disable_delivery')
$dir = DOL_DOCUMENT_ROOT."/core/modules/expedition/";
$form=new Form($db);
llxHeader("","");
llxHeader("",$langs->trans("SendingsSetup"));
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
print '<br>';
$head = expedition_admin_prepare_head();
dol_fiche_head($head, 'general', $langs->trans("ModuleSetup"), 0, 'sending');
dol_fiche_head($head, 'general', $langs->trans("Sendings"), 0, 'sending');
/*
* Formulaire parametres divers

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2015 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2011 Remy Younes <ryounes@gmail.com>
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
@@ -699,7 +699,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i=0;
foreach ($listfieldinsert as $f => $value)
{
if ($value == 'price' || preg_match('/^amount/i',$value) || preg_match('/^localtax/i',$value) || $value == 'taux') {
if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($value == 'entity') {
@@ -747,7 +747,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i = 0;
foreach ($listfieldmodify as $field)
{
if ($field == 'price' || preg_match('/^amount/i',$field) || preg_match('/^localtax/i',$field) || $field == 'taux') {
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($field == 'entity') {
@@ -909,7 +909,7 @@ print "<br>\n";
// Confirmation de la suppression de la ligne
if ($action == 'delete')
{
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
}
//var_dump($elementList);
@@ -1238,6 +1238,7 @@ if ($id)
{
foreach ($fieldlist as $field => $value)
{
$showfield=1;
$align="left";
$valuetoshow=$obj->{$fieldlist[$field]};
@@ -1374,31 +1375,18 @@ if ($id)
$valuetoshow=$localtax_typeList[$valuetoshow];
else
$valuetoshow = '';
$align="center";
$align="right";
}
else if ($fieldlist[$field]=='localtax2_type') {
if ($obj->localtax2 != 0)
$valuetoshow=$localtax_typeList[$valuetoshow];
else
$valuetoshow = '';
$align="center";
}
else if ($fieldlist[$field]=='localtax1') {
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
if ($obj->localtax1 == 0)
$valuetoshow = '';
$align="right";
}
else if ($fieldlist[$field]=='localtax2') {
else if ($fieldlist[$field]=='taux') {
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
if ($obj->localtax2 == 0)
$valuetoshow = '';
$align="right";
}
else if (in_array($fieldlist[$field],array('taux','localtax1','localtax2')))
{
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
$align="right";
$align="right";
}
else if (in_array($fieldlist[$field],array('recuperableonly')))
{
@@ -1578,7 +1566,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
} // For state page, we do not show the country input (we link to region, not country)
print '<td>';
$fieldname='country';
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), $fieldname, '', 28, 'maxwidth300');
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone');
print '</td>';
}
elseif ($fieldlist[$field] == 'country_id')
@@ -1699,12 +1687,14 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
print '<td>';
if (! empty($conf->accounting->enabled))
{
$accountancy_account = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0);
print $formaccountancy->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1);
$fieldname = $fieldlist[$field];
$accountancy_account = (! empty($obj->$fieldname) ? $obj->$fieldname : 0);
print $formaccountancy->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
}
else
{
print '<input type="text" size="10" class="flat" value="'.(isset($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'').'" name="'.$fieldlist[$field].'">';
$fieldname = $fieldlist[$field];
print '<input type="text" size="10" class="flat" value="'.(isset($obj->$fieldname)?$obj->$fieldname:'').'" name="'.$fieldlist[$field].'">';
}
print '</td>';
}

View File

@@ -215,7 +215,7 @@ $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
$form=new Form($db);
llxHeader("","");
llxHeader("",$langs->trans("SendingsSetup"));
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');

View File

@@ -46,14 +46,17 @@ $action=GETPOST('action');
*/
// positionne la variable pour le nombre de rss externes
$sql ="SELECT MAX(".$db->decrypt('name').") as name FROM ".MAIN_DB_PREFIX."const";
$sql ="SELECT ".$db->decrypt('name')." as name FROM ".MAIN_DB_PREFIX."const";
$sql.=" WHERE ".$db->decrypt('name')." LIKE 'EXTERNAL_RSS_URLRSS_%'";
$result=$db->query($sql);
//print $sql;
$result=$db->query($sql); // We can't use SELECT MAX() because EXTERNAL_RSS_URLRSS_10 is lower than EXTERNAL_RSS_URLRSS_9
if ($result)
{
$obj = $db->fetch_object($result);
preg_match('/([0-9]+)$/i',$obj->name,$reg);
if ($reg[1]) $lastexternalrss = $reg[1];
while ($obj = $db->fetch_object($result))
{
preg_match('/([0-9]+)$/i',$obj->name,$reg);
if ($reg[1] && $reg[1] > $lastexternalrss) $lastexternalrss = $reg[1];
}
}
else
{

View File

@@ -38,6 +38,7 @@ $langs->load("products");
$langs->load("members");
$langs->load("projects");
$langs->load("hrm");
$langs->load("agenda");
if (! $user->admin) accessforbidden();

View File

@@ -83,147 +83,17 @@ if ($action == 'update' && empty($_POST["cancel"]))
}
/*
* Add file in email form
*/
if (GETPOST('addfile') || GETPOST('addfilehtml'))
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
// Actions to send emails
$id=0;
$actiontypecode='';
$trigger_name='';
$paramname='id';
$mode='emailfortest';
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
// Set tmp user directory
$vardir=$conf->user->dir_output."/".$user->id;
$upload_dir = $vardir.'/temp';
dol_add_file_process($upload_dir,0,0);
if ($action == 'presend' && GETPOST('trackid') == 'test') $action='test';
if ($action == 'presend' && GETPOST('trackid') == 'testhtml') $action='testhtml';
if ($_POST['addfile']) $action='test';
if ($_POST['addfilehtml']) $action='testhtml';
}
/*
* Remove file in email form
*/
if (! empty($_POST['removedfile']) || ! empty($_POST['removedfilehtml']))
{
// Set tmp user directory
$vardir=$conf->user->dir_output."/".$user->id;
$upload_dir = $vardir.'/temp';
$keytodelete=isset($_POST['removedfile'])?$_POST['removedfile']:$_POST['removedfilehtml'];
$keytodelete--;
$listofpaths=array();
$listofnames=array();
$listofmimes=array();
if (! empty($_SESSION["listofpaths"])) $listofpaths=explode(';',$_SESSION["listofpaths"]);
if (! empty($_SESSION["listofnames"])) $listofnames=explode(';',$_SESSION["listofnames"]);
if (! empty($_SESSION["listofmimes"])) $listofmimes=explode(';',$_SESSION["listofmimes"]);
if ($keytodelete >= 0)
{
$pathtodelete=$listofpaths[$keytodelete];
$filetodelete=$listofnames[$keytodelete];
$result = dol_delete_file($pathtodelete,1);
if ($result)
{
setEventMessages(array($langs->trans("FileWasRemoved"), $filetodelete), null, 'mesgs');
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$formmail->remove_attached_files($keytodelete);
}
}
if ($_POST['removedfile'] || $action='send') $action='test';
if ($_POST['removedfilehtml'] || $action='sendhtml') $action='testhtml';
}
/*
* Send mail
*/
if (($action == 'send' || $action == 'sendhtml') && ! GETPOST('addfile') && ! GETPOST('addfilehtml') && ! GETPOST('removedfile') && ! GETPOST('cancel'))
{
$error=0;
$email_from='';
if (! empty($_POST["fromname"])) $email_from=$_POST["fromname"].' ';
if (! empty($_POST["frommail"])) $email_from.='<'.$_POST["frommail"].'>';
$errors_to = $_POST["errorstomail"];
$sendto = $_POST["sendto"];
$sendtocc = $_POST["sendtocc"];
$sendtoccc = $_POST["sendtoccc"];
$subject = $_POST['subject'];
$body = $_POST['message'];
$deliveryreceipt= $_POST["deliveryreceipt"];
$trackid = GETPOST('trackid');
//Check if we have to decode HTML
if (!empty($conf->global->FCKEDITOR_ENABLE_MAILING) && dol_textishtml(dol_html_entity_decode($body, ENT_COMPAT | ENT_HTML401))) {
$body=dol_html_entity_decode($body, ENT_COMPAT | ENT_HTML401);
}
// Create form object
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$attachedfiles=$formmail->get_attached_files();
$filepath = $attachedfiles['paths'];
$filename = $attachedfiles['names'];
$mimetype = $attachedfiles['mimes'];
if (empty($_POST["frommail"]))
{
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MailFrom")), null, 'errors');
$action='test';
$error++;
}
if (empty($sendto))
{
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MailTo")), null, 'errors');
$action='test';
$error++;
}
if (! $error)
{
// Is the message in HTML?
$msgishtml=0; // Message is not HTML
if ($action == 'sendhtml') $msgishtml=1; // Force message to HTML
// Pratique les substitutions sur le sujet et message
$subject=make_substitutions($subject,$substitutionarrayfortest);
$body=make_substitutions($body,$substitutionarrayfortest);
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$mailfile = new CMailFile(
$subject,
$sendto,
$email_from,
$body,
$filepath,
$mimetype,
$filename,
$sendtocc,
$sendtoccc,
$deliveryreceipt,
$msgishtml,
$errors_to,
'',
$trackid
);
$result=$mailfile->sendfile();
if ($result)
{
setEventMessages($langs->trans("MailSuccessfulySent",$mailfile->getValidAddress($email_from,2),$mailfile->getValidAddress($sendto,2)), null, 'mesgs');
}
else
{
setEventMessages($langs->trans("ResultKo").'<br>'.$mailfile->error.' '.$result, null, 'errors');
}
$action='';
}
}
@@ -747,7 +617,7 @@ else
$formmail = new FormMail($db);
$formmail->fromname = (isset($_POST['fromname'])?$_POST['fromname']:$conf->global->MAIN_MAIL_EMAIL_FROM);
$formmail->frommail = (isset($_POST['frommail'])?$_POST['frommail']:$conf->global->MAIN_MAIL_EMAIL_FROM);
$formmail->trackid='test';
$formmail->trackid=(($action == 'testhtml')?"testhtml":"test");
$formmail->withfromreadonly=0;
$formmail->withsubstit=0;
$formmail->withfrom=1;
@@ -767,7 +637,7 @@ else
// Tableau des substitutions
$formmail->substit=$substitutionarrayfortest;
// Tableau des parametres complementaires du post
$formmail->param["action"]=($action == 'testhtml'?"sendhtml":"send");
$formmail->param["action"]="send";
$formmail->param["models"]="body";
$formmail->param["mailid"]=0;
$formmail->param["returnurl"]=$_SERVER["PHP_SELF"];
@@ -778,7 +648,7 @@ else
$formmail->clear_attached_files();
}
print $formmail->get_form(($action == 'testhtml'?'addfilehtml':'addfile'),($action == 'testhtml'?'removefilehtml':'removefile'));
print $formmail->get_form('addfile','removefile');
print '<br>';
}

View File

@@ -193,7 +193,7 @@ foreach ($modulesdir as $dir)
}
ksort($arrayofnatures);
}
// Define array $categ with categ with at least one qualified module
if ($modulequalified > 0)
{
@@ -315,13 +315,13 @@ if ($mode != 'marketplace')
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
$moreforfilter = '';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('Keyword') . ': <input type="text" name="search_keyword" value="'.dol_escape_htmltag($search_keyword).'">';
$moreforfilter.= '</div>';
$moreforfilter.='<div class="divsearchfield">';
$moreforfilter.= $langs->trans('Origin') . ': '.$form->selectarray('search_nature', $arrayofnatures, $search_nature, 1);
$moreforfilter.= $langs->trans('Origin') . ': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1);
$moreforfilter.= '</div>';
if (! empty($conf->global->MAIN_FEATURES_LEVEL))
{
@@ -342,7 +342,7 @@ if ($mode != 'marketplace')
$moreforfilter.=' ';
$moreforfilter.='<input type="submit" name="buttonreset" class="button" value="'.dol_escape_htmltag($langs->trans("Reset")).'">';
$moreforfilter.= '</div>';
if (! empty($moreforfilter))
{
//print '<div class="liste_titre liste_titre_bydiv centpercent">';
@@ -351,11 +351,11 @@ if ($mode != 'marketplace')
$reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
//print '</div>';
}
}
print '<br><br><br>';
// Show list of modules
print '<table summary="list_of_modules" id="list_of_modules" class="liste" width="100%">'."\n";
@@ -370,7 +370,7 @@ if ($mode != 'marketplace')
$modName = $filename[$key];
$objMod = $modules[$key];
$dirofmodule = $dirmod[$key];
$special = $objMod->special;
//print $objMod->name." - ".$key." - ".$objMod->special.' - '.$objMod->version."<br>";
@@ -383,9 +383,9 @@ if ($mode != 'marketplace')
dol_syslog("Error for module ".$key." - Property name of module looks empty", LOG_WARNING);
continue;
}
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
// Check filters
$modulename=$objMod->getName();
$moduledesc=$objMod->getDesc();
@@ -396,7 +396,7 @@ if ($mode != 'marketplace')
if ($search_keyword)
{
$qualified=0;
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
if (preg_match('/'.preg_quote($search_keyword).'/i', $modulename)
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesc)
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduledesclong)
|| preg_match('/'.preg_quote($search_keyword).'/i', $moduleauthor)
@@ -415,7 +415,7 @@ if ($mode != 'marketplace')
{
//print $reg[1].'-'.dol_escape_htmltag($objMod->getPublisher());
$publisher=dol_escape_htmltag($objMod->getPublisher());
if ($reg[1] && $reg[1] != $publisher) continue;
if ($reg[1] && dol_escape_htmltag($reg[1]) != $publisher) continue;
if (! $reg[1] && ! empty($publisher)) continue;
}
if ($search_nature == 'core' && $objMod->isCoreOrExternalModule() == 'external') continue;
@@ -496,7 +496,7 @@ if ($mode != 'marketplace')
$text='';
if ($objMod->getDescLong()) $text.=$objMod->getDesc().'<br>'.$objMod->getDescLong().'<br>';
else $text.=$objMod->getDesc().'<br>';
$textexternal='';
if ($objMod->isCoreOrExternalModule() == 'external')
{
@@ -522,7 +522,7 @@ if ($mode != 'marketplace')
}
}
else $text.=$langs->trans("No");
$text.='<br><strong>'.$langs->trans("AddDictionaries").':</strong> ';
if (isset($objMod->dictionaries) && isset($objMod->dictionaries['tablib']) && is_array($objMod->dictionaries['tablib']) && count($objMod->dictionaries['tablib']))
{
@@ -534,7 +534,7 @@ if ($mode != 'marketplace')
}
}
else $text.=$langs->trans("No");
$text.='<br><strong>'.$langs->trans("AddBoxes").':</strong> ';
if (isset($objMod->boxes) && is_array($objMod->boxes) && count($objMod->boxes))
{
@@ -553,14 +553,14 @@ if ($mode != 'marketplace')
$text.=$langs->trans("Yes");
}
else $text.=$langs->trans("No");
$text.='<br><strong>'.$langs->trans("AddSubstitutions").':</strong> ';
if (isset($objMod->module_parts) && isset($objMod->module_parts['substitutions']) && $objMod->module_parts['substitutions'])
{
$text.=$langs->trans("Yes");
}
else $text.=$langs->trans("No");
$text.='<br><strong>'.$langs->trans("AddSheduledJobs").':</strong> ';
if (isset($objMod->cronjobs) && is_array($objMod->cronjobs) && count($objMod->cronjobs))
{
@@ -572,14 +572,14 @@ if ($mode != 'marketplace')
}
}
else $text.=$langs->trans("No");
$text.='<br><strong>'.$langs->trans("AddTriggers").':</strong> ';
if (isset($objMod->module_parts) && isset($objMod->module_parts['triggers']) && $objMod->module_parts['triggers'])
{
$text.=$langs->trans("Yes");
}
else $text.=$langs->trans("No");
$text.='<br><strong>'.$langs->trans("AddHooks").':</strong> ';
if (isset($objMod->module_parts) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks']))
{
@@ -603,14 +603,14 @@ if ($mode != 'marketplace')
}
}
else $text.=$langs->trans("No");
$text.='<br><strong>'.$langs->trans("AddMenus").':</strong> ';
if (isset($objMod->menu) && is_array($objMod->menu) && ! empty($objMod->menu))
{
$text.=$langs->trans("Yes");
}
else $text.=$langs->trans("No");
$text.='<br><strong>'.$langs->trans("AddExportProfiles").':</strong> ';
if (isset($objMod->export_label) && is_array($objMod->export_label) && count($objMod->export_label))
{
@@ -622,7 +622,7 @@ if ($mode != 'marketplace')
}
}
else $text.=$langs->trans("No");
$text.='<br><strong>'.$langs->trans("AddImportProfiles").':</strong> ';
if (isset($objMod->import_label) && is_array($objMod->import_label) && count($objMod->import_label))
{
@@ -634,25 +634,25 @@ if ($mode != 'marketplace')
}
}
else $text.=$langs->trans("No");
$text.='<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
$text.=$langs->trans("DetectionNotPossible");
print $form->textwithpicto('', $text, 1, 'help', 'minheight20');
// Picto warning
// Picto warning
$version=$objMod->getVersion(0);
$versiontrans=$objMod->getVersion(1);
if (preg_match('/development/i', $version)) print img_warning($langs->trans("Development"), 'style="float: right"');
if (preg_match('/experimental/i', $version)) print img_warning($langs->trans("Experimental"), 'style="float: right"');
if (preg_match('/deprecated/i', $version)) print img_warning($langs->trans("Deprecated"), 'style="float: right"');
// Picto external
if ($textexternal) print img_picto($langs->trans("ExternalModule",$dirofmodule), 'external', 'style="float: right"');
print '</td>';
// Version
print '<td align="center" valign="top" class="nowrap">';
print $versiontrans;

View File

@@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir)
while (($file = readdir($handle))!==false)
{
if (substr($file, 0, 21) == 'mod_supplier_proposal_' && substr($file, dol_strlen($file)-3, 3) == 'php')
if (substr($file, 0, 22) == 'mod_supplier_proposal_' && substr($file, dol_strlen($file)-3, 3) == 'php')
{
$file = substr($file, 0, dol_strlen($file)-4);

View File

@@ -90,7 +90,8 @@ $configfileparameters=array(
'?dolibarr_font_DOL_DEFAULT_TTF_BOLD',
'separator',
'?dolibarr_mailing_limit_sendbyweb',
'?dolibarr_strict_mode'
'?dolibarr_mailing_limit_sendbycli',
'?dolibarr_strict_mode'
);
$configfilelib=array(
// 'separator',

View File

@@ -284,7 +284,8 @@ $configfileparameters=array(
'separator4' => '',
'dolibarr_main_prod' => 'Production mode (Hide all error messages)',
'?dolibarr_mailing_limit_sendbyweb' => 'Limit nb of email sent by page',
'?dolibarr_strict_mode' => 'Strict mode is on/off',
'?dolibarr_mailing_limit_sendbycli' => 'Limit nb of email sent by cli',
'?dolibarr_strict_mode' => 'Strict mode is on/off',
'?dolibarr_pdf_force_fpdf' => 'Force fpdf usage to generate PDF'
);

View File

@@ -121,7 +121,9 @@ $utils = new Utils($db);
if ($what == 'mysql')
{
$cmddump=GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg
$cmddump=GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg
$cmddump=dol_sanitizePathName($cmddump);
if (! empty($dolibarr_main_restrict_os_commands))
{
$arrayofallowedcommand=explode(',', $dolibarr_main_restrict_os_commands);
@@ -168,7 +170,8 @@ if ($what == 'mysqlnobin')
// POSTGRESQL
if ($what == 'postgresql')
{
$cmddump=GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by escapeshellarg
$cmddump=GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg
$cmddump=dol_sanitizePathName($cmddump);
if (! $errormsg && $cmddump)
{

View File

@@ -69,12 +69,18 @@ if ($action=='install')
}
else
{
if (! preg_match('/\.zip/i',$original_file))
if (! preg_match('/\.zip$/i',$original_file))
{
$langs->load("errors");
setEventMessages($langs->trans("ErrorFileMustBeADolibarrPackage",$original_file), null, 'errors');
$error++;
}
if (! preg_match('/module_.*\-[\d]+\.[\d]+.*$/i',$original_file))
{
$langs->load("errors");
setEventMessages($langs->trans("ErrorFilenameDosNotMatchDolibarrPackageRules",$original_file, 'module_*-x.y*.zip'), null, 'errors');
$error++;
}
}
if (! $error)
@@ -117,7 +123,7 @@ if ($action=='install')
//var_dump($modulenamedir);
if (! dol_is_dir($modulenamedir))
{
setEventMessages($langs->trans("ErrorModuleFileSeemsToHaveAWrongFormat"), null, 'errors');
setEventMessages($langs->trans("ErrorModuleFileSeemsToHaveAWrongFormat").'<br>Dir not found: '.$conf->admin->dir_temp.'/'.$tmpdir.'/'.$modulename.'<br>'.$conf->admin->dir_temp.'/'.$tmpdir.'/htdocs/'.$modulename, null, 'errors');
$error++;
}
}

View File

@@ -535,7 +535,8 @@ if ($id)
{
$showfield=1;
$align="left";
$valuetoshow=$obj->$fieldlist[$field];
$fieldname=$fieldlist[$field];
$valuetoshow=$obj->$fieldname;
// Show value for field
if ($showfield) print '<td align="'.$align.'">'.$valuetoshow.'</td>';
@@ -613,14 +614,15 @@ function fieldListWebsites($fieldlist, $obj='', $tabname='', $context='')
foreach ($fieldlist as $field => $value)
{
$fieldname = $fieldlist[$field];
if ($fieldlist[$field] == 'lang')
{
print '<td>';
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT,'lang');
print '</td>';
}
elseif ($fieldlist[$field] == 'code' && isset($obj->$fieldlist[$field])) {
print '<td><input type="text" class="flat" value="'.(! empty($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'').'" size="10" name="'.$fieldlist[$field].'"></td>';
elseif ($fieldlist[$field] == 'code' && isset($obj->$fieldname)) {
print '<td><input type="text" class="flat" value="'.(! empty($obj->$fieldname)?$obj->$fieldname:'').'" size="10" name="'.$fieldlist[$field].'"></td>';
}
else
{
@@ -631,7 +633,7 @@ function fieldListWebsites($fieldlist, $obj='', $tabname='', $context='')
if ($fieldlist[$field]=='libelle') $size='size="32" ';
if ($fieldlist[$field]=='tracking') $size='size="92" ';
if ($fieldlist[$field]=='sortorder') $size='size="2" ';
print '<input type="text" '.$size.' class="flat" value="'.(isset($obj->$fieldlist[$field])?$obj->$fieldlist[$field]:'').'" name="'.$fieldlist[$field].'">';
print '<input type="text" '.$size.' class="flat" value="'.(isset($obj->$fieldname)?$obj->$fieldname:'').'" name="'.$fieldlist[$field].'">';
print '</td>';
}
}

View File

@@ -45,11 +45,14 @@ class GenericApi extends DolibarrApi
* @return array Response status and user token
*
* @throws RestException
*
* @url POST /login
* @url GET /login
*/
public function login($login, $password, $entity=0, $reset=0) {
global $conf, $dolibarr_main_authentication, $dolibarr_auto_user;
// Authentication mode
if (empty($dolibarr_main_authentication))
$dolibarr_main_authentication = 'http,dolibarr';
@@ -67,21 +70,21 @@ class GenericApi extends DolibarrApi
}
$token = 'failedtogenerateorgettoken';
$tmpuser=new User($this->db);
$tmpuser->fetch(0, $login);
// Renew the hash
if (empty($tmpuser->api_key) || $reset)
{
// Generate token for user
$token = dol_hash($login.uniqid().$conf->global->MAIN_API_KEY,1);
// We store API token into database
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
$sql.= " SET api_key = '".$this->db->escape($token)."'";
$sql.= " WHERE login = '".$this->db->escape($login)."'";
dol_syslog(get_class($this)."::login", LOG_DEBUG); // No log
$result = $this->db->query($sql);
if (!$result)
@@ -93,7 +96,7 @@ class GenericApi extends DolibarrApi
{
$token = $tmpuser->api_key;
}
//return token
return array(
'success' => array(

View File

@@ -26,6 +26,7 @@
*
*/
if (! defined("NOLOGIN")) define("NOLOGIN",'1');
if (! defined("NOCSRFCHECK")) define("NOCSRFCHECK",'1');
$res=0;
if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php';
@@ -121,9 +122,9 @@ foreach ($modulesdir as $dir)
$classname = str_replace('Api_','',ucwords($reg[1])).'Api';
$classname = ucfirst($classname);
require_once $dir_part.$file_searched;
if (class_exists($classname))
if (class_exists($classname))
{
dol_syslog("Found API classname=".$classname);
dol_syslog("Found API classname=".$classname);
$api->r->addAPIClass($classname,'');
$listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched);
}
@@ -142,7 +143,3 @@ foreach ($modulesdir as $dir)
// Call API (we suppose we found it)
$api->r->handle();

View File

@@ -48,7 +48,7 @@ $langs->load("cashdesk");
onfocus="javascript: this.select(); verifResultat('resultats_dhtml', this.value, <?php echo (isset($conf->global->BARCODE_USE_SEARCH_TO_SELECT) ? (int) $conf->global->BARCODE_USE_SEARCH_TO_SELECT : 1) ?>);"
onBlur="javascript: document.getElementById('resultats_dhtml').innerHTML = '';"/>
</td>
<td class="select_design">
<td class="select_design maxwidthonsmartphone">
<?php /*
$selected='';
$htmlname='idprod';
@@ -60,7 +60,7 @@ $langs->load("cashdesk");
*/
?>
<select id="selProduit" name="selProduit" onchange="javascript: setSource('LISTE');">
<select id="selProduit" class="maxwidthonsmartphone" name="selProduit" onchange="javascript: setSource('LISTE');">
<?php
print '<option value="0">'.$top_liste_produits.'</option>'."\n";
@@ -80,7 +80,7 @@ $langs->load("cashdesk");
$label = $tab_designations[$i]['label'];
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.dol_trunc($tab_designations[$i]['ref'],7).' - '.dol_trunc($label,35,'middle');
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.dol_trunc($tab_designations[$i]['ref'],16).' - '.dol_trunc($label,35,'middle');
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot) && $tab_designations[$i]['fk_product_type']==0) print ' ('.$langs->trans("CashDeskStock").': '.(empty($tab_designations[$i]['reel'])?0:$tab_designations[$i]['reel']).')';
print '</option>'."\n";

View File

@@ -62,9 +62,9 @@ $langs->load("main");
print '<div class="menu_bloc">';
print '<ul class="menu">';
// Link to new sell
print '<li class="menu_choix1"><a href="affIndex.php?menutpl=facturation&id=NOUV"><span>'.$langs->trans("NewSell").'</span></a></li>';
print '<li class="menu_choix1"><a href="affIndex.php?menutpl=facturation&id=NOUV"><span class="hideonsmartphone">'.$langs->trans("NewSell").'</span></a></li>';
// Open new tab on backoffice (this is not a disconnect from POS)
print '<li class="menu_choix2"><a href=".." target="backoffice"><span>'.$langs->trans("BackOffice").'</span></a></li>';
print '<li class="menu_choix2"><a href=".." target="backoffice"><span class="hideonsmartphone">'.$langs->trans("BackOffice").'</span></a></li>';
// Disconnect
print '<li class="menu_choix0">'.$langs->trans("User").': '.$_SESSION['firstname'].' '.$_SESSION['lastname'];
print ' <a href="deconnexion.php">'.img_picto($langs->trans('Logout'), 'logout.png').'</a><br>';

View File

@@ -5,7 +5,7 @@
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013-2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013-2016 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
@@ -618,17 +618,19 @@ class Categorie extends CommonObject
{
if ($this->db->num_rows($resql) > 0)
{
$objparent = $this->db->fetch_object($resql);
$objparent = $this->db->fetch_object($resql);
if (!empty($objparent->fk_parent))
{
$cat = new Categorie($this->db);
$cat->id=$objparent->fk_parent;
$result=$cat->add_type($obj, $type);
if ($result < 0)
{
$this->error=$cat->error;
$error++;
$cat->id = $objparent->fk_parent;
if (!$cat->containsObject($type, $obj->id)) {
$result = $cat->add_type($obj, $type);
if ($result < 0)
{
$this->error = $cat->error;
$error++;
}
}
}
}
@@ -1487,14 +1489,14 @@ class Categorie extends CommonObject
{
while (($file = readdir($handle)) !== false)
{
if (dol_is_file($dir.$file) && preg_match('/(\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$dir.$file))
if (dol_is_file($dir.$file) && preg_match('/(\.jpeg|\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$dir.$file))
{
$nbphoto++;
$photo = $file;
// On determine nom du fichier vignette
$photo_vignette='';
if (preg_match('/(\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$photo,$regs))
if (preg_match('/(\.jpeg|\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$photo,$regs))
{
$photo_vignette=preg_replace('/'.$regs[0].'/i','',$photo).'_small'.$regs[0];
}
@@ -1537,7 +1539,7 @@ class Categorie extends CommonObject
dol_delete_file($file,1);
// Si elle existe, on efface la vignette
if (preg_match('/(\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$filename,$regs))
if (preg_match('/(\.jpeg|\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i',$filename,$regs))
{
$photo_vignette=preg_replace('/'.$regs[0].'/i','',$filename).'_small'.$regs[0];
if (file_exists($dirthumb.$photo_vignette))

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
*
@@ -147,7 +147,7 @@ dol_fiche_head('');
print '<table class="border" width="100%">';
// Ref
print '<tr><td class="fieldrequired" width="25%">';
print '<tr><td class="titlefieldcreate fieldrequired">';
print $langs->trans("Ref").'</td>';
print '<td><input type="text" size="25" id="label" name ="label" value="'.$object->label.'" />';
print '</tr>';

View File

@@ -853,6 +853,9 @@ if ($id > 0)
$result3=$object->fetch_contact();
$result4=$object->fetch_userassigned();
$result5=$object->fetch_optionals($id,$extralabels);
$percentage=in_array(GETPOST('status'),array(-1,100))?GETPOST('status'):(in_array(GETPOST('complete'),array(-1,100))?GETPOST('complete'):GETPOST("percentage")); // If status is -1 or 100, percentage is not defined and we must use status
if($listUserAssignedUpdated || $donotclearsession) {
@@ -1030,7 +1033,7 @@ if ($id > 0)
// Status
print '<tr><td class="nowrap">'.$langs->trans("Status").' / '.$langs->trans("Percentage").'</td><td colspan="3">';
$percent=GETPOST("percentage")?GETPOST("percentage"):$object->percentage;
$percent = GETPOST("percentage") ? GETPOST("percentage"): $object->percentage;
$formactions->form_select_status_action('formaction',$percent,1);
print '</td></tr>';

View File

@@ -2,8 +2,8 @@
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1255,6 +1255,7 @@ class ActionComm extends CommonObject
{
// Note: Output of sql request is encoded in $conf->file->character_set_client
// This assignment in condition is not a bug. It allows walking the results.
$diff = 0;
while ($obj=$this->db->fetch_object($resql))
{
$qualified=true;
@@ -1289,8 +1290,9 @@ class ActionComm extends CommonObject
if ($qualified && $datestart)
{
$eventarray[$datestart]=$event;
$eventarray[$datestart+$diff]=$event;
}
$diff++;
}
}
else

View File

@@ -933,7 +933,14 @@ if (count($listofextcals))
// Complete $eventarray with events coming from external module
$parameters=array(); $object=null;
$reshook=$hookmanager->executeHooks('getCalendarEvents',$parameters,$object,$action);
if (! empty($hookmanager->resArray['eventarray'])) $eventarray=array_merge($eventarray, $hookmanager->resArray['eventarray']);
if (! empty($hookmanager->resArray['eventarray'])) {
foreach ($hookmanager->resArray['eventarray'] as $keyDate => $events) {
if (!isset($eventarray[$keyDate])) {
$eventarray[$keyDate]=array();
}
$eventarray[$keyDate]=array_merge($eventarray[$keyDate], $events);
}
}

View File

@@ -61,7 +61,6 @@ $result = restrictedArea($user,'societe',$id,'&societe');
$action = GETPOST('action');
$mode = GETPOST("mode");
$modesearch = GETPOST("mode_search");
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@@ -88,7 +87,7 @@ $hookmanager->initHooks(array('commcard','globalcard'));
* Actions
*/
$parameters = array('socid' => $id);
$parameters = array('id' => $id, 'socid' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@@ -192,41 +191,15 @@ $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('',$title,$help_url);
/*
if ($mode == 'search')
{
if ($modesearch == 'soc')
{
// TODO move to DAO class
$sql = "SELECT s.rowid";
if (!$user->rights->societe->client->voir && !$id) $sql .= ", sc.fk_soc, sc.fk_user ";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
if (!$user->rights->societe->client->voir && !$id) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE lower(s.nom) like '%".strtolower($socname)."%'";
if (!$user->rights->societe->client->voir && !$id) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
}
$resql=$db->query($sql);
if ($resql)
{
if ( $db->num_rows($resql) == 1)
{
$obj = $db->fetch_object($resql);
$id = $obj->rowid;
}
$db->free($resql);
}
}
*/
if ($id > 0)
{
$head = societe_prepare_head($object);
dol_fiche_head($head, 'customer', $langs->trans("ThirdParty"),0,'company');
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
$linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'socid', $linkback, ($user->societe_id?0:1), 'rowid', 'nom');
print '<div class="fichecenter"><div class="fichehalfleft">';
@@ -481,7 +454,7 @@ if ($id > 0)
{
$langs->load("members");
$langs->load("users");
print '<tr><td width="25%">'.$langs->trans("LinkedToDolibarrMember").'</td>';
print '<tr><td class="titlefield">'.$langs->trans("LinkedToDolibarrMember").'</td>';
print '<td colspan="3">';
$adh=new Adherent($db);
$result=$adh->fetch('','',$object->id);

View File

@@ -71,7 +71,7 @@ if (! empty($conf->supplier_proposal->enabled)) $supplierproposalstatic=new Supp
if (! empty($conf->commande->enabled)) $orderstatic=new Commande($db);
if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFournisseur($db);
llxHeader();
llxHeader("",$langs->trans("CommercialArea"));
print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png');
@@ -118,7 +118,7 @@ if (count($listofsearchfields))
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td class="noborderbottom" rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button "></td>';
print '</tr>';
$i++;

View File

@@ -753,10 +753,13 @@ else
$sendingmode=$conf->global->MAIN_MAIL_SENDMODE;
if (empty($sendingmode)) $sendingmode='mail'; // If not defined, we use php mail function
// MAILING_NO_USING_PHPMAIL may be defined or not.
// MAILING_LIMIT_SENDBYWEB is always defined to something != 0 (-1=forbidden).
// MAILING_LIMIT_SENDBYCLI may be defined ot not (-1=forbidden, 0 or undefined=no limit).
if (! empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail')
{
// EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent.
// You ensure that every user is using its own SMTP server.
// You ensure that every user is using its own SMTP server when using the mass emailing module.
$linktoadminemailbefore='<a href="'.DOL_URL_ROOT.'/admin/mails.php">';
$linktoadminemailend='</a>';
setEventMessages($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), null, 'warnings');
@@ -764,19 +767,27 @@ else
if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessages($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), null, 'warnings');
$_GET["action"]='';
}
else if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
else if ($conf->global->MAILING_LIMIT_SENDBYWEB == '-1')
{
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
// on affiche donc juste un message
setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL), null, 'warnings');
// The feature is forbidden from GUI, we show just message to use from command line.
setEventMessages($langs->trans("MailingNeedCommand"), null, 'warnings');
setEventMessages('<textarea cols="60" rows="'.ROWS_1.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.'</textarea>', null, 'warnings');
setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings');
if ($conf->file->mailing_limit_sendbyweb != '-1') // MAILING_LIMIT_SENDBYWEB was set to -1 in database, but it is allowed ot increase it.
{
setEventMessages($langs->trans("MailingNeedCommand2"), null, 'warnings'); // You can send online with constant...
}
$_GET["action"]='';
}
else
{
$text='';
if ($conf->file->mailing_limit_sendbyweb == 0)
if (! empty($conf->global->MAILING_LIMIT_WARNING_PHPMAIL) && $sendingmode == 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_PHPMAIL), null, 'warnings');
if (! empty($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL) && $sendingmode != 'mail') setEventMessages($langs->transnoentitiesnoconv($conf->global->MAILING_LIMIT_WARNING_NOPHPMAIL), null, 'warnings');
$text='';
if ($conf->global->MAILING_LIMIT_SENDBYCLI >= 0)
{
$text.=$langs->trans("MailingNeedCommand");
$text.='<br><textarea cols="60" rows="'.ROWS_2.'" wrap="soft">php ./scripts/emailings/mailing-send.php '.$object->id.' '.$user->login.'</textarea>';
@@ -784,7 +795,7 @@ else
}
$text.=$langs->trans('ConfirmSendingEmailing').'<br>';
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270);
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,300);
}
}
@@ -822,23 +833,28 @@ else
print $langs->trans("TotalNbOfDistinctRecipients");
print '</td><td colspan="3">';
$nbemail = ($object->nbemail?$object->nbemail:img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>');
if ($object->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
if ($object->statut != 3 && is_numeric($nbemail))
{
if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0)
{
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
print $form->textwithpicto($nbemail,$text,1,'warning');
}
else
{
$text=$langs->trans('NotEnoughPermissions');
print $form->textwithpicto($nbemail,$text,1,'warning');
}
}
else
{
print $nbemail;
$text='';
if (! empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
{
if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0)
{
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
}
else
{
$text.=$langs->trans('NotEnoughPermissions');
}
}
if ($text)
{
print $form->textwithpicto($nbemail,$text,1,'warning');
}
else
{
print $nbemail;
}
}
print '</td></tr>';

View File

@@ -651,6 +651,7 @@ class Propal extends CommonObject
//Fetch current line from the database and then clone the object and set it in $oldline property
$line = new PropaleLigne($this->db);
$line->fetch($rowid);
$line->fetch_optionals(); // Fetch extrafields for oldcopy
$staticline = clone $line;
@@ -910,7 +911,7 @@ class Propal extends CommonObject
if ($this->id)
{
$this->ref='(PROV'.$this->id.')';
$sql = 'UPDATE '.MAIN_DB_PREFIX."propal SET ref='".$this->ref."' WHERE rowid=".$this->id;
$sql = 'UPDATE '.MAIN_DB_PREFIX."propal SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".$this->id;
dol_syslog(get_class($this)."::create", LOG_DEBUG);
$resql=$this->db->query($sql);
@@ -926,7 +927,7 @@ class Propal extends CommonObject
for ($i=0;$i<$num;$i++)
{
// Reset fk_parent_line for no child products and special product
// Reset fk_parent_line for line that are not child lines or special product
if (($this->lines[$i]->product_type != 9 && empty($this->lines[$i]->fk_parent_line)) || $this->lines[$i]->product_type == 9) {
$fk_parent_line = 0;
}
@@ -942,7 +943,7 @@ class Propal extends CommonObject
$this->lines[$i]->remise_percent,
'HT',
0,
0,
$this->lines[$i]->info_bits,
$this->lines[$i]->product_type,
$this->lines[$i]->rang,
$this->lines[$i]->special_code,
@@ -1135,14 +1136,9 @@ class Propal extends CommonObject
}
$clonedObj->id=0;
$clonedObj->ref='';
$clonedObj->statut=self::STATUS_DRAFT;
if (empty($conf->global->PROPALE_ADDON) || ! is_readable(DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.".php"))
{
$this->error='ErrorSetupNotComplete';
return -1;
}
// Clear fields
$clonedObj->user_author = $user->id;
$clonedObj->user_valid = '';
@@ -1151,13 +1147,8 @@ class Propal extends CommonObject
$clonedObj->fin_validite = $clonedObj->date + ($clonedObj->duree_validite * 24 * 3600);
if (empty($conf->global->MAIN_KEEP_REF_CUSTOMER_ON_CLONING)) $clonedObj->ref_client = '';
// Set ref
require_once DOL_DOCUMENT_ROOT ."/core/modules/propale/".$conf->global->PROPALE_ADDON.'.php';
$obj = $conf->global->PROPALE_ADDON;
$modPropale = new $obj;
$clonedObj->ref = $modPropale->getNextValue($objsoc,$clonedObj);
// Create clone
$result=$clonedObj->create($user);
if ($result < 0) $error++;
else
@@ -2803,20 +2794,33 @@ class Propal extends CommonObject
*/
function getNomUrl($withpicto=0,$option='', $get_params='')
{
global $langs, $conf;
global $langs, $conf, $user;
$result='';
$label = '<u>' . $langs->trans("ShowPropal") . '</u>';
if (! empty($this->ref))
$label.= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
if (! empty($this->ref_client))
$label.= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
if (! empty($this->total_ht))
$label.= '<br><b>' . $langs->trans('AmountHT') . ':</b> ' . price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_tva))
$label.= '<br><b>' . $langs->trans('VAT') . ':</b> ' . price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency);
if (! empty($this->total_ttc))
$label.= '<br><b>' . $langs->trans('AmountTTC') . ':</b> ' . price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency);
$label = '';
if ($user->rights->propal->lire) {
$label .= '<u>'.$langs->trans("ShowPropal").'</u>';
if (!empty($this->ref)) {
$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
}
if (!empty($this->ref_client)) {
$label .= '<br><b>'.$langs->trans('RefCustomer').':</b> '.$this->ref_client;
}
if (!empty($this->total_ht)) {
$label .= '<br><b>'.$langs->trans('AmountHT').':</b> '.price($this->total_ht, 0, $langs, 0, -1, -1,
$conf->currency);
}
if (!empty($this->total_tva)) {
$label .= '<br><b>'.$langs->trans('VAT').':</b> '.price($this->total_tva, 0, $langs, 0, -1, -1,
$conf->currency);
}
if (!empty($this->total_ttc)) {
$label .= '<br><b>'.$langs->trans('AmountTTC').':</b> '.price($this->total_ttc, 0, $langs, 0, -1, -1,
$conf->currency);
}
}
$linkclose = '" title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip">';
if ($option == '') {
$link = '<a href="'.DOL_URL_ROOT.'/comm/propal/card.php?id='.$this->id. $get_params .$linkclose;
@@ -3224,7 +3228,11 @@ class PropaleLigne extends CommonObjectLine
if (empty($this->fk_fournprice)) $this->fk_fournprice=0;
if (! is_numeric($this->qty)) $this->qty = 0;
if (empty($this->pa_ht)) $this->pa_ht=0;
if (empty($this->multicurrency_subprice)) $this->multicurrency_subprice=0;
if (empty($this->multicurrency_total_ht)) $this->multicurrency_total_ht=0;
if (empty($this->multicurrency_total_tva)) $this->multicurrency_total_tva=0;
if (empty($this->multicurrency_total_ttc)) $this->multicurrency_total_ttc=0;
// if buy price not defined, define buyprice as configured in margin admin
if ($this->pa_ht == 0 && $pa_ht_isemptystring)
{
@@ -3435,14 +3443,14 @@ class PropaleLigne extends CommonObjectLine
$sql.= " , tva_tx='".price2num($this->tva_tx)."'";
$sql.= " , localtax1_tx=".price2num($this->localtax1_tx);
$sql.= " , localtax2_tx=".price2num($this->localtax2_tx);
$sql.= " , localtax1_type='".$this->localtax1_type."'";
$sql.= " , localtax2_type='".$this->localtax2_type."'";
$sql.= " , localtax1_type='".$this->db->escape($this->localtax1_type)."'";
$sql.= " , localtax2_type='".$this->db->escape($this->localtax2_type)."'";
$sql.= " , qty='".price2num($this->qty)."'";
$sql.= " , subprice=".price2num($this->subprice)."";
$sql.= " , remise_percent=".price2num($this->remise_percent)."";
$sql.= " , price=".price2num($this->price).""; // TODO A virer
$sql.= " , remise=".price2num($this->remise).""; // TODO A virer
$sql.= " , info_bits='".$this->info_bits."'";
$sql.= " , info_bits='".$this->db->escape($this->info_bits)."'";
if (empty($this->skip_update_total))
{
$sql.= " , total_ht=".price2num($this->total_ht)."";

View File

@@ -10,6 +10,7 @@
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -356,6 +357,7 @@ if ($result)
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($sall) $param.='&sall='.$sall;
if ($month) $param.='&month='.$month;
if ($year) $param.='&year='.$year;
if ($search_ref) $param.='&search_ref=' .$search_ref;

View File

@@ -114,7 +114,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
$newdiscount2->amount_ttc=price2num($discount->amount_ttc-$newdiscount1->amount_ttc);
$newdiscount1->amount_ht=price2num($newdiscount1->amount_ttc/(1+$newdiscount1->tva_tx/100),'MT');
$newdiscount2->amount_ht=price2num($newdiscount2->amount_ttc/(1+$newdiscount2->tva_tx/100),'MT');
$newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount2->amount_ht);
$newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount1->amount_ht);
$newdiscount2->amount_tva=price2num($newdiscount2->amount_ttc-$newdiscount2->amount_ht);
$db->begin();

View File

@@ -1595,7 +1595,14 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<tr>';
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $objectsrc->libelle_incoterms, 1).'</label></td>';
print '<td colspan="3" class="maxwidthonsmartphone">';
print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:''));
$incoterm_id = GETPOST('incoterm_id');
$incoterm_location = GETPOST('location_incoterms');
if (empty($incoterm_id))
{
$incoterm_id = (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : $soc->fk_incoterms);
$incoterm_location = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms);
}
print $form->select_incoterms($incoterm_id, $incoterm_location);
print '</td></tr>';
}
@@ -1974,7 +1981,7 @@ if ($action == 'create' && $user->rights->commande->creer)
print '<table class="nobordernopadding" width="100%"><tr><td class="nowrap">';
print $langs->trans('RefCustomer') . '</td><td align="left">';
print '</td>';
if ($action != 'refcustomer' && $object->brouillon)
if ($action != 'refcustomer')
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?action=refcustomer&amp;id=' . $object->id . '">' . img_edit($langs->trans('Modify')) . '</a></td>';
print '</tr></table>';
print '</td><td colspan="3">';
@@ -2513,7 +2520,7 @@ if ($action == 'create' && $user->rights->commande->creer)
}
// Create contract
if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED)) {
if ($conf->contrat->enabled && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_ACCEPTED || $object->statut == Commande::STATUS_CLOSED)) {
$langs->load("contracts");
if ($user->rights->contrat->creer) {

View File

@@ -193,7 +193,7 @@ class CommandeApi extends DolibarrApi
* @return array Array of order objects
*/
function getListForSoc($socid = 0) {
return getList(0,"s.rowid","ASC",0,0,$socid);
return $this->getList(0,"s.rowid","ASC",0,0,$socid);
}

View File

@@ -9,7 +9,7 @@
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -135,6 +135,7 @@ class Commande extends CommonOrder
var $linked_objects=array();
var $user_author_id;
var $user_valid;
/**
* @var OrderLine[]
@@ -239,7 +240,8 @@ class Commande extends CommonOrder
}
else
{
dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error);
$this->error=$obj->error;
//dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error);
return "";
}
}
@@ -276,7 +278,7 @@ class Commande extends CommonOrder
if (! ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->creer))
|| (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && ! empty($user->rights->commande->order_advance->validate))))
{
$this->error='ErrorPermissionDenied';
$this->error='NotEnoughPermissions';
dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR);
return -1;
}
@@ -1504,7 +1506,7 @@ class Commande extends CommonOrder
// Check parameters
if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1;
$sql = 'SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_statut';
$sql = 'SELECT c.rowid, c.date_creation, c.ref, c.fk_soc, c.fk_user_author, c.fk_user_valid, c.fk_statut';
$sql.= ', c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_tva, c.localtax1 as total_localtax1, c.localtax2 as total_localtax2, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_availability, c.fk_input_reason';
$sql.= ', c.fk_account';
$sql.= ', c.date_commande';
@@ -1548,6 +1550,7 @@ class Commande extends CommonOrder
$this->socid = $obj->fk_soc;
$this->statut = $obj->fk_statut;
$this->user_author_id = $obj->fk_user_author;
$this->user_valid = $obj->fk_user_valid;
$this->total_ht = $obj->total_ht;
$this->total_tva = $obj->total_tva;
$this->total_localtax1 = $obj->total_localtax1;
@@ -2765,8 +2768,8 @@ class Commande extends CommonOrder
$sql.= " total_ht=".(isset($this->total_ht)?$this->total_ht:"null").",";
$sql.= " total_ttc=".(isset($this->total_ttc)?$this->total_ttc:"null").",";
$sql.= " fk_statut=".(isset($this->statut)?$this->statut:"null").",";
$sql.= " fk_user_author=".(isset($this->user_author)?$this->user_author:"null").",";
$sql.= " fk_user_valid=".(isset($this->fk_user_valid)?$this->fk_user_valid:"null").",";
$sql.= " fk_user_author=".(isset($this->user_author_id)?$this->user_author_id:"null").",";
$sql.= " fk_user_valid=".(isset($this->user_valid)?$this->user_valid:"null").",";
$sql.= " fk_projet=".(isset($this->fk_project)?$this->fk_project:"null").",";
$sql.= " fk_cond_reglement=".(isset($this->cond_reglement_id)?$this->cond_reglement_id:"null").",";
$sql.= " fk_mode_reglement=".(isset($this->mode_reglement_id)?$this->mode_reglement_id:"null").",";
@@ -3630,7 +3633,7 @@ class OrderLine extends CommonOrderLine
$this->db->begin();
$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE rowid='".$this->rowid."';";
$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE rowid=".$this->rowid;
dol_syslog("OrderLine::delete", LOG_DEBUG);
$resql=$this->db->query($sql);
@@ -3871,8 +3874,8 @@ class OrderLine extends CommonOrderLine
$sql.= " , tva_tx=".price2num($this->tva_tx);
$sql.= " , localtax1_tx=".price2num($this->localtax1_tx);
$sql.= " , localtax2_tx=".price2num($this->localtax2_tx);
$sql.= " , localtax1_type='".$this->localtax1_type."'";
$sql.= " , localtax2_type='".$this->localtax2_type."'";
$sql.= " , localtax1_type='".$this->db->escape($this->localtax1_type)."'";
$sql.= " , localtax2_type='".$this->db->escape($this->localtax2_type)."'";
$sql.= " , qty=".price2num($this->qty);
$sql.= " , subprice=".price2num($this->subprice)."";
$sql.= " , remise_percent=".price2num($this->remise_percent)."";

View File

@@ -81,7 +81,8 @@ class CommandeStats extends Stats
$this->where.= " c.fk_statut > 2"; // Only approved & ordered
}
//$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
$this->where.= " AND c.entity = ".$conf->entity;
$this->where.= ' AND c.entity IN ('.getEntity('commande', 1).')';
if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id;
if ($this->socid)
{

View File

@@ -383,6 +383,7 @@ if ($resql)
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($sall) $param.='&sall='.$sall;
if ($socid > 0) $param.='&socid='.$socid;
if ($viewstatut != '') $param.='&viewstatut='.$viewstatut;
if ($orderday) $param.='&orderday='.$orderday;
@@ -400,6 +401,8 @@ if ($resql)
if ($search_total_vat != '') $param.='&search_total_vat='.$search_total_vat;
if ($search_total_ttc != '') $param.='&search_total_ttc='.$search_total_ttc;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
if ($billed != '') $param.='&billed='.$billed;
// Add $param from extra fields
foreach ($search_array_options as $key => $val)
{

View File

@@ -833,7 +833,7 @@ if ($id > 0 || ! empty($ref))
{
$loanstatic->label=$links[$key]['label'];
}
$loanstatic->ref=$loanstatic->label;
$loanstatic->ref=$links[$key]['url_id'];
print $loanstatic->getLinkUrl(1,16);
}
else if ($links[$key]['type']=='member')

View File

@@ -60,10 +60,12 @@ $extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label($account->table_element);
/*
* Actions
*/
if ($_POST["action"] == 'add')
if ($action == 'add')
{
$error=0;
@@ -129,6 +131,8 @@ if ($_POST["action"] == 'add')
if (! $error)
{
$db->begin();
$id = $account->create($user);
if ($id > 0)
{
@@ -137,15 +141,20 @@ if ($_POST["action"] == 'add')
$account->setCategories($categories);
$_GET["id"]=$id; // Force chargement page en mode visu
$action='';
$db->commit();
}
else {
$db->rollback();
setEventMessages($account->error, $account->errors, 'errors');
$action='create'; // Force chargement page en mode creation
}
}
}
if ($_POST["action"] == 'update' && ! $_POST["cancel"])
if ($action == 'update' && ! $_POST["cancel"])
{
$error=0;
@@ -226,15 +235,24 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
}
}
if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->banque->configurer)
if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->banque->configurer)
{
// Delete
$account = new Account($db);
$account->fetch($_GET["id"]);
$account->delete();
$result = $account->delete($user);
header("Location: ".DOL_URL_ROOT."/compta/bank/index.php");
exit;
if ($result > 0)
{
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
header("Location: ".DOL_URL_ROOT."/compta/bank/index.php");
exit;
}
else
{
setEventMessages($account->error, $account->errors, 'errors');
$action='';
}
}

View File

@@ -72,6 +72,7 @@ if ($categid) {
}
}
/*
* View
*/
@@ -79,7 +80,7 @@ if ($categid) {
llxHeader();
print load_fiche_titre($langs->trans("Rubriques"), '', 'title_bank.png');
print load_fiche_titre($langs->trans("RubriquesTransactions"), '', 'title_bank.png');
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';

View File

@@ -235,7 +235,7 @@ class Account extends CommonObject
$this->status = array(
self::STATUS_OPEN => $langs->trans("StatusAccountOpened"),
self::STATUS_CLOSED => $langs->trans("StatusAccountOpened")
self::STATUS_CLOSED => $langs->trans("StatusAccountClosed")
);
}
@@ -380,7 +380,7 @@ class Account extends CommonObject
/**
* Add an entry into table ".MAIN_DB_PREFIX."bank
*
* @param int $date Date operation
* @param int $date Date operation
* @param string $oper 1,2,3,4... (deprecated) or TYP,VIR,PRE,LIQ,VAD,CB,CHQ...
* @param string $label Descripton
* @param float $amount Amount
@@ -596,12 +596,15 @@ class Account extends CommonObject
$accline->datec = $this->db->idate($now);
$accline->label = '('.$langs->trans("InitialBankBalance").')';
$accline->amount = price2num($this->solde);
$accline->fk_user_author = $user->id;
$accline->fk_account = $this->id;
$accline->datev = $this->db->idate($this->date_solde);
$accline->dateo = $this->db->idate($this->date_solde);
$accline->fk_type = 'SOLD';
if ($accline->insert() < 0) {
$this->error = $accline->error;
$this->errors = $accline->errors;
return -3;
}
@@ -680,17 +683,17 @@ class Account extends CommonObject
$sql.= ",accountancy_journal = '".$this->accountancy_journal."'";
$sql.= ",bank = '".$this->db->escape($this->bank)."'";
$sql.= ",code_banque='".$this->code_banque."'";
$sql.= ",code_guichet='".$this->code_guichet."'";
$sql.= ",number='".$this->number."'";
$sql.= ",cle_rib='".$this->cle_rib."'";
$sql.= ",bic='".$this->bic."'";
$sql.= ",iban_prefix = '".$this->iban."'";
$sql.= ",code_banque='".$this->db->escape($this->code_banque)."'";
$sql.= ",code_guichet='".$this->db->escape($this->code_guichet)."'";
$sql.= ",number='".$this->db->escape($this->number)."'";
$sql.= ",cle_rib='".$this->db->escape($this->cle_rib)."'";
$sql.= ",bic='".$this->db->escape($this->bic)."'";
$sql.= ",iban_prefix = '".$this->db->escape($this->iban)."'";
$sql.= ",domiciliation='".$this->db->escape($this->domiciliation)."'";
$sql.= ",proprio = '".$this->db->escape($this->proprio)."'";
$sql.= ",owner_address = '".$this->db->escape($this->owner_address)."'";
$sql.= ",currency_code = '".$this->currency_code."'";
$sql.= ",currency_code = '".$this->db->escape($this->currency_code)."'";
$sql.= ",min_allowed = ".($this->min_allowed != '' ? price2num($this->min_allowed) : "null");
$sql.= ",min_desired = ".($this->min_desired != '' ? price2num($this->min_desired) : "null");
@@ -764,12 +767,12 @@ class Account extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."bank_account SET ";
$sql.= " bank = '".$this->db->escape($this->bank)."'";
$sql.= ",code_banque='".$this->code_banque."'";
$sql.= ",code_guichet='".$this->code_guichet."'";
$sql.= ",number='".$this->number."'";
$sql.= ",cle_rib='".$this->cle_rib."'";
$sql.= ",bic='".$this->bic."'";
$sql.= ",iban_prefix = '".$this->iban."'";
$sql.= ",code_banque='".$this->db->escape($this->code_banque)."'";
$sql.= ",code_guichet='".$this->db->escape($this->code_guichet)."'";
$sql.= ",number='".$this->db->escape($this->number)."'";
$sql.= ",cle_rib='".$this->db->escape($this->cle_rib)."'";
$sql.= ",bic='".$this->db->escape($this->bic)."'";
$sql.= ",iban_prefix = '".$this->db->escape($this->iban)."'";
$sql.= ",domiciliation='".$this->db->escape($this->domiciliation)."'";
$sql.= ",proprio = '".$this->db->escape($this->proprio)."'";
$sql.= ",owner_address = '".$this->db->escape($this->owner_address)."'";
@@ -947,29 +950,60 @@ class Account extends CommonObject
{
global $conf;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE rowid = ".$this->rowid;
$sql.= " AND entity = ".$conf->entity;
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) {
// Remove extrafields
if ((empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
{
$result=$this->deleteExtraFields();
if ($result < 0)
{
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
return -1;
}
}
$error=0;
$this->db->begin();
// Delete link between tag and bank account
if (! $error)
{
//$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class"; // No more used
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account";
$sql.= " WHERE fk_account = ".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$error++;
$this->error = "Error ".$this->db->lasterror();
}
}
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE rowid = ".$this->rowid;
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$result = $this->db->query($sql);
if ($result)
{
// Remove extrafields
if ((empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
{
$result=$this->deleteExtraFields();
if ($result < 0)
{
$error++;
dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR);
}
}
}
else
{
$error++;
$this->error = "Error ".$this->db->lasterror();
}
}
if (! $error)
{
$this->db->commit();
return 1;
}
else {
dol_print_error($this->db);
else
{
$this->db->rollback();
return -1;
}
}

View File

@@ -188,29 +188,60 @@ class BankCateg // extends CommonObject
/**
* Delete object in database
*
* @param User $user User that delete
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
* @param User $user User that delete
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
public function delete(User $user, $notrigger = 0)
{
global $conf;
$error = 0;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
$sql .= " WHERE rowid=".$this->id;
$sql .= " AND entity = ".$conf->entity;
$this->db->begin();
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$resql = $this->db->query($sql);
if (!$resql) {
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
// Delete link between tag and bank account
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_account";
$sql.= " WHERE fk_categorie = ".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
}
}
// Commit or rollback
// Delete link between tag and bank lines
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class";
$sql.= " WHERE fk_categ = ".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
}
}
// Delete bank categ
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
$sql .= " WHERE rowid=".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$error++;
$this->errors[] = "Error ".$this->db->lasterror();
}
}
// Commit or rollback
if ($error) {
foreach ($this->errors as $errmsg) {
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);

View File

@@ -221,8 +221,8 @@ if ($resql)
print_liste_field_titre($langs->trans("Numero"),$_SERVER['PHP_SELF'],'b.num_releve','',$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Description"),$_SERVER['PHP_SELF'],'','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER['PHP_SELF'],'bu.label','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Debit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Credit"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Debit"),$_SERVER['PHP_SELF'],'b.amount','',$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Credit"),$_SERVER['PHP_SELF'],'b.amount','',$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Account"),$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre('');
print "</tr>\n";

View File

@@ -282,6 +282,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$refcomp=$societestatic->getNomUrl(1,'',24);
$paiement = $facturestatic->getSommePaiement(); // Payment already done
$paiement+= $facturestatic->getSumDepositsUsed();
$paiement+= $facturestatic->getSumCreditNotesUsed();
}
if ($obj->family == 'social_contribution')
{

View File

@@ -43,7 +43,6 @@ accessforbidden();
$langs->load("companies");
$mode=GETPOST("mode");
$modesearch=GETPOST("mode_search");
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
@@ -70,20 +69,15 @@ if ($action == 'note')
$result = $db->query($sql);
}
if ($mode == 'search') {
if ($modesearch == 'soc') {
$sql = "SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s ";
$sql.= " WHERE s.nom LIKE '%".$db->escape(strtolower($socname))."%'";
$sql.= " AND s.entity IN (".getEntity('societe', 1).")";
}
if ($mode == 'search')
{
$resql=$db->query($sql);
if ($resql) {
if ( $db->num_rows($resql) == 1) {
$obj = $db->fetch_object($resql);
$socid = $obj->rowid;
}
$db->free();
$db->free($resql);
}
}

View File

@@ -66,7 +66,6 @@ if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
if (! empty($conf->margin->enabled))
$langs->load('margins');
$sall = trim(GETPOST('sall'));
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
@@ -813,14 +812,14 @@ if (empty($reshook))
$line->fk_parent_line = $fk_parent_line;
$line->subprice =-$line->subprice; // invert price for object
$line->pa_ht = -$line->pa_ht;
$line->pa_ht = $line->pa_ht; // we choosed to have buy/cost price always positive, so no revert of sign here
$line->total_ht=-$line->total_ht;
$line->total_tva=-$line->total_tva;
$line->total_ttc=-$line->total_ttc;
$line->total_localtax1=-$line->total_localtax1;
$line->total_localtax2=-$line->total_localtax2;
$result = $line->insert();
$result = $line->insert(0, 1); // When creating credit note with same lines than source, we must ignore error if discount alreayd linked
$object->lines[] = $line; // insert new line in current object
@@ -1154,7 +1153,9 @@ if (empty($reshook))
// Extrafields
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) {
$lines[$i]->fetch_optionals($lines[$i]->rowid);
$targetExtraFields = new ExtraFields($db);
$targetExtraFieldLabels = $targetExtraFields->fetch_name_optionals_label($object->table_element_line);
$lines[$i]->fetch_optionals($lines[$i]->rowid, $targetExtraFieldLabels);
$array_options = $lines[$i]->array_options;
}
@@ -1996,7 +1997,9 @@ if ($action == 'create')
if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code;
}
if(!empty($soc->id)) $absolute_discount = $soc->getAvailableDiscounts();
if (!empty($soc->id)) $absolute_discount = $soc->getAvailableDiscounts();
$note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc)?$objectsrc->note_public:null));
$note_private = $object->getDefaultCreateValueFor('note_private', ((! empty($origin) && ! empty($originid) && is_object($objectsrc))?$objectsrc->note_private:null));
if (! empty($conf->use_javascript_ajax))
{
@@ -2078,13 +2081,19 @@ if ($action == 'create')
}
print '</tr>' . "\n";
// Predefined invoices
// Overwrite value if creation of invoice is from a predefined invoice
if (empty($origin) && empty($originid) && GETPOST('fac_rec','int') > 0)
{
$invoice_predefined = new FactureRec($db);
$invoice_predefined->fetch(GETPOST('fac_rec','int'));
$dateinvoice = $invoice_predefined->date_when; // To use next gen date by default later
if (empty($projectid)) $projectid = $invoice_predefined->fk_project;
$cond_reglement_id = $invoice_predefined->cond_reglement_id;
$mode_reglement_id = $invoice_predefined->mode_reglement_id;
$fk_account = $invoice_predefined->fk_account;
$note_public = $invoice_predefined->note_public;
$note_private = $invoice_predefined->note_private;
$sql = 'SELECT r.rowid, r.titre, r.total_ttc';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'facture_rec as r';
@@ -2190,31 +2199,34 @@ if ($action == 'create')
if ((empty($origin)) || ((($origin == 'propal') || ($origin == 'commande')) && (! empty($originid))))
{
// Deposit
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#typedeposit, #valuedeposit").click(function() {
jQuery("#radio_deposit").prop("checked", true);
});
});
</script>';
if (empty($conf->global->INVOICE_DISABLE_DEPOSIT))
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_deposit" name="type" value="3"' . (GETPOST('type') == 3 ? ' checked' : '') . '> ';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#typedeposit, #valuedeposit").click(function() {
jQuery("#radio_deposit").prop("checked", true);
});
});
</script>';
$desc = $form->textwithpicto($tmp.$langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3);
print '<table class="nobordernopadding"><tr><td>';
print $desc;
print '</td>';
if (($origin == 'propal') || ($origin == 'commande'))
{
print '<td class="nowrap" style="padding-left: 5px">';
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
print '</td>';
print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>';
}
print '</td></tr></table>';
$desc = $form->textwithpicto($tmp.$langs->trans("InvoiceDeposit"), $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3);
print '<table class="nobordernopadding"><tr><td>';
print $desc;
print '</td>';
if (($origin == 'propal') || ($origin == 'commande'))
{
print '<td class="nowrap" style="padding-left: 5px">';
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
print $form->selectarray('typedeposit', $arraylist, GETPOST('typedeposit'), 0, 0, 0, '', 1);
print '</td>';
print '<td class="nowrap" style="padding-left: 5px">' . $langs->trans('Value') . ':<input type="text" id="valuedeposit" name="valuedeposit" size="3" value="' . GETPOST('valuedeposit', 'int') . '"/>';
}
print '</td></tr></table>';
print '</div></div>';
print '</div></div>';
}
}
if ($socid > 0)
@@ -2244,32 +2256,36 @@ if ($action == 'create')
}
// Replacement
print '<!-- replacement line --><div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOST('type') == 1 ? ' checked' : '');
if (! $options) $tmp.=' disabled';
$tmp.='> ';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#fac_replacement").change(function() {
jQuery("#radio_replacement").prop("checked", true);
});
});
</script>';
$text = $tmp.$langs->trans("InvoiceReplacementAsk") . ' ';
$text .= '<select class="flat" name="fac_replacement" id="fac_replacement"';
if (! $options)
$text .= ' disabled';
$text .= '>';
if ($options) {
$text .= '<option value="-1">&nbsp;</option>';
$text .= $options;
} else {
$text .= '<option value="-1">' . $langs->trans("NoReplacableInvoice") . '</option>';
if (empty($conf->global->INVOICE_DISABLE_REPLACEMENT))
{
print '<!-- replacement line -->';
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_replacement" value="1"' . (GETPOST('type') == 1 ? ' checked' : '');
if (! $options) $tmp.=' disabled';
$tmp.='> ';
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#fac_replacement").change(function() {
jQuery("#radio_replacement").prop("checked", true);
});
});
</script>';
$text = $tmp.$langs->trans("InvoiceReplacementAsk") . ' ';
$text .= '<select class="flat" name="fac_replacement" id="fac_replacement"';
if (! $options)
$text .= ' disabled';
$text .= '>';
if ($options) {
$text .= '<option value="-1">&nbsp;</option>';
$text .= $options;
} else {
$text .= '<option value="-1">' . $langs->trans("NoReplacableInvoice") . '</option>';
}
$text .= '</select>';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3);
print $desc;
print '</div></div>';
}
$text .= '</select>';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceReplacementDesc"), 1, 'help', '', 0, 3);
print $desc;
print '</div></div>';
}
else
{
@@ -2286,53 +2302,57 @@ if ($action == 'create')
{
if ($socid > 0)
{
// Credit note
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_creditnote" name="type" value="2"' . (GETPOST('type') == 2 ? ' checked' : '');
if (! $optionsav) $tmp.=' disabled';
$tmp.= '> ';
// Show credit note options only if we checked credit note
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
if (! jQuery("#radio_creditnote").is(":checked"))
{
jQuery("#credit_note_options").hide();
}
jQuery("#radio_creditnote").click(function() {
jQuery("#credit_note_options").show();
});
jQuery("#radio_standard, #radio_replacement, #radio_deposit").click(function() {
jQuery("#credit_note_options").hide();
});
});
</script>';
$text = $tmp.$langs->transnoentities("InvoiceAvoirAsk") . ' ';
// $text.='<input type="text" value="">';
$text .= '<select class="flat" name="fac_avoir" id="fac_avoir"';
if (! $optionsav)
$text .= ' disabled';
$text .= '>';
if ($optionsav) {
$text .= '<option value="-1"></option>';
$text .= $optionsav;
} else {
$text .= '<option value="-1">' . $langs->trans("NoInvoiceToCorrect") . '</option>';
}
$text .= '</select>';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
print $desc;
// Credit note
if (empty($conf->global->INVOICE_DISABLE_CREDIT_NOTE))
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" id="radio_creditnote" name="type" value="2"' . (GETPOST('type') == 2 ? ' checked' : '');
if (! $optionsav) $tmp.=' disabled';
$tmp.= '> ';
// Show credit note options only if we checked credit note
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
if (! jQuery("#radio_creditnote").is(":checked"))
{
jQuery("#credit_note_options").hide();
}
jQuery("#radio_creditnote").click(function() {
jQuery("#credit_note_options").show();
});
jQuery("#radio_standard, #radio_replacement, #radio_deposit").click(function() {
jQuery("#credit_note_options").hide();
});
});
</script>';
$text = $tmp.$langs->transnoentities("InvoiceAvoirAsk") . ' ';
// $text.='<input type="text" value="">';
$text .= '<select class="flat" name="fac_avoir" id="fac_avoir"';
if (! $optionsav)
$text .= ' disabled';
$text .= '>';
if ($optionsav) {
$text .= '<option value="-1"></option>';
$text .= $optionsav;
} else {
$text .= '<option value="-1">' . $langs->trans("NoInvoiceToCorrect") . '</option>';
}
$text .= '</select>';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
print $desc;
print '<div id="credit_note_options" class="clearboth">';
print '&nbsp;&nbsp;&nbsp; <input data-role="none" type="checkbox" name="invoiceAvoirWithLines" id="invoiceAvoirWithLines" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithPaymentRestAmount\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithLines','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithLines">'.$langs->trans('invoiceAvoirWithLines')."</label>";
print '<br>&nbsp;&nbsp;&nbsp; <input data-role="none" type="checkbox" name="invoiceAvoirWithPaymentRestAmount" id="invoiceAvoirWithPaymentRestAmount" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithLines\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithPaymentRestAmount','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithPaymentRestAmount">'.$langs->trans('invoiceAvoirWithPaymentRestAmount')."</label>";
print '</div>';
print '<div id="credit_note_options" class="clearboth">';
print '&nbsp;&nbsp;&nbsp; <input data-role="none" type="checkbox" name="invoiceAvoirWithLines" id="invoiceAvoirWithLines" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithPaymentRestAmount\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithLines','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithLines">'.$langs->trans('invoiceAvoirWithLines')."</label>";
print '<br>&nbsp;&nbsp;&nbsp; <input data-role="none" type="checkbox" name="invoiceAvoirWithPaymentRestAmount" id="invoiceAvoirWithPaymentRestAmount" value="1" onclick="if($(this).is(\':checked\') ) { $(\'#radio_creditnote\').prop(\'checked\', true); $(\'#invoiceAvoirWithLines\').removeAttr(\'checked\'); }" '.(GETPOST('invoiceAvoirWithPaymentRestAmount','int')>0 ? 'checked':'').' /> <label for="invoiceAvoirWithPaymentRestAmount">'.$langs->trans('invoiceAvoirWithPaymentRestAmount')."</label>";
print '</div>';
print '</div></div>';
print '</div></div>';
}
}
else
{
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp='<input type="radio" name="type" id="radio_creditnote" value="0" disabled> ';
if (empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp='<input type="radio" name="type" id="radio_creditnote" value="0" disabled> ';
else $tmp='<input type="radio" name="type" id="radio_creditnote" value="2" > ';
$text = $tmp.$langs->trans("InvoiceAvoir") . ' ';
$text.= '('.$langs->trans("YouMustCreateInvoiceFromThird").') ';
$desc = $form->textwithpicto($text, $langs->transnoentities("InvoiceAvoirDesc"), 1, 'help', '', 0, 3);
@@ -2390,7 +2410,7 @@ if ($action == 'create')
}
// Payment term
print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">';
print '<tr><td class="nowrap fieldrequired">' . $langs->trans('PaymentConditionsShort') . '</td><td colspan="2">';
$form->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id');
print '</td></tr>';
@@ -2424,7 +2444,14 @@ if ($action == 'create')
print '<tr>';
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $objectsrc->libelle_incoterms, 1).'</label></td>';
print '<td colspan="2" class="maxwidthonsmartphone">';
print $form->select_incoterms((!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : ''), (!empty($objectsrc->location_incoterms)?$objectsrc->location_incoterms:''));
$incoterm_id = GETPOST('incoterm_id');
$incoterm_location = GETPOST('location_incoterms');
if (empty($incoterm_id))
{
$incoterm_id = (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : $soc->fk_incoterms);
$incoterm_location = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms);
}
print $form->select_incoterms($incoterm_id, $incoterm_location);
print '</td></tr>';
}
@@ -2458,7 +2485,6 @@ if ($action == 'create')
print '<tr>';
print '<td class="border" valign="top">' . $langs->trans('NotePublic') . '</td>';
print '<td valign="top" colspan="2">';
$note_public = $object->getDefaultCreateValueFor('note_public', (is_object($objectsrc)?$objectsrc->note_public:null));
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
@@ -2468,7 +2494,6 @@ if ($action == 'create')
print '<tr>';
print '<td class="border" valign="top">' . $langs->trans('NotePrivate') . '</td>';
print '<td valign="top" colspan="2">';
$note_private = $object->getDefaultCreateValueFor('note_private', ((! empty($origin) && ! empty($originid) && is_object($objectsrc))?$objectsrc->note_private:null));
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%');
print $doleditor->Create(1);
// print '<textarea name="note_private" wrap="soft" cols="70" rows="'.ROWS_3.'">'.$note_private.'.</textarea>
@@ -3125,10 +3150,10 @@ else if ($id > 0 || ! empty($ref))
if ($action == 'editinvoicedate') {
$form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate');
} else {
print dol_print_date($object->date, 'daytext');
print dol_print_date($object->date, 'day');
}
} else {
print dol_print_date($object->date, 'daytext');
print dol_print_date($object->date, 'day');
}
print '</td>';
@@ -3466,7 +3491,7 @@ else if ($id > 0 || ! empty($ref))
if ($action == 'editdate_pointoftax') {
$form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_pointoftax, 'date_pointoftax');
} else {
print dol_print_date($object->date_pointoftax, 'daytext');
print dol_print_date($object->date_pointoftax, 'day');
}
print '</td></tr>';
}
@@ -3506,7 +3531,7 @@ else if ($id > 0 || ! empty($ref))
if ($action == 'editpaymentterm') {
$form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm');
} else {
print dol_print_date($object->date_lim_reglement, 'daytext');
print dol_print_date($object->date_lim_reglement, 'day');
if ($object->hasDelay()) {
print img_warning($langs->trans('Late'));
}
@@ -3722,7 +3747,9 @@ else if ($id > 0 || ! empty($ref))
print '</td>';
if ($action != 'classify') {
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=classify&amp;facid=' . $object->id . '">';
print img_edit($langs->trans('SetProject'), 1);
if ($user->rights->facture->creer) {
print img_edit($langs->trans('SetProject'), 1);
}
print '</a></td>';
}
print '</tr></table>';

View File

@@ -43,6 +43,7 @@ class FactureRec extends CommonInvoice
public $table_element_line='facturedet_rec';
public $fk_element='fk_facture';
var $entity;
var $number;
var $date;
var $amount;
@@ -241,7 +242,7 @@ class FactureRec extends CommonInvoice
*/
function fetch($rowid, $ref='', $ref_ext='', $ref_int='')
{
$sql = 'SELECT f.rowid, f.titre, f.fk_soc, f.amount, f.tva, f.total, f.total_ttc, f.remise_percent, f.remise_absolue, f.remise';
$sql = 'SELECT f.rowid, f.entity, f.titre, f.fk_soc, f.amount, f.tva, f.total, f.total_ttc, f.remise_percent, f.remise_absolue, f.remise';
$sql.= ', f.date_lim_reglement as dlr';
$sql.= ', f.note_private, f.note_public, f.fk_user_author';
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet';
@@ -269,6 +270,7 @@ class FactureRec extends CommonInvoice
$obj = $this->db->fetch_object($result);
$this->id = $obj->rowid;
$this->entity = $obj->entity;
$this->titre = $obj->titre;
$this->ref = $obj->titre;
$this->ref_client = $obj->ref_client;
@@ -519,6 +521,7 @@ class FactureRec extends CommonInvoice
{
// Clean parameters
$remise_percent=price2num($remise_percent);
if (empty($remise_percent)) $remise_percent=0;
$qty=price2num($qty);
if (! $qty) $qty=1;
if (! $info_bits) $info_bits=0;
@@ -579,12 +582,12 @@ class FactureRec extends CommonInvoice
$sql.= ", ".price2num($txtva);
$sql.= ", ".(! empty($fk_product)?"'".$fk_product."'":"null");
$sql.= ", ".$product_type;
$sql.= ", '".price2num($remise_percent)."'";
$sql.= ", '".price2num($pu_ht)."'";
$sql.= ", ".price2num($remise_percent);
$sql.= ", ".price2num($pu_ht);
$sql.= ", null";
$sql.= ", '".price2num($total_ht)."'";
$sql.= ", '".price2num($total_tva)."'";
$sql.= ", '".price2num($total_ttc)."'";
$sql.= ", ".price2num($total_ht);
$sql.= ", ".price2num($total_tva);
$sql.= ", ".price2num($total_ttc);
$sql.= ", ".$rang;
$sql.= ", ".$special_code;
$sql.= ", ".($fk_unit?"'".$this->db->escape($fk_unit)."'":"null").")";
@@ -721,14 +724,16 @@ class FactureRec extends CommonInvoice
}
/**
* Create all recurrents invoices.
* A result may also be provided into this->output
* Create all recurrents invoices (for all entities if multicompany is used).
* A result may also be provided into this->output.
*
* WARNING: This method change context $conf->entity to be in correct context for each recurring invoice found.
*
* @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK)
*/
function createRecurringInvoices()
{
global $langs, $db, $user;
global $conf, $langs, $db, $user;
$langs->load("bills");
@@ -743,6 +748,7 @@ class FactureRec extends CommonInvoice
$sql.= ' WHERE frequency > 0'; // A recurring invoice is an invoice with a frequency
$sql.= " AND (date_when IS NULL OR date_when <= '".$db->idate($today)."')";
$sql.= ' AND (nb_gen_done < nb_gen_max OR nb_gen_max = 0)';
$sql.= $db->order('entity', 'ASC');
//print $sql;exit;
$resql = $db->query($sql);
@@ -754,7 +760,9 @@ class FactureRec extends CommonInvoice
if ($num) $this->output.=$langs->trans("FoundXQualifiedRecurringInvoiceTemplate", $num)."\n";
else $this->output.=$langs->trans("NoQualifiedRecurringInvoiceTemplateFound");
while ($i < $num)
$saventity = $conf->entity;
while ($i < $num) // Loop on each template invoice
{
$line = $db->fetch_object($resql);
@@ -763,7 +771,10 @@ class FactureRec extends CommonInvoice
$facturerec = new FactureRec($db);
$facturerec->fetch($line->rowid);
dol_syslog("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref);
// Set entity context
$conf->entity = $facturerec->entity;
dol_syslog("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref.", entity=".$facturerec->entity);
$error=0;
@@ -774,7 +785,7 @@ class FactureRec extends CommonInvoice
$facture->date = $facturerec->date_when; // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later.
$facture->socid = $facturerec->socid;
$invoiceidgenerated = $facture->create($user); // This will also update fields of recurring invoice
$invoiceidgenerated = $facture->create($user);
if ($invoiceidgenerated <= 0)
{
$this->errors = $facture->errors;
@@ -794,18 +805,20 @@ class FactureRec extends CommonInvoice
if (! $error && $invoiceidgenerated >= 0)
{
$db->commit();
$db->commit("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref);
dol_syslog("createRecurringInvoices Process invoice template ".$facturerec->ref." is finished with a success generation");
$nb_create++;
$this->output.=$langs->trans("InvoiceGeneratedFromTemplate", $facture->ref, $facturerec->ref)."\n";
}
else
{
$db->rollback();
$db->rollback("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref);
}
$i++;
}
$conf->entity = $saventity; // Restore entity context
}
else dol_print_error($db);
@@ -1060,7 +1073,7 @@ class FactureRec extends CommonInvoice
return -1;
}
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element;
$sql.= ' SET date_when = "'.$this->db->idate($date).'"';
$sql.= " SET date_when = ".($date ? "'".$this->db->idate($date)."'" : "null");
if ($increment_nb_gen_done>0) $sql.= ', nb_gen_done = nb_gen_done + 1';
$sql.= ' WHERE rowid = '.$this->id;

View File

@@ -239,7 +239,8 @@ class Facture extends CommonInvoice
if (! $this->cond_reglement_id) $this->cond_reglement_id = 0;
if (! $this->mode_reglement_id) $this->mode_reglement_id = 0;
$this->brouillon = 1;
if (empty($this->entity)) $this->entity = $conf->entity;
// Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate)
if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code);
else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code);
@@ -279,8 +280,9 @@ class Facture extends CommonInvoice
$_facrec = new FactureRec($this->db);
$result=$_facrec->fetch($this->fac_rec);
$this->socid = $_facrec->socid;
$this->socid = $_facrec->socid; // Invoice created on same thirdparty than template
$this->entity = $_facrec->entity; // Invoice created in same entity than template
// Fields coming from GUI (priority on template). TODO Value of template should be used as default value on GUI so we can use here always value from GUI
$this->fk_project = GETPOST('projectid','int') > 0 ? GETPOST('projectid','int') : $_facrec->fk_project;
$this->note_public = GETPOST('note_public') ? GETPOST('note_public') : $_facrec->note_public;
@@ -309,13 +311,15 @@ class Facture extends CommonInvoice
$forceduedate = $this->calculate_date_lim_reglement();
// For recurrn invoices, update date and number of last generation of recurring template invoice, before inserting new invoice
// For recurring invoices, update date and number of last generation of recurring template invoice, before inserting new invoice
if ($_facrec->frequency > 0)
{
dol_syslog("This is a recurring invoice so we set date_last_gen and next date_when");
if (empty($_facrec->date_when)) $_facrec->date_when = $now;
$next_date = $_facrec->getNextDate(); // Calculate next date
$_facrec->setValueFrom('date_last_gen', $now, '', null, 'date');
$result = $_facrec->setValueFrom('date_last_gen', $now, '', null, 'date');
//$_facrec->setValueFrom('nb_gen_done', $_facrec->nb_gen_done + 1); // Not required, +1 already included into setNextDate when second param is 1.
$_facrec->setNextDate($next_date,1);
$result = $_facrec->setNextDate($next_date,1);
}
}
@@ -350,7 +354,7 @@ class Facture extends CommonInvoice
$sql.= ")";
$sql.= " VALUES (";
$sql.= "'(PROV)'";
$sql.= ", ".$conf->entity;
$sql.= ", ".$this->entity;
$sql.= ", ".($this->ref_ext?"'".$this->db->escape($this->ref_ext)."'":"null");
$sql.= ", '".$this->db->escape($this->type)."'";
$sql.= ", '".$socid."'";
@@ -388,7 +392,7 @@ class Facture extends CommonInvoice
// Update ref with new one
$this->ref='(PROV'.$this->id.')';
$sql = 'UPDATE '.MAIN_DB_PREFIX."facture SET facnumber='".$this->ref."' WHERE rowid=".$this->id;
$sql = 'UPDATE '.MAIN_DB_PREFIX."facture SET facnumber='".$this->db->escape($this->ref)."' WHERE rowid=".$this->id;
dol_syslog(get_class($this)."::create", LOG_DEBUG);
$resql=$this->db->query($sql);
@@ -1160,7 +1164,7 @@ class Facture extends CommonInvoice
{
$this->lines=array();
$sql = 'SELECT l.rowid, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.tva_tx, ';
$sql = 'SELECT l.rowid, l.fk_facture, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.tva_tx, ';
$sql.= ' l.situation_percent, l.fk_prev_id,';
$sql.= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,';
$sql.= ' l.rang, l.special_code,';
@@ -1187,6 +1191,7 @@ class Facture extends CommonInvoice
$line->id = $objp->rowid;
$line->rowid = $objp->rowid; // deprecated
$line->fk_facture = $objp->fk_facture;
$line->label = $objp->custom_label; // deprecated
$line->desc = $objp->description; // Description line
$line->description = $objp->description; // Description line
@@ -1439,6 +1444,18 @@ class Facture extends CommonInvoice
$facligne->rang=-1;
$facligne->info_bits=2;
// Get buy/cost price of invoice that is source of discount
if ($remise->fk_facture_source > 0)
{
$srcinvoice=new Facture($this->db);
$srcinvoice->fetch($remise->fk_facture_source);
$totalcostpriceofinvoice=0;
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; // TODO Move this into commonobject
$formmargin=new FormMargin($this->db);
$arraytmp=$formmargin->getMarginInfosArray($srcinvoice, false);
$facligne->pa_ht = $arraytmp['pa_total'];
}
$facligne->total_ht = -$remise->amount_ht;
$facligne->total_tva = -$remise->amount_tva;
$facligne->total_ttc = -$remise->amount_ttc;
@@ -2465,7 +2482,7 @@ class Facture extends CommonInvoice
* @param string $fk_unit Code of the unit to use. Null to use the default one
* @return int < 0 if KO, > 0 if OK
*/
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=0, $fk_unit = null)
function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=100, $fk_unit = null)
{
global $conf,$user;
// Deprecation warning
@@ -2999,7 +3016,8 @@ class Facture extends CommonInvoice
* set up mask.
*/
if ($mode != 'last' && !$numref) {
dol_print_error($this->db,"Facture::getNextNumRef ".$obj->error);
$this->error=$obj->error;
//dol_print_error($this->db,"Facture::getNextNumRef ".$obj->error);
return "";
}
@@ -4079,10 +4097,11 @@ class FactureLigne extends CommonInvoiceLine
/**
* Insert line into database
*
* @param int $notrigger 1 no triggers
* @return int <0 if KO, >0 if OK
* @param int $notrigger 1 no triggers
* @param int $noerrorifdiscountalreadylinked 1=Do not make error if lines is linked to a discount and discount already linked to another
* @return int <0 if KO, >0 if OK
*/
function insert($notrigger=0)
function insert($notrigger=0, $noerrorifdiscountalreadylinked=0)
{
global $langs,$user,$conf;
@@ -4226,13 +4245,16 @@ class FactureLigne extends CommonInvoiceLine
// Check if discount was found
if ($result > 0)
{
// Check if discount not already affected to another invoice
if ($discount->fk_facture)
// Check if discount not already affected to another invoice
if ($discount->fk_facture_line > 0)
{
$this->error=$langs->trans("ErrorDiscountAlreadyUsed",$discount->id);
dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR);
$this->db->rollback();
return -3;
if (empty($noerrorifdiscountalreadylinked))
{
$this->error=$langs->trans("ErrorDiscountAlreadyUsed",$discount->id);
dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR);
$this->db->rollback();
return -3;
}
}
else
{
@@ -4353,14 +4375,14 @@ class FactureLigne extends CommonInvoiceLine
$sql.= ",tva_tx=".price2num($this->tva_tx)."";
$sql.= ",localtax1_tx=".price2num($this->localtax1_tx)."";
$sql.= ",localtax2_tx=".price2num($this->localtax2_tx)."";
$sql.= ",localtax1_type='".$this->localtax1_type."'";
$sql.= ",localtax2_type='".$this->localtax2_type."'";
$sql.= ",localtax1_type='".$this->db->escape($this->localtax1_type)."'";
$sql.= ",localtax2_type='".$this->db->escape($this->localtax2_type)."'";
$sql.= ",qty=".price2num($this->qty)."";
$sql.= ",date_start=".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null");
$sql.= ",date_end=".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null");
$sql.= ",product_type=".$this->product_type;
$sql.= ",info_bits='".$this->info_bits."'";
$sql.= ",special_code='".$this->special_code."'";
$sql.= ",info_bits='".$this->db->escape($this->info_bits)."'";
$sql.= ",special_code='".$this->db->escape($this->special_code)."'";
if (empty($this->skip_update_total))
{
$sql.= ",total_ht=".price2num($this->total_ht)."";

View File

@@ -4,6 +4,7 @@
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2017 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -161,6 +162,6 @@ else
print $langs->trans("ErrorUnknown");
}
$db->close();
llxFooter();
$db->close();

View File

@@ -37,6 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
$langs->load('bills');
$langs->load('compta');
$langs->load('admin');
// Security check
$id=(GETPOST('facid','int')?GETPOST('facid','int'):GETPOST('id','int'));
@@ -123,6 +124,10 @@ if (is_array($extrafields->attribute_label) && count($extrafields->attribute_lab
* Actions
*/
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
// Set note
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
@@ -148,14 +153,14 @@ if ($action == 'add')
$remin=GETPOST('remin');
$nb_gen_max=GETPOST('nb_gen_max', 'int');
//if (empty($nb_gen_max)) $nb_gen_max =0;
if (GETPOST('frequency'))
{
if (empty($reyear) || empty($remonth) || empty($reday))
if (empty($reyear) || empty($remonth) || empty($reday))
{
setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->trans("Date")), null, 'errors');
$action = "create";
$error++;
$error++;
}
if ($nb_gen_max === '')
{
@@ -171,14 +176,14 @@ if ($action == 'add')
$object->note_private = GETPOST('note_private');
$object->note_public = GETPOST('note_public');
$object->usenewprice = GETPOST('usenewprice');
$object->frequency = $frequency;
$object->unit_frequency = GETPOST('unit_frequency', 'alpha');
$object->nb_gen_max = $nb_gen_max;
$object->auto_validate = GETPOST('auto_validate', 'int');
$object->fk_project = $projectid;
$date_next_execution = dol_mktime($rehour, $remin, 0, $remonth, $reday, $reyear);
$object->date_when = $date_next_execution;
@@ -187,9 +192,9 @@ if ($action == 'add')
{
$srcObject = new Facture($db);
$srcObject->fetch(GETPOST('facid','int'));
$srcObject->fetchObjectLinked();
if (! empty($srcObject->linkedObjectsIds['contrat']))
{
$contractidid = reset($srcObject->linkedObjectsIds['contrat']);
@@ -199,12 +204,12 @@ if ($action == 'add')
$object->linked_objects[$object->origin] = $object->origin_id;
}
}
$db->begin();
$oldinvoice = new Facture($db);
$oldinvoice->fetch($id);
$result = $object->create($user, $oldinvoice->id);
if ($result > 0)
{
@@ -222,18 +227,18 @@ if ($action == 'add')
setEventMessages($object->error, $object->errors, 'errors');
$action = "create";
}
if (! $error)
{
$db->commit();
header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $object->id);
exit;
}
else
{
$db->rollback();
$error++;
setEventMessages($object->error, $object->errors, 'errors');
$action = "create";
@@ -311,16 +316,16 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->factu
$object->fetch_thirdparty();
$db->begin();
$line=new FactureLigneRec($db);
// For triggers
$line->id = $lineid;
if ($line->delete() > 0)
{
$result=$object->update_price(1);
if ($result > 0)
{
$db->commit();
@@ -401,7 +406,7 @@ if ($action == 'addline' && $user->rights->facture->creer)
setEventMessages($langs->trans('ErrorQtyForCustomerInvoiceCantBeNegative'), null, 'errors');
$error ++;
}
if (! $error && ($qty >= 0) && (! empty($product_desc) || ! empty($idprod))) {
$ret = $object->fetch($id);
if ($ret < 0) {
@@ -435,7 +440,7 @@ if ($action == 'addline' && $user->rights->facture->creer)
$tva_tx = get_default_tva($mysoc, $object->thirdparty, $prod->id);
$tva_npr = get_default_npr($mysoc, $object->thirdparty, $prod->id);
if (empty($tva_tx)) $tva_npr=0;
$pu_ht = $prod->price;
$pu_ttc = $prod->price_ttc;
$price_min = $prod->price_min;
@@ -542,7 +547,7 @@ if ($action == 'addline' && $user->rights->facture->creer)
$type = GETPOST('type');
$fk_unit= GETPOST('units', 'alpha');
}
// Margin
$fournprice = price2num(GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : '');
$buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we must keep this value
@@ -550,7 +555,7 @@ if ($action == 'addline' && $user->rights->facture->creer)
// Local Taxes
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty, $mysoc, $tva_npr);
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $mysoc, $tva_npr);
$info_bits = 0;
if ($tva_npr)
$info_bits |= 0x01;
@@ -582,7 +587,7 @@ if ($action == 'addline' && $user->rights->facture->creer)
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
}*/
$object->fetch($object->id); // Reload lines
unset($_POST['prod_entry_mode']);
unset($_POST['qty']);
@@ -745,7 +750,7 @@ elseif ($action == 'updateligne' && $user->rights->facture->creer && ! GETPOST('
}*/
$object->fetch($object->id); // Reload lines
unset($_POST['qty']);
unset($_POST['type']);
unset($_POST['productid']);
@@ -820,7 +825,7 @@ $companystatic = new Societe($db);
$now = dol_now();
$tmparray=dol_getdate($now);
$today = dol_mktime(23,59,59,$tmparray['mon'],$tmparray['mday'],$tmparray['year']); // Today is last second of current day
/*
* Create mode
@@ -832,11 +837,11 @@ if ($action == 'create')
$object = new Facture($db); // Source invoice
$product_static = new Product($db);
$formproject = new FormProjets($db);
if ($object->fetch($id, $ref) > 0)
{
$result = $object->getLinesArray();
print '<form action="fiche-rec.php" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
@@ -870,7 +875,7 @@ if ($action == 'create')
print '<tr><td>'.$langs->trans("NotePrivate").'</td><td valign="top">';
print '<textarea class="flat centpercent" name="note_private" wrap="soft" rows="'.ROWS_4.'"></textarea>';
print '</td></tr>';
// Author
print "<tr><td>".$langs->trans("Author")."</td><td>".$user->getFullName($langs)."</td></tr>";
@@ -891,14 +896,14 @@ if ($action == 'create')
$langs->load('projects');
print '<tr><td>' . $langs->trans('Project') . '</td><td>';
$numprojet = $formproject->select_projects($socid, $projectid, 'projectid', 0);
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'">' . $langs->trans("AddProject") . '</a>';
print ' &nbsp; <a href="'.DOL_URL_ROOT.'/projet/card.php?socid=' . $object->thirdparty->id . '&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$object->thirdparty->id).'">' . $langs->trans("AddProject") . '</a>';
print '</td></tr>';
}
// Bank account
if ($object->fk_account > 0)
{
print "<tr><td>".$langs->trans('BankAccount')."</td><td>";
print "<tr><td>".$langs->trans('RIB')."</td><td>";
$form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none');
print "</td></tr>";
}
@@ -907,24 +912,24 @@ if ($action == 'create')
print '<br><br>';
// Autogeneration
$title = $langs->trans("Recurrence");
print load_fiche_titre($title, '', 'calendar');
print '<table class="border" width="100%">';
// Frequency
print '<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency'))."</td><td>";
print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='5' />&nbsp;".$form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m'));
print "</td></tr>";
// First date of execution for cron
print "<tr><td>".$langs->trans('NextDateToExecution')."</td><td>";
$date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1);
print $form->select_date($date_next_execution, '', 1, 1, '', "add", 1, 1, 1);
print "</td></tr>";
// Number max of generation
print "<tr><td>".$langs->trans("MaxPeriodNumber")."</td><td>";
print '<input type="text" name="nb_gen_max" value="'.GETPOST('nb_gen_max').'" size="5" />';
@@ -958,11 +963,11 @@ if ($action == 'create')
$disableedit=1;
$disablemove=1;
$disableremove=1;
$ret = $object->printObjectLines('', $mysoc, $soc, $lineid, 0); // No date selector for template invoice
$ret = $object->printObjectLines('', $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice
}
print "</table>\n";
print '</td></tr>';
if ($flag_price_may_change)
@@ -1002,12 +1007,12 @@ else
if ($action == 'ask_deleteline') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1);
}
print $formconfirm;
$author = new User($db);
$author->fetch($object->user_author);
$head=array();
$h=0;
$head[$h][0] = $_SERVER["PHP_SELF"].'?id='.$object->id;
@@ -1029,8 +1034,8 @@ else
$morehtmlref = $form->editfieldval($langs->trans("Ref"), 'ref', $object->ref, $object, $user->rights->facture->creer, 'string');
print $form->showrefnav($object, 'ref', $linkback, 1, 'titre', 'none', $morehtmlref);
print '</td></tr>';
print '<tr><td>'.$langs->trans("Customer").'</td>';
print '<td colspan="3">'.$object->thirdparty->getNomUrl(1,'customer').'</td></tr>';
@@ -1092,7 +1097,7 @@ else
print $form->editfieldval($langs->trans("NotePublic"), 'note_public', $object->note_public, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
print '</td>';
print '</tr>';
// Note private
print '<tr><td>';
print $form->editfieldkey($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer);
@@ -1100,23 +1105,23 @@ else
print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $user->rights->facture->creer, 'textarea:'.ROWS_4.':60');
print '</td>';
print '</tr>';
// Project
if (! empty($conf->projet->enabled)) {
$langs->load('projects');
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Project');
print '</td>';
if ($action != 'classify') {
if ($action != 'classify' && $user->rights->facture->creer) {
print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=classify&amp;facid=' . $object->id . '">';
print img_edit($langs->trans('SetProject'), 1);
print '</a></td>';
}
print '</tr></table>';
print '</td><td colspan="3">';
if ($action == 'classify') {
$form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1);
@@ -1128,9 +1133,11 @@ else
}
// Bank Account
$langs->load('banks');
print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('BankAccount');
print $langs->trans('RIB');
print '<td>';
if (($action != 'editbankaccount') && $user->rights->commande->creer && ! empty($object->brouillon))
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&amp;id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
@@ -1156,11 +1163,11 @@ else
*/
$title = $langs->trans("Recurrence");
print load_fiche_titre($title, '', 'calendar');
print '<table class="border" width="100%">';
// if "frequency" is empty or = 0, the reccurence is disabled
print '<tr><td width="20%">';
print '<tr><td class="titlefield">';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Frequency');
print '</td>';
@@ -1180,7 +1187,7 @@ else
print '<td align="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '</tr></table></form>';
}
else
else
{
if ($object->frequency > 0)
{
@@ -1192,7 +1199,7 @@ else
}
}
print '</td></tr>';
// Date when
print '<tr><td>';
if ($action == 'date_when' || $object->frequency > 0)
@@ -1210,7 +1217,7 @@ else
}
print '</td>';
print '</tr>';
// Max period / Rest period
print '<tr><td>';
if ($action == 'nb_gen_max' || $object->frequency > 0)
@@ -1232,7 +1239,7 @@ else
}
print '</td>';
print '</tr>';
// Status of generated invoices
print '<tr><td>';
if ($action == 'auto_validate' || $object->frequency > 0)
@@ -1247,28 +1254,28 @@ else
}
print '</td>';
print '</tr>';
print '</table>';
print '<br>';
// Frequencry/Recurring section
if ($object->frequency > 0)
{
if (empty($conf->cron->enabled))
{
print info_admin($langs->trans("EnableAndSetupModuleCron", $langs->transnoentitiesnoconv("Module2300Name")));
print info_admin($langs->trans("EnableAndSetupModuleCron", $langs->transnoentitiesnoconv("Module2300Name")));
}
print '<table class="border" width="100%">';
// Nb of generation already done
print '<tr><td width="20%">'.$langs->trans("NbOfGenerationDone").'</td>';
print '<tr><td class="titlefield">'.$langs->trans("NbOfGenerationDone").'</td>';
print '<td>';
print $object->nb_gen_done?$object->nb_gen_done:'0';
print '</td>';
print '</tr>';
// Date last
print '<tr><td>';
print $langs->trans("DateLastGeneration");
@@ -1276,12 +1283,12 @@ else
print dol_print_date($object->date_last_gen, 'dayhour');
print '</td>';
print '</tr>';
print '</table>';
print '<br>';
}
}
// Lines
print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid')) . '" method="POST">
<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">
@@ -1289,41 +1296,41 @@ else
<input type="hidden" name="mode" value="">
<input type="hidden" name="id" value="' . $object->id . '">
';
if (! empty($conf->use_javascript_ajax) && $object->statut == 0) {
include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
}
print '<table id="tablelines" class="noborder noshadow" width="100%">';
// Show object lines
if (! empty($object->lines))
{
//$disableedit=1;
//$disablemove=1;
$ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 0); // No date selector for template invoice
$ret = $object->printObjectLines($action, $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice
}
// Form to add new line
if ($object->statut == 0 && $user->rights->facture->creer && $action != 'valid' && $action != 'editline')
{
if ($action != 'editline')
{
$var = true;
// Add free products/services
$object->formAddObjectLine(0, $mysoc, $soc); // No date selector for template invoice
$object->formAddObjectLine(0, $mysoc, $object->thirdparty); // No date selector for template invoice
$parameters = array();
$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
}
}
print "</table>\n";
print "</form>\n";
dol_fiche_end();
/**
* Barre d'actions
@@ -1363,15 +1370,15 @@ else
}
print '</div>';
print '<div class="fichecenter"><div class="fichehalfleft">';
print '<a name="builddoc"></a>'; // ancre
// Linked object block
$somethingshown = $form->showLinkedObjectBlock($object);
print '</div></div>';
}
@@ -1383,8 +1390,14 @@ else
$sql = "SELECT s.nom as name, s.rowid as socid, f.rowid as facid, f.titre, f.total, f.tva as total_vat, f.total_ttc, f.frequency,";
$sql.= " f.date_last_gen, f.date_when";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_rec as f";
if (! $user->rights->societe->client->voir && ! $socid) {
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
}
$sql.= " WHERE f.fk_soc = s.rowid";
$sql.= " AND f.entity = ".$conf->entity;
if (! $user->rights->societe->client->voir && ! $socid) {
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
}
if ($search_ref) $sql .= natural_search('f.titre', $search_ref);
if ($search_societe) $sql .= natural_search('s.nom', $search_societe);
if ($search_frequency) $sql .= natural_search('f.frequency', $search_frequency);
@@ -1416,7 +1429,7 @@ else
else if ($year_date_when > 0)
{
$sql.= " AND f.date_when BETWEEN '".$db->idate(dol_get_first_day($year_date_when,1,false))."' AND '".$db->idate(dol_get_last_day($year_date_when,12,false))."'";
}
}
$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
@@ -1424,15 +1437,15 @@ else
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
}
$sql.= $db->order($sortfield, $sortorder);
$sql.= $db->plimit($limit+1,$offset);
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$param='&socid='.$socid;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
@@ -1457,9 +1470,9 @@ else
$tmpkey=preg_replace('/search_options_/','',$key);
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
}
$massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@@ -1486,7 +1499,7 @@ else
print_liste_field_titre(''); // Field may contains ling text
print "</tr>\n";
// Filters lines
print '<tr class="liste_titre">';
// Ref
@@ -1592,8 +1605,8 @@ else
print $searchpitco;
print '</td>';
print "</tr>\n";
if ($num > 0)
{
$var=true;
@@ -1617,7 +1630,7 @@ else
print '<td align="center">'.yn($objp->frequency?1:0).'</td>';
print '<td align="center">'.($objp->frequency ? dol_print_date($objp->date_last_gen,'day') : '').'</td>';
print '<td align="center">'.($objp->frequency ? dol_print_date($objp->date_when,'day') : '').'</td>';
print '<td align="center">';
if ($user->rights->facture->creer)
{
@@ -1640,7 +1653,7 @@ else
$i++;
}
}
else print '<tr '.$bc[false].'><td colspan="9">'.$langs->trans("NoneF").'</td></tr>';
else print '<tr '.$bc[false].'><td colspan="9" class="opacitymedium">'.$langs->trans("NoneF").'</td></tr>';
print "</table>";
$db->free($resql);

View File

@@ -28,6 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
$langs->load("companies");
$langs->load("bills");

View File

@@ -130,7 +130,7 @@ $search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search
$fieldstosearchall = array(
'f.facnumber'=>'Ref',
'f.ref_client'=>'RefCustomer',
'fd.description'=>'Description',
'pd.description'=>'Description',
's.nom'=>"ThirdParty",
'f.note_public'=>'NotePublic',
);
@@ -152,7 +152,7 @@ $arrayfields=array(
'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1),
'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0),
'f.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0),
'am'=>array('label'=>$langs->trans("Received"), 'checked'=>0),
'dynamount_payed'=>array('label'=>$langs->trans("Received"), 'checked'=>0),
'rtp'=>array('label'=>$langs->trans("Rest"), 'checked'=>0),
'f.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
'f.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
@@ -201,7 +201,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter") || GETPOS
$search_state="";
$search_type='';
$search_country='';
$search_type_thirdparty='';
$search_type_thirdparty='';
$day='';
$year='';
$month='';
@@ -228,7 +228,11 @@ if (empty($reshook))
setEventMessages($langs->trans('TooManyRecordForMassAction',$maxformassaction), null, 'errors');
$error++;
}
if (! $error && $massaction == 'confirm_presend' && GETPOST('modelselected')) // If we change the template, we must not send email, but keep on send email form
{
$massaction='presend';
}
if (! $error && $massaction == 'confirm_presend')
{
$resaction = '';
@@ -236,7 +240,7 @@ if (empty($reshook))
$nbignored = 0;
$langs->load("mails");
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
if (!$error && !isset($user->email))
{
$error++;
@@ -254,7 +258,7 @@ if (empty($reshook))
{
$objecttmp=new Facture($db); // must create new instance because instance is saved into $listofobjectref array for future use
$result=$objecttmp->fetch($toselectid);
if ($result > 0)
if ($result > 0)
{
$listoinvoicesid[$toselectid]=$toselectid;
$thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid;
@@ -263,16 +267,16 @@ if (empty($reshook))
}
}
//var_dump($listofobjectthirdparties);exit;
foreach ($listofobjectthirdparties as $thirdpartyid)
{
$result = $thirdparty->fetch($thirdpartyid);
if ($result < 0)
if ($result < 0)
{
dol_print_error($db);
exit;
}
// Define recipient $sendto and $sendtocc
if (trim($_POST['sendto']))
{
@@ -310,9 +314,9 @@ if (empty($reshook))
$sendtocc = $thirdparty->contact_get_property((int) $_POST['receivercc'],'email');
}
}
//var_dump($listofobjectref[$thirdpartyid]); // Array of invoice for this thirdparty
$attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array());
$listofqualifiedinvoice=array();
$listofqualifiedref=array();
@@ -320,14 +324,14 @@ if (empty($reshook))
{
//var_dump($object);
//var_dump($thirdpartyid.' - '.$objectid.' - '.$object->statut);
if ($object->statut != Facture::STATUS_VALIDATED)
{
$nbignored++;
$resaction.='<div class="error">'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$object->ref).'</div><br>';
continue; // Payment done or started or canceled
}
// Read document
// TODO Use future field $object->fullpathdoc to know where is stored default file
// TODO If not defined, use $object->modelpdf (or defaut invoice config) to know what is template to use to regenerate doc.
@@ -343,39 +347,39 @@ if (empty($reshook))
$object->fetch_thirdparty();
$sendto = $object->thirdparty->email;
}
if (empty($sendto))
if (empty($sendto))
{
//print "No recipient for thirdparty ".$object->thirdparty->name;
$nbignored++;
continue;
}
if (dol_strlen($sendto))
{
// Create form object
$attachedfiles=array(
'paths'=>array_merge($attachedfiles['paths'],array($file)),
'names'=>array_merge($attachedfiles['names'],array($filename)),
'paths'=>array_merge($attachedfiles['paths'],array($file)),
'names'=>array_merge($attachedfiles['names'],array($filename)),
'mimes'=>array_merge($attachedfiles['mimes'],array($mime))
);
}
$listofqualifiedinvoice[$objectid]=$object;
$listofqualifiedref[$objectid]=$object->ref;
}
else
{
{
$nbignored++;
$langs->load("errors");
$resaction.='<div class="error">'.$langs->trans('ErrorCantReadFile',$file).'</div><br>';
dol_syslog('Failed to read file: '.$file, LOG_WARNING);
continue;
}
//var_dump($listofqualifiedref);
}
if (count($listofqualifiedinvoice) > 0)
{
$langs->load("commercial");
@@ -385,7 +389,7 @@ if (empty($reshook))
$message = GETPOST('message');
$sendtocc = GETPOST('sentocc');
$sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO);
$substitutionarray=array(
'__ID__' => join(', ',array_keys($listofqualifiedinvoice)),
'__EMAIL__' => $thirdparty->email,
@@ -396,16 +400,16 @@ if (empty($reshook))
'__REF__' => join(', ',$listofqualifiedref),
'__REFCLIENT__' => $thirdparty->name
);
$subject=make_substitutions($subject, $substitutionarray);
$message=make_substitutions($message, $substitutionarray);
$filepath = $attachedfiles['paths'];
$filename = $attachedfiles['names'];
$mimetype = $attachedfiles['mimes'];
//var_dump($filepath);
// Send mail
require_once(DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php');
$mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1);
@@ -419,9 +423,9 @@ if (empty($reshook))
if ($result)
{
$resaction.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'<br>'; // Must not contain "
$error=0;
// Insert logs into agenda
foreach($listofqualifiedinvoice as $invid => $object)
{
@@ -434,7 +438,7 @@ if (empty($reshook))
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg = dol_concatdesc($actionmsg, $message);
}
// Initialisation donnees
$object->sendtoid = 0;
$object->actiontypecode = $actiontypecode;
@@ -442,14 +446,14 @@ if (empty($reshook))
$object->actionmsg2 = $actionmsg2; // Short text
$object->fk_element = $invid;
$object->elementtype = $object->element;
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
$interface=new Interfaces($db);
$result=$interface->run_triggers('BILL_SENTBYMAIL',$object,$user,$langs,$conf);
if ($result < 0) { $error++; $errors=$interface->errors; }
// Fin appel triggers
if ($error)
{
setEventMessages($db->lasterror(), $errors, 'errors');
@@ -480,7 +484,7 @@ if (empty($reshook))
$resaction.=$langs->trans("NbSelected").': '.count($toselect)."\n<br>";
$resaction.=$langs->trans("NbIgnored").': '.($nbignored?$nbignored:0)."\n<br>";
$resaction.=$langs->trans("NbSent").': '.($nbsent?$nbsent:0)."\n<br>";
if ($nbsent)
{
$action=''; // Do not show form post if there was at least one successfull sent
@@ -493,7 +497,7 @@ if (empty($reshook))
setEventMessages($resaction, null, 'warnings');
}
}
$action='list';
$massaction='';
}
@@ -503,7 +507,7 @@ if (empty($reshook))
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
$objecttmp=new Facture($db);
$listofobjectid=array();
$listofobjectthirdparties=array();
@@ -538,7 +542,7 @@ if (empty($reshook))
}
}
}
// Define output language (Here it is not used because we do only merging existing PDF)
$outputlangs = $langs;
$newlang='';
@@ -603,12 +607,12 @@ if (empty($reshook))
setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors');
}
}
// Remove file
if ($action == 'remove_file')
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("other");
$upload_dir = $diroutputmassaction;
$file = $upload_dir . '/' . GETPOST('file');
@@ -617,10 +621,10 @@ if (empty($reshook))
else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors');
$action='';
}
}
/*
* View
@@ -644,7 +648,9 @@ $sql.= ' f.datec as date_creation, f.tms as date_update,';
$sql.= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, ';
$sql.= " typent.code as typent_code,";
$sql.= " state.code_departement as state_code, state.nom as state_name";
if (! $sall) $sql.= ', SUM(pf.amount) as am'; // To be able to sort on status
// We need dynamount_payed to be able to sort on status (value is surely wrong because we can count several lines several times due to other left join or link with contacts. But what we need is just 0 or > 0)
// TODO Better solution to be able to sort on already payed or remain to pay is to store amount_payed in a denormalized field.
if (! $sall) $sql.= ', SUM(pf.amount) as dynamount_payed';
// Add fields from extrafields
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
// Add fields from hooks
@@ -658,7 +664,6 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s
$sql.= ', '.MAIN_DB_PREFIX.'facture as f';
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_extrafields as ef on (f.rowid = ef.fk_object)";
if (! $sall) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON pf.fk_facture = f.rowid';
else $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facturedet as fd ON fd.fk_facture = f.rowid';
if ($sall || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facturedet as pd ON f.rowid=pd.fk_facture';
if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product';
// We'll need this table joined to the select in order to filter by sale
@@ -698,7 +703,7 @@ if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')';
if ($search_company) $sql .= natural_search('s.nom', $search_company);
if ($search_montant_ht != '') $sql.= natural_search('f.total', $search_montant_ht, 1);
if ($search_montant_vat != '') $sql.= natural_search('f.total_vat', $search_montant_vat, 1);
if ($search_montant_vat != '') $sql.= natural_search('f.tva', $search_montant_vat, 1);
if ($search_montant_ttc != '') $sql.= natural_search('f.total_ttc', $search_montant_ttc, 1);
if ($search_status != '' && $search_status >= 0)
{
@@ -761,12 +766,17 @@ $sql.=$hookmanager->resPrint;
if (! $sall)
{
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, fk_mode_reglement, f.total, f.tva, f.total_ttc,';
$sql.= ' GROUP BY f.rowid, f.facnumber, ref_client, f.type, f.note_private, f.note_public, f.increment, f.fk_mode_reglement, f.total, f.tva, f.total_ttc,';
$sql.= ' f.datef, f.date_lim_reglement,';
$sql.= ' f.paye, f.fk_statut,';
$sql.= ' f.datec, f.tms,';
$sql.= ' s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.code_client, s.client, typent.code';
$sql.= ' ,state.code_departement, state.nom';
$sql.= ' s.rowid, s.nom, s.town, s.zip, s.fk_pays, s.code_client, s.client, typent.code,';
$sql.= ' state.code_departement, state.nom';
foreach ($extrafields->attribute_label as $key => $val) //prevent error with sql_mode=only_full_group_by
{
$sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key : '');
}
}
else
{
@@ -785,7 +795,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$nbtotalofrecords = $db->num_rows($result);
}
$sql.= $db->plimit($limit+1,$offset);
$sql.= $db->plimit($limit + 1,$offset);
//print $sql;
$resql = $db->query($sql);
@@ -794,7 +804,7 @@ if ($resql)
$num = $db->num_rows($resql);
$arrayofselected=is_array($toselect)?$toselect:array();
if ($socid)
{
$soc = new Societe($db);
@@ -804,6 +814,7 @@ if ($resql)
$param='&socid='.$socid;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($sall) $param.='&sall='.$sall;
if ($day) $param.='&day='.urlencode($day);
if ($month) $param.='&month='.urlencode($month);
if ($year) $param.='&year=' .urlencode($year);
@@ -831,11 +842,12 @@ if ($resql)
$tmpkey=preg_replace('/search_options_/','',$key);
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
}
$massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
$i = 0;
print '<form method="POST" name="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
@@ -843,14 +855,14 @@ if ($resql)
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="viewstatut" value="'.$viewstatut.'">';
print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,$massactionbutton,$num,$nbtotalofrecords,'title_accountancy.png',0,'','',$limit);
if ($massaction == 'presend')
{
$langs->load("mails");
if (! GETPOST('cancel'))
if (! GETPOST('cancel'))
{
$objecttmp=new Facture($db);
$listofselectedid=array();
@@ -859,7 +871,7 @@ if ($resql)
foreach($arrayofselected as $toselectid)
{
$result=$objecttmp->fetch($toselectid);
if ($result > 0)
if ($result > 0)
{
$listofselectedid[$toselectid]=$toselectid;
$thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid;
@@ -870,10 +882,10 @@ if ($resql)
}
print '<input type="hidden" name="massaction" value="confirm_presend">';
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$formmail = new FormMail($db);
dol_fiche_head(null, '', '');
$topicmail="SendBillRef";
@@ -938,16 +950,16 @@ if ($resql)
//$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;
print $formmail->get_form();
dol_fiche_end();
}
if ($sall)
{
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
print $langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall);
}
// If the user can view prospects other than his'
$moreforfilter='';
if ($user->rights->societe->client->voir || $socid)
@@ -990,9 +1002,9 @@ if ($resql)
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<tr class="liste_titre">';
if (! empty($arrayfields['f.facnumber']['checked'])) print_liste_field_titre($arrayfields['f.facnumber']['label'],$_SERVER['PHP_SELF'],'f.facnumber','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['f.ref_client']['checked'])) print_liste_field_titre($arrayfields['f.ref_client']['label'],$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder);
@@ -1008,8 +1020,8 @@ if ($resql)
if (! empty($arrayfields['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'],$_SERVER['PHP_SELF'],'f.total','',$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'],$_SERVER['PHP_SELF'],'f.tva','',$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['f.total_ttc']['checked'])) print_liste_field_titre($arrayfields['f.total_ttc']['label'],$_SERVER['PHP_SELF'],'f.total_ttc','',$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['am']['checked'])) print_liste_field_titre($arrayfields['am']['label'],$_SERVER['PHP_SELF'],'am','',$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'],$_SERVER['PHP_SELF'],'rtp','',$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['dynamount_payed']['checked'])) print_liste_field_titre($arrayfields['dynamount_payed']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['rtp']['checked'])) print_liste_field_titre($arrayfields['rtp']['label'],$_SERVER['PHP_SELF'],'','',$param,'align="right"',$sortfield,$sortorder);
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
@@ -1028,28 +1040,28 @@ if ($resql)
print $hookmanager->resPrint;
if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'],$_SERVER["PHP_SELF"],"f.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'],$_SERVER["PHP_SELF"],"f.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'],$_SERVER["PHP_SELF"],"fk_statut,paye,am","",$param,'align="right"',$sortfield,$sortorder);
if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'],$_SERVER["PHP_SELF"],"fk_statut,paye,type,dynamount_payed","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
print "</tr>\n";
// Filters lines
print '<tr class="liste_titre">';
// Ref
if (! empty($arrayfields['f.facnumber']['checked']))
if (! empty($arrayfields['f.facnumber']['checked']))
{
print '<td class="liste_titre" align="left">';
print '<input class="flat" size="6" type="text" name="search_ref" value="'.$search_ref.'">';
print '</td>';
}
// Ref customer
if (! empty($arrayfields['f.ref_client']['checked']))
if (! empty($arrayfields['f.ref_client']['checked']))
{
print '<td class="liste_titre">';
print '<input class="flat" size="6" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">';
print '</td>';
}
// Date invoice
if (! empty($arrayfields['f.date']['checked']))
if (! empty($arrayfields['f.date']['checked']))
{
print '<td class="liste_titre" align="center">';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
@@ -1058,7 +1070,7 @@ if ($resql)
print '</td>';
}
// Date due
if (! empty($arrayfields['f.date_lim_reglement']['checked']))
if (! empty($arrayfields['f.date_lim_reglement']['checked']))
{
print '<td class="liste_titre" align="center">';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day_lim" value="'.$day_lim.'">';
@@ -1068,7 +1080,7 @@ if ($resql)
print '</td>';
}
// Thirpdarty
if (! empty($arrayfields['s.nom']['checked']))
if (! empty($arrayfields['s.nom']['checked']))
{
print '<td class="liste_titre" align="left"><input class="flat" type="text" size="6" name="search_societe" value="'.$search_societe.'"></td>';
}
@@ -1098,7 +1110,7 @@ if ($resql)
print '</td>';
}
// Payment mode
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
{
print '<td class="liste_titre" align="left">';
$form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 0, 1, 10);
@@ -1125,7 +1137,7 @@ if ($resql)
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.$search_montant_ttc.'">';
print '</td>';
}
if (! empty($arrayfields['am']['checked']))
if (! empty($arrayfields['dynamount_payed']['checked']))
{
print '<td class="liste_titre" align="right">';
print '</td>';
@@ -1205,23 +1217,27 @@ if ($resql)
$facturestatic->type=$obj->type;
$facturestatic->statut=$obj->fk_statut;
$facturestatic->date_lim_reglement=$db->jdate($obj->datelimite);
$paiement = $facturestatic->getSommePaiement();
$totalcreditnotes = $facturestatic->getSumCreditNotesUsed();
$totaldeposits = $facturestatic->getSumDepositsUsed();
$totalpay = $paiement + $totalcreditnotes + $totaldeposits;
$remaintopay = $obj->total_ttc - $totalpay;
print '<tr '.$bc[$var].'>';
if (! empty($arrayfields['f.facnumber']['checked']))
{
print '<td class="nowrap">';
$notetoshow=dol_string_nohtmltag(($user->societe_id>0?$obj->note_public:$obj->note_private),1);
$paiement = $facturestatic->getSommePaiement();
$remaintopay = $obj->total_ttc - $paiement;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
print '<td class="nobordernopadding nowrap">';
print $facturestatic->getNomUrl(1,'',200,0,$notetoshow);
print $obj->increment;
print '</td>';
print '<td style="min-width: 20px" class="nobordernopadding nowrap">';
if (! empty($obj->note_private))
{
@@ -1236,11 +1252,11 @@ if ($resql)
print '</td>';
print '</tr>';
print '</table>';
print "</td>\n";
if (! $i) $totalarray['nbfield']++;
}
// Customer ref
if (! empty($arrayfields['f.ref_client']['checked']))
{
@@ -1249,7 +1265,7 @@ if ($resql)
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Date
if (! empty($arrayfields['f.date']['checked']))
{
@@ -1258,7 +1274,7 @@ if ($resql)
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Date limit
if (! empty($arrayfields['f.date_lim_reglement']['checked']))
{
@@ -1270,7 +1286,7 @@ if ($resql)
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Third party
if (! empty($arrayfields['s.nom']['checked']))
{
@@ -1324,7 +1340,7 @@ if ($resql)
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Payment mode
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
{
@@ -1333,7 +1349,7 @@ if ($resql)
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Amount HT
if (! empty($arrayfields['f.total_ht']['checked']))
{
@@ -1359,22 +1375,22 @@ if ($resql)
$totalarray['totalttc'] += $obj->total_ttc;
}
if (! empty($arrayfields['am']['checked']))
if (! empty($arrayfields['dynamount_payed']['checked']))
{
print '<td align="right">'.(! empty($paiement)?price($paiement,0,$langs):'&nbsp;').'</td>';
print '<td align="right">'.(! empty($totalpay)?price($totalpay,0,$langs):'&nbsp;').'</td>'; // TODO Use a denormalized field
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalamfield']=$totalarray['nbfield'];
$totalarray['totalam'] += $paiement;
$totalarray['totalam'] += $totalpay;
}
if (! empty($arrayfields['rtp']['checked']))
{
print '<td align="right">'.(! empty($remaintopay)?price($remaintopay,0,$langs):'&nbsp;').'</td>';
print '<td align="right">'.(! empty($remaintopay)?price($remaintopay,0,$langs):'&nbsp;').'</td>'; // TODO Use a denormalized field
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalrtpfield']=$totalarray['nbfield'];
$totalarray['totalrtp'] += $remaintopay;
}
// Extra fields
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label))
{
@@ -1416,12 +1432,12 @@ if ($resql)
// Status
if (! empty($arrayfields['f.fk_statut']['checked']))
{
print '<td align="right" class="nowrap">';
print $facturestatic->LibStatut($obj->paye,$obj->fk_statut,5,$paiement,$obj->type);
print "</td>";
if (! $i) $totalarray['nbfield']++;
print '<td align="right" class="nowrap">';
print $facturestatic->LibStatut($obj->paye,$obj->fk_statut,5,$paiement,$obj->type);
print "</td>";
if (! $i) $totalarray['nbfield']++;
}
// Action column
print '<td class="nowrap" align="center">';
$selected=0;
@@ -1429,7 +1445,7 @@ if ($resql)
print '<input id="cb'.$obj->facid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->facid.'"'.($selected?' checked="checked"':'').'>';
print '</td>' ;
if (! $i) $totalarray['nbfield']++;
print "</tr>\n";
$i++;
@@ -1456,20 +1472,20 @@ if ($resql)
else print '<td></td>';
}
print '</tr>';
}
}
$db->free($resql);
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print "</table>\n";
print "</form>\n";
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
{
/*
@@ -1477,15 +1493,15 @@ if ($resql)
*/
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
$urlsource.=str_replace('&amp;','&',$param);
$filedir=$diroutputmassaction;
$genallowed=$user->rights->facture->lire;
$delallowed=$user->rights->facture->lire;
print '<br><a name="show_files"></a>';
$paramwithoutshowfiles=preg_replace('/show_files=1&?/','',$param);
$title=$langs->trans("MassFilesArea").' <a href="'.$_SERVER["PHP_SELF"].'?'.$paramwithoutshowfiles.'">('.$langs->trans("Hide").')</a>';
print $formfile->showdocuments('massfilesarea_facture','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
}
else

View File

@@ -117,7 +117,7 @@ if (count($listofsearchfields))
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="14"></td>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="14"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;

View File

@@ -154,12 +154,12 @@ class Localtax extends CommonObject
$sql.= " tms=".$this->db->idate($this->tms).",";
$sql.= " datep=".$this->db->idate($this->datep).",";
$sql.= " datev=".$this->db->idate($this->datev).",";
$sql.= " amount='".$this->amount."',";
$sql.= " amount=".price2num($this->amount).",";
$sql.= " label='".$this->db->escape($this->label)."',";
$sql.= " note='".$this->db->escape($this->note)."',";
$sql.= " fk_bank='".$this->fk_bank."',";
$sql.= " fk_user_creat='".$this->fk_user_creat."',";
$sql.= " fk_user_modif='".$this->fk_user_modif."'";
$sql.= " fk_bank=".$this->fk_bank.",";
$sql.= " fk_user_creat=".$this->fk_user_creat.",";
$sql.= " fk_user_modif=".$this->fk_user_modif;
$sql.= " WHERE rowid=".$this->id;
dol_syslog(get_class($this)."::update", LOG_DEBUG);

View File

@@ -106,7 +106,7 @@ $fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">';
$calc=$conf->global->MAIN_INFO_LOCALTAX_CALC.$local;
// Affiche en-tete du rapport
if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice for goods and services
if ($calc==0 || $calc==1) // Calculate on invoice for goods and services
{
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
$calcmode=$calc==0?$langs->trans("CalcModeLT".$local):$langs->trans("CalcModeLT".$local."Rec");
@@ -124,7 +124,7 @@ if ($conf->global->$calc==0 || $conf->global->$calc==1) // Calculate on invoice
$productsup=$langs->trans("Description");
$amountsup=$langs->trans("AmountHT");
}
if ($conf->global->$calc==2) // Invoice for goods, payment for services
if ($calc==2) // Invoice for goods, payment for services
{
$nom=$langs->transcountry($local==1?"LT1ReportByCustomersInInputOutputMode":"LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
$calcmode=$langs->trans("CalcModeLT2Debt");
@@ -149,7 +149,7 @@ $vatcust=$langs->transcountry($local==1?"LT1":"LT2",$mysoc->country_code);
$vatsup=$langs->transcountry($local==1?"LT1":"LT2",$mysoc->country_code);
// IRPF that the customer has retained me
if($conf->global->$calc ==0 || $conf->global->$calc == 2)
if($calc ==0 || $calc == 2)
{
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
@@ -232,7 +232,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 2)
}
// IRPF I retained my supplier
if($conf->global->$calc ==0 || $conf->global->$calc == 1){
if($calc ==0 || $calc == 1){
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print '<td align="left">'.$langs->trans("Num")."</td>";
@@ -309,7 +309,7 @@ if($conf->global->$calc ==0 || $conf->global->$calc == 1){
}
}
if($conf->global->$calc ==0){
if($calc ==0){
// Total to pay
print '<br><br>';
print '<table class="noborder" width="100%">';

View File

@@ -277,7 +277,8 @@ $sql.= " WHERE f.entity = ".$conf->entity;
$sql.= " AND f.datev >= '".$db->idate(dol_get_first_day($y,1,false))."'";
$sql.= " AND f.datev <= '".$db->idate(dol_get_last_day($y,12,false))."'";
$sql.= " AND localtaxtype=".$localTaxType;
$sql.= " GROUP BY dm ASC ORDER BY dm ASC";
$sql.= " GROUP BY dm";
$sql.= " ORDER BY dm ASC";
pt($db, $sql,$langs->trans("Year")." $y");

View File

@@ -391,10 +391,9 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
var form = $("#payment_form");
json["invoice_type"] = $("#invoice_type").val();
json["amountPayment"] = $("#amountpayment").attr("value");
json["amountPayment"] = $("#amountpayment").attr("value");
json["amounts"] = _elemToJson(form.find("input.amount"));
json["remains"] = _elemToJson(form.find("input.remain]"));
json["remains"] = _elemToJson(form.find("input.remain"));
if (imgId != null) {
json["imgClicked"] = imgId;
}

View File

@@ -177,7 +177,7 @@ class RemiseCheque extends CommonObject
{
$sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque";
$sql.= " SET ref='(PROV".$this->id.")'";
$sql.= " WHERE rowid='".$this->id."';";
$sql.= " WHERE rowid=".$this->id."";
dol_syslog("RemiseCheque::Create", LOG_DEBUG);
$resql = $this->db->query($sql);

View File

@@ -160,7 +160,7 @@ if ($resql)
print '</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="right">';
print '<input class="flat" type="text" size="6" name="search_amount" value="'.$search_amount.'">';
print '<input class="flat maxwidth50" type="text" name="search_amount" value="'.$search_amount.'">';
print '</td>';
print '<td></td>';
print '<td class="liste_titre" align="right">';
@@ -179,7 +179,7 @@ if ($resql)
print "<tr ".$bc[$var].">";
// Num ref cheque
print '<td width="80">';
print '<td>';
$checkdepositstatic->id=$objp->rowid;
$checkdepositstatic->ref=($objp->ref?$objp->ref:$objp->rowid);
$checkdepositstatic->statut=$objp->statut;

View File

@@ -22,7 +22,7 @@
/**
* \file htdocs/compta/prelevement/class/bonprelevement.class.php
* \ingroup prelevement
* \brief Fichier de la classe des bons de prelevements
* \brief File of withdrawal receipts class
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
@@ -104,11 +104,11 @@ class BonPrelevement extends CommonObject
}
/**
* Add facture to withdrawal
* Add invoice to withdrawal
*
* @param int $facture_id id invoice to add
* @param int $client_id id invoice customer
* @param string $client_nom name of cliente
* @param string $client_nom customer name
* @param int $amount amount of invoice
* @param string $code_banque code of bank withdrawal
* @param string $code_guichet code of bank's office
@@ -166,7 +166,7 @@ class BonPrelevement extends CommonObject
*
* @param int $line_id id line to add
* @param int $client_id id invoice customer
* @param string $client_nom name of cliente
* @param string $client_nom customer name
* @param int $amount amount of invoice
* @param string $code_banque code of bank withdrawal
* @param string $code_guichet code of bank's office
@@ -182,7 +182,7 @@ class BonPrelevement extends CommonObject
if ($concat == 1)
{
/*
* On aggrege les lignes
* We aggregate the lines
*/
$sql = "SELECT rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_lignes";
@@ -205,7 +205,7 @@ class BonPrelevement extends CommonObject
else
{
/*
* Pas de d'agregation
* No aggregate
*/
$sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_lignes (";
$sql.= "fk_prelevement_bons";
@@ -252,7 +252,7 @@ class BonPrelevement extends CommonObject
function getErrorString($error)
{
global $langs;
$errors = array();
$errors[1027] = $langs->trans("DateInvalid");
@@ -376,7 +376,7 @@ class BonPrelevement extends CommonObject
}
/*
* Fin de la procedure
* End of procedure
*/
if ($error == 0)
{
@@ -478,7 +478,7 @@ class BonPrelevement extends CommonObject
$error++;
}
}
// Update prelevement line
// Update withdrawal line
// TODO: Translate to ligneprelevement.class.php
$sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes";
$sql.= " SET statut = 2";
@@ -605,8 +605,8 @@ class BonPrelevement extends CommonObject
$arr = array();
/*
* Renvoie toutes les factures presente
* dans un bon de prelevement
* Returns all invoices presented
* within a withdrawal receipt
*/
$sql = "SELECT fk_facture";
if ($amounts) $sql .= ", SUM(pl.amount)";
@@ -920,7 +920,7 @@ class BonPrelevement extends CommonObject
$dir=$conf->prelevement->dir_output.'/receipts';
if (! is_dir($dir)) dol_mkdir($dir);
$this->filename = $dir.'/'.$ref.'.xml';
// Create withdraw receipt in database
@@ -1028,7 +1028,7 @@ class BonPrelevement extends CommonObject
$this->emetteur_bic = $account->bic;
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
$this->raison_sociale = $account->proprio;
}
@@ -1272,18 +1272,6 @@ class BonPrelevement extends CommonObject
* section Debiteur (sepa Debiteurs bloc lines)
*/
$tmp_invoices = array();
$sql = "SELECT f.facnumber as fac FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."prelevement_facture as pf, ".MAIN_DB_PREFIX."societe as soc, ".MAIN_DB_PREFIX."c_country as p, ".MAIN_DB_PREFIX."societe_rib as rib WHERE pl.fk_prelevement_bons = ".$this->id." AND pl.rowid = pf.fk_prelevement_lignes AND pf.fk_facture = f.rowid AND soc.fk_pays = p.rowid AND soc.rowid = f.fk_soc AND rib.fk_soc = f.fk_soc AND rib.default_rib = 1";
$resql=$this->db->query($sql);
if ($resql) {
while ($objfac = $this->db->fetch_object($resql)) {
$tmp_invoices[] = $objfac->fac;
}
}
$ListOfFactures = implode($tmp_invoices);
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
$sql.= " f.facnumber as fac, pf.fk_facture as idfac, rib.datec, rib.iban_prefix as iban, rib.bic as bic, rib.rowid as drum";
@@ -1310,7 +1298,7 @@ class BonPrelevement extends CommonObject
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $ListOfFactures, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
$fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
$this->total = $this->total + $obj->somme;
$i++;
}
@@ -1565,7 +1553,7 @@ class BonPrelevement extends CommonObject
$XML_DEBITOR ='';
$XML_DEBITOR .=' <DrctDbtTxInf>'.$CrLf;
$XML_DEBITOR .=' <PmtId>'.$CrLf;
$XML_DEBITOR .=' <EndToEndId>'.('AS-'.$row_facnumber.'-'.$Rowing).'</EndToEndId>'.$CrLf;
$XML_DEBITOR .=' <EndToEndId>'.('AS-'.dol_trunc($row_facnumber,20).'-'.$Rowing).'</EndToEndId>'.$CrLf; // ISO20022 states that EndToEndId has a MaxLength of 35 characters
$XML_DEBITOR .=' </PmtId>'.$CrLf;
$XML_DEBITOR .=' <InstdAmt Ccy="EUR">'.round($row_somme, 2).'</InstdAmt>'.$CrLf;
$XML_DEBITOR .=' <DrctDbtTx>'.$CrLf;
@@ -1581,11 +1569,11 @@ class BonPrelevement extends CommonObject
$XML_DEBITOR .=' </FinInstnId>'.$CrLf;
$XML_DEBITOR .=' </DbtrAgt>'.$CrLf;
$XML_DEBITOR .=' <Dbtr>'.$CrLf;
$XML_DEBITOR .=' <Nm>'.strtoupper(dol_string_unaccent($row_nom)).'</Nm>'.$CrLf;
$XML_DEBITOR .=' <Nm>'.strtoupper(dolEscapeXML(dol_string_unaccent($row_nom))).'</Nm>'.$CrLf;
$XML_DEBITOR .=' <PstlAdr>'.$CrLf;
$XML_DEBITOR .=' <Ctry>'.$row_country_code.'</Ctry>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))).'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.dol_string_unaccent($row_zip.' '.$row_town).'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.dolEscapeXML(dol_trunc(dol_string_unaccent(strtr($row_address, array(CHR(13) => ", ", CHR(10) => ""))),70,'right','UTF-8',true)).'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' <AdrLine>'.dolEscapeXML(dol_string_unaccent($row_zip.' '.$row_town)).'</AdrLine>'.$CrLf;
$XML_DEBITOR .=' </PstlAdr>'.$CrLf;
$XML_DEBITOR .=' </Dbtr>'.$CrLf;
$XML_DEBITOR .=' <DbtrAcct>'.$CrLf;
@@ -1680,8 +1668,9 @@ class BonPrelevement extends CommonObject
* @return string String with SEPA Sender
*/
function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n')
{ // SEPA INITIALISATION
global $confs;
{
// SEPA INITIALISATION
global $conf;
$dateTime_YMD = dol_print_date($ladate, '%Y%m%d');
$dateTime_ETAD = dol_print_date($ladate, '%Y-%m-%d');
@@ -1698,12 +1687,12 @@ class BonPrelevement extends CommonObject
$this->emetteur_number_key = $account->cle_rib;
$this->emetteur_iban = $account->iban;
$this->emetteur_bic = $account->bic;
$this->emetteur_ics = $conf->global->PRELEVEMENT_ICS; // Ex: PRELEVEMENT_ICS = "FR78ZZZ123456";
$this->raison_sociale = $account->proprio;
}
// Récupération info demandeur
$sql = "SELECT rowid, ref";
$sql.= " FROM";

View File

@@ -52,6 +52,17 @@ if ($user->societe_id > 0) $socid = $user->societe_id;
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
$limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortfield) $sortfield='s.nom, s.rowid';
if (! $sortorder) $sortorder='ASC';
// Date range
$year=GETPOST("year");
if (empty($year))
@@ -150,12 +161,23 @@ $hselected = 'report';
report_header($name,$nomlink,$period,$periodlink,$description,$builddate,$exportlink,array('modecompta'=>$modecompta),$calcmode);
// Show report array
$param='&modecompta='.$modecompta;
if ($date_startday) $param.='&date_startday='.$date_startday;
if ($date_startmonth) $param.='&date_startmonth='.$date_startmonth;
if ($date_startyear) $param.='&date_startyear='.$date_startyear;
if ($date_endday) $param.='&date_endday='.$date_endday;
if ($date_endmonth) $param.='&date_endmonth='.$date_endmonth;
if ($date_endyear) $param.='&date_endyear='.$date_startyear;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td width="10%">&nbsp;</td><td>&nbsp;</td>';
print_liste_field_titre('');
print_liste_field_titre($langs->trans("Name"), $_SERVER["PHP_SELF"],'s.nom, s.rowid','',$param,'',$sortfield,$sortorder);
if ($modecompta == 'CREANCES-DETTES')
print "<td align=\"right\">".$langs->trans("AmountHT")."</td>";
print "<td align=\"right\">".$langs->trans("AmountTTC")."</td>";
{
print_liste_field_titre($langs->trans("AmountHT"), $_SERVER["PHP_SELF"],'amount_ht','',$param,'align="right"',$sortfield,$sortorder);
}
print_liste_field_titre($langs->trans("AmountTTC"), $_SERVER["PHP_SELF"],'amount_ttc','',$param,'align="right"',$sortfield,$sortorder);
print "</tr>\n";
/*
@@ -197,7 +219,7 @@ else
$sql.= " AND f.entity = ".$conf->entity;
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql.= " GROUP BY s.nom, s.rowid";
$sql.= " ORDER BY s.nom, s.rowid";
$sql.= $db->order($sortfield, $sortorder);
dol_syslog("get customer invoices", LOG_DEBUG);
$result = $db->query($sql);
@@ -323,7 +345,7 @@ else
$sql.= " AND f.entity = ".$conf->entity;
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql .= " GROUP BY s.nom, s.rowid";
$sql .= " ORDER BY s.nom, s.rowid";
$sql.= $db->order($sortfield, $sortorder);
print '<tr><td colspan="4">'.$langs->trans("SuppliersInvoices").'</td></tr>';
@@ -408,7 +430,11 @@ else
}
$sql.= " AND cs.entity = ".$conf->entity;
$sql.= " GROUP BY c.libelle, c.id";
$sql.= " ORDER BY c.libelle, c.id";
$newsortfield = $sortfield;
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'c.libelle, c.id';
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
$sql.= $db->order($newsortfield, $sortorder);
dol_syslog("get social contributions deductible=0", LOG_DEBUG);
$result=$db->query($sql);
@@ -468,8 +494,6 @@ if ($modecompta == 'CREANCES-DETTES')
if (! empty($date_start) && ! empty($date_end))
$sql.= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'";
$sql.= " AND cs.entity = ".$conf->entity;
$sql.= " GROUP BY c.libelle, c.id";
$sql.= " ORDER BY c.libelle, c.id";
}
else
{
@@ -483,9 +507,13 @@ else
if (! empty($date_start) && ! empty($date_end))
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
$sql.= " AND cs.entity = ".$conf->entity;
$sql.= " GROUP BY c.libelle, c.id";
$sql.= " ORDER BY c.libelle, c.id";
}
$sql.= " GROUP BY c.libelle, c.id";
$newsortfield = $sortfield;
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'c.libelle, c.id';
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
$sql.= $db->order($newsortfield, $sortorder);
dol_syslog("get social contributions deductible=1", LOG_DEBUG);
$result=$db->query($sql);
@@ -569,8 +597,12 @@ if (! empty($conf->salaries->enabled))
$sql.= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'";
$sql.= " GROUP BY u.rowid, u.firstname, u.lastname, p.fk_user, p.label, dm";
$sql.= " ORDER BY u.firstname";
$newsortfield = $sortfield;
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'u.firstname, u.lastname';
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
$sql.= $db->order($newsortfield, $sortorder);
dol_syslog("get payment salaries");
$result=$db->query($sql);
$subtotal_ht = 0;
@@ -638,7 +670,7 @@ if (! empty($conf->expensereport->enabled))
$column='p.date_valid';
} else {
$sql = "SELECT p.rowid, p.ref, u.rowid as userid, u.firstname, u.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.total_ht) as amount_ht,sum(p.total_ttc) as amount_ttc";
$sql = "SELECT p.rowid, p.ref, u.rowid as userid, u.firstname, u.lastname, date_format(pe.datep,'%Y-%m') as dm, sum(p.total_ht) as amount_ht, sum(p.total_ttc) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as p";
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid=p.fk_user_author";
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."payment_expensereport as pe ON pe.fk_expensereport = p.rowid";
@@ -652,55 +684,59 @@ if (! empty($conf->expensereport->enabled))
print '<tr><td colspan="4">'.$langs->trans("ExpenseReport").'</td></tr>';
if (! empty($date_start) && ! empty($date_end))
{
$sql.= " AND $column >= '".$db->idate($date_start)."' AND $column <= '".$db->idate($date_end)."'";
}
$sql.= " GROUP BY u.rowid, p.rowid, p.ref, u.firstname, u.lastname, dm";
$newsortfield = $sortfield;
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'p.ref';
$sql.= $db->order($newsortfield, $sortorder);
$sql.= " GROUP BY u.rowid, p.rowid, p.ref, u.firstname, u.lastname, dm";
$sql.= " ORDER BY p.ref";
dol_syslog("get expense report outcome");
$result=$db->query($sql);
$subtotal_ht = 0;
$subtotal_ttc = 0;
if ($result)
dol_syslog("get expense report outcome");
$result=$db->query($sql);
$subtotal_ht = 0;
$subtotal_ttc = 0;
if ($result)
{
$num = $db->num_rows($result);
$var=true;
if ($num)
{
$num = $db->num_rows($result);
$var=true;
if ($num)
while ($obj = $db->fetch_object($result))
{
while ($obj = $db->fetch_object($result))
{
$total_ht -= $obj->amount_ht;
$total_ttc -= $obj->amount_ttc;
$subtotal_ht += $obj->amount_ht;
$subtotal_ttc += $obj->amount_ttc;
$total_ht -= $obj->amount_ht;
$total_ttc -= $obj->amount_ttc;
$subtotal_ht += $obj->amount_ht;
$subtotal_ttc += $obj->amount_ttc;
$var = !$var;
print "<tr ".$bc[$var]."><td>&nbsp;</td>";
print "<td>".$langs->trans("ExpenseReport")." <a href=\"".DOL_URL_ROOT."/expensereport/list.php?search_user=".$obj->userid."\">".$obj->firstname." ".$obj->lastname."</a></td>\n";
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price(-$obj->amount_ht).'</td>';
print '<td align="right">'.price(-$obj->amount_ttc).'</td>';
print '</tr>';
}
}
else
{
$var = !$var;
print "<tr ".$bc[$var]."><td>&nbsp;</td>";
print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
print "<td>".$langs->trans("ExpenseReport")." <a href=\"".DOL_URL_ROOT."/expensereport/list.php?search_user=".$obj->userid."\">".$obj->firstname." ".$obj->lastname."</a></td>\n";
if ($modecompta == 'CREANCES-DETTES') print '<td align="right">'.price(-$obj->amount_ht).'</td>';
print '<td align="right">'.price(-$obj->amount_ttc).'</td>';
print '</tr>';
}
}
else
{
dol_print_error($db);
}
print '<tr class="liste_total">';
if ($modecompta == 'CREANCES-DETTES')
print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>';
print '<td colspan="3" align="right">'.price(-$subtotal_ttc).'</td>';
$var = !$var;
print "<tr ".$bc[$var]."><td>&nbsp;</td>";
print '<td colspan="3" class="opacitymedium">'.$langs->trans("None").'</td>';
print '</tr>';
}
}
else
{
dol_print_error($db);
}
print '<tr class="liste_total">';
if ($modecompta == 'CREANCES-DETTES')
print '<td colspan="3" align="right">'.price(-$subtotal_ht).'</td>';
print '<td colspan="3" align="right">'.price(-$subtotal_ttc).'</td>';
print '</tr>';
}
/*
@@ -720,7 +756,11 @@ if (! empty($conf->don->enabled))
if (! empty($date_start) && ! empty($date_end))
$sql.= " AND p.datedon >= '".$db->idate($date_start)."' AND p.datedon <= '".$db->idate($date_end)."'";
$sql.= " GROUP BY p.societe, p.firstname, p.lastname, dm";
$sql.= " ORDER BY p.societe, p.firstname, p.lastname, dm";
$newsortfield = $sortfield;
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'p.societe, p.firstname, p.lastname, dm';
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
$sql.= $db->order($newsortfield, $sortorder);
dol_syslog("get dunning");
$result=$db->query($sql);
@@ -795,7 +835,11 @@ if ($modecompta == 'CREANCES-DETTES')
$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " GROUP BY dm";
$sql.= " ORDER BY dm";
$newsortfield = $sortfield;
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm';
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
$sql.= $db->order($newsortfield, $sortorder);
dol_syslog("get vat to pay", LOG_DEBUG);
$result=$db->query($sql);
@@ -840,7 +884,11 @@ if ($modecompta == 'CREANCES-DETTES')
$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " GROUP BY dm";
$sql.= " ORDER BY dm";
$newsortfield = $sortfield;
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm';
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
$sql.= $db->order($newsortfield, $sortorder);
dol_syslog("get vat received back", LOG_DEBUG);
$result=$db->query($sql);
@@ -884,7 +932,11 @@ else
$sql.= " AND t.datev >= '".$db->idate($date_start)."' AND t.datev <= '".$db->idate($date_end)."'";
$sql.= " AND t.entity = ".$conf->entity;
$sql.= " GROUP BY dm";
$sql.= " ORDER BY dm";
$newsortfield = $sortfield;
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm';
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
$sql.= $db->order($newsortfield, $sortorder);
dol_syslog("get vat really paid", LOG_DEBUG);
$result=$db->query($sql);
@@ -925,7 +977,11 @@ else
$sql.= " AND t.datev >= '".$db->idate($date_start)."' AND t.datev <= '".$db->idate($date_end)."'";
$sql.= " AND t.entity = ".$conf->entity;
$sql.= " GROUP BY dm";
$sql.= " ORDER BY dm";
$newsortfield = $sortfield;
if ($newsortfield == 's.nom, s.rowid') $newsortfield = 'dm';
if ($newsortfield == 'amount_ht') $newsortfield = 'amount';
if ($newsortfield == 'amount_ttc') $newsortfield = 'amount';
$sql.= $db->order($newsortfield, $sortorder);
dol_syslog("get vat really received back", LOG_DEBUG);
$result=$db->query($sql);

View File

@@ -415,7 +415,7 @@ if ($id)
}
else
{
print '<a class="butActionRefused" href="#" title="'.$langs->trans("LinkedToAConcialitedTransaction").'">'.$langs->trans("Delete").'</a>';
print '<a class="butActionRefused" href="#" title="'.$langs->trans("LinkedToAConciliatedTransaction").'">'.$langs->trans("Delete").'</a>';
}
print "</div>";
}

View File

@@ -97,19 +97,19 @@ class PaymentSalary extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_salary SET";
$sql.= " tms=".$this->db->idate($this->tms).",";
$sql.= " fk_user='".$this->fk_user."',";
$sql.= " fk_user=".$this->fk_user.",";
$sql.= " datep=".$this->db->idate($this->datep).",";
$sql.= " datev=".$this->db->idate($this->datev).",";
$sql.= " amount='".$this->amount."',";
$sql.= " amount=".price2num($this->amount).",";
$sql.= " fk_typepayment=".$this->fk_typepayment."',";
$sql.= " num_payment='".$this->num_payment."',";
$sql.= " num_payment='".$this->db->escape($this->num_payment)."',";
$sql.= " label='".$this->db->escape($this->label)."',";
$sql.= " datesp=".$this->db->idate($this->datesp).",";
$sql.= " dateep=".$this->db->idate($this->dateep).",";
$sql.= " note='".$this->db->escape($this->note)."',";
$sql.= " fk_bank=".($this->fk_bank > 0 ? "'".$this->fk_bank."'":"null").",";
$sql.= " fk_user_author='".$this->fk_user_author."',";
$sql.= " fk_user_modif='".$this->fk_user_modif."'";
$sql.= " fk_user_author=".$this->fk_user_author.",";
$sql.= " fk_user_modif=".$this->fk_user_modif;
$sql.= " WHERE rowid=".$this->id;

View File

@@ -216,7 +216,7 @@ class ChargeSociales extends CommonObject
// Delete payments
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."paiementcharge where fk_charge='".$this->id."'";
$sql = "DELETE FROM ".MAIN_DB_PREFIX."paiementcharge where fk_charge=".$this->id;
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$resql=$this->db->query($sql);
if (! $resql)
@@ -228,7 +228,7 @@ class ChargeSociales extends CommonObject
if (! $error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."chargesociales where rowid='".$this->id."'";
$sql = "DELETE FROM ".MAIN_DB_PREFIX."chargesociales where rowid=".$this->id;
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
$resql=$this->db->query($sql);
if (! $resql)

View File

@@ -34,6 +34,8 @@ require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$langs->load("companies");
$langs->load("categories");
$langs->load("bills");
$langs->load("compta");
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->global->ACCOUNTING_MODE;

View File

@@ -365,8 +365,8 @@ if ($id)
/*
* Boutons d'actions
*/
* Action buttons
*/
print "<div class=\"tabsAction\">\n";
if ($object->rappro == 0)
{
@@ -381,7 +381,7 @@ if ($id)
}
else
{
print '<a class="butActionRefused" href="#" title="'.$langs->trans("LinkedToAConcialitedTransaction").'">'.$langs->trans("Delete").'</a>';
print '<a class="butActionRefused" href="#" title="'.$langs->trans("LinkedToAConciliatedTransaction").'">'.$langs->trans("Delete").'</a>';
}
print "</div>";
}

View File

@@ -175,12 +175,12 @@ class Tva extends CommonObject
$sql.= " tms=".$this->db->idate($this->tms).",";
$sql.= " datep=".$this->db->idate($this->datep).",";
$sql.= " datev=".$this->db->idate($this->datev).",";
$sql.= " amount='".$this->amount."',";
$sql.= " amount=".price2num($this->amount).",";
$sql.= " label='".$this->db->escape($this->label)."',";
$sql.= " note='".$this->db->escape($this->note)."',";
$sql.= " fk_bank='".$this->fk_bank."',";
$sql.= " fk_user_creat='".$this->fk_user_creat."',";
$sql.= " fk_user_modif='".$this->fk_user_modif."'";
$sql.= " fk_bank=".$this->fk_bank.",";
$sql.= " fk_user_creat=".$this->fk_user_creat.",";
$sql.= " fk_user_modif=".$this->fk_user_modif."";
$sql.= " WHERE rowid=".$this->id;

View File

@@ -123,17 +123,9 @@ print $langs->trans("VATReportBuildWithOptionDefinedInModule").'<br>';
print '('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')<br>';
print '<br>';
print '<table width="100%" class="notopnoleftnoright">';
print '<tr><td class="notopnoleft" width="50%">';
print load_fiche_titre($langs->trans("VATSummary"), '', '');
// The report mode is the one defined by defaut in tax module setup
//print $modetax;
//print '('.$langs->trans("SeeVATReportInInputOutputMode",'<a href="'.$_SERVER["PHP_SELF"].'?year='.$year_start.'&modetax=0">','</a>').')';
print '</td><td>';
print load_fiche_titre($langs->trans("VATPaid"), '', '');
print '</td></tr>';
print '<div class="fichecenter"><div class="fichethirdleft">';
print '<tr><td class="notopnoleft" width="50%" valign="top">';
print load_fiche_titre($langs->trans("VATSummary"), '', '');
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@@ -223,18 +215,12 @@ print '<tr class="liste_total"><td align="right" colspan="3">'.$langs->trans("To
print "<td>&nbsp;</td>\n";
print '</tr>';
/*}
else
{
print '<tr><td colspan="5">'.$langs->trans("FeatureNotYetAvailable").'</td></tr>';
print '<tr><td colspan="5">'.$langs->trans("FeatureIsSupportedInInOutModeOnly").'</td></tr>';
}*/
print '</table>';
print '</td>';
print '<td class="notopnoleftnoright" valign="top" width="50%">';
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
print load_fiche_titre($langs->trans("VATPaid"), '', '');
/*
* Payed
@@ -250,10 +236,7 @@ $sql.= " GROUP BY dm ORDER BY dm ASC";
pt($db, $sql,$langs->trans("Year")." $y");
print "</td></tr></table>";
print '</td></tr>';
print '</table>';
print '</div></div>';
llxFooter();
$db->close();

View File

@@ -251,11 +251,16 @@ $dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore';
$dolibarr_nocsrfcheck='0';
// dolibarr_mailing_limit_sendbyweb
// Can set a limit for mailing send by web. Can be used for a restricted mode.
// Default value: 0 (use database value if exist)
// Examples:
// $dolibarr_mailing_limit_sendbyweb='0';
// Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level.
// Default value: '25'
// Examples: '-1' (sending by web is forbidden)
// $dolibarr_mailing_limit_sendbyweb='25';
// dolibarr_mailing_limit_sendbycli
// Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level.
// Default value: '0' (no hard limit, use soft database value if exists)
// Examples: '-1' (sending by cli is forbidden)
// $dolibarr_mailing_limit_sendbycli='0';
//##################

View File

@@ -122,15 +122,17 @@ class Contact extends CommonObject
$sql = "SELECT count(sp.rowid) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON (sp.fk_soc = s.rowid)";
if (!$user->rights->societe->client->voir && !$user->societe_id)
{
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc";
$sql.= " WHERE sc.fk_user = " .$user->id;
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE sp.fk_soc = s.rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
$clause = "AND";
}
$sql.= ' '.$clause.' s.entity IN ('.getEntity($this->element, 1).')';
$sql.= ' '.$clause.' sp.entity IN ('.getEntity($this->element, 1).')';
$sql.= " AND (sp.priv='0' OR (sp.priv='1' AND sp.fk_user_creat=".$user->id."))";
if ($user->societe_id > 0) $sql.=" AND sp.fk_soc = ".$user->societe_id;
$resql=$this->db->query($sql);
if ($resql)
{

Some files were not shown because too many files have changed in this diff Show More