2
0
forked from Wavyzz/dolibarr

Compare commits

..

3635 Commits
6.0.6 ... 7.0.3

Author SHA1 Message Date
Laurent Destailleur
edec89ef1e Prepare 7.0.3 2018-06-23 12:44:30 +02:00
Laurent Destailleur
ca04ffe420 Load lang 2018-06-22 17:07:49 +02:00
Laurent Destailleur
d458b383ad Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-06-22 15:29:44 +02:00
Laurent Destailleur
533c19cc2c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/accountancy/customer/list.php
	htdocs/core/lib/functions.lib.php
2018-06-22 15:29:26 +02:00
Laurent Destailleur
8414ceaddb Merge pull request #9000 from ATM-Marc/FIX_7.0_propal_contact_SHIPPING
FIX: proposal: missing contact type translation key
2018-06-22 15:16:56 +02:00
Laurent Destailleur
bd7277431f Merge pull request #8986 from atm-greg/fix_desired_stock
FIX bad result on fetch ProductStockEntrepot
2018-06-22 15:01:19 +02:00
Laurent Destailleur
dab264c641 Merge pull request #8994 from hregis/6.0_multicompany
Fix: to avoid deleting line breaks
2018-06-22 15:00:26 +02:00
Laurent Destailleur
cfc8e8b0ef Merge pull request #8972 from fmarcet/7.0
FIX Avoid converting into reduction twice and draft invoice
2018-06-22 14:35:26 +02:00
Laurent Destailleur
5bee324578 Update paiement.class.php 2018-06-22 14:34:59 +02:00
Laurent Destailleur
2d89d9634b Fix search on extrafields 2018-06-20 23:16:06 +02:00
Laurent Destailleur
714057d435 Fix stats on project. Must use assignement on project as filter. 2018-06-20 21:31:37 +02:00
Laurent Destailleur
9f2437fa04 Fix missing field 2018-06-20 17:59:01 +02:00
Marc de Lima Lucio
2fab4d7f76 FIX: proposal: missing contact type translation key 2018-06-20 14:56:24 +02:00
Regis Houssin
8fc2f7441c Fix: to avoid deleting line breaks 2018-06-20 09:06:16 +02:00
bgenere
403116898f Fix cherry-pick 2018-06-19 18:25:52 +02:00
atm-greg
df056980b5 fix bad result on fetch ProductStockEntrepot 2018-06-19 10:46:07 +02:00
Laurent Destailleur
31067b6250 FIX picto for type in product link in accountany list is wrong 2018-06-18 14:43:32 +02:00
Laurent Destailleur
ce5514bd68 Fix sql begin at wrong place 2018-06-18 14:37:16 +02:00
Laurent Destailleur
5d6d43d539 Merge pull request #8964 from atm-gauthier/6.0_accounting_entity
FIX : need to filter on aa.entity for same accounting accounts available in several entities
2018-06-18 14:30:55 +02:00
Laurent Destailleur
16fee19b6f Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-06-18 13:20:11 +02:00
Laurent Destailleur
102f9aa84f FIX Problems in accountancy module when using multicompany module. 2018-06-18 13:19:46 +02:00
gauthier
fed61930d5 FIX : clause must not be there 2018-06-18 11:37:15 +02:00
Laurent Destailleur
8c6f311aa6 Merge pull request #8974 from atm-ph/fix_7.0_addMoreActionsButtons_on_usercard
Fix missing hook on usercard (addMoreActionsButtons)
2018-06-18 11:18:12 +02:00
Laurent Destailleur
9cfc4a8d28 Merge pull request #8971 from atm-ph/fix_7.0_hook_getnomurltooltip
Fix can't add an attribute simply
2018-06-18 11:13:29 +02:00
Laurent Destailleur
95ee3325fc Part of fix of #8972 2018-06-18 11:11:07 +02:00
Laurent Destailleur
3c55e50bac Merge pull request #8966 from hregis/7.0_bug6
Fix: MEMBER_MODIFY trigger not called if i change only extrafields
2018-06-18 10:53:35 +02:00
Laurent Destailleur
95dfa1f7aa Merge pull request #8973 from altatof/FIX_HTML_DETECTION
Fix <br/> detection
2018-06-18 10:42:02 +02:00
Laurent Destailleur
63fb82931c Update functions.lib.php 2018-06-18 10:41:11 +02:00
atm-ph
3c80ce501b Fix missing hook on usercard (addMoreActionsButtons) 2018-06-15 16:05:50 +02:00
altatof
5d6cd381b9 Fix <br/> detection 2018-06-15 15:59:14 +02:00
Ferran Marcet
a21e138c70 Fix: Avoid converting into reduction twice and draft invoice 2018-06-15 11:19:04 +02:00
atm-ph
cb3704b67e Fix can't add an attribute simply 2018-06-15 11:02:46 +02:00
Regis Houssin
f9a86ba43f Fix: MEMBER_MODIFY trigger not called if i change only extrafields 2018-06-14 14:01:05 +02:00
Laurent Destailleur
e18a5d148c Merge pull request #8962 from ATM-Marc/FIX_7.0_supplierorder_reffourn
FIX: supplier order: product supplier ref not saved on addline
2018-06-14 12:00:36 +02:00
gauthier
e9d65ea751 FIX : need to filter on aa.entity for same accounting accounts available in several entities 2018-06-14 11:56:22 +02:00
Marc de Lima Lucio
1dec4c4320 FIX: supplier order: product supplier ref not saved on addline 2018-06-14 10:37:40 +02:00
Laurent Destailleur
4c2af6fc70 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/comm/propal/class/propal.class.php
	htdocs/core/class/html.form.class.php
2018-06-13 23:04:08 +02:00
Laurent Destailleur
09c92b7cc8 Merge pull request #8936 from atm-gauthier/6.0_fix_dont_remove_all_fourn_rights
FIX : If we enable 3 steps for supplier order approbation, we must no…
2018-06-13 21:36:01 +02:00
Laurent Destailleur
c586f2ecf7 Merge pull request #8957 from altatof/FIX_TOTAL_HT_DEVISE
FIX : pu_ht_devise was not converted to numeric so decimals were lost when calculating total_ht_devise
2018-06-13 21:20:42 +02:00
Laurent Destailleur
b5cd722eb1 Merge pull request #8917 from atm-gauthier/6.0_fix_apply_reduc
FIX : sometimes amounts are identical but php find them different.
2018-06-13 20:34:59 +02:00
Laurent Destailleur
76ee88f0b1 Merge pull request #8951 from fappels/7.0_fix_ErrorProductAlreadyExists
Fix Wrong error for duplicate ref if barcode enabled but not set.
2018-06-13 20:19:55 +02:00
Laurent Destailleur
eabb3e9cd3 Merge pull request #8930 from hregis/7.0_non-numeric
FIX wrong var name $search_month_lim
2018-06-13 20:09:13 +02:00
Laurent Destailleur
5fcfad5966 Merge pull request #8918 from atm-gauthier/6.0_fix_entity_select_prod_fourn_prices
FIX : entity test must be on product_fourn_price table and not product table
2018-06-13 20:08:25 +02:00
Laurent Destailleur
3f7f77ce95 Merge pull request #8923 from atm-florian/7.0
fix error display
2018-06-13 20:02:45 +02:00
Laurent Destailleur
fdc90da408 Update card.php 2018-06-13 20:02:38 +02:00
Laurent Destailleur
4c1bb9d28f Merge pull request #8948 from glu000/7.0
Fix #8946
2018-06-13 20:01:29 +02:00
Laurent Destailleur
f07408c6c3 Merge pull request #8929 from ATM-Marc/FIX_7.0_extrafields_intervention
FIX: intervention: extrafield error when calling insertExtrafields
2018-06-13 20:00:48 +02:00
altatof
d42f00bca9 FIX : pu_ht_devise was not converted to numeric so decimals were lost
when clculating total_ht_devise
2018-06-13 16:35:52 +02:00
fappels
a86c90fed1 Fix Wrong error for duplicate ref if barcode enabled but not set. 2018-06-12 16:38:42 +02:00
Günter Lukas
fcbf50467e Update user.class.php 2018-06-12 09:52:55 +02:00
Laurent Destailleur
31eeaf9914 Trans 2018-06-09 13:46:42 +02:00
gauthier
baf9d4a806 FIX : If we enable 3 steps for supplier order approbation, we must not delete all fourn rights def. 2018-06-08 17:11:59 +02:00
Regis Houssin
7ce2ebf1a9 Fix: wrong var name 2018-06-07 16:25:47 +02:00
Marc de Lima Lucio
d69fae72c7 FIX: intervention: extrafield regression in commit b5f37301a5 2018-06-07 15:17:22 +02:00
florian HENRY
75305e095d Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0 2018-06-05 20:39:53 +02:00
florian HENRY
8031ef49f2 fix error return 2018-06-05 20:38:55 +02:00
Laurent Destailleur
8400614c3d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-06-05 18:22:47 +02:00
Laurent Destailleur
426eb178f2 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-06-05 18:22:28 +02:00
Laurent Destailleur
8785d69548 Do not load database handler 2018-06-05 18:21:56 +02:00
Laurent Destailleur
30b04c0d3d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/lib/files.lib.php
2018-06-05 18:16:32 +02:00
Laurent Destailleur
4c21ad4e4e FIX: dol_delete_file must work in a context without db handler loaded
Conflicts:
	htdocs/core/lib/files.lib.php
2018-06-05 18:12:14 +02:00
Laurent Destailleur
9c32e49bd3 FIX: dol_delete_file must work in a context without db handler loaded 2018-06-05 18:05:33 +02:00
gauthier
45ecb0258b FIX : entity test must be on product_fourn_price table and not product table 2018-06-05 12:41:38 +02:00
gauthier
77e7932671 FIX : sometimes amounts are identical but php find them different. 2018-06-05 11:33:58 +02:00
Laurent Destailleur
3368e35502 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-06-04 14:09:34 +02:00
Laurent Destailleur
de2ffa1122 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/comm/action/listactions.php
2018-06-04 14:09:17 +02:00
Laurent Destailleur
840330deea Merge pull request #8905 from atm-greg/Add_supplier_proposals_in_suppliers_linkedObjects
Add supplier proposal in linkedObjects type select of the suppliers
2018-06-04 13:46:36 +02:00
Laurent Destailleur
7eaa2011ba Merge pull request #8900 from atm-florian/6.0_fixagenda
fix: when agenda is filterd with "todo" event, do not display "not applicable" event
2018-06-04 13:39:23 +02:00
atm-greg
0785029fe0 Add supplier proposal in linkedObjects type select of the suppliers 2018-05-31 10:46:50 +02:00
florian HENRY
b996237142 fix: when agenda is filterd with "todo" event, do not display "not
applicable" event
2018-05-30 13:37:17 +02:00
Laurent Destailleur
0412264418 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2018-05-30 12:05:54 +02:00
Laurent Destailleur
60321aabd8 Fix regression 2018-05-30 11:59:23 +02:00
Laurent Destailleur
3733169120 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/compta/recap-compta.php
	htdocs/fourn/class/fournisseur.commande.class.php
2018-05-30 11:09:53 +02:00
Laurent Destailleur
2df2071bae Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-30 11:05:12 +02:00
Laurent Destailleur
02da9b6992 FIX #8893 to get formatted price as substitution vars 2018-05-30 11:04:44 +02:00
Laurent Destailleur
28646a6b50 Merge pull request #8892 from ATM-Nicolas/fix_bad_email_substitution_key
FIX : Bad substitution key used for default send proposal email
2018-05-30 10:57:31 +02:00
Laurent Destailleur
7590df85e6 Merge pull request #8887 from atm-florian/6.0
add hook on balence pages
2018-05-30 10:47:59 +02:00
Laurent Destailleur
aa59c380ad Merge pull request #8886 from ATM-Nicolas/fix_supplier_order
FIX : Keep supplier proposal price for supplier order
2018-05-30 10:45:37 +02:00
Laurent Destailleur
e57ceab5de Update fournisseur.commande.class.php 2018-05-30 10:45:06 +02:00
ATM-Nicolas
48a315f6cd FIX : Bad substitution key used for default send proposal email 2018-05-30 10:14:34 +02:00
florian HENRY
b65b545e0f add hook on balence pages 2018-05-29 16:29:14 +02:00
Laurent Destailleur
b846f0f84c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-29 12:42:33 +02:00
Laurent Destailleur
2e2cc55350 Backport fix of file checker generation 2018-05-29 12:15:28 +02:00
Laurent Destailleur
95e3c5a4b1 Backport fix of file list check generation 2018-05-29 12:13:58 +02:00
ATM-Nicolas
6b0b975ffd FIX : Keep supplier proposal price for supplier order 2018-05-29 11:21:30 +02:00
Laurent Destailleur
86ec2b8c20 Merge pull request #8883 from ATM-Marc/FIX_7.0_commande_list
FIX: missing parenthesis
2018-05-29 10:58:52 +02:00
Laurent Destailleur
fe2795d7f9 Merge pull request #8867 from ptibogxiv/patch-28
Fix error in list.php
2018-05-29 10:45:13 +02:00
Laurent Destailleur
7b824e3c48 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-29 10:13:48 +02:00
Laurent Destailleur
7eea70ebc8 FIX #8858 #8860 Backport better compatibility fix 2018-05-29 10:13:34 +02:00
Laurent Destailleur
21dab0d8ee Merge pull request #8866 from frederic34/patch-12
Fix Travis for 7.0
2018-05-29 10:04:38 +02:00
Marc de Lima Lucio
ea9e833ab8 FIX: missing parenthesis 2018-05-28 15:03:24 +02:00
ptibogxiv
d032b6ecfb Fix error in list.php 2018-05-26 09:51:56 +02:00
Frédéric FRANCE
091fb81368 Update list.php 2018-05-26 09:49:13 +02:00
Laurent Destailleur
bf81b755f9 Fix state code for payment from indonesia 2018-05-25 16:21:13 +02:00
Laurent Destailleur
37dcfe4a46 FIX button to pay still visible when amount null used 2018-05-25 16:00:23 +02:00
Laurent Destailleur
943d1dce2e Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-25 13:15:38 +02:00
Laurent Destailleur
8a64ee2297 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/commande/list.php
	htdocs/compta/facture/card.php
	htdocs/compta/facture/list.php
	htdocs/expedition/class/expedition.class.php
	htdocs/expedition/list.php
	htdocs/societe/card.php
2018-05-25 13:14:58 +02:00
Laurent Destailleur
1a1f0fbc62 Merge pull request #8839 from ATM-Nicolas/fix_shipping_fetch
FIX : Fetch shipping will now fetch project id
2018-05-25 11:46:06 +02:00
Laurent Destailleur
131ddd6984 Merge pull request #8827 from ATM-Marc/FIX_shipment_fk_project
FIX: shipment: fk_proje(c)t not handled in fetch() and update() methods
2018-05-25 11:12:39 +02:00
Laurent Destailleur
b25c7e44d3 Merge pull request #8816 from atm-gauthier/6.0_fix_test_before_delete_invoice
FIX : test is_erasable() must be done before call function delete()
2018-05-25 11:05:20 +02:00
Laurent Destailleur
0a581e48d4 Update card.php 2018-05-25 11:04:04 +02:00
Laurent Destailleur
04586fab66 Merge pull request #8824 from ggg44473/7.0
Fix sql error accounting account
2018-05-25 10:41:16 +02:00
Laurent Destailleur
545133960e Merge pull request #8849 from atm-quentin/FIX_missing_filters_during_ordering
FIX missing filters during reordering
2018-05-25 10:15:20 +02:00
Laurent Destailleur
3816b18c27 Merge pull request #8856 from glu000/7.0
FIX: It's not possible to remove a contact which is assigned to an event #8852
2018-05-25 10:14:19 +02:00
Günter Lukas
1b237a75b9 Update card.php 2018-05-24 13:31:23 +02:00
atm-quentin
eb224e43a5 FIX missing filters during ordering 2018-05-24 10:41:24 +02:00
Laurent Destailleur
4967c678b8 Fix translation 2018-05-23 18:05:19 +02:00
Laurent Destailleur
3a06918b16 FIX Missing extrafields in export of stock or products 2018-05-23 18:00:27 +02:00
Laurent Destailleur
d1d8494666 FIX Missing extrafields in export 2018-05-23 17:48:18 +02:00
ATM-Nicolas
734ecbc9b5 FIX : Fetch shipping will now fetch project id 2018-05-23 09:47:29 +02:00
Laurent Destailleur
2a579b707a FIX javascript showempty error
FIX Contact tab not visible when using canvas
2018-05-22 19:43:28 +02:00
Laurent Destailleur
be21405d21 Fix missing error message 2018-05-22 19:24:56 +02:00
Laurent Destailleur
7fce02e72e Fix phpunit test name 2018-05-21 23:43:26 +02:00
Laurent Destailleur
8951c4a7a5 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-21 23:36:47 +02:00
Laurent Destailleur
afa57fd66d Fix syntax error 2018-05-21 23:33:20 +02:00
Laurent Destailleur
69141c9493 Fix PSR True->true and GETPOST file name for local checksum check 2018-05-21 22:24:27 +02:00
Laurent Destailleur
e5561ecdfb Remove useless files 2018-05-21 22:14:15 +02:00
Marc de Lima Lucio
c9222adf6d FIX: shipment: fk_proje(c)t not handled in fetch() and update() methods 2018-05-21 16:22:06 +02:00
Sean Wang
8e397b772f Fix sql error 2018-05-21 14:19:41 +08:00
gauthier
4c3f9d6d5e FIX : test is_erasable() must be done before call function delete() too to avoid delete invoice with &action=delete in url 2018-05-18 15:20:16 +02:00
BENKE Charlene
24d353c9a7 inversion of dateo and datee 2018-05-18 12:24:44 +02:00
Laurent Destailleur
7de812d2ed Merge pull request #8793 from atm-john/Fix_situation_discount_used
Fix creating next situation invoice if a discount was allready apply
2018-05-18 12:18:58 +02:00
Laurent Destailleur
b5f37b2876 Merge pull request #8811 from fappels/7.0_fix_product_vat_update_errorhandling
Fix product vat update error handling
2018-05-18 12:00:03 +02:00
Laurent Destailleur
508f6c1a89 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-18 11:53:09 +02:00
Laurent Destailleur
6d0306f75a Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/class/html.formfile.class.php
2018-05-18 11:52:48 +02:00
Laurent Destailleur
5f8346f854 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-05-18 11:48:30 +02:00
Laurent Destailleur
492b1e7169 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-05-18 11:48:08 +02:00
Laurent Destailleur
75f5cdbc0f Merge pull request #8810 from simnandez/7.0
Fix: extrafiels is not passing orders to invoice
2018-05-18 11:47:44 +02:00
Laurent Destailleur
f2cfb928e8 Merge pull request #8809 from simnandez/5.0
Fix: extrafiels is not passing orders to invoice
2018-05-18 11:47:27 +02:00
Laurent Destailleur
24281028b7 Merge pull request #8807 from inoveaconseil/patch-2
Fix missing params for commonGenerateDocument
2018-05-18 11:43:11 +02:00
Laurent Destailleur
fa7f81c828 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-18 11:38:26 +02:00
Laurent Destailleur
a450f99e8a Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/filefunc.inc.php
2018-05-18 11:38:11 +02:00
Laurent Destailleur
162d271884 Merge pull request #8803 from atm-alexis/7.0_fix_task_contact_card_withoutproject
FIX 7.0 task contact card without withproject parameters
2018-05-18 11:29:11 +02:00
Laurent Destailleur
71f8971a8e Merge pull request #8794 from ATM-Nicolas/fix_select_user
FIX : Select user on add time spent form
2018-05-18 11:27:05 +02:00
Laurent Destailleur
078ea2ce9b Merge pull request #8790 from aspangaro/7.0-f1
Fix : Double WHERE on admin/journal_list.php
2018-05-18 11:20:05 +02:00
Laurent Destailleur
2e9f5d1c94 Merge pull request #8798 from atm-florian/6.0
fix SQL and add hook
2018-05-18 11:18:10 +02:00
Laurent Destailleur
79bbeb05ae Add missing phpunit tests 2018-05-18 11:17:33 +02:00
Laurent Destailleur
e2369dea29 FIX #8722 2018-05-18 11:17:21 +02:00
John
3dd11e1eaf Fix discount id 2018-05-18 11:02:04 +02:00
Laurent Destailleur
80bce6b62d Add phpunit for accountingaccount 2018-05-18 09:25:59 +02:00
Juanjo Menent
dd259043cd Fix: Cashdesk does not apply multi-price or price per customer 2018-05-18 09:20:18 +02:00
Laurent Destailleur
26e10caa7d FIX #8813 2018-05-18 09:15:18 +02:00
fappels
90d2ccc79c Fix product vat update error handling
Product vat update does not show update error if update result negative.
2018-05-17 21:29:15 +02:00
Juanjo Menent
0aa8c6f498 Fix: extrafiels is not passing orders to invoice 2018-05-17 19:05:25 +02:00
Juanjo Menent
dc7a1610e7 Fix: extrafiels is not passing orders to invoice 2018-05-17 18:56:01 +02:00
Inovea Conseil
5804d1d4a3 Fix missing params for commonGenerateDocument
ADD param moreparams for compatibility with commonGenerateDocument
2018-05-17 10:16:44 +02:00
alexis Algoud
5c727c077b fix task contact card without withproject parameters 2018-05-16 16:34:19 +02:00
florian HENRY
630e38072b fix SQL and add hook 2018-05-15 17:02:54 +02:00
Alexandre SPANGARO
88bc2dd416 Correct insert 2018-05-14 20:59:38 +02:00
Laurent Destailleur
a46362a71f Prepare 7.0.3 2018-05-14 15:17:10 +02:00
Laurent Destailleur
c8e758411d Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-14 15:16:33 +02:00
Laurent Destailleur
9552a914d8 FIX link for projets not linked to a thirdparties 2018-05-14 15:16:19 +02:00
ATM-Nicolas
ca09fddfb3 FIX : Select user on add time spent form 2018-05-14 15:16:07 +02:00
John
b42c87256c Fix_situation_discount_used 2018-05-14 14:55:33 +02:00
Alexandre SPANGARO
2f1ac6fad8 Fix : Double WHERE on admin/journal_list.php 2018-05-13 20:35:07 +02:00
Laurent Destailleur
e1585a4d68 Merge pull request #8763 from fmarcet/7.0
Fix: Bug on invoice status list on left menu
2018-05-10 11:54:34 +02:00
Laurent Destailleur
842c6168a2 FIX #8762 2018-05-10 11:50:35 +02:00
Ferran Marcet
d1fd39936c Fix: Bug on invoice status list on left menu 2018-05-08 09:04:04 +02:00
Laurent Destailleur
20c50e809d Start 6.0.8 2018-05-06 10:43:40 +02:00
Laurent Destailleur
f15da0b980 Fix chart of account initial data for syscohada 2018-05-05 22:15:19 +02:00
Laurent Destailleur
4f0e053463 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	ChangeLog
2018-05-05 21:58:17 +02:00
Laurent Destailleur
19008531bb Fix packager 2018-05-05 21:56:34 +02:00
Laurent Destailleur
f76df85aec compatibility with ubuntu 14.04 2018-05-05 21:53:02 +02:00
Laurent Destailleur
d4d4f8cc83 Prepare 7.0.2 2018-05-05 20:29:06 +02:00
Laurent Destailleur
b958311819 Prepare 6.0.7 2018-05-05 20:25:06 +02:00
Laurent Destailleur
9c68b81f59 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/accountancy/admin/account.php
	htdocs/projet/class/task.class.php
2018-05-05 14:34:54 +02:00
Laurent Destailleur
8b4b786969 Merge pull request #8730 from atm-arnaud/FIX_project_list_label
FIX label in getnomurl projectlist
2018-05-05 13:26:11 +02:00
Laurent Destailleur
44cb60e61d Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-05 13:25:00 +02:00
Laurent Destailleur
f6ca1eb624 Fix permission name 2018-05-05 13:24:46 +02:00
Laurent Destailleur
352676cd16 Merge pull request #8725 from fappels/Fix_7.0_ProductCombbination
FIX delete all product variants of a parent product
2018-05-05 13:14:55 +02:00
Laurent Destailleur
2f79a12c6b Merge pull request #8720 from atm-florian/6.0_pjAndTskCounter
fix project and task visibility same as list
2018-05-05 13:13:25 +02:00
Laurent Destailleur
8d52c4f919 Merge pull request #8721 from atm-florian/6.0_fixtaskid
fix taskid
2018-05-05 13:13:04 +02:00
Laurent Destailleur
7bb9615cff Merge pull request #8702 from atm-florian/6.0
fix accountancy multientity
2018-05-05 12:53:36 +02:00
Laurent Destailleur
08cf034e2f FIX to allow IRPF not null even if main VAT is null.
From https://www.javierrguez.com/problema-facturas-irpf-sin-iva-dolibarr/
2018-05-03 13:39:44 +02:00
atm-arnaud
6245f25deb FIX label in getnomurl projectlist 2018-05-03 11:47:31 +02:00
fappels
db76fd7895 Fix delete all product variants of a parent product
User object missing
2018-05-02 22:33:23 +02:00
florian HENRY
46e94af594 fix taskid 2018-05-02 19:46:04 +02:00
florian HENRY
3657857d21 fix project and task visibility same as list 2018-05-02 19:29:18 +02:00
Laurent Destailleur
f3003fa542 Merge pull request #8713 from atm-greg/Fix_supplierinvoice_line_Rank_handling
FIX addline on invoice supplier manage rank on its own if not provided
2018-05-02 18:24:17 +02:00
atm-greg
942e2f40bf addline manage rank on its own if not provided 2018-05-02 17:07:27 +02:00
florian HENRY
886ad9d4b6 check eldy message 2018-05-02 08:45:18 +02:00
florian HENRY
f2b1aa00b9 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr.git into 6.0 2018-05-02 08:40:52 +02:00
Laurent Destailleur
3340598cf8 FIX Projet is not prefilled when created from overwiew page 2018-05-01 14:15:11 +02:00
Laurent Destailleur
171414bed6 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-01 12:51:08 +02:00
Laurent Destailleur
aa958459b7 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-05-01 12:50:54 +02:00
Laurent Destailleur
5c024ceb54 Merge 2018-05-01 12:49:21 +02:00
florian HENRY
b5d7206519 fix 6.0 accountancy multientity 2018-05-01 12:02:33 +02:00
Laurent Destailleur
82708705c7 Merge pull request #8701 from Dolibarr/revert-8354-5.0_multicurrency_objectline_print
Revert "No display object line curreny if not necessary"
2018-05-01 11:17:59 +02:00
Laurent Destailleur
d975dd507b Revert "No display object line curreny if not necessary" 2018-05-01 11:17:47 +02:00
Laurent Destailleur
b1f1ddc6d0 Merge pull request #8354 from tuxgasy/5.0_multicurrency_objectline_print
No display object line curreny if not necessary
2018-05-01 11:15:31 +02:00
Laurent Destailleur
4eb4cf6506 Merge pull request #8693 from Librethic/fix-api-product-check-perm
FIX : missing english name for object
2018-05-01 10:19:27 +02:00
Laurent Destailleur
ab85fa8721 Backport EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS to solve blocking
situation.
2018-04-30 17:45:34 +02:00
Laurent Destailleur
e79c907ae0 Fix edit of capital 2018-04-30 11:01:33 +02:00
Laurent Destailleur
9a345e99ef Fix syntax error 2018-04-29 20:14:57 +02:00
jfefe
7cedf55c27 FIX : missing english name for object
'product' is used by API to check perms and return a 401 error even if user has correct
permissions
2018-04-27 20:54:48 +02:00
Laurent Destailleur
3b473943dc Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-27 12:44:07 +02:00
Laurent Destailleur
a80621471c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
	htdocs/fourn/commande/card.php
2018-04-27 12:42:18 +02:00
Laurent Destailleur
e5df7e206b Merge pull request #8224 from atm-ph/fix_6.0_supplier_order_from_supplier_proposal
Fix wrong price on supplier order line
2018-04-27 12:20:49 +02:00
Laurent Destailleur
d179cafa9c Update fournisseur.commande.class.php 2018-04-27 12:19:32 +02:00
Laurent Destailleur
ecd84f6c45 Update fournisseur.commande.class.php 2018-04-27 12:18:45 +02:00
Laurent Destailleur
4c87cbf644 Update card.php 2018-04-27 12:14:51 +02:00
Laurent Destailleur
e18190565c Merge pull request #8683 from ATM-Marc/FIX_export_actioncomm
FIX: actioncomm export: type filtering not working
2018-04-27 11:38:59 +02:00
Laurent Destailleur
8f60bd35a5 Merge pull request #8676 from atm-florian/7.0
fix commonobject double style
2018-04-27 10:14:13 +02:00
Laurent Destailleur
3faeb08b78 Merge pull request #8672 from ATM-Nicolas/fix_action_contact
FIX : Related contact printed in societe agenda
2018-04-27 10:00:18 +02:00
Laurent Destailleur
e2b936e2d8 Merge pull request #8666 from frederic34/patch-2
Update api_products.class.php
2018-04-27 09:45:40 +02:00
Laurent Destailleur
761d2b3667 FIX Not approved holidays must not be visible into timesheet 2018-04-26 17:44:36 +02:00
Marc de Lima Lucio
c044d9ab58 FIX: actioncomm export: type filtering not working 2018-04-25 16:20:09 +02:00
Laurent Destailleur
83b762b681 FIX CVE-2018-9019 2018-04-25 16:01:06 +02:00
florian HENRY
70961bd075 fix perms 2018-04-24 12:46:16 +02:00
florian HENRY
67329b8805 fix commonobject double style 2018-04-24 12:33:07 +02:00
ATM-Nicolas
736c56705b FIX : Related contact printed in societe agenda 2018-04-24 10:02:26 +02:00
Laurent Destailleur
fdb3a11f34 FIX extrafields price and double were lost during a failed post. 2018-04-23 22:56:40 +02:00
Laurent Destailleur
0a5e606937 FIX extrafields price and double were lost during a failed post. 2018-04-23 22:53:57 +02:00
Laurent Destailleur
f95e5078c1 FIX Can't edit option PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY 2018-04-23 21:33:49 +02:00
Frédéric FRANCE
657fa48c3f Update api_products.class.php 2018-04-23 15:31:55 +02:00
Laurent Destailleur
315d5bad39 FIX Error in ContractLigne not return to Contract 2018-04-23 15:07:50 +02:00
Laurent Destailleur
77d9ff033a FIX cron script disabled if module disabled 2018-04-23 15:07:27 +02:00
Laurent Destailleur
e834eff049 FIX #8650 2018-04-22 20:03:24 +02:00
Laurent Destailleur
6b90558b7a FIX File name not visible in email preview 2018-04-20 11:20:56 +02:00
Laurent Destailleur
7a703e149f Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-20 01:39:48 +02:00
Laurent Destailleur
c6a53ca25d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/supplier_proposal/card.php
2018-04-20 01:39:26 +02:00
Laurent Destailleur
54154343b2 Merge pull request #8643 from ATM-Marc/FIX_7.0_commonobject_default
FIX: CommonObject: don't require 'notnull' field if 'default' set
2018-04-20 01:28:00 +02:00
Laurent Destailleur
e1585ef7e3 Merge pull request #8640 from atm-florian/6.0
fix : use template at the goos place for generate doc for supplier
2018-04-20 01:23:44 +02:00
Laurent Destailleur
15aeffee7d Merge pull request #8638 from ATM-Marc/FIX_showOutputField_empty_date
FIX: don't print empty date in CommonObject::showOutputField
2018-04-20 01:20:45 +02:00
Laurent Destailleur
b1ea34f4e7 FIX DOL_AUTOSET_COOKIE was not correctly setting value of cookie 2018-04-19 13:54:43 +02:00
Marc de Lima Lucio
893ce55852 FIX: commonobject: don't require notnull field if default set 2018-04-19 10:29:48 +02:00
florian HENRY
882863ab48 fix : define in conf dir_output for suipplier_proposal modules 2018-04-18 16:21:20 +02:00
florian HENRY
bf27ca1b11 fix : use template at the goos place for generate doc for supplier
propoal
2018-04-18 16:00:37 +02:00
Laurent Destailleur
1dc466e1fb FIX CVE-2018-10095 2018-04-18 12:32:19 +02:00
Laurent Destailleur
7ade4e37f2 FIX CVE-2018-10094 2018-04-18 12:23:49 +02:00
Laurent Destailleur
6b3e5e2085 FIX sanitize setup params 2018-04-18 12:19:23 +02:00
Laurent Destailleur
5d121b2d3a FIX CVE-2018-10092 2018-04-18 11:58:36 +02:00
Laurent Destailleur
fb3cae9ad3 Fix translation of country for GB 2018-04-18 11:36:44 +02:00
Marc de Lima Lucio
e88830820a FIX: dont print empty date in CommonObject::showOutputField 2018-04-18 11:13:18 +02:00
Laurent Destailleur
b39755f7b9 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-18 00:16:14 +02:00
Laurent Destailleur
013f95f54b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-18 00:02:51 +02:00
Laurent Destailleur
e4635c9401 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-04-18 00:01:40 +02:00
Laurent Destailleur
c7789d2038 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-04-18 00:01:06 +02:00
Laurent Destailleur
d8138b1ded Merge pull request #8626 from hregis/7.0_bug6
Fix: missing drop constraint with postgresql
2018-04-17 18:53:09 +02:00
Laurent Destailleur
11897976c3 Merge pull request #8625 from hregis/6.0_multicompany
Fix: missing drop index with postgresql
2018-04-17 18:52:45 +02:00
Laurent Destailleur
1870598734 Merge pull request #8627 from hregis/5.0_bug
Fix: syntax error for postgresql > 9.1
2018-04-17 18:51:55 +02:00
Regis Houssin
9a210c1a91 Fix: syntax error for postgresql > 9.1 2018-04-17 17:33:40 +02:00
Regis Houssin
d89086cb7a Fix: missing drop constraint with postgresql 2018-04-17 17:25:54 +02:00
Regis Houssin
dd835c4868 Fix: missing drop index with postgresql 2018-04-17 17:18:59 +02:00
Laurent Destailleur
e7281238a9 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-17 16:17:25 +02:00
Laurent Destailleur
eb3b351e83 Transifex sync 2018-04-17 16:17:07 +02:00
Laurent Destailleur
5eaa3bee83 Merge pull request #8617 from simnandez/7.0
FIX zip not filter
2018-04-17 16:09:01 +02:00
Juanjo Menent
9ae28d2bc2 Fix: zip not filter 2018-04-17 10:43:25 +02:00
Laurent Destailleur
bcecc25401 Merge pull request #8606 from atm-greg/Add_hooks_on_supplier_docs
add hooks on supplier documents
2018-04-17 09:43:51 +02:00
Laurent Destailleur
27a8476117 FIX remove var_dump 2018-04-16 17:02:54 +02:00
Laurent Destailleur
622042e9b2 FIX Max nb of generation of recurring invoice should not show warning 2018-04-16 15:05:35 +02:00
Laurent Destailleur
50d86a7cfd Fix accounting area when advanced accounting module not enabled 2018-04-16 14:25:39 +02:00
Laurent Destailleur
f1ad3912e7 Fix multicompany compatibility for recurring invoice generation 2018-04-16 14:18:38 +02:00
Laurent Destailleur
14ed19265c FIX environment shown on cron card 2018-04-16 13:53:59 +02:00
Laurent Destailleur
f05cc8b310 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-16 11:20:44 +02:00
Laurent Destailleur
0d26bdcdc5 FIX Button receive products not visible 2018-04-16 11:20:29 +02:00
Laurent Destailleur
99633eb815 FIX button "Classify bill" on supplier order was not visible 2018-04-16 11:12:27 +02:00
atm-greg
90f1ab8af4 add hooks on supplier documents 2018-04-16 06:46:22 +02:00
Laurent Destailleur
57c03553dd Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/lib/functions.lib.php
2018-04-15 12:09:07 +02:00
Laurent Destailleur
64dafbc37f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-04-15 11:33:40 +02:00
Laurent Destailleur
37e4da30d0 Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-04-15 11:33:27 +02:00
Laurent Destailleur
e29476428c Merge pull request #8594 from hregis/6.0_multicompany
FIX project category is type 6 not 5 !!
2018-04-15 11:32:49 +02:00
Laurent Destailleur
6b3c17680f Merge pull request #8596 from simnandez/5.0
FIX: some localtaxes errors
2018-04-15 11:25:27 +02:00
Juanjo Menent
bfed1b9db1 FIX: some localtaxes errors 2018-04-14 12:45:40 +02:00
Regis Houssin
79c34f4d69 Fix: project category is type 6 not 5 !! 2018-04-14 10:03:21 +02:00
Laurent Destailleur
6a3c2f9808 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/fourn/facture/card.php
2018-04-13 23:27:14 +02:00
Laurent Destailleur
50a3b73a6f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-04-13 23:21:29 +02:00
Laurent Destailleur
3ec295935c Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-04-13 23:21:18 +02:00
Laurent Destailleur
ecdb56606d Merge pull request #8590 from atm-greg/FIX_supplier_invoice_line_rank
Rank of invoice_supplier lines was always -1
2018-04-13 23:20:42 +02:00
Laurent Destailleur
c4076fc8bd Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-13 23:08:34 +02:00
Laurent Destailleur
8cfcdabcac Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2018-04-13 23:03:46 +02:00
Laurent Destailleur
e1bd605604 Merge pull request #8587 from atm-greg/Fix_specialcode_on_supplier_doc_lines
Fix specialcode on order_supplier doc lines
2018-04-13 22:24:04 +02:00
Laurent Destailleur
235bf2a961 Merge pull request #8591 from hregis/7.0_bug6
FIX avoid focus problem when select2 is in a modal dialog window
2018-04-13 22:22:24 +02:00
Regis Houssin
556a418132 Fix: best method 2018-04-13 19:30:11 +02:00
Regis Houssin
199bf4c044 Fix: avoid focus problem when select2 is in a modal dialog window 2018-04-13 17:10:07 +02:00
atm-greg
4fae1e3236 rank of invoice_supplier lines was always -1 2018-04-13 17:01:10 +02:00
atm-greg
8d4126274a rang was missing on order_supplier lines 2018-04-13 15:53:49 +02:00
atm-greg
ef2c6a0ed4 fix sql error 2018-04-13 10:31:36 +02:00
atm-greg
58535993c1 use special_code on order_supplier lines 2018-04-13 10:31:27 +02:00
Laurent Destailleur
04aafbc493 Fix css to restore focus undertext on select2 combo lists 2018-04-13 10:01:07 +02:00
Laurent Destailleur
891925874f FIX #8574 2018-04-13 00:54:08 +02:00
Laurent Destailleur
ecd18da137 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-13 00:43:37 +02:00
Laurent Destailleur
f7bb781b42 FIX #8571 2018-04-13 00:43:15 +02:00
Laurent Destailleur
2bbde44f63 FIX #8580 2018-04-12 23:54:53 +02:00
Laurent Destailleur
7bf9801b80 Merge pull request #8577 from atm-florian/6.0
fix error on first install pgsql
2018-04-12 23:47:10 +02:00
Laurent Destailleur
421a794942 FIX #8559 Bug to generate cheque receipt 2018-04-12 17:22:51 +02:00
florian HENRY
cd2f6616be fix index creation with unique name for pgSQL 2018-04-12 16:41:53 +02:00
florian HENRY
def28be0ab fix error on first install pgsql 2018-04-12 16:36:04 +02:00
Laurent Destailleur
e437989853 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-12 13:25:27 +02:00
Laurent Destailleur
8da84af973 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-11 19:31:48 +02:00
Laurent Destailleur
8aa41c09c0 Fix phpunit 2018-04-11 19:31:28 +02:00
Laurent Destailleur
eec99b436e Merge pull request #8565 from atm-greg/Add_supplierContactName_on_documents
Add supplier contact name on supplier documents
2018-04-11 19:25:01 +02:00
Laurent Destailleur
3df873ee06 Merge pull request #8562 from ATM-Marc/FIX_modulebuilder
FIX: various modulebuilder-related issues
2018-04-11 18:01:04 +02:00
Laurent Destailleur
9ccba03a17 Update html.form.class.php 2018-04-11 18:00:34 +02:00
Laurent Destailleur
885c2389af Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-11 17:58:37 +02:00
Laurent Destailleur
afdd504e16 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/accountancy/journal/sellsjournal.php
2018-04-11 17:58:21 +02:00
Laurent Destailleur
0f3d2cc8df Merge pull request #8564 from atm-ph/fix_6.0_sellsjournal_situation_invoice
Fix wrong amount for situation invoice in sellsjournal
2018-04-11 17:51:00 +02:00
atm-greg
ae34fa6fbd add supplier contact name on supplier documents 2018-04-11 17:42:26 +02:00
Laurent Destailleur
d7da83ebc5 Merge pull request #8560 from atm-john/Fix_extrafield_list_from_table_entity
Fix extrafield entity query filter
2018-04-11 17:31:36 +02:00
Laurent Destailleur
9a83a6ad6e Merge pull request #8546 from atm-quentin/FIX_Issue_8455
FIX Issue #8455
2018-04-11 17:26:13 +02:00
Laurent Destailleur
e4f2e0ecbd Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-11 17:21:14 +02:00
Laurent Destailleur
590bc2948a Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/compta/bank/card.php
	htdocs/core/tpl/admin_extrafields_view.tpl.php
2018-04-11 17:20:49 +02:00
Laurent Destailleur
9fafefa0d7 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-04-11 17:18:09 +02:00
Laurent Destailleur
0518218aed Fix regression 2018-04-11 17:17:03 +02:00
atm-ph
6f526eb780 Fix wrong amount for situation invoice in sellsjournal 2018-04-11 16:40:59 +02:00
Laurent Destailleur
73a8966659 Merge pull request #8538 from atm-arnaud/FIX_8389_html_in_lang_DE
FIX #8389
2018-04-11 16:31:36 +02:00
Laurent Destailleur
307f217d56 Merge pull request #8543 from ATM-Nicolas/fix_duplicate_events
FIX : multiple creation of same event
2018-04-11 16:28:32 +02:00
Laurent Destailleur
23dba46c8c Merge pull request #8551 from ATM-Nicolas/fix_datetime_extrafields
FIX : update wrong datetime extrafield
2018-04-11 16:28:04 +02:00
Laurent Destailleur
ca6b7205ef Update commonobject.class.php 2018-04-11 16:27:56 +02:00
Laurent Destailleur
b732844e91 Merge pull request #8537 from atm-arnaud/FIX_8023_missing_escape_htmltag
FIX #8023
2018-04-11 16:25:33 +02:00
Laurent Destailleur
628b437e28 Update card.php 2018-04-11 16:25:05 +02:00
Laurent Destailleur
c392b9b8ef Merge pull request #8541 from atm-gauthier/FIX_count_6.0
FIX #8478 !empty instead of count to avoid warning
2018-04-11 14:55:41 +02:00
Laurent Destailleur
75bc3d17e6 Update admin_extrafields_view.tpl.php 2018-04-11 14:55:29 +02:00
Laurent Destailleur
bc1515cb56 Merge pull request #8535 from atm-greg/Fix_dolGetFirstLastname
fix #8521
2018-04-11 14:54:15 +02:00
Laurent Destailleur
1f21078e08 Merge pull request #8536 from atm-florian/7.0_fix8474
fix #8474
2018-04-11 14:53:26 +02:00
Laurent Destailleur
ab43d9d675 Merge pull request #8544 from ATM-Marc/FIX_odt_cond_reglement
FIX: payment term doc-specific label was not used (issue #8414)
2018-04-11 14:52:06 +02:00
Laurent Destailleur
0d15d8e0ad Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/user/card.php
2018-04-11 14:45:11 +02:00
Laurent Destailleur
804703c9c9 Fix regression 2018-04-11 14:43:16 +02:00
Laurent Destailleur
e1c83df086 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0 2018-04-11 14:39:13 +02:00
Laurent Destailleur
560038fa18 Fix regression in update contact 2018-04-11 14:38:56 +02:00
Laurent Destailleur
c2eb2bf10e Merge pull request #8542 from ATM-Marc/FIX_user_autocomplete
FIX: weird password autocompletion in Google Chrome (issue #8479)
2018-04-11 13:22:42 +02:00
Laurent Destailleur
4f7fbb80ba Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-11 13:21:36 +02:00
Laurent Destailleur
21c65f812a Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-11 13:21:20 +02:00
Laurent Destailleur
edb59c05dc Merge pull request #8525 from atm-greg/Add_projettaskcard_hook
add doActions hook on projettaskcard
2018-04-11 13:20:07 +02:00
Laurent Destailleur
73aa34dfbe Merge pull request #8528 from hregis/7.0_bug6
FIX avoid Error: Call to undefined method mysqli::get_charset()
2018-04-11 13:19:33 +02:00
Laurent Destailleur
ba526dd7f2 Merge pull request #8530 from hregis/7.0_bug3
FIX missing User object with API REST
2018-04-11 13:11:27 +02:00
Laurent Destailleur
e642535389 Merge pull request #8561 from frederic34/patch-11
Update combinations.php
2018-04-11 13:09:34 +02:00
Laurent Destailleur
6731e238a3 Merge pull request #8550 from atm-quentin/FIX_Issue_8037
FIX issue #8037
2018-04-11 13:06:26 +02:00
Laurent Destailleur
7d7c0624d2 Update traduction.php 2018-04-11 12:59:24 +02:00
Laurent Destailleur
50dd75632c Merge pull request #8532 from atm-arnaud/FIX_8359_project_link_categ_list
FIX #8359
2018-04-11 12:57:41 +02:00
Laurent Destailleur
c958a4f865 Merge pull request #8558 from atm-greg/Fix_contact_birthday_update
FIX #8259 can't update contact birthday with REST API
2018-04-11 12:53:41 +02:00
Laurent Destailleur
d02405dccd Merge pull request #8533 from atm-quentin/FIX_issues_8470
FIX issue #8470
2018-04-11 12:52:44 +02:00
Laurent Destailleur
dfe93bce21 Merge pull request #8534 from atm-maxime/fix_suporder_defaultcurrency
FIX default currency not set on supplier order creation from commercial menu #8459
2018-04-11 12:52:17 +02:00
Marc de Lima Lucio
fa8cf98249 FIX: modulebuilder: handle 'price' fieldtype 2018-04-11 12:18:54 +02:00
Frédéric FRANCE
a95bc76afb Update combinations.php 2018-04-11 12:10:58 +02:00
Frédéric FRANCE
bc7623d383 Update getCombinations.php 2018-04-11 12:05:23 +02:00
Marc de Lima Lucio
bbc12cf06b FIX: default addupdatedelete actions: uniformize add/update value checks 2018-04-11 11:49:29 +02:00
Marc de Lima Lucio
2f75bfcd83 FIX: modulebuilder: could not create html fields 2018-04-11 11:46:47 +02:00
Frédéric FRANCE
2c76a6cd80 Update combinations.php 2018-04-11 11:44:22 +02:00
Marc de Lima Lucio
c966cdbd47 FIX: selectForFormsList: entity checked even is object not multi-entity managed 2018-04-11 11:43:51 +02:00
John
96e26100f0 Add extrafield entity query filter 2018-04-11 11:27:47 +02:00
atm-greg
7cdc1c8bef Fix #8259 can't update contact birthday with REST API 2018-04-11 07:08:40 +02:00
ATM-Nicolas
cffe1e9771 FIX : Multiple creation of same event 2018-04-10 17:11:18 +02:00
ATM-Nicolas
47d5b1f6fd FIX : update wrong datetime extrafield 2018-04-10 16:39:28 +02:00
atm-quentin
809b2a91ed FIX issue #8037 2018-04-10 16:27:18 +02:00
atm-quentin
cc832bd972 FIX Issue #8455 2018-04-10 15:47:06 +02:00
Marc de Lima Lucio
1fd5dba118 FIX: payment term doc-specific label was not used 2018-04-10 15:24:57 +02:00
Marc de Lima Lucio
307ede8b22 FIX: weird password autocompletion in Goocle Chrome (issue #8479) 2018-04-10 15:03:50 +02:00
gauthier
5621d1f8ea FIX #8478 !empty instead of count to avoid warning 2018-04-10 15:03:15 +02:00
atm-arnaud
26e9f10833 FIX #8389 2018-04-10 14:52:16 +02:00
atm-arnaud
848d76ee78 FIX #8023 2018-04-10 14:43:32 +02:00
florian HENRY
84f80795c3 fix #8474 2018-04-10 14:38:41 +02:00
atm-greg
4f13a4f45b fix #8521 2018-04-10 14:16:01 +02:00
Maxime Kohlhaas
cb1a011b50 Fix default currency not set on supplier order creation from commercial menu #8459 2018-04-10 14:14:16 +02:00
atm-arnaud
d24b36f768 FIX #8359 2018-04-10 14:10:40 +02:00
atm-quentin
6277928b67 FIX issue #8470 2018-04-10 14:01:35 +02:00
Regis Houssin
97bf6fff7f Fix: missing User object with API REST 2018-04-10 08:07:23 +02:00
Regis Houssin
89ec185f51 Fix: avoid Error: Call to undefined method mysqli::get_charset() 2018-04-09 12:53:03 +02:00
Regis Houssin
976b5c26c7 Fix: TODO get_charset() function don't exists 2018-04-09 12:26:39 +02:00
atm-greg
b1469ba761 add doActions hook on projettaskcard 2018-04-09 07:06:20 +02:00
Laurent Destailleur
79af10fc83 Fix search filters 2018-04-08 13:01:42 +02:00
Laurent Destailleur
3d36e3ee49 Fix search criteria in bookkeeping table 2018-04-08 12:41:03 +02:00
Laurent Destailleur
560c84be0d FIX When clearing filter, we must not save tmp criterias in session 2018-04-08 12:40:19 +02:00
Laurent Destailleur
8cca3dabd6 FIX look and feel v7 "back to" for bookkeeping record 2018-04-08 11:29:30 +02:00
Laurent Destailleur
aad99bdcc0 FIX Removed error when no error on accounting setup page 2018-04-07 22:27:42 +02:00
Laurent Destailleur
304adff973 FIX view of balance before field
Conflicts:
	htdocs/compta/bank/bankentries_list.php
2018-04-07 21:49:59 +02:00
Laurent Destailleur
989d1c87c6 Fix link to reconcile 2018-04-07 20:06:19 +02:00
Laurent Destailleur
bacee3c298 Translation 2018-04-07 20:06:14 +02:00
Laurent Destailleur
5a34a22934 Code comment 2018-04-07 13:04:52 +02:00
Laurent Destailleur
15c7bbf9d8 Fix input lost when error 2018-04-07 12:28:10 +02:00
Laurent Destailleur
ebb418fe3a Fix CSRF test 2018-04-06 20:06:05 +02:00
Laurent Destailleur
35d2f0e441 Fix no lose entry when error on survey comment submission 2018-04-06 19:42:59 +02:00
Laurent Destailleur
84426c69e3 Fix not not saved 2018-04-06 19:26:24 +02:00
Laurent Destailleur
77f2b137b5 FIX XSS 2018-04-06 19:23:41 +02:00
Laurent Destailleur
1a321e19c8 FIX XSS in company setup page 2018-04-06 19:12:13 +02:00
Laurent Destailleur
417c07a6e8 Fix REFLECTED XSS 2018-04-06 18:33:51 +02:00
Laurent Destailleur
2d1183cbb7 FIX can bypass the CSRF protection with url with domain inside 2018-04-06 17:58:30 +02:00
Laurent Destailleur
7877854693 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-06 17:37:19 +02:00
Laurent Destailleur
1623fea618 FIX SQL Injection CWE-89 2018-04-06 17:25:22 +02:00
Laurent Destailleur
f56438112f FIX CWE-89 2018-04-06 17:22:14 +02:00
Laurent Destailleur
1009a629d9 Try better Fix for #8432 2018-04-06 13:20:09 +02:00
François J
a78c064461 Fix CommandeFournisseur::getDispachedLines line ID & return quantity 2018-04-06 11:22:15 +02:00
Laurent Destailleur
723ac6fba0 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-06 00:02:06 +02:00
Laurent Destailleur
920891ba70 Fix edit of default opportunit percent 2018-04-06 00:01:24 +02:00
Laurent Destailleur
2207e5e470 Fix tooltip 2018-04-05 19:23:36 +02:00
TuxGasy
47dcc0d5c6 fix notrigger ignored on BILL_CREATE 2018-04-05 18:32:41 +02:00
Laurent Destailleur
8cf56a5b9c Fix regression 2018-04-05 16:29:37 +02:00
Laurent Destailleur
dfa37be7e9 Merge pull request #8499 from atm-maxime/7.0
FIX service creation, right is tested regarding the product type
2018-04-05 16:21:06 +02:00
Laurent Destailleur
55719cd166 Update card.php 2018-04-05 16:20:50 +02:00
Laurent Destailleur
ab27b105c0 Merge pull request #8490 from hregis/7.0_bug6
FIX limit access of email template page to internal users
2018-04-05 16:11:04 +02:00
Laurent Destailleur
45d074c39d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-04-05 13:25:59 +02:00
Laurent Destailleur
2b135dc951 FIX #8488 2018-04-05 13:13:45 +02:00
Laurent Destailleur
08ab67289b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/societe/class/societe.class.php
2018-04-05 13:10:11 +02:00
Regis Houssin
5914bfdf18 Fix: more complete 2018-04-05 13:00:55 +02:00
Regis Houssin
156d26ddb9 Fix: backward compatibility 2018-04-05 13:00:50 +02:00
Laurent Destailleur
0223d54107 FIX Support or multicompany for sheduled jobs
FIX Use priority to define order of sheduled jobs

Conflicts:
	htdocs/cron/list.php
2018-04-05 12:38:42 +02:00
Laurent Destailleur
88b3e08b22 FIX filter/sorting on extrafield on contact list from contact tab 2018-04-05 11:34:26 +02:00
Laurent Destailleur
7c70f9ed03 Fix option STOCK_SUPPORTS_SERVICES 2018-04-03 20:23:47 +02:00
Maxime Kohlhaas
0c3b92f09a Better fix 2018-04-03 14:53:57 +02:00
Maxime Kohlhaas
39eab6d88d Fix service creation, right is tested regarding the product type 2018-04-03 14:38:20 +02:00
Laurent Destailleur
8595d7621b Fix POST mut use method POST no GET 2018-04-02 23:30:23 +02:00
Laurent Destailleur
fba40575f7 Remove dead code 2018-04-02 16:39:48 +02:00
Regis Houssin
c720345e6d Fix: better test 2018-04-01 11:47:10 +02:00
Regis Houssin
20e80a58a8 Fix: limit access to internal users 2018-04-01 11:43:39 +02:00
Laurent Destailleur
84bb4c6ad7 FIX With x extrafields, request for multicompany label was done x times 2018-03-30 19:51:53 +02:00
Laurent Destailleur
2e22c13062 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-29 15:31:35 +02:00
Laurent Destailleur
fdfcb96176 Fix length of combobox 2018-03-29 15:31:21 +02:00
Laurent Destailleur
39758625b7 Merge pull request #8471 from atm-ph/fix_6.0_error_creating_soc
Fix error on creating company with external module in 'custom' folder…
2018-03-29 13:48:36 +02:00
Laurent Destailleur
0e986b8f97 Update societe.class.php 2018-03-29 13:48:09 +02:00
Laurent Destailleur
839ebb428b Merge pull request #8477 from ggg44473/7.0
Fix wrong approve time in expense report
2018-03-29 13:40:33 +02:00
Laurent Destailleur
92cbcd9ccb Merge pull request #8462 from atm-florian/7.0
Fix error log
2018-03-29 13:38:35 +02:00
Laurent Destailleur
188e5d286d Fix statut 2018-03-29 13:28:29 +02:00
Laurent Destailleur
072b6c02c0 FIX Test on mandatory status when closing proposal failed 2018-03-29 13:25:03 +02:00
Laurent Destailleur
b806b85761 Fix field filtert is set twice 2018-03-29 11:15:50 +02:00
florian HENRY
cc7deb0add Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0 2018-03-29 09:36:05 +02:00
florian HENRY
78812ef826 better error management 2018-03-29 09:35:47 +02:00
Sean Wang
3dd9d47089 Fix wrong approve time in expense report
The approve time showed was 8 hours more than the real time.
Checking database turned out that it had the wrong data(+8 hours).

After checking every timezone related settings were correct,
I found that it do twice idate() in setApproved().
Since we have idate() in $sql, we don't need the idate()
at the line 1249.
2018-03-29 14:49:06 +08:00
Laurent Destailleur
125085acee Fix name of method to avoid ci errors 2018-03-29 03:01:05 +02:00
atm-ph
a89983ef5c Fix error on creating company with external module in 'custom' folder with a file to generate accountancy code 2018-03-28 15:41:10 +02:00
florian HENRY
7635f23d78 Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0 2018-03-27 18:39:56 +02:00
florian HENRY
af7c1d8da1 fix error log 2018-03-27 18:39:18 +02:00
Frédéric FRANCE
299c32d262 Update actions_sendmails.inc.php 2018-03-27 18:02:27 +02:00
Laurent Destailleur
34fae0bd48 Merge pull request #8456 from atm-greg/Fix_bankentries_list
FIX sql error using no category
2018-03-27 17:49:01 +02:00
Bruno Généré
925e0c46dd BUG - Point of sale - buttons for cheque and CB are not displayed properly when one account is not defined
I find out in the point of sale module that when you have an account for CB but not for check than you could use check but not CB.
It seems quite obvious when you look to the previous code that a mistake was done.
This is now fixed I expect.
The workaround for now is to define both default accounts (for check and for CB).
2018-03-27 17:13:25 +02:00
Laurent Destailleur
460344fbfb Traduction 2018-03-27 16:02:06 +02:00
Laurent Destailleur
51cd793d80 Fix log and duplicate vat_by_date function 2018-03-27 14:37:29 +02:00
Laurent Destailleur
f9ee2930e2 FIX Data on income/expense report was always 0 2018-03-27 14:16:59 +02:00
Laurent Destailleur
0b13cd17ac FIX Some report have data when several chart of accounts exists
FIX Detail per account not visible when total < 0
2018-03-27 13:55:10 +02:00
Laurent Destailleur
2b588b9e43 FIX Initial month on report income/expense per predefined group 2018-03-27 13:37:40 +02:00
Laurent Destailleur
930512d9a2 FIX Add a test to avoid to reset binding by error. 2018-03-27 13:08:16 +02:00
Laurent Destailleur
56944115cb Hide a very dangerous feature. Should be useless. 2018-03-27 12:46:15 +02:00
Laurent Destailleur
dab8dbd671 FIX Binding pages must start on fiscal month not calendar month 2018-03-27 12:31:08 +02:00
Laurent Destailleur
88939a8469 FIX Draft invoice must be excluded from report 2018-03-27 11:10:12 +02:00
atm-greg
91d6a1b621 fix sql error using no category 2018-03-27 06:40:12 +02:00
Laurent Destailleur
89bf781fe6 FIX Add warning when expense report line not into range
FIX Name of user not visible on journalizing expense report payments
FIX Only approved expense report must be journalized
2018-03-26 14:13:40 +02:00
Laurent Destailleur
934d2d8881 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/filefunc.inc.php
2018-03-25 15:27:31 +02:00
Laurent Destailleur
c85cb7fe0a Merge pull request #8447 from fappels/7.0_modulbuilder
Update on module builder
2018-03-24 16:41:43 +01:00
Laurent Destailleur
1c581c6fff Merge pull request #8443 from atm-florian/6.0
fix user right on modRessource,  fix security check on fourn card
2018-03-24 16:37:11 +01:00
Laurent Destailleur
d63c8356f4 Merge pull request #8437 from hregis/7.0_bug6
Fix: uniformize getEntity('intervention')
2018-03-24 16:36:27 +01:00
Laurent Destailleur
224fa1c03e Fix external links ko when substitution key are inside domain 2018-03-24 12:48:33 +01:00
Laurent Destailleur
a3c199e9e3 FIX Missing include 2018-03-24 12:48:19 +01:00
fappels
caa43ae2f6 Make helper methods available for derived classes.
Use-case: a module build with modulebuilder can make it's own fetch
method using the helper methods.
2018-03-23 17:35:46 +01:00
Laurent Destailleur
83b6dd4cb9 Prepare 7.0.2 2018-03-23 16:17:56 +01:00
Laurent Destailleur
a15abb2ded Update lang 2018-03-23 16:17:28 +01:00
Laurent Destailleur
c12469860a Update lang 2018-03-23 16:17:10 +01:00
florian HENRY
11446fb2f7 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr.git into 6.0 2018-03-22 23:26:37 +01:00
florian HENRY
46d2b4d62d fix security check on fourn card 2018-03-22 23:25:54 +01:00
Laurent Destailleur
9f67bb0aa3 Start 6.0.7 2018-03-22 21:58:24 +01:00
Regis Houssin
9cf66e53f6 Fix: wrong module name 2018-03-22 16:39:47 +01:00
Regis Houssin
b5f37301a5 Fix: uniformize getEntity('intervention') 2018-03-22 16:28:00 +01:00
Laurent Destailleur
87815265c8 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-22 14:19:56 +01:00
Laurent Destailleur
a9944e1d23 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	ChangeLog
	htdocs/contrat/card.php
2018-03-22 14:19:34 +01:00
Laurent Destailleur
99d88b0fa9 Merge pull request #8435 from enstentechnologies/7.0
FIX PropalStatusValidatedShort missing in langs/en_US/propal.lang
2018-03-22 14:04:40 +01:00
Laurent Destailleur
0bb7d4d494 Update propal.lang 2018-03-22 14:04:33 +01:00
Laurent Destailleur
a7cb811b39 Merge pull request #8431 from fappels/7.0_fix_products_translation
Fix products translation
2018-03-22 13:51:37 +01:00
Laurent Destailleur
4c1dcc37d1 Fix packager 2018-03-22 13:38:28 +01:00
Laurent Destailleur
2ee0e68d67 Fic packaging tools 2018-03-22 13:22:33 +01:00
vabeltran
3793fd69e6 FIX PropalStatusValidatedShort missing in langs/en_US/propal.lang
Added PropalStatusValidatedShort value, missing in lang/en_US/propal.lang file.
2018-03-22 13:18:06 +01:00
Laurent Destailleur
658b145ff4 Missing translation 2018-03-22 13:16:38 +01:00
Laurent Destailleur
4eec7db731 Prepare 7.0.1 2018-03-22 13:13:04 +01:00
Laurent Destailleur
68a4058387 Fix translation 2018-03-22 13:03:12 +01:00
fappels
3765bc4775 Fix html escape for edit label 2018-03-22 10:48:03 +01:00
fappels
9e4a66b1a9 Fix hidden oprion PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION 2018-03-22 10:46:54 +01:00
Laurent Destailleur
227b830aa2 Fix visible rounding of abandonned amount 2018-03-22 09:41:30 +01:00
florian HENRY
1feb22ea9c fix user right on modRessource 2018-03-21 22:24:11 +01:00
Laurent Destailleur
b3bb6d88e6 Fix list of leave not complete for a manager 2018-03-21 19:17:42 +01:00
Laurent Destailleur
a2b9dbfbe3 Fix list must show only employee 2018-03-21 11:13:28 +01:00
Laurent Destailleur
891ebc0e7c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-21 10:59:59 +01:00
Laurent Destailleur
ac35acb273 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-20 20:04:20 +01:00
Laurent Destailleur
fe53ff56ee FIX Error management in leave request 2018-03-20 20:03:44 +01:00
Laurent Destailleur
11d33c8dcc Merge pull request #8420 from hregis/7.0_bug3
Fix: better compatibility with all hostname syntax
2018-03-20 17:32:14 +01:00
Laurent Destailleur
a3a416aa7a Can remove comment added due to lack of test 2018-03-20 16:46:09 +01:00
Laurent Destailleur
78b4492f1e FIX Permission in list of holiday
Conflicts:
	htdocs/holiday/list.php
2018-03-20 14:46:46 +01:00
Laurent Destailleur
8214e7bb42 Fix missing security restiction test 2018-03-20 14:32:24 +01:00
Laurent Destailleur
896a1cbc24 Fix bad var init 2018-03-20 11:27:47 +01:00
Laurent Destailleur
8cf2d4eb45 Fix filter on holiday statut
Fix tr/td balance for extrafields on lines
2018-03-20 10:10:21 +01:00
Laurent Destailleur
a325bbf865 FIX Input of holiday for subordinates was ko 2018-03-19 20:46:43 +01:00
Laurent Destailleur
0dc8d3cb00 Fix trad 2018-03-19 18:53:33 +01:00
Regis Houssin
4767819b7a Fix: better compatibility with all hostname syntax 2018-03-19 17:59:23 +01:00
Laurent Destailleur
14e80948b8 FIX approval date was not visible if leave was canceled after 2018-03-19 17:53:33 +01:00
Laurent Destailleur
ee3dcb724f FIX email use the validate user instead of approver in holiday approval
email.
2018-03-19 17:20:44 +01:00
Laurent Destailleur
73eba91756 Fix translation of email message 2018-03-19 17:06:59 +01:00
Laurent Destailleur
91cc3d1b73 FIX navigation and filters on holiday list 2018-03-19 16:11:42 +01:00
Laurent Destailleur
e0164884ee Better management of hidden option HOLIDAY_HIDE_BALANCE 2018-03-19 15:13:36 +01:00
Laurent Destailleur
eb03fb7540 Fix trad/compatibility 2018-03-19 15:00:50 +01:00
Laurent Destailleur
ac9ab7b228 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-19 14:10:17 +01:00
Laurent Destailleur
8889e7f4b2 FIX translation of holiday types 2018-03-19 14:09:44 +01:00
Laurent Destailleur
13801a0d93 Merge pull request #8417 from hregis/7.0_bug3
Fix: replace ldaps:// by ssl://
2018-03-19 12:38:14 +01:00
Laurent Destailleur
eb7886ecff Update ldap.class.php 2018-03-19 12:37:53 +01:00
Regis Houssin
890d0b6685 Fix: replace ldaps:// by ssl:// 2018-03-19 12:11:59 +01:00
Laurent Destailleur
0013e9d83b FIX Make a redirect after the remove_file action to avoid deletion done
at next action too.
2018-03-19 11:29:36 +01:00
Laurent Destailleur
8e72ddc89b FIX missing email of customer in stripe info payments 2018-03-19 10:18:03 +01:00
Laurent Destailleur
8e50e63243 Fix translation 2018-03-18 20:32:18 +01:00
Laurent Destailleur
e55c90b015 Fix translation 2018-03-18 20:29:36 +01:00
Laurent Destailleur
99ac06b0b8 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-18 20:22:22 +01:00
Laurent Destailleur
b4881645d8 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/lib/functions.lib.php
2018-03-18 20:21:59 +01:00
Laurent Destailleur
0dd33440d1 Merge pull request #8397 from hregis/7.0_bug3
Fix: missing update of $conf
2018-03-18 12:29:58 +01:00
Regis Houssin
c0a6ae2195 Fix: replace with dolibarr_install_syslog 2018-03-16 18:31:11 +01:00
Laurent Destailleur
bbb095bcb2 FIX css 2018-03-16 12:19:16 +01:00
Laurent Destailleur
07fb29f0c4 Fix var not initialized 2018-03-16 12:18:20 +01:00
Laurent Destailleur
46e8692620 Escape db 2018-03-16 12:17:20 +01:00
Laurent Destailleur
ff765a2efe FIX Look and feel v7 2018-03-16 12:16:40 +01:00
Laurent Destailleur
96ff5b1b23 Update sql image file for 7.0 stable 2018-03-16 11:19:58 +01:00
Laurent Destailleur
fe94562a56 Prepare 7.0.1 2018-03-16 01:33:11 +01:00
Laurent Destailleur
a94017ba25 FIX letter for month March 2018-03-16 00:07:00 +01:00
Laurent Destailleur
ce7da41bef Fix save setup 2018-03-15 23:47:16 +01:00
Laurent Destailleur
7db23385f5 Hide pass 2018-03-15 19:49:29 +01:00
Regis Houssin
6e585869c7 Fix: better method for avoid lost global 2018-03-15 19:33:08 +01:00
Regis Houssin
9f62ddaf36 Fix: missing update of $conf 2018-03-15 19:24:34 +01:00
Laurent Destailleur
ce0144e645 Add code to help debug 2018-03-15 13:21:02 +01:00
Laurent Destailleur
542eb2e5f4 Comment 2018-03-15 13:19:29 +01:00
Laurent Destailleur
85e307d6b8 Fix report when group is not dedicated to a country 2018-03-15 12:31:24 +01:00
Laurent Destailleur
73005d81a7 FIX country must not be mandatory for accounting report groups 2018-03-15 11:42:59 +01:00
Laurent Destailleur
97c8504915 Fix remove log 2018-03-15 10:26:06 +01:00
Laurent Destailleur
c4eea1f0e0 Fix SQLi 2018-03-15 02:12:01 +01:00
Laurent Destailleur
4957ea9178 Fix SQLi reported by op7ica 2018-03-15 01:55:16 +01:00
Laurent Destailleur
6a70d268e0 Fix SQLi reported by op7ica 2018-03-15 01:22:32 +01:00
Laurent Destailleur
14a33af603 Merge pull request #8384 from fmarcet/7.0
FIX Activate all also if there are inactive services
2018-03-15 00:37:37 +01:00
Laurent Destailleur
c69f5843da Update card.php 2018-03-15 00:36:56 +01:00
Laurent Destailleur
ffc91bdfdf Merge pull request #8383 from ggg44473/7.0
Add missing $mode in BookKeeping::createStd()
2018-03-15 00:33:37 +01:00
fmarcet
5140c1c5d2 Fix: Merge categories when merging thirds 2018-03-14 13:25:05 +01:00
Ferran Marcet
4d4a204f7f Merge remote-tracking branch 'upstream/7.0' into 7.0 2018-03-14 11:11:54 +01:00
Ferran Marcet
e47dda72e7 Fix: Activate all also if there are inactive services 2018-03-14 11:08:38 +01:00
Laurent Destailleur
e7a315958d Merge pull request #8381 from fmarcet/7.0
FIX Can't activate tasks on projects configuration
2018-03-14 10:42:45 +01:00
Ferran Marcet
304595ee4f Fix: Can't activate tasks on projects configuration 2018-03-14 09:48:39 +01:00
Sean Wang
9a1588df13 Add missing $mode in BookKeeping::createStd()
In accountancy ledger, creating new transaction, there is
'ERROR: 55000: currval of sequence "llx_accounting_bookkeeping_rowid_seq"
is not yet defined in this session' occurred.

According to dolibarr.log, this error will show up after
createStd() {...Insert request to llx_accounting_bookkeeping_tmp...}.

It query the "llx_accounting_bookkeeping_rowid_seq" instead of
"llx_accounting_bookkeeping_tmp_rowid_seq",
due to missing $mode at bookkeeping.class.php
line504:last_insert_id().
2018-03-14 16:38:22 +08:00
Laurent Destailleur
ca809a11af Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/commande/class/commande.class.php
2018-03-13 18:04:18 +01:00
Laurent Destailleur
f88536068f Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-13 15:30:07 +01:00
Laurent Destailleur
17b7c6268e FIX avoid "Array" on screen 2018-03-13 15:29:52 +01:00
Laurent Destailleur
1c731f1d0c Merge pull request #8368 from ptibogxiv/patch-13
FIX for nondisplay of  fk_element 's id in  REST API response
2018-03-13 10:49:37 +01:00
ptibogxiv
4f6f0b302e FIX for nondisplay of fk_element 's id in REST API response
the fk_element don't display when the call is made with REST API (reason non found)
2018-03-13 10:28:44 +01:00
Laurent Destailleur
ae5080dab4 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-12 20:16:23 +01:00
Laurent Destailleur
55d3e72463 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/contact/class/contact.class.php
	htdocs/societe/card.php
2018-03-12 19:02:30 +01:00
TuxGasy
34145ed443 Do not display multicurrency cols if currency of object is same as main currency 2018-03-11 21:58:32 +01:00
Laurent Destailleur
51c94fadfa Look and feel v7 2018-03-11 21:31:34 +01:00
Laurent Destailleur
e1654f4215 Fix division by zero 2018-03-11 21:18:18 +01:00
Laurent Destailleur
a3d25b24d3 FIX #8285 Extrafields now reported by /api/index.php/agendaevents/{id} 2018-03-11 19:27:03 +01:00
Laurent Destailleur
5c4b5cc74f fix 2018-03-11 00:40:35 +01:00
Laurent Destailleur
9ed2e47775 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-11 00:32:41 +01:00
Laurent Destailleur
897b3f7b79 Fix setup 2018-03-11 00:31:26 +01:00
Laurent Destailleur
d10b7ef05a Merge pull request #8330 from BadPixxel/7.0_Fix_Product_price_warning
Fix for PHP7.1: PHP Warning:  A non-numeric value in product.class.php
2018-03-10 21:53:48 +01:00
Laurent Destailleur
0b1b740a0e Merge pull request #8329 from BadPixxel/7.0
BugFix Issue #8261: Variants module. Combinations cannot be edited
2018-03-10 21:53:12 +01:00
Laurent Destailleur
6c9e0e1752 Merge branch '7.0' into 7.0 2018-03-10 21:52:57 +01:00
Alexis Algoud
74dc815bfa fix commonobject isInt for module builder capabilities 2018-03-10 19:02:06 +01:00
Laurent Destailleur
905cf112e9 Merge pull request #8327 from tiaris/fix7.0
FIX #8289
2018-03-10 18:58:22 +01:00
Laurent Destailleur
6fcc271790 Update product.class.php 2018-03-10 18:57:55 +01:00
Laurent Destailleur
aea3c164ba Merge pull request #8178 from hregis/7.0_bug2
Fix: avoid Warning: A non-numeric value encountered
2018-03-10 18:47:11 +01:00
Laurent Destailleur
3911738b88 Fix vulnerability reported by DIGITEMIS CYBERSECURITY & PRIVACY 2018-03-10 18:40:45 +01:00
Laurent Destailleur
e3ace1f89f Fix morecss not provided 2018-03-10 18:17:54 +01:00
Laurent Destailleur
702c84a100 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-10 17:57:49 +01:00
BadPixxel
ea3872b0cb BugFix for PHP7.1: PHP Warning: A non-numeric value encountered in /tmp/Dolibarr/htdocs/product/class/product.class.php on line 1709 2018-03-10 15:57:29 +01:00
Laurent Destailleur
241b5e9a93 FIX security report DIGITEMIS CYBERSECURITY & PRIVACY 2018-03-10 15:52:11 +01:00
BadPixxel
44d18027f2 BugFix for PHP7.1: PHP Warning: A non-numeric value encountered in /tmp/Dolibarr/htdocs/product/class/product.class.php on line 1709 2018-03-10 15:48:40 +01:00
BadPixxel
836054a8b3 BugFix Issue #8261: Variants module. Combinations cannot be edited 2018-03-10 14:51:24 +01:00
jean
6793bfae3a FIX #8289 add a cofoiguration for correct stopck calculation 2018-03-10 14:17:52 +01:00
Laurent Destailleur
a85a103a55 Merge pull request #8308 from atm-florian/7.0_fixinventory
7.0 fixinventory
2018-03-10 12:54:36 +01:00
Laurent Destailleur
212536a3fd Update list.php 2018-03-10 12:54:20 +01:00
Laurent Destailleur
64f2f324de Update card.php 2018-03-10 12:52:09 +01:00
Laurent Destailleur
a7f82af352 Update card.php 2018-03-10 12:49:25 +01:00
Laurent Destailleur
75b470b580 Update eldy.lib.php 2018-03-10 12:43:01 +01:00
Laurent Destailleur
04bcc4dd46 Update eldy.lib.php 2018-03-10 12:39:39 +01:00
Maxime Kohlhaas
7b0119aee0 Merge pull request #8321 from atm-maxime/7.0
Fix required field + space in dispatch
2018-03-09 23:50:51 +01:00
Maxime Kohlhaas
d92fa3a69c Fix required field + space in dispatch 2018-03-09 23:49:40 +01:00
florian HENRY
c62904d632 Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0_fixinventory 2018-03-09 23:41:32 +01:00
Laurent Destailleur
612b95b219 Merge pull request #8316 from atm-maxime/fix_clone_supplierorder
Fix supplier order clone was keeping objectlinked
2018-03-09 23:01:45 +01:00
Laurent Destailleur
31f36f4028 Merge pull request #8312 from atm-florian/7.0_fix8232
7.0 fix8232
2018-03-09 22:47:10 +01:00
Maxime Kohlhaas
d82c62b638 Fix supplier order clone was keeping objectlinked 2018-03-09 21:51:59 +01:00
Laurent Destailleur
143827ac79 Merge pull request #8306 from Robisix/7.0
FIX Duplicate product_type asignement on order addline
2018-03-09 19:45:47 +01:00
Laurent Destailleur
8f7122cf52 Merge pull request #8305 from atm-florian/7.0_fix
fix warning and sql error
2018-03-09 19:44:57 +01:00
florian HENRY
42fed5981d bettre syntax 2018-03-09 19:16:06 +01:00
florian HENRY
02beed265e better space 2018-03-09 19:14:43 +01:00
florian HENRY
5a56e802d9 FIX #8232 2018-03-09 19:10:52 +01:00
florian HENRY
f0164f2689 fix type date 2018-03-09 14:25:37 +01:00
florian HENRY
1c966d4769 on going 2018-03-09 12:57:58 +01:00
Romain DELVAL
ee55776886 FIX Duplicate product_type asignement on order addline
On addline order method, ther is a duplicate assignation on
line->product_type before call to "insert" method.
The second assignement always make product_type to "0" while it was
fetched from product himsel like it was made on first asignement few
lines above
2018-03-09 12:38:28 +01:00
florian HENRY
f37d482331 fix warning and sql error 2018-03-09 11:37:23 +01:00
atm-ph
53ce297ab3 Fix travis - missing documentation of new param 2018-03-09 09:30:11 +01:00
Laurent Destailleur
ad96229ec4 Fix not visible template selector for supplier order/invoice emails
Conflicts:
	htdocs/fourn/facture/card.php
2018-03-08 20:52:25 +01:00
Laurent Destailleur
af9fff4f83 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-08 16:35:12 +01:00
Laurent Destailleur
3762ed12c7 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/class/html.formfile.class.php
2018-03-08 16:33:51 +01:00
Laurent Destailleur
343ca1bc77 Merge pull request #8294 from hregis/7.0_bug5
Fix: avoid conflict between invoice and invoicenumber sharings
2018-03-08 16:24:05 +01:00
Laurent Destailleur
7a7c4b8f14 Fix invalid url 2018-03-08 14:41:13 +01:00
Laurent Destailleur
d8dcebfa9a FIX Do not lose filter when editing comment of a time spent in task view 2018-03-07 20:12:40 +01:00
Laurent Destailleur
cab61724f2 Fix phpcs 2018-03-07 19:40:06 +01:00
Laurent Destailleur
317a5f5b2f Fix by adding a redirect to avoid the order2billing being done twice. 2018-03-07 19:15:23 +01:00
Laurent Destailleur
78259db0ee Intorduce dolDecodeBlockedData 2018-03-07 19:14:48 +01:00
Laurent Destailleur
69ef6a9316 Fix data on thirdparty tooltip 2018-03-07 19:13:54 +01:00
Laurent Destailleur
c02e8e9831 Css 2018-03-07 19:13:15 +01:00
Laurent Destailleur
acc29ea163 FIX #8219 2018-03-07 16:19:13 +01:00
Laurent Destailleur
f4f009d877 FIX #8269 2018-03-07 16:10:40 +01:00
Laurent Destailleur
eeb5b4b206 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-07 15:53:12 +01:00
Laurent Destailleur
b2f6105ae2 FIX #8277 2018-03-07 15:52:58 +01:00
Regis Houssin
a0774d523d Fix: avoid conflict between invoice and invoicenumber sharings 2018-03-07 15:24:23 +01:00
Laurent Destailleur
64e59c3f97 Merge pull request #8292 from hregis/7.0_bug6
Fix: avoid error if type is not numeric
2018-03-07 13:08:31 +01:00
Laurent Destailleur
f8d8c5c658 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-07 13:04:27 +01:00
Laurent Destailleur
004839b368 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-07 13:03:40 +01:00
Laurent Destailleur
e518303e1b Merge pull request #8288 from atm-florian/7.0_fix_comment_task
FIX comment on tasks
2018-03-07 12:40:31 +01:00
Laurent Destailleur
f7f9f0e605 Update comment.php 2018-03-07 12:40:09 +01:00
Laurent Destailleur
ee1a2c49fd Merge pull request #8287 from hregis/7.0_bug3
Fix: problem to see users with transverse mode
2018-03-07 12:38:00 +01:00
Regis Houssin
0f574579eb Fix: avoid error if type is not numeric 2018-03-07 12:27:13 +01:00
Laurent Destailleur
2053cc9307 Merge pull request #8284 from hregis/7.0_bug5
Fix: wrong entity id, always value 1 !
2018-03-07 12:19:09 +01:00
Laurent Destailleur
a0a9e12178 Fix css 2018-03-07 11:29:50 +01:00
Laurent Destailleur
f3fd5f4cfa FIX Label of event show twice 2018-03-07 11:03:35 +01:00
florian HENRY
6cb77577a6 can use image 2018-03-07 09:03:13 +01:00
florian HENRY
bb73a715a8 Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0_fix_comment_task 2018-03-07 08:49:08 +01:00
florian HENRY
03873038d5 fix comment task 2018-03-07 08:47:34 +01:00
Laurent Destailleur
23a4a60970 Fix status of task 2018-03-06 21:51:43 +01:00
Laurent Destailleur
0dfc9af72a FIX multicompany compatibility and fix reports 2018-03-06 19:58:13 +01:00
Regis Houssin
bf4402eb89 Fix: missing superadmin 2018-03-06 19:22:59 +01:00
Regis Houssin
175971bfc1 Fix: syntax error 2018-03-06 19:12:18 +01:00
Regis Houssin
d406b28911 Fix: problem to see users with transverse mode 2018-03-06 19:08:39 +01:00
Regis Houssin
1807bb36e2 Fix: missing global $conf 2018-03-06 13:31:13 +01:00
Regis Houssin
35703cff99 Fix: wrong entity id, already value 1 ! 2018-03-06 13:23:00 +01:00
Laurent Destailleur
592a97f9a5 Fix default topic 2018-03-06 12:45:48 +01:00
Laurent Destailleur
45fd0cfc16 FIX Subscription events not recorded into agenda 2018-03-06 12:36:39 +01:00
Laurent Destailleur
72af963ed5 Fix triggers 2018-03-06 12:26:26 +01:00
Laurent Destailleur
1e6a55745c CSS 2018-03-06 11:54:05 +01:00
Laurent Destailleur
17e012e0ac FIX Subscription not correctly log in blockedlog 2018-03-06 09:08:45 +01:00
Laurent Destailleur
7c95233e3c FIX Trad and creation date in subscription create 2018-03-06 09:08:28 +01:00
Laurent Destailleur
14d7ffa53b Fix cancel and template to record stock movement/correction 2018-03-06 09:07:39 +01:00
Laurent Destailleur
6d13e58a23 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-06 09:07:03 +01:00
Laurent Destailleur
a765dba570 Fix trad 2018-03-06 09:06:49 +01:00
Laurent Destailleur
5de43d6652 Merge pull request #8273 from fappels/7.0_fix_insert_expedition_line
Fix shipment line insert
2018-03-05 20:47:03 +01:00
Laurent Destailleur
81e193b725 Update expedition.class.php 2018-03-05 20:46:54 +01:00
Laurent Destailleur
951babae6d Merge pull request #8272 from aspangaro/7.0
Fix : Missing language file
2018-03-05 20:44:34 +01:00
Laurent Destailleur
65fe376bbf Merge pull request #8270 from hregis/7.0_bug4
Fix: avoid Warning: A non-numeric value encountered
2018-03-05 20:44:23 +01:00
Laurent Destailleur
45898d26a8 Merge pull request #8267 from hregis/7.0_bug5
Fix: check if file name already exists
2018-03-05 20:44:02 +01:00
atm-ph
5971cd8e59 Fix label goes in desc and lost fourn ref 2018-03-05 17:18:03 +01:00
atm-ph
ebb4da8417 Fix keep supplier proposal price in supplier order 2018-03-05 16:58:35 +01:00
Laurent Destailleur
0b3e2e92e2 Revert "Fix SQL error when creating subscription"
This reverts commit d422fc8a11.
2018-03-05 16:13:32 +01:00
Laurent Destailleur
d422fc8a11 Fix SQL error when creating subscription 2018-03-05 16:09:26 +01:00
Laurent Destailleur
184c773301 Fix error management 2018-03-05 15:43:48 +01:00
Laurent Destailleur
f35679fb2a Fix description of field of table 2018-03-05 13:11:07 +01:00
Regis Houssin
722fbc9d29 Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0_bug5 2018-03-05 10:25:23 +01:00
fappels
1a7c09b7d5 Fix 0 is also a valid Qty
Fix error handling
2018-03-04 12:35:32 +01:00
fappels
7262f89016 Merge remote-tracking branch 'refs/remotes/Dolibarr/7.0' into 7.0_fix_insert_expedition_line 2018-03-04 11:58:27 +01:00
Alexandre SPANGARO
c0664474e4 Fix : Missing language file 2018-03-04 06:32:55 +01:00
Laurent Destailleur
44eb50c424 FIX Infinite loop on deletion of temp file when there is symbolic links 2018-03-03 11:57:10 +01:00
Laurent Destailleur
eac1b2efe9 FIX Infinite loop on deletion of temp file when there is symbolic links 2018-03-03 11:23:23 +01:00
Regis Houssin
0c52977027 Fix: avoid Warning: A non-numeric value encountered 2018-03-03 08:37:44 +01:00
Regis Houssin
647331876b Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0_bug5 2018-03-02 19:02:08 +01:00
Regis Houssin
b69d2800ef Fix: check if file name already exists 2018-03-02 18:59:30 +01:00
Laurent Destailleur
b24259ed46 Merge pull request #8265 from hregis/7.0_bug5
Fix: missing hook during rename file action
2018-03-02 18:15:01 +01:00
Regis Houssin
8e85198bd1 Fix: missing $upload_dir 2018-03-02 18:09:06 +01:00
Laurent Destailleur
4137e1cc76 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-03-02 17:56:30 +01:00
Laurent Destailleur
d35c5282d4 Merge pull request #8245 from enstentechnologies/7.0
FIX Unknown column 'pl.amount_requested' in compta/prelevement/factures.php
2018-03-02 17:52:23 +01:00
Laurent Destailleur
ef402f4bcb Merge pull request #8266 from atm-florian/7.0
fix pgSQL install
2018-03-02 17:42:41 +01:00
florian HENRY
3490d3779b Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0 2018-03-02 17:31:39 +01:00
florian HENRY
473c16ede5 fix pgSQL install 2018-03-02 17:30:46 +01:00
Regis Houssin
bf4543a636 Fix: missing hook during rename file action 2018-03-02 17:05:52 +01:00
Laurent Destailleur
b87db9d32d Fix missing ; 2018-03-02 16:38:56 +01:00
Laurent Destailleur
8d11f1efa1 FIX Payment mode not correctly set in donation and document 2018-03-02 12:32:49 +01:00
Laurent Destailleur
a01287b211 Fix template donation 2018-03-02 12:25:43 +01:00
Laurent Destailleur
c478ab952f Fix block to generate donation document missing 2018-03-02 11:57:39 +01:00
Laurent Destailleur
a815326a28 Fix filters on bank entry list 2018-03-01 12:37:03 +01:00
Laurent Destailleur
54edd51847 Fix look and feel v7 2018-03-01 12:07:19 +01:00
Laurent Destailleur
822dd4778c Fix info in tooltip 2018-03-01 12:03:50 +01:00
Laurent Destailleur
c0f89601ea Merge 2018-03-01 11:54:52 +01:00
Laurent Destailleur
0e7a250060 Fix colspan 2018-03-01 11:53:18 +01:00
Laurent Destailleur
d25270a6f4 Fix ref not visible in payment link 2018-03-01 11:53:02 +01:00
Laurent Destailleur
bc04b3ee27 Fix min decimal on amount in payment page 2018-03-01 11:52:50 +01:00
Laurent Destailleur
be3e8a0e2d FIX Look and feel v7 2018-03-01 11:52:41 +01:00
Laurent Destailleur
ee488ed83e FIX invoice creation fails when next date not defined 2018-02-27 20:24:50 +01:00
Laurent Destailleur
8b9e196478 Fix trans 2018-02-27 20:24:29 +01:00
Laurent Destailleur
75cbc466d5 Fix warning 2018-02-27 19:08:38 +01:00
Laurent Destailleur
1907b9c52d Fix search on dates on template invoices 2018-02-27 19:04:21 +01:00
Laurent Destailleur
bca2927da0 FIX css border missing 2018-02-27 19:03:42 +01:00
Laurent Destailleur
7d3162313e FIX Temporary dir for mail files must be cleaned at beginning of form 2018-02-27 10:59:26 +01:00
Laurent Destailleur
0cc84ab92f FIX Missing restore_lastsearch_values 2018-02-26 21:21:28 +01:00
Laurent Destailleur
fd1d900f7f FIX: Properties updated if update successfull.
Conflicts:
	htdocs/contrat/class/contrat.class.php
2018-02-26 21:20:31 +01:00
Laurent Destailleur
229ee5c12f Fix search criteria lost 2018-02-26 12:32:56 +01:00
vabeltran
604cc5896e FIX Unknown column 'pl.amount_requested' in compta/prelevement/factures.php
Column 'amount_requested' in ORDER clause not exists because that column is called 'amount' now in 'prelevement_bons' table in db.
2018-02-26 12:31:40 +01:00
Laurent Destailleur
d1e846385a FIX Useless clean of tree 2018-02-26 12:01:36 +01:00
Laurent Destailleur
667c9045a2 FIX duplicate confirm message. Missing reposition class 2018-02-26 10:33:39 +01:00
Laurent Destailleur
4866d63ece Fix method getListOfPayments in the wrong class 2018-02-26 09:45:15 +01:00
Laurent Destailleur
41638e6dff Fix back link of look and feel v7 2018-02-26 09:20:05 +01:00
Laurent Destailleur
1666f371bf css 2018-02-26 00:13:16 +01:00
Laurent Destailleur
7ff94c88bd Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-02-25 15:00:31 +01:00
Laurent Destailleur
251136bebf Fix PHPUnit 2018-02-25 15:00:14 +01:00
Laurent Destailleur
502f219f7f Merge pull request #8231 from hregis/7.0_entity
FIX missing object entity in fetch
2018-02-25 12:59:38 +01:00
Laurent Destailleur
68e0283fe4 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-02-25 12:58:32 +01:00
Laurent Destailleur
0a571a0677 Complete fix #8230 2018-02-25 12:58:17 +01:00
Laurent Destailleur
0262b64eb1 Merge pull request #8230 from hregis/7.0_bug4
Fix: missing hook parameters
2018-02-25 12:56:43 +01:00
Laurent Destailleur
898f2cf0ca Merge pull request #8229 from hregis/7.0_bug3
FIX Parameter must be an array or an object that implements Countable
2018-02-25 12:55:54 +01:00
Laurent Destailleur
7dfedbf35c Merge pull request #8228 from hregis/7.0_bug
FIX Use of undefined constant _ROWS_2
2018-02-25 12:55:17 +01:00
Laurent Destailleur
6c16f2af1e Merge pull request #8226 from hregis/7.0_multicompany
Fix: differentiate sharing of "member" and "member_type"
2018-02-25 12:54:51 +01:00
Laurent Destailleur
4581d6049c Update societecontact.php 2018-02-25 12:52:39 +01:00
Laurent Destailleur
8dceb8930f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/class/html.formactions.class.php
	htdocs/user/card.php
2018-02-25 12:41:17 +01:00
Rui Strecht
7b448a2d18 Fixed issue with elementarray null if num_rows = 0 2018-02-25 12:29:15 +01:00
Laurent Destailleur
6a78ce65e9 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/imports/import.php
2018-02-25 12:21:10 +01:00
Regis Houssin
703d976b3b Fix: missing object entity in fetch 2018-02-24 16:21:16 +01:00
Regis Houssin
b216249214 Fix: missing hook parameters 2018-02-24 15:01:29 +01:00
Regis Houssin
3859b5a926 Fix: Parameter must be an array or an object that implements Countable 2018-02-24 14:20:53 +01:00
Laurent Destailleur
a5b1f114c2 FIX Generic substitution of constant disabled for sensitive constant 2018-02-24 14:03:32 +01:00
Laurent Destailleur
619e0d3792 FIX Bad var for substitution of free text 2018-02-24 14:03:27 +01:00
Regis Houssin
5ecbe2ae81 Fix: Use of undefined constant _ROWS_2 2018-02-24 13:49:30 +01:00
Laurent Destailleur
03d9bf1376 Restore deprecated var 2018-02-24 12:35:36 +01:00
Laurent Destailleur
cbfe241c1b FIX Can use odx templates that does not include lines tags 2018-02-24 12:34:15 +01:00
Laurent Destailleur
e68612fa09 Fix initdemo must not copy index.html files 2018-02-24 12:06:26 +01:00
Laurent Destailleur
435e4823a5 Fix some warning during install 2018-02-24 11:58:09 +01:00
Regis Houssin
4c06384197 Fix: differentiate sharing of "member" and "member_type" 2018-02-24 11:13:14 +01:00
Laurent Destailleur
812911bd44 Fix type of expense report output in PDF 2018-02-23 15:33:42 +01:00
Laurent Destailleur
953001c7ab Fix bad naming of column 2018-02-23 15:16:49 +01:00
atm-ph
d300b943e1 Fix wrong price on supplier order line 2018-02-23 15:10:25 +01:00
Laurent Destailleur
f7ecac8734 Fix look and feel v7 2018-02-23 11:40:56 +01:00
Laurent Destailleur
194f5a2cef Fix substitution key 2018-02-23 11:03:48 +01:00
Laurent Destailleur
3f9a9f20ce Fix missing substitution key 2018-02-22 17:06:18 +01:00
Laurent Destailleur
bc0993d6cd Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-02-22 12:17:25 +01:00
Laurent Destailleur
479c4b4d77 Fix look and feel v7 2018-02-22 12:15:11 +01:00
Laurent Destailleur
51cfb9795e Fix bad picto 2018-02-22 11:26:41 +01:00
Laurent Destailleur
9114a28e88 Fix: missing the reposition 2018-02-21 22:43:25 +01:00
Laurent Destailleur
34135e0a13 Fix extrafield date or datetime with bad timezone 2018-02-20 19:20:47 +01:00
Laurent Destailleur
48d250b201 Help to understand 2018-02-20 15:55:58 +01:00
Laurent Destailleur
f207e91643 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/holiday/define_holiday.php
	htdocs/main.inc.php
	htdocs/societe/class/societe.class.php
2018-02-20 15:06:41 +01:00
Laurent Destailleur
b361877ea8 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/compta/facture/card.php
2018-02-20 12:48:28 +01:00
Laurent Destailleur
16fca2ee35 Fix bad link 2018-02-20 10:05:11 +01:00
Laurent Destailleur
87a3019e73 Fix upgrade missing steps 2018-02-20 06:03:22 +01:00
Laurent Destailleur
aa1ede6f74 FIX Search criteria on vat 2018-02-20 06:03:08 +01:00
Laurent Destailleur
cb644665bd Fix output dir of grab 2018-02-20 06:02:53 +01:00
Laurent Destailleur
46c941c823 Translation 2018-02-16 23:57:35 +01:00
Laurent Destailleur
5c5d2cbefa Fix smtp warning message 2018-02-16 23:49:08 +01:00
Laurent Destailleur
9bed2ce8e2 Fix ignore file integrity check on filefunc.inc.php for deb/rpm package 2018-02-16 22:03:13 +01:00
Laurent Destailleur
b3e567c310 Fix rpm package for apache 2.4, selinux and php packages 2018-02-16 20:47:28 +01:00
Laurent Destailleur
a4b155fc91 Fix typo and 2018-02-16 20:42:40 +01:00
Laurent Destailleur
c513ffe1f7 Fix debian package 2018-02-16 18:21:18 +01:00
Laurent Destailleur
8db6b1ecc0 Fix package for debian 2018-02-16 17:19:04 +01:00
Laurent Destailleur
f67f0df609 Fix preview link not visible with long file names 2018-02-16 12:11:39 +01:00
Laurent Destailleur
47713e0264 Fix bug reported by scrutinizer 2018-02-15 15:32:43 +01:00
Laurent Destailleur
8493d9f62e FIX #8163 2018-02-15 15:27:06 +01:00
Laurent Destailleur
13dd440fd4 FIX #8192 2018-02-15 14:47:08 +01:00
Laurent Destailleur
7722f004c8 FIX #8153 2018-02-15 14:08:42 +01:00
Laurent Destailleur
5eee292663 FIX #8189 2018-02-15 13:40:17 +01:00
Laurent Destailleur
825a295294 FIX #8198 2018-02-15 13:28:15 +01:00
Laurent Destailleur
f0855da0fb Fix responsive 2018-02-15 12:57:04 +01:00
Laurent Destailleur
a4384b1921 Fix date start/end of project are day not hours 2018-02-15 02:02:32 +01:00
Laurent Destailleur
18acff5e57 Fix avoid error when homepage not set 2018-02-15 01:29:51 +01:00
Laurent Destailleur
dde5c186e7 Fix duplicate html tag 2018-02-15 00:53:03 +01:00
Laurent Destailleur
b789a50ce6 Fix duplicate html tag 2018-02-15 00:38:11 +01:00
Laurent Destailleur
bab5c41b98 Fix duplicate html tag 2018-02-15 00:24:15 +01:00
Laurent Destailleur
0fc302fe98 Sync transifex 2018-02-15 00:06:43 +01:00
Laurent Destailleur
b515448bbd Fix delete when no extrafields used 2018-02-15 00:01:25 +01:00
Laurent Destailleur
5f0f9ff326 Fix delete page 2018-02-14 23:57:57 +01:00
Laurent Destailleur
7ba55ea12e Fix phpunit 2018-02-14 22:17:53 +01:00
Laurent Destailleur
4e145f0e5b Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-02-14 22:09:12 +01:00
Laurent Destailleur
7f8cbc0f62 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/adherents/type.php
	htdocs/contrat/services.php
	htdocs/contrat/tpl/linkedobjectblock.tpl.php
	htdocs/install/upgrade2.php
2018-02-14 22:08:18 +01:00
Laurent Destailleur
06357e62da Merge pull request #8182 from laudeco/hotfix/bank_module
Bank module is not accessible (error 500) since 7.0.0
2018-02-14 20:52:36 +01:00
Laurent Destailleur
8783857aa5 Fix tooltip of website editor 2018-02-14 20:33:48 +01:00
Laurent Destailleur
536eb7e008 Fix label of invoice 2018-02-14 17:25:13 +01:00
Laurent Destailleur
ca71d90d96 Fix help 2018-02-14 14:57:53 +01:00
Laurent Destailleur
9f883f3401 Fix install log disappeared 2018-02-14 14:50:22 +01:00
Laurent Destailleur
7bdf335a8e Add a fix to clean data 2018-02-14 14:26:33 +01:00
Laurent Destailleur
434980bb22 Fix svg image preview ko 2018-02-13 18:15:39 +01:00
Laurent Destailleur
e510e1b679 Fix search field at wrong column 2018-02-13 15:48:29 +01:00
Laurent Destailleur
7ed128ff2b Fix bad escaping 2018-02-13 14:30:14 +01:00
Laurent Destailleur
a8267a86ca Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-02-13 13:39:41 +01:00
Laurent Destailleur
af9e5885d0 Update changelog 2018-02-13 13:38:19 +01:00
Laurent Destailleur
39a2d03263 Update changelog 2018-02-13 13:36:44 +01:00
Laurent Destailleur
88bdebb80f Fix label truncated 2018-02-12 23:08:01 +01:00
Laurent Destailleur
00a8be22a2 Fix field too small 2018-02-12 22:11:43 +01:00
Laurent Destailleur
a4f48fcfb6 Fix feature must be hidden (not stable) 2018-02-12 16:09:22 +01:00
Laurent Destailleur
1c9f543fd5 Translation 2018-02-12 15:55:37 +01:00
Laurent Destailleur
b2835fc803 Fix check of vat only for european countries 2018-02-12 15:54:24 +01:00
De Coninck Laurent
6f7d6f977b fix error in latest release 2018-02-12 15:50:14 +01:00
Laurent Destailleur
30ba1c1702 FIX #8174 2018-02-12 14:02:51 +01:00
Laurent Destailleur
12e48e07ae Fix deletion of ledger line when editing transaction 2018-02-12 13:50:26 +01:00
Laurent Destailleur
284e6f1ad3 Better position of error check 2018-02-12 13:39:06 +01:00
Laurent Destailleur
caa136bed3 FIX Debug journalization: Avoid journalizing if all lines not bound 2018-02-12 13:31:32 +01:00
Laurent Destailleur
09dfd5eb9f Fix journalization protection 2018-02-12 12:02:01 +01:00
Laurent Destailleur
734bd4d2fb Fix menu visible in dev only 2018-02-12 10:15:58 +01:00
Regis Houssin
40fe3849dc Fix: avoid Warning: A non-numeric value encountered 2018-02-12 08:21:35 +01:00
Laurent Destailleur
60a848de5a Fix bad list of id for supplier categories 2018-02-12 04:09:15 +01:00
Laurent Destailleur
64f61c80ad Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-02-12 04:08:13 +01:00
Laurent Destailleur
55779e3b55 Fix confusion between supplier and customer categories 2018-02-12 04:07:45 +01:00
Laurent Destailleur
9b8b3a1236 Merge pull request #8176 from hregis/7.0_bug2
Fix: wrong param name (Travis error !)
2018-02-12 03:25:23 +01:00
Laurent Destailleur
b23ef5fd8f Merge pull request #8175 from hregis/7.0_bug
Fix: check perms by type of product
2018-02-12 03:25:08 +01:00
Laurent Destailleur
7f4adb7f97 Update card.php 2018-02-12 03:23:57 +01:00
Laurent Destailleur
975608b9d3 FIX #8174 2018-02-12 03:21:04 +01:00
Laurent Destailleur
671fbd3d55 Code comment 2018-02-12 02:59:18 +01:00
Laurent Destailleur
c03ceb2205 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-02-12 02:56:51 +01:00
Romain DESCHAMPS
8e42ed5824 add missing links in cust. card boxes 2018-02-12 02:40:13 +01:00
Romain DESCHAMPS
37ff46b05a add missing links in supplier card boxes 2018-02-12 02:40:09 +01:00
Laurent Destailleur
fa3b1c74a9 Fix bad link 2018-02-12 02:25:34 +01:00
Laurent Destailleur
b7b496132b Fix syntax error 2018-02-12 01:27:54 +01:00
Regis Houssin
3525306cc4 Fix: wrong var name 2018-02-11 13:29:37 +01:00
Regis Houssin
86df1ddd0a Fix: uniformize user rights check 2018-02-11 13:27:02 +01:00
Regis Houssin
2b7693c582 Fix: wrong param name (Travis error !) 2018-02-11 12:14:23 +01:00
Regis Houssin
01b3b8e09e Fix: check perms by type of product 2018-02-11 12:09:12 +01:00
Laurent Destailleur
71c968b0b1 Fix lose validator user in edit 2018-02-09 16:06:48 +01:00
Laurent Destailleur
84fd67c407 CSS 2018-02-09 15:49:49 +01:00
Laurent Destailleur
d10d9f0fb2 Fix scrutinizer 2018-02-08 17:22:07 +01:00
Laurent Destailleur
b5c12b346c Fix typo 2018-02-08 16:50:43 +01:00
Laurent Destailleur
19a0f552c9 Fix td balance 2018-02-08 16:50:01 +01:00
Laurent Destailleur
a200a7f149 Fix look and feel v7 2018-02-08 16:43:10 +01:00
Laurent Destailleur
cc20a9d1d5 FIX #8079 2018-02-08 16:43:05 +01:00
Laurent Destailleur
2b2e68c78d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/societe/card.php
2018-02-08 15:18:28 +01:00
Laurent Destailleur
c8ba173563 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-02-08 13:27:56 +01:00
Laurent Destailleur
03b10041db Fix missing contextpage 2018-02-08 13:27:43 +01:00
Laurent Destailleur
071436caba Merge pull request #8144 from hregis/7.0_bug
Fix: wrong id name
2018-02-08 13:19:54 +01:00
Laurent Destailleur
ab21769aa2 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/compta/facture/card.php
2018-02-08 12:58:47 +01:00
Laurent Destailleur
879308e0ef Fix responsive 2018-02-08 10:15:53 +01:00
Regis Houssin
70a65b89eb Merge branch '7.0' of https://github.com/Dolibarr/dolibarr.git into 7.0_bug 2018-02-08 08:52:45 +01:00
Laurent Destailleur
729cf20df7 Fix css 2018-02-07 20:53:13 +01:00
Laurent Destailleur
507328d83a Fix syntax error 2018-02-07 17:50:16 +01:00
Laurent Destailleur
37afc58c48 The module ExpenseReport use numbering rules that you can setup (like
other modules do). If you need to keep the hard coded numbering rule of
expenses report used in 6.0, just add constant
EXPENSEREPORT_USE_OLD_NUMBERING_RULE to 1.
2018-02-07 17:45:13 +01:00
Laurent Destailleur
cb5d0b1677 Fix compatibility option EXPENSEREPORT_USE_OLD_NUMBERING_RULE 2018-02-07 17:43:16 +01:00
Laurent Destailleur
510fc22172 Fix expense report 2018-02-07 17:01:14 +01:00
Laurent Destailleur
8dd7d69294 Fix commit 2018-02-07 16:04:31 +01:00
Laurent Destailleur
413331c7dd Fix travis 2018-02-07 15:54:58 +01:00
Laurent Destailleur
d8872a412b Fix numbering for expense report 2018-02-07 15:52:57 +01:00
Laurent Destailleur
852c4fc033 Fix context of filter not lost 2018-02-07 12:08:25 +01:00
Laurent Destailleur
b95cd2f383 Fix translation 2018-02-06 19:33:31 +01:00
Regis Houssin
8b7f40e15b Fix: wrong id name 2018-02-06 19:29:16 +01:00
Laurent Destailleur
5e7d172a58 Fix look and feel v7 on ref popup 2018-02-06 19:16:15 +01:00
Laurent Destailleur
9962d36dbc Fix translation 2018-02-06 18:39:11 +01:00
Laurent Destailleur
490a1bd08d Fix label 2018-02-06 18:36:47 +01:00
Laurent Destailleur
69196dc52c Fix menu not visible with auguria module 2018-02-06 18:22:04 +01:00
Laurent Destailleur
ea92f6beae Fix for multicompany 2018-02-06 10:57:53 +01:00
Laurent Destailleur
565372eaab Fix param showsize. Fix extrafields field too long 2018-02-06 10:34:29 +01:00
Laurent Destailleur
930d58ab96 Fix import supplier product price vat 2018-02-06 10:03:06 +01:00
Laurent Destailleur
bf7ae08c48 sync transifex 2018-02-06 01:17:50 +01:00
Laurent Destailleur
b364b2a4de Fix selection of filter in agenda views 2018-02-06 01:16:51 +01:00
Laurent Destailleur
f251113f69 Fix accounting module with multicompany 2018-02-06 01:00:35 +01:00
Laurent Destailleur
074f4a3b46 Fix class not found when selecting project ref in lists 2018-02-06 00:34:14 +01:00
Laurent Destailleur
b063c19084 Fix: object project not defined 2018-02-06 00:19:40 +01:00
Laurent Destailleur
2fbe4637ac Fix bad filter link 2018-02-05 23:05:37 +01:00
Laurent Destailleur
6d52676600 Prepare 7.0 2018-02-05 20:50:15 +01:00
Laurent Destailleur
180f9918c7 Transifex sync 2018-02-05 20:43:50 +01:00
Laurent Destailleur
c2590b9c7e Fix: complete labels of operation if bank journal
Conflicts:
	htdocs/compta/tva/class/tva.class.php
2018-02-05 17:10:18 +01:00
Laurent Destailleur
ad384a9992 Fix default sort order 2018-02-05 17:08:47 +01:00
Laurent Destailleur
aeeb787bae Merge pull request #8135 from atm-arnaud/FIX_contact_order_by_name
FIX order contactlist on Thirdparty by name
2018-02-05 15:14:17 +01:00
arnaud
3c816acb05 FIX order contactlist on Thirdparty by name 2018-02-05 15:06:28 +01:00
Laurent Destailleur
72f6b2956a Fix: pagination into belugo template 2018-02-05 14:31:39 +01:00
Laurent Destailleur
775085e1b8 Border of comment box 2018-02-05 14:10:24 +01:00
Laurent Destailleur
85964e02de Fix css 2018-02-05 12:34:11 +01:00
Laurent Destailleur
90bc859048 Fix trans 2018-02-05 02:34:49 +01:00
Laurent Destailleur
10e7517596 Fix missing mainmenu and leftmenu into menu definition 2018-02-05 02:29:19 +01:00
Laurent Destailleur
c02d46fb0a Fix leftmenu in menu entries 2018-02-05 01:33:44 +01:00
Laurent Destailleur
30c683ed65 Fix properties into tooltip 2018-02-05 00:36:54 +01:00
Laurent Destailleur
5455ab3280 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/projet/card.php
2018-02-04 23:17:09 +01:00
Laurent Destailleur
354fc4edd0 Fix: amount into form must be numeric without format 2018-02-04 23:06:37 +01:00
Laurent Destailleur
fe57cf697f Fix init category selected 2018-02-04 14:35:38 +01:00
Laurent Destailleur
7ed66457b4 Fix ref already output 2018-02-04 13:55:18 +01:00
Laurent Destailleur
5a609215d5 Fix default value was not save at creation
Conflicts:
	htdocs/core/class/extrafields.class.php
2018-02-04 13:23:04 +01:00
Laurent Destailleur
3cfb6aaa67 Fix missing trigger CONTRACT_MODIFY 2018-02-04 12:59:16 +01:00
Laurent Destailleur
956df63c87 Fix extrafields updated twice 2018-02-04 12:55:29 +01:00
Laurent Destailleur
0e3d5ea9e5 Fix missing translation 2018-02-04 11:44:39 +01:00
Laurent Destailleur
c6fba7273d Api interventions 2018-02-03 20:58:26 +01:00
Laurent Destailleur
3fd0105512 Merge pull request #8104 from kadogo/add-api-for-fichinter
NEW: Add an API for fichinter
2018-02-03 20:00:14 +01:00
Laurent Destailleur
408fc69fac Update index.php 2018-02-03 19:59:21 +01:00
Laurent Destailleur
48a31b2398 Update explorer.php 2018-02-03 19:58:30 +01:00
Laurent Destailleur
936a2ca966 Merge branch '7.0' into add-api-for-fichinter 2018-02-03 19:57:04 +01:00
Laurent Destailleur
30c68aecf2 Code comment 2018-02-03 19:52:09 +01:00
Laurent Destailleur
5ab5c12a7b Code comments 2018-02-03 19:42:00 +01:00
Laurent Destailleur
f57ea2682a Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/contrat/card.php
	htdocs/core/class/commonobject.class.php
	htdocs/core/class/notify.class.php
	htdocs/societe/class/societe.class.php
2018-02-03 19:33:24 +01:00
Laurent Destailleur
6de2a08d70 Fix scrutinizer bugs 2018-02-03 19:10:52 +01:00
Laurent Destailleur
a91172b7bc Add comment into csv export 2018-02-03 18:58:02 +01:00
Laurent Destailleur
fa3f06aaaa Merge pull request #8123 from atm-florian/7.0
fix warning class declaration
2018-02-03 16:33:39 +01:00
Laurent Destailleur
756f8a1b9f Update modules_expensereport.php 2018-02-03 16:33:27 +01:00
Laurent Destailleur
97a29e87ea Fix pdf template baleine (pb with page breaks and long task desc) 2018-02-03 16:31:36 +01:00
Laurent Destailleur
fe1f276d85 FIX labels into ledger are same that into screen
FIX pagination
FIX init of fiscal year
Fix tr balance
2018-02-02 17:24:40 +01:00
Laurent Destailleur
a41847d084 Fix: date of modificaiton in ledger not visible.
Fix: show hours in date of creation in ledger.
Fix: label in export.
Fix: label in export of draft journal is same than on screen.
Fix: missing line desc in csv export of draft bank journal.
2018-02-02 14:27:07 +01:00
Laurent Destailleur
4ea4419cd6 Update changelog 2018-02-02 10:39:50 +01:00
Laurent Destailleur
d3a6342034 Fix regeneration of PDF after creation of payment. 2018-02-02 10:37:10 +01:00
Laurent Destailleur
742079cfe3 Clean code 2018-02-01 19:15:50 +01:00
Laurent Destailleur
0412d3d11d Fix extrafield mandatory check.Fix empty extrafields with type link. 2018-02-01 19:05:24 +01:00
Laurent Destailleur
f6c17247af Fix can set draft status of project 2018-02-01 17:50:19 +01:00
florian HENRY
5d20af7751 fix warning class declaration 2018-02-01 16:15:57 +01:00
Laurent Destailleur
b2536d8ebb FIX #8110 2018-02-01 15:44:35 +01:00
Laurent Destailleur
6e446ccaae Fix scrutinizer 2018-02-01 10:51:01 +01:00
Laurent Destailleur
ed3bcf59b6 Try doc hint array of array of int with @var int[][] 2018-02-01 10:50:50 +01:00
Laurent Destailleur
f6f57aa938 Missing Api for standing proposal/orders/invoices 2018-02-01 02:29:41 +01:00
Laurent Destailleur
74a34acf77 Tab vs space 2018-02-01 02:14:17 +01:00
Laurent Destailleur
9c6b6f244c Fix tooltip on invoice 2018-02-01 01:25:45 +01:00
Laurent Destailleur
8896e0573f Fix missing name alias 2018-02-01 01:10:54 +01:00
Laurent Destailleur
0385dfe859 Fix td balance 2018-02-01 00:49:12 +01:00
Laurent Destailleur
b49a7e245c Add hidden option INVOICE_NO_PAYMENT_DETAILS required by some countries 2018-01-31 20:22:19 +01:00
Laurent Destailleur
14ecdce650 Fix merge of thirdparties (pb when merging codes and error management) 2018-01-31 18:01:56 +01:00
Laurent Destailleur
a6f12eebe3 Fix changelog 2018-01-31 15:23:57 +01:00
Laurent Destailleur
de0a8ba71f Fix extrafields 2018-01-31 14:01:58 +01:00
Laurent Destailleur
e9f8c7ba01 Fix edit of extrafields "link" corrupts the data definition 2018-01-31 10:51:40 +01:00
Laurent Destailleur
89dc208072 Fix fk_account not into update 2018-01-30 17:00:17 +01:00
Laurent Destailleur
d6317a26d2 Fix for multicompany 2018-01-30 15:48:09 +01:00
Laurent Destailleur
0d90ab0c6c Fix when counter is corrupted in database 2018-01-30 14:42:13 +01:00
Laurent Destailleur
d744a1af0d Fix look and feel v7 2018-01-30 11:30:03 +01:00
Laurent Destailleur
be874f0b1d Fix fulltag 2018-01-30 11:24:02 +01:00
Laurent Destailleur
06f2382e39 Fix compatibility with old actioncomm record 2018-01-30 11:05:11 +01:00
Laurent Destailleur
cd91a81456 CSS 2018-01-30 10:47:06 +01:00
Laurent Destailleur
acf92da12d Fix option MEMBER_NEWFORM_AMOUNT 2018-01-30 10:43:24 +01:00
Laurent Destailleur
cc0048474e Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0 2018-01-29 21:28:31 +01:00
Laurent Destailleur
e208e5b8a7 Fix look and feel v7 2018-01-29 21:27:46 +01:00
Laurent Destailleur
7bb46e65d7 Merge pull request #8103 from simnandez/7.0
Trad: more understandable extrafield translation to the end user
2018-01-29 20:45:42 +01:00
Laurent Destailleur
8cd54d6630 Merge pull request #8108 from laudeco/hotfix/invoice_book
fix issue on Big book
2018-01-29 19:47:09 +01:00
Laurent Destailleur
1f30f9b179 Update list.php 2018-01-29 19:46:46 +01:00
Laurent Destailleur
491e64db06 Fix various payments 2018-01-29 19:07:42 +01:00
Laurent Destailleur
4eb7d7a332 Debug blockedlog with various payments 2018-01-29 18:22:26 +01:00
Laurent Destailleur
8ae25b3c65 Fix the FACTURE_ENABLE_NEGATIVE was useless without
FACTURE_ENABLE_NEGATIVE_LINES
2018-01-29 16:21:54 +01:00
Laurent Destailleur
c67e57836e Code comment 2018-01-29 12:58:33 +01:00
Laurent Destailleur
0a11d52d53 Fix info on email sent 2018-01-29 12:46:07 +01:00
Laurent Destailleur
424e8a3139 Fix price format in payment pages 2018-01-29 12:10:06 +01:00
Laurent Destailleur
3c4ed55179 Fix css 2018-01-29 11:32:56 +01:00
Laurent Destailleur
716d44a610 Fix price in member public form 2018-01-29 11:22:02 +01:00
Laurent Destailleur
c41374220e Fix css 2018-01-29 11:13:18 +01:00
De Coninck Laurent
857c03eeb9 fix issue on Big book 2018-01-28 21:04:13 +01:00
Laurent Destailleur
a87ecc14ec Fix install.lock not always saved 2018-01-28 10:58:15 +01:00
Laurent Destailleur
65c7117240 Fix var serialized twice 2018-01-27 19:40:42 +01:00
Laurent Destailleur
7dcb3bf6fc Fix var not initialized 2018-01-27 19:40:35 +01:00
Laurent Destailleur
a639308601 Fix css 2018-01-27 19:40:16 +01:00
Laurent Destailleur
bee64962fe Fix css 2018-01-27 19:40:11 +01:00
kadogo
b48bcc9ab8 NEW: Add an API for fichinter
We missed an API for fichinter
It add list, create and create line functions
2018-01-27 19:25:18 +01:00
Juanjo Menent
13adf06ae4 Trad: more understandable extrafield translation to the end user
Trad: fix english words
Trad: more accurate accounting translation
2018-01-27 15:48:11 +01:00
Laurent Destailleur
ba0a96c882 Missing param limit 2018-01-26 15:37:23 +01:00
Laurent Destailleur
c5307e5cac Fix option MAILING_LIMIT_SENDBYWEB 2018-01-26 15:12:40 +01:00
Laurent Destailleur
3239187f6b Prepare 7.0 2018-01-26 13:14:30 +01:00
Laurent Destailleur
d4e15545b4 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/filefunc.inc.php
2018-01-26 12:10:13 +01:00
Laurent Destailleur
82c2079d40 Fix var not initialized 2018-01-26 10:23:24 +01:00
Laurent Destailleur
d751f9153f Fix look and feel v7 2018-01-26 10:21:53 +01:00
Laurent Destailleur
1be42a7af8 Fix comment 2018-01-26 02:23:26 +01:00
Laurent Destailleur
b298cec7d3 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-26 01:42:09 +01:00
Laurent Destailleur
4f9f1b51d7 Fix translation 2018-01-26 01:34:49 +01:00
Laurent Destailleur
e79f6fda2b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-26 01:23:18 +01:00
Laurent Destailleur
c922498e79 Code comment 2018-01-25 20:35:25 +01:00
Laurent Destailleur
cff1dc6827 Rename 2018-01-25 17:57:49 +01:00
Laurent Destailleur
e9441f7881 Fix name of log module to avoid confusion with blocked log 2018-01-25 17:56:46 +01:00
Laurent Destailleur
59c907260b Export of unalterablelog must contains init hash 2018-01-25 13:18:52 +01:00
Laurent Destailleur
8d7f6843a4 Must be able to export lockedlog for a dedicated year.
Fix date are nto humanly readable.
2018-01-25 12:57:36 +01:00
Laurent Destailleur
005bccc63d Fix missing badge of nb of permissions 2018-01-25 12:06:22 +01:00
Laurent Destailleur
e3b8eede26 Update licence tag 2018-01-24 20:59:40 +01:00
Laurent Destailleur
f66ac935c8 Fix migration for files from modules 2018-01-24 20:00:27 +01:00
Laurent Destailleur
18ed53b9a7 Fix css 2018-01-24 18:04:06 +01:00
Laurent Destailleur
60c1a1e745 Code comment on accesskey 2018-01-24 17:29:29 +01:00
Laurent Destailleur
d796f403a9 Fix sender email when sending a password remind 2018-01-24 15:43:55 +01:00
Laurent Destailleur
f3b89d9d39 Add missing trans 2018-01-24 14:47:52 +01:00
Laurent Destailleur
9cdb7f0f27 Code comment 2018-01-24 14:37:26 +01:00
Laurent Destailleur
e45d35dcb1 Fix code comment 2018-01-24 14:22:11 +01:00
Laurent Destailleur
fbeb66fedd Fix refreshing of captcha broken if a cache-control set by server 2018-01-24 13:40:39 +01:00
Laurent Destailleur
6e906ac0e3 Clean code 2018-01-24 13:08:09 +01:00
Laurent Destailleur
64f6e9e5c0 CSS 2018-01-24 12:23:52 +01:00
Laurent Destailleur
3a4ca8ae2b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-24 11:49:36 +01:00
Laurent Destailleur
af2efaf137 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-24 11:44:01 +01:00
Laurent Destailleur
561f273900 Minor fix for smartphone 2018-01-24 11:43:34 +01:00
Laurent Destailleur
ccb415c8b3 Merge pull request #8087 from frederic34/patch-2
Update bills.lang
2018-01-24 11:15:25 +01:00
Laurent Destailleur
fd48ce11f9 Merge pull request #8085 from Darkjeff/Fixing-Lettering
Fixing lettering
2018-01-24 11:14:19 +01:00
Laurent Destailleur
f1b63d7cbf Fix css 2018-01-23 09:00:03 +01:00
Laurent Destailleur
c969d58907 Clean code 2018-01-22 23:51:24 +01:00
Laurent Destailleur
39c4df723a Fix error management when setting product accounts 2018-01-22 21:07:10 +01:00
Frédéric FRANCE
7ac286463f Update bills.lang 2018-01-22 17:23:59 +01:00
Laurent Destailleur
d1365c2492 Fix trackid 2018-01-22 17:15:44 +01:00
Laurent Destailleur
2ed34d813d Css 2018-01-22 16:04:58 +01:00
Darkjeff
f47f0357d3 Fixing Subledger account in lettering 2018-01-22 15:57:17 +01:00
Darkjeff
53f91280c5 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-22 13:54:34 +01:00
Laurent Destailleur
7a1a2cf90d Fix send into ledger for bank line record. Show accounted status. 2018-01-22 04:13:29 +01:00
Laurent Destailleur
273e88a599 Fix send into ledger for expense report. Show accounted status. 2018-01-22 03:07:11 +01:00
Laurent Destailleur
3c3e02dbea Fix missing fields 2018-01-21 22:47:15 +01:00
Laurent Destailleur
710cefa3a8 Add missing vat rates 2018-01-21 21:30:11 +01:00
Laurent Destailleur
3987033aab Fix substitution in public notes of pdf 2018-01-21 20:53:36 +01:00
Laurent Destailleur
dfc7d47747 Fix message 2018-01-21 15:32:10 +01:00
Laurent Destailleur
e6bfc3354a FIX #8071 2018-01-20 18:42:12 +01:00
Laurent Destailleur
0fb3669529 Fix for #8071 2018-01-20 18:33:25 +01:00
Laurent Destailleur
1b33a0ba69 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-20 17:52:34 +01:00
Laurent Destailleur
a3a24e2182 Clean chart of account files 2018-01-20 17:52:01 +01:00
Laurent Destailleur
d0c76f58d3 Merge pull request #8076 from Conspir3D/patch-1
Fix label generation for fichinter card
2018-01-20 15:56:37 +01:00
Laurent Destailleur
fd6f0a4494 Fix use constant for status 2018-01-20 13:03:18 +01:00
Laurent Destailleur
fa30804364 Merge pull request #8075 from Conspir3D/develop
Added order status =1 or =2 for overview of orders
2018-01-20 13:00:53 +01:00
Laurent Destailleur
80b2b7d8f2 Merge pull request #8074 from all3kcis/develop-patch-15
Fix #8058
2018-01-20 12:55:40 +01:00
Laurent Destailleur
23494a9dd4 Update product.php 2018-01-20 12:53:30 +01:00
Laurent Destailleur
abdf587fb5 Fix link to expert accounting no visible if module off 2018-01-20 12:12:36 +01:00
Laurent Destailleur
3a8ceb130f Fix utf8 on all fields 2018-01-19 15:17:19 +01:00
Laurent Destailleur
9d0a0ed867 Fix demo 2018-01-19 12:55:03 +01:00
Laurent Destailleur
0296661864 Complete the demo profile 2018-01-19 12:39:47 +01:00
Laurent Destailleur
446c28ce2a Init demo for v7 2018-01-19 12:35:38 +01:00
Conspir3D
07772ce2f5 Fix label generation for fichinter card
Fix label generation for fichinter card generation from order. Labels get concatenated.
2018-01-19 12:28:52 +01:00
Jan Giebels
9642206bd1 Fix label generation for fichinter card generation from order. Labels get concatenated. 2018-01-19 12:21:42 +01:00
Laurent Destailleur
a892a3fe71 Fix info of collation is wrong on log 2018-01-19 12:10:03 +01:00
Laurent Destailleur
937a27396f Fix log of install disappear. 2018-01-19 11:43:55 +01:00
Jan Giebels
d01a8d0508 Added order status =1 or =2 for overview 2018-01-19 11:22:25 +01:00
Conspir3D
15e1c5d1ad Merge pull request #1 from Dolibarr/develop
Fix status was not refreshed
2018-01-19 11:11:53 +01:00
All-3kcis
a58a3f893d Fix #8058 2018-01-19 10:21:48 +01:00
Laurent Destailleur
d967527b58 Fix status was not refreshed 2018-01-18 18:40:01 +01:00
Laurent Destailleur
768c93a707 Fix suggested amount for direct debit order 2018-01-18 18:22:10 +01:00
Laurent Destailleur
1730feeb4f Fix error message 2018-01-18 17:52:48 +01:00
Laurent Destailleur
3871c694f6 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-17 19:50:33 +01:00
Laurent Destailleur
57f664c0c1 Fix vat npr for template invoices 2018-01-17 19:45:23 +01:00
Laurent Destailleur
4034122169 Fix usage of PAYMENT_SECURITY_TOKEN 2018-01-17 18:00:05 +01:00
Darkjeff
f9d02628de Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-17 17:29:27 +01:00
Laurent Destailleur
81999be027 Fix lose filter type 2018-01-17 17:29:17 +01:00
Laurent Destailleur
756838c3a0 Fix lose filter type 2018-01-17 17:13:50 +01:00
Darkjeff
e8b27c8e66 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-17 17:06:12 +01:00
Laurent Destailleur
56d702e3c6 Fix missing property in tooltip 2018-01-17 16:26:24 +01:00
Laurent Destailleur
1e9ddf153c Fix workboard not visible on smartphone, so i invert position with stats 2018-01-17 13:55:53 +01:00
Laurent Destailleur
dcd579242f Fix <br /> (xml) into <br> (html) 2018-01-17 13:26:57 +01:00
Laurent Destailleur
2e0ec5e76a Fix <br> 2018-01-17 13:17:33 +01:00
Laurent Destailleur
be821716f0 code comment 2018-01-17 12:26:20 +01:00
Laurent Destailleur
90e579b884 Update doxygen 2018-01-17 11:49:06 +01:00
Laurent Destailleur
0a85a4702a Fix https 2018-01-17 11:41:03 +01:00
Laurent Destailleur
ef5939fe78 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-17 11:20:32 +01:00
Laurent Destailleur
1a04178d64 Clean unused file and fix missing translation 2018-01-17 11:20:18 +01:00
Darkjeff
5f1a95e5d7 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-17 08:48:54 +01:00
Laurent Destailleur
3f551f0d05 Fix migration 2018-01-17 02:19:32 +01:00
Laurent Destailleur
a84ed841cc Fix creation date was not filled 2018-01-16 20:47:33 +01:00
Laurent Destailleur
26ba0a9ec2 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/cashdesk/index.php
	htdocs/compta/index.php
	htdocs/core/lib/security.lib.php
	htdocs/societe/list.php
2018-01-16 20:23:32 +01:00
Laurent Destailleur
59eefa46e6 Fix duplicate search field 2018-01-16 18:02:36 +01:00
Darkjeff
69ab7542d0 Merge branch 'develop' of https://github.com/Darkjeff/dolibarr into develop 2018-01-16 17:51:00 +01:00
Darkjeff
0a1fec42a2 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-16 17:50:46 +01:00
Darkjeff
73c0a96d1b Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-16 16:52:05 +01:00
Laurent Destailleur
1c3fb7f94b Fix responsive of boxes 2018-01-16 16:15:49 +01:00
Laurent Destailleur
51421a8bf6 Fix position of fields 2018-01-15 18:11:56 +01:00
Laurent Destailleur
25d59cf107 Fix sort on common fields 2018-01-15 18:05:15 +01:00
Laurent Destailleur
3d34a839a3 Doc 2018-01-15 17:43:18 +01:00
Laurent Destailleur
926683763b Modulebuilde fix sort of fields, fix generation of files 2018-01-15 17:38:15 +01:00
Darkjeff
608aa54517 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-15 13:14:31 +01:00
Laurent Destailleur
bc2009874d Fix code comment 2018-01-15 12:59:30 +01:00
Darkjeff
9f2ecdd06f Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-15 12:53:25 +01:00
Laurent Destailleur
e4c02152b3 Fix navigation in bookeeping view grouped by account 2018-01-15 12:14:18 +01:00
Laurent Destailleur
04a5dc79e9 Merge pull request #8054 from artis-auxilium/accounting_searchdate_fiscalyear
Accounting searchdate fiscalyear
2018-01-15 11:38:04 +01:00
Laurent Destailleur
926f39fc2b Merge pull request #8060 from atm-maxime/fix_blockaedlog_migration
Fix blockedlog triggers fatal error in migration script
2018-01-15 11:34:48 +01:00
Laurent Destailleur
c29bfcef31 Merge pull request #8053 from Oeris/develop-api
FIX use DB PREFIX instead of llx_
2018-01-15 11:33:09 +01:00
Laurent Destailleur
193dfec29e Merge pull request #8061 from fappels/7.0_fix_module_builder
7.0 fix module builder
2018-01-15 11:32:40 +01:00
Laurent Destailleur
64fd5154c9 Merge pull request #8052 from hregis/develop_multicompany
Fix: regression and broken feature
2018-01-15 11:31:07 +01:00
Laurent Destailleur
68f0808d16 Update societe.class.php 2018-01-15 11:30:32 +01:00
Laurent Destailleur
b8688a46d3 Update contact.class.php 2018-01-15 11:30:11 +01:00
fappels
00185bd9d4 Fix fetchCommon should return 0 iso error if not found 2018-01-15 11:21:24 +01:00
Laurent Destailleur
3410e29755 CSS 2018-01-15 11:20:45 +01:00
Laurent Destailleur
90fc086814 Fix minor 2018-01-14 20:11:38 +01:00
Laurent Destailleur
cc5dcde9e1 Fix protection to avoid errors 2018-01-14 18:55:55 +01:00
Laurent Destailleur
3c3402bc60 Debug API for prices of products 2018-01-14 15:58:04 +01:00
fappels
d6ed968c51 html modulebuilder type is a text type in database 2018-01-14 15:41:37 +01:00
fappels
25b455272a Fix 0 is a valif value for a NOT NULL field 2018-01-14 15:31:31 +01:00
Laurent Destailleur
133e87fcc3 Sync transifex 2018-01-14 12:45:26 +01:00
Darkjeff
7e94cf497d Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-14 12:41:58 +01:00
Maxime Kohlhaas
36afa87fb5 Fix blockedlog triggers fatal error in migration script 2018-01-14 11:56:45 +01:00
Laurent Destailleur
f0d6099e5f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/db/DoliDB.class.php
	htdocs/core/lib/functions.lib.php
2018-01-14 03:15:49 +01:00
Laurent Destailleur
debc758134 Fix code comment 2018-01-14 01:40:12 +01:00
Laurent Destailleur
7a087327e1 Fix deprecated code 2018-01-13 19:33:40 +01:00
Laurent Destailleur
1f2d275ef2 Fix conditions of some fields 2018-01-13 17:21:56 +01:00
Laurent Destailleur
7c480f76e3 Fix thumbs of pdf at wrong place
Fix param not provided
Fix css
2018-01-13 16:09:05 +01:00
Laurent Destailleur
aa1692483f Fix colspan 2018-01-13 16:06:04 +01:00
Laurent Destailleur
8d793c680e Fix dol_delete_preview 2018-01-13 15:48:30 +01:00
Laurent Destailleur
7a88afe962 Fix field enabled and perms must differs 2018-01-13 13:16:33 +01:00
Laurent Destailleur
3bcf1d9da6 Fix css 2018-01-13 12:08:24 +01:00
Laurent Destailleur
53b36435d0 Fix on smartphone 2018-01-12 20:50:18 +01:00
Laurent Destailleur
854a71726c Fix lose filters 2018-01-12 20:32:30 +01:00
Laurent Destailleur
5fb8672221 Fix blockedlog. Browser can be used with large amount of events 2018-01-12 20:24:09 +01:00
Laurent Destailleur
8014f7d822 Fix blockedlog module must store ref of invoice once validated 2018-01-12 19:09:43 +01:00
Darkjeff
05d3b1bb5c Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-12 18:59:16 +01:00
Laurent Destailleur
d0680b429f Fix name of file saved from tax document tab 2018-01-12 17:39:20 +01:00
Laurent Destailleur
7bfcfd4574 Fix recursive path when dir is '0' 2018-01-12 17:12:38 +01:00
Laurent Destailleur
32a998e68d Fix preview link 2018-01-12 16:28:10 +01:00
Laurent Destailleur
8b972313ae Fix scrutinizer 2018-01-12 15:38:53 +01:00
Laurent Destailleur
ad4b59d2c8 Fix scrutinizer 2018-01-12 15:33:21 +01:00
Laurent Destailleur
92f8fc8b85 Fix scrutinizer 2018-01-12 15:26:50 +01:00
Laurent Destailleur
b45b7a9996 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-12 15:24:09 +01:00
Laurent Destailleur
ac8a7f064a More robust code 2018-01-12 15:23:56 +01:00
Laurent Destailleur
64ae70d106 Fix scrutinizer bug 2018-01-12 15:20:17 +01:00
Laurent Destailleur
63e824144e Fix scrutinizer bug 2018-01-12 15:19:02 +01:00
Laurent Destailleur
7da9911db1 Fix message 2018-01-12 15:06:50 +01:00
Laurent Destailleur
28207ad4cb Clean var 2018-01-12 14:57:02 +01:00
Laurent Destailleur
a44363ce3d Fix responsive 2018-01-12 14:41:57 +01:00
Laurent Destailleur
4f8a447d30 Fix alignement 2018-01-12 14:09:51 +01:00
Laurent Destailleur
50596a5214 Fix trans key 2018-01-12 14:06:48 +01:00
Laurent Destailleur
6c9d5984a2 Fix trans key 2018-01-12 14:03:03 +01:00
Laurent Destailleur
3423d4e6d3 Fix balance is amount after, so i fix by adding amount before 2018-01-12 13:35:53 +01:00
Darkjeff
5f38beebbf Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2018-01-12 13:24:19 +01:00
Regis Houssin
20ad3b0e80 Fix: if $entity is empty '' the isset return true !! 2018-01-12 10:39:15 +01:00
Regis Houssin
93d5c818c5 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_multicompany 2018-01-12 10:35:22 +01:00
Laurent Destailleur
f0a10cdcc1 Missing backlink 2018-01-12 10:32:48 +01:00
Laurent Destailleur
95d2a9f88d Responsive and css 2018-01-12 01:10:03 +01:00
Laurent Destailleur
5e7b814966 Fix responsive 2018-01-12 00:16:55 +01:00
Laurent Destailleur
f93f9e1a73 Fix regression 2018-01-11 20:39:23 +01:00
Laurent Destailleur
eaecb9da5e CSS 2018-01-11 20:33:09 +01:00
Laurent Destailleur
b225a6f79c Better translation 2018-01-11 20:19:53 +01:00
Laurent Destailleur
e56d74f5c4 Fix generation of doc for supplier payment 2018-01-11 19:01:47 +01:00
Laurent Destailleur
e152e81d18 Fix close code 2018-01-11 18:24:40 +01:00
Laurent Destailleur
0b893c11fd Revert "Fix wrong address used into PDF model of supplier payment"
This reverts commit 22d92c0540.
2018-01-11 18:09:05 +01:00
Laurent Destailleur
15ed7584b8 Fix navigation in accounting account card 2018-01-11 17:06:06 +01:00
dev2a
60c508b1c4 Get start date from fiscal year
if start date is empty, get date from current accounting fiscal year, else from company fiscal month setting
2018-01-11 15:52:45 +01:00
dev2a
415d7574eb Fix PHP notices adding empty($page) 2018-01-11 15:35:34 +01:00
Laurent Destailleur
6d9a9dd3fe Fix Time spent for "other task" was not visible when filtering project 2018-01-11 13:08:13 +01:00
Neil Orley
8d710020e9 FIX use DB PREFIX instead of llx_ 2018-01-11 12:58:41 +01:00
Laurent Destailleur
46d28deee7 Fix substitution of thirdparty 2018-01-11 12:25:40 +01:00
Laurent Destailleur
3f4d7dbce6 Fix substitution of thirdparty 2018-01-11 12:24:47 +01:00
Regis Houssin
157e118cba Fix: broken feature 2018-01-11 10:47:40 +01:00
Laurent Destailleur
95312d1944 Fix regression 2018-01-11 10:20:49 +01:00
Laurent Destailleur
a4ab37e990 Remove deprecated field 2018-01-11 01:16:14 +01:00
Laurent Destailleur
d74305d333 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-11 01:14:40 +01:00
Laurent Destailleur
90ddfc3f7f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/admin/translation.php
2018-01-11 01:14:20 +01:00
Laurent Destailleur
4316793638 Merge pull request #8047 from hregis/develop_multicompany
Fix: some bugs with multicompany sharing
2018-01-11 01:07:17 +01:00
Laurent Destailleur
a11cb8dcbf Update card.php 2018-01-11 01:06:50 +01:00
Laurent Destailleur
af6b84ba3a Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/facture/list.php
	htdocs/contact/document.php
	htdocs/product/list.php
2018-01-11 01:03:13 +01:00
Laurent Destailleur
b2c900011c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-11 00:48:10 +01:00
Laurent Destailleur
f83ea80d6a Merge pull request #8041 from dolibarr95/patch-35
NEW Add class in societe/card.php
2018-01-11 00:47:53 +01:00
Laurent Destailleur
e41f761157 Fix ident 2018-01-11 00:47:29 +01:00
Laurent Destailleur
9827358002 Merge pull request #8040 from atm-florian/dev_fixsecu
fix #7963
2018-01-11 00:44:45 +01:00
Laurent Destailleur
4747e84b74 Update price.php 2018-01-11 00:40:33 +01:00
Laurent Destailleur
436b653fa0 Error report 2018-01-11 00:16:45 +01:00
HENRY Florian
5af39e80e0 Update price.php 2018-01-10 20:38:06 +01:00
Laurent Destailleur
f2b8c3c97d Fix check of customer/supplier code 2018-01-10 18:19:54 +01:00
Regis Houssin
8c3b4f62db Fix: wrong entity with thirdparty sharing 2018-01-10 13:30:57 +01:00
Laurent Destailleur
43d560830c Fix on old php 2018-01-10 13:20:43 +01:00
Laurent Destailleur
e141d43999 Fix bad links with mobile 2018-01-10 13:14:30 +01:00
Laurent Destailleur
ae59ca43cc Fix sort of subscriptions 2018-01-10 13:02:05 +01:00
Regis Houssin
4683a35532 Fix: wrong image path with multicompany sharing 2018-01-10 12:52:30 +01:00
Regis Houssin
4cc0e889c1 Fix: restore broken feature 2018-01-10 12:38:27 +01:00
Regis Houssin
bd1acca2cd Fix: wrong entity with multicompany thirdparty sharing 2018-01-10 12:38:12 +01:00
Laurent Destailleur
cda078ce26 Fix test on email unique 2018-01-10 12:27:11 +01:00
Laurent Destailleur
e5c26f89e7 Fix search link 2018-01-10 11:08:52 +01:00
Laurent Destailleur
49f59e0d06 Fix menu visible in experimental mode 2018-01-10 11:02:11 +01:00
Laurent Destailleur
bc9fc2828a Fix missing class 2018-01-10 10:42:36 +01:00
Laurent Destailleur
167ab17927 Fix substitution of user_signature 2018-01-10 10:31:27 +01:00
Laurent Destailleur
9b448459c9 Fix dispatching replacement invoice into bookkeeping (not used by most
countries in europe)
2018-01-09 19:12:08 +01:00
dolibarr95
6fdbd4cc17 Update company.lib.php 2018-01-09 14:29:01 +01:00
Laurent Destailleur
9f79ad800b Fix price per quantity 2018-01-09 14:20:47 +01:00
dolibarr95
b9b42e3e9d Add class
Add oddeven class to show_contacts() list.
2018-01-09 14:04:18 +01:00
florian HENRY
fdedd6f75b fix 7963 2018-01-08 20:54:40 +01:00
Laurent Destailleur
9844352193 More complete repair 2018-01-08 15:04:17 +01:00
Laurent Destailleur
42e659e26c Fix link for online payment 2018-01-08 13:21:04 +01:00
Laurent Destailleur
5847ea7319 Fix var_dump 2018-01-08 12:44:55 +01:00
Laurent Destailleur
5ebba6fead Fix example 2018-01-08 12:41:22 +01:00
Laurent Destailleur
40f2644520 Fix example 2018-01-08 12:31:11 +01:00
Laurent Destailleur
968bb8a100 Fix travis 2018-01-08 02:15:20 +01:00
Laurent Destailleur
f653adeb71 Fix phpcs 2018-01-08 02:00:06 +01:00
Laurent Destailleur
86227d77d6 Fix link of images 2018-01-08 01:37:10 +01:00
Laurent Destailleur
c13a7709f5 Fix link on image for website module 2018-01-08 00:20:38 +01:00
Laurent Destailleur
e256a1d57e Code comment 2018-01-08 00:05:26 +01:00
Laurent Destailleur
9254782ad7 Fix init template of non page 2018-01-07 22:04:31 +01:00
Laurent Destailleur
de94c77a98 Fix url to alias when dolibarr is server for website module 2018-01-07 20:32:59 +01:00
Laurent Destailleur
9fd257d2f7 Fix rename of dir from filemanager 2018-01-07 19:38:20 +01:00
Laurent Destailleur
280059a3d7 Fix perm 2018-01-07 18:56:57 +01:00
Laurent Destailleur
a92f60416a Fix permissions 2018-01-07 18:52:35 +01:00
Laurent Destailleur
da4417dfc8 Fix website in multicompany mode 2018-01-07 18:33:20 +01:00
Laurent Destailleur
2812dae3b3 Fix website in multicompany mode 2018-01-07 18:28:47 +01:00
Laurent Destailleur
82fcf3cbdb CSS 2018-01-07 16:53:59 +01:00
Laurent Destailleur
e6ffaa0f8b Fix option MAIN_SHOW_TECHNICAL_ID 2018-01-07 16:41:45 +01:00
Laurent Destailleur
140ee422a4 NEW Add chart of account for england 2018-01-05 22:06:40 +01:00
Laurent Destailleur
a37019a25b NEW Add chart of account for england 2018-01-05 22:04:43 +01:00
Laurent Destailleur
b9015de7e2 Fix can't edit payment mode / default bank account 2018-01-05 19:52:23 +01:00
Laurent Destailleur
4f409b802e Fix switch extrafield password/text 2018-01-05 18:16:40 +01:00
Laurent Destailleur
35a710a8ed Missing translation 2018-01-05 17:50:05 +01:00
Laurent Destailleur
70cfec37b1 Fix add of free entry into bank account 2018-01-05 17:38:21 +01:00
Laurent Destailleur
5580cedfdc Fix add of free entry into bank account 2018-01-05 17:35:28 +01:00
Laurent Destailleur
f826696aa1 Add the status of record into blockedlog export 2018-01-05 13:40:56 +01:00
Laurent Destailleur
332ee53c22 Fix module blockedlog for donation 2018-01-05 12:43:53 +01:00
Laurent Destailleur
dbf7603118 Debug blockedlog for loi finance 2016 2018-01-05 04:31:48 +01:00
Laurent Destailleur
1e438b7ebd Fix travis and return of api that change status 2018-01-05 02:01:57 +01:00
Laurent Destailleur
940e9cb1a5 Fix travis error 2018-01-05 01:46:07 +01:00
Laurent Destailleur
d7837f8800 Try fix for #7778 2018-01-05 01:43:51 +01:00
Laurent Destailleur
e7527ca4b5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-05 01:30:32 +01:00
Laurent Destailleur
0fb95fa15f Try a fix for #7778 2018-01-05 01:30:12 +01:00
Laurent Destailleur
07d991cc8d Code comment 2018-01-05 01:27:48 +01:00
Laurent Destailleur
6e9e4e13c1 Code comment 2018-01-05 01:26:57 +01:00
Laurent Destailleur
45ed5c20ea Merge pull request #8011 from frederic34/patch-1
Update card.php
2018-01-04 23:57:53 +01:00
Laurent Destailleur
dd8e7d657f Update card.php 2018-01-04 23:57:45 +01:00
Laurent Destailleur
a3c6746b6f Merge #8008 manually 2018-01-04 23:50:15 +01:00
Laurent Destailleur
1464937c66 Merge #8008 manually 2018-01-04 23:44:21 +01:00
Laurent Destailleur
742c4efe7b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-04 23:36:35 +01:00
Laurent Destailleur
f19fb90ab0 Merge #8008 manually 2018-01-04 23:36:14 +01:00
Laurent Destailleur
24dc144cc4 Merge #8008 manually 2018-01-04 21:14:45 +01:00
Laurent Destailleur
6b8c7239cd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2018-01-04 21:07:05 +01:00
Laurent Destailleur
5400bee3ed Fix title 2018-01-04 21:06:39 +01:00
Laurent Destailleur
f25b2ebc51 Merge pull request #8026 from c3do/patch-3
Fix #8026 Remove PHP Warning adding empty($page)
2018-01-04 21:04:33 +01:00
Laurent Destailleur
460bdd441a Merge pull request #8025 from c3do/patch-2
Fix #8025 Remove PHP Warning adding empty($page)
2018-01-04 21:04:22 +01:00
Laurent Destailleur
055d0e138e Merge pull request #8024 from c3do/patch-1
Fix #8024 Remove PHP notices adding empty($page)
2018-01-04 21:04:12 +01:00
Laurent Destailleur
21506f25b9 Merge pull request #8022 from OPEN-DSI/core_access_rights_resource_multientities
Fix: Access rights for resource in multi-entities
2018-01-04 21:03:55 +01:00
Laurent Destailleur
60976c08e4 Merge pull request #8010 from atm-john/FIX_supplier_invoice_lines_extrafields_reception
Fix extrafields transmition from supplier order to supplier invoice : lines part
2018-01-04 20:57:20 +01:00
Laurent Destailleur
cc24634cfd Merge pull request #8007 from atm-florian/develop
fix #8004
2018-01-04 20:56:38 +01:00
Laurent Destailleur
90e9b3db68 Fix look and feel v7 2018-01-04 20:42:57 +01:00
Laurent Destailleur
e10a9912dc Fix missing worload 2018-01-04 19:54:30 +01:00
Laurent Destailleur
6b77dc3b5d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/main.inc.php
2018-01-04 19:30:25 +01:00
Laurent Destailleur
01cde59608 Fix filter on bookkeeping group view 2018-01-04 19:16:53 +01:00
Laurent Destailleur
56b27a3a11 Fix: do no lose filter when deleting a bookeeping transaction 2018-01-04 19:03:01 +01:00
Laurent Destailleur
ebc76b5f27 Fix tooltips on thirdparty and invoice 2018-01-04 18:29:12 +01:00
Cédric
4ed86c830a Fix PHP Warning
Warning: A non-numeric value encountered in dolibarr/htdocs/accountancy/bookkeeping/list.php on line 89
2018-01-04 17:42:23 +01:00
Cédric
777ed43e75 Remove PHP notices adding empty($page) 2018-01-04 17:31:59 +01:00
Cédric
41fec45daf Fix PHP notices adding empty($page) 2018-01-04 16:23:25 +01:00
Laurent Destailleur
59ed23069c Fix debug accounting module 2018-01-04 15:52:07 +01:00
KHELIFA
7d824b3ef2 Fix: Access rights for resource in multi-entities 2018-01-04 15:05:11 +01:00
Laurent Destailleur
f4c62a3bd9 Fix ui 2018-01-04 14:54:04 +01:00
Laurent Destailleur
300d4e1603 Fix disable direct debit request for replaced invoices 2018-01-04 14:35:02 +01:00
Laurent Destailleur
c4eba665d0 Fix order of task in gantt diagram 2018-01-04 13:52:37 +01:00
Laurent Destailleur
04dd0663ff Fix translation 2018-01-04 12:17:32 +01:00
Laurent Destailleur
b3465d441a Missing ajaxcombobox 2018-01-04 10:45:48 +01:00
Laurent Destailleur
f6007045f5 Fix search filters 2018-01-04 00:23:08 +01:00
Laurent Destailleur
6bc8268dc5 Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop 2018-01-03 23:35:15 +01:00
Laurent Destailleur
534cbcb941 Debug translation 2018-01-03 20:59:35 +01:00
Laurent Destailleur
48261f793d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/product/admin/product.php
2018-01-03 20:21:10 +01:00
Laurent Destailleur
bc1f741600 Fix duplicate instructions 2018-01-03 14:46:18 +01:00
florian HENRY
2bd8bafc1f Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop 2018-01-03 12:06:59 +01:00
Laurent Destailleur
c3f8012dfb Update vat rates 2018-01-02 23:05:40 +01:00
Laurent Destailleur
ca14dd790b Fix module website 2018-01-02 22:58:37 +01:00
Laurent Destailleur
c98b5c7ec7 Fix css background 2018-01-02 17:27:05 +01:00
Frédéric FRANCE
aaff13a984 Update card.php 2018-01-02 14:28:52 +01:00
John
9180121999 Fix extrafields transmition from supplier order lines to supplier invoice lines 2018-01-02 12:06:11 +01:00
florian HENRY
320465aeb9 fix : #8003 2018-01-02 09:46:45 +01:00
florian HENRY
abe53cad05 fix #8004 2018-01-02 09:36:37 +01:00
Laurent Destailleur
24a59a7731 Merge pull request #8002 from fappels/7.0_fix_on_fix_mail_trigger
Fix on #7981 sendmail trigger error
2017-12-31 12:53:02 +01:00
Laurent Destailleur
affce9c0a7 Merge pull request #8001 from frederic34/patch-1
correct merge
2017-12-31 12:49:02 +01:00
fappels
b6e3d312ad Fix on #7981
Trigger interface does not set error eventmessage.
Improvement:
Show both trigger error and mail send succesful, so you know mail was
send succesful bot some trigger action after sending mail failed.
2017-12-30 12:12:13 +01:00
Frédéric FRANCE
0fae2ba8ca correct merge 2017-12-29 20:41:39 +01:00
Laurent Destailleur
77be56ff74 Merge pull request #7991 from defrance/patch-103
Add project column on proposal list
2017-12-28 13:03:03 +01:00
Laurent Destailleur
af8ebc616b Update list.php 2017-12-28 13:02:26 +01:00
Laurent Destailleur
9ac99caffe Merge pull request #7995 from frederic34/patch-1
Update propal.class.php
2017-12-28 12:51:44 +01:00
Laurent Destailleur
b0fefffcf8 Fix standardize api code 2017-12-28 12:44:15 +01:00
Laurent Destailleur
ce680af357 Fix field name and length (database portabilit) 2017-12-28 11:16:27 +01:00
Laurent Destailleur
6676178435 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/contact/list.php
	htdocs/contrat/card.php
2017-12-28 09:56:40 +01:00
Laurent Destailleur
836a94fab2 Merge pull request #7988 from OPEN-DSI/core_pdf_modele_propal_payment_mode_flag
Fix PROPALE_PDF_HIDE_PAYMENTTERMMODE and SUPPLIER_PROPOSAL_PDF_SHOW_PAYMENTTERMMODE
2017-12-28 07:18:57 +01:00
Laurent Destailleur
8476567dc6 Merge pull request #7981 from fappels/7.0_sendmail_trigger_error
Fix action_sendmail.inc
2017-12-28 07:01:02 +01:00
Laurent Destailleur
fcf42802a3 More example for website 2017-12-27 21:13:42 +01:00
Laurent Destailleur
5264aec853 Add js into export of website 2017-12-27 20:21:19 +01:00
Laurent Destailleur
8388858715 Fix filemanager 2017-12-27 20:17:08 +01:00
Laurent Destailleur
6f107e3fee Fix API to download/build doc 2017-12-27 15:48:20 +01:00
Frédéric FRANCE
80618d56ac Update propal.class.php 2017-12-26 16:12:28 +01:00
Laurent Destailleur
768cc19bbc Fix protection on tpl to avoid direct url call 2017-12-24 15:07:06 +01:00
Laurent Destailleur
07f1dd7dae Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-24 15:03:09 +01:00
Laurent Destailleur
644e8b5a05 Fix navigation on stock 2017-12-24 15:02:15 +01:00
Laurent Destailleur
fdac3078e2 Fix permissions 2017-12-24 14:42:51 +01:00
BENKE Charlene
df884e4080 Add project column on proposal list
if project are not enabled we don't display it
2017-12-23 18:37:08 +01:00
Laurent Destailleur
e6c7f9e69b Debug module inventory 2017-12-22 21:29:09 +01:00
Laurent Destailleur
57272dc5fe API to get list of available document is ok for invoice
order, proposal, shipment
2017-12-22 19:49:31 +01:00
Laurent Destailleur
f0c8b548f3 Fix bugs reported by scrutinizer 2017-12-22 14:24:31 +01:00
Laurent Destailleur
493669e986 Fix look and feel v7 2017-12-22 14:19:12 +01:00
Laurent Destailleur
e839c72109 Fix css 2017-12-22 14:05:49 +01:00
Laurent Destailleur
fb8326a9bb Css use roboto but files does not exists 2017-12-22 12:56:29 +01:00
Laurent Destailleur
3b54be5dac Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

Conflicts:
	htdocs/product/price.php
2017-12-22 12:55:16 +01:00
Laurent Destailleur
2b056b0177 BUG Fix of old hidden feature price per quantity 2017-12-22 12:53:46 +01:00
Laurent Destailleur
ff245aa646 BUG Fix of old hidden feature price per quantity 2017-12-22 10:56:52 +01:00
Laurent Destailleur
d1cfbc2906 Code comment 2017-12-22 01:03:40 +01:00
Laurent Destailleur
207730bf63 Css 2017-12-22 00:22:33 +01:00
Laurent Destailleur
27a9a81f99 Fix link to contracts 2017-12-21 23:48:33 +01:00
KHELIFA
d069ccdb7f Core Modele PDF: Fix globale variable for hide payment mode with PROPALE_PDF_HIDE_PAYMENTTERMMODE and SUPPLIER_PROPOSAL_PDF_SHOW_PAYMENTTERMMODE
- Fix hide payment condition for supplier proposal
2017-12-21 16:58:37 +01:00
Laurent Destailleur
aad0da2513 Fix maxi debug of APIs (clean output fields) 2017-12-21 16:50:18 +01:00
Laurent Destailleur
6a96a9765f Transifex sync 2017-12-21 15:04:04 +01:00
Laurent Destailleur
eab44f62b1 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/actions_builddoc.inc.php
	htdocs/core/class/html.form.class.php
	htdocs/core/tpl/admin_extrafields_add.tpl.php
	htdocs/core/tpl/admin_extrafields_edit.tpl.php
	htdocs/core/tpl/admin_extrafields_view.tpl.php
	htdocs/core/tpl/notes.tpl.php
	htdocs/main.inc.php
	htdocs/product/inventory/tpl/inventory.tpl.php
	htdocs/societe/tpl/linesalesrepresentative.tpl.php
2017-12-21 14:35:33 +01:00
Laurent Destailleur
54d7d85d90 Sync transifex 2017-12-21 11:47:35 +01:00
Laurent Destailleur
e8a141aa63 Add uruguay languages 2017-12-21 11:37:51 +01:00
Laurent Destailleur
635917d0e6 CSS 2017-12-20 21:33:45 +01:00
Laurent Destailleur
f1305bbdd6 Fix css 2017-12-20 21:14:22 +01:00
Laurent Destailleur
d20062df73 Fix jquery css theme 2017-12-20 20:18:41 +01:00
Laurent Destailleur
9ea2fe226d Fix look and feel v6 2017-12-20 19:30:30 +01:00
Laurent Destailleur
b03d0134a7 Filter on date extrafield timestamp and datetime disabled (not possible
yet)
2017-12-20 18:30:41 +01:00
fappels
4bc2e80ba8 Fix sending expense reports 2017-12-20 17:20:40 +01:00
Laurent Destailleur
9d10eb57f2 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	dev/dolibarr_changes.txt
	htdocs/compta/facture/card.php
	htdocs/compta/facture/list.php
	htdocs/main.inc.php
2017-12-20 13:28:41 +01:00
fappels
7da1f706e5 Error in send_mail trigger is not system error 2017-12-20 12:25:30 +01:00
Laurent Destailleur
846453e94b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-19 18:26:49 +01:00
Laurent Destailleur
12d91d7444 Fix missing messages in error report.
Fix test on non empty array
2017-12-19 18:26:27 +01:00
Laurent Destailleur
d51ae72eb4 Merge pull request #7965 from Oeris/develop-api
NEW improvements of invoices, orders and proposals in the REST API
2017-12-19 18:17:48 +01:00
Laurent Destailleur
57603e3df4 Update api_invoices.class.php 2017-12-19 18:16:39 +01:00
Laurent Destailleur
bffed79132 Update api_invoices.class.php 2017-12-19 18:06:05 +01:00
Laurent Destailleur
3635e88396 Update api_proposals.class.php 2017-12-19 18:01:38 +01:00
Laurent Destailleur
29b9fb6f54 Merge pull request #7964 from aspangaro/8.0-a1
NEW : Add search on date and accounting account in various payment list
2017-12-19 17:58:26 +01:00
Laurent Destailleur
016be9139b Fix sql request 2017-12-19 17:09:47 +01:00
Laurent Destailleur
731cb3f721 Fix editor of user signature 2017-12-19 17:00:40 +01:00
Laurent Destailleur
01c99b780e Fix missing index 2017-12-19 16:22:47 +01:00
Laurent Destailleur
f504716501 Fix sync contact - external user 2017-12-19 16:16:31 +01:00
Neil Orley
171e388f6d NEW Update bank account when updating an order
Add the ability to update the bankaccount when updating an order
2017-12-19 14:16:51 +01:00
Neil Orley
a3f4066790 NEW Update bank account when updating an invoice
Add the ability to update the bankaccount when updating an invoice
2017-12-19 14:14:26 +01:00
Neil Orley
7e3a2d75bb FIX Error when classify the order as invoiced unsing API
Remove of notrigger parameter. The notrigger attribute caused a type error when used.
2017-12-19 13:06:28 +01:00
Neil Orley
40aebfa081 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-12-19 12:54:38 +01:00
Laurent Destailleur
feaff433b8 Debug module website 2017-12-19 12:54:10 +01:00
Neil Orley
e90183f4ba NEW Update end of validity date of proposal using the API
Add the ability to update the end of validity date when modifying a proposal
2017-12-19 12:37:37 +01:00
Neil Orley
fe8fac9577 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-12-19 12:36:46 +01:00
Laurent Destailleur
89a62103ca Debug module website 2017-12-19 11:40:29 +01:00
Laurent Destailleur
fcf04c122f Fix phpcs 2017-12-19 00:39:01 +01:00
Laurent Destailleur
91932838ef Fix constant MAIN_LANG_DEFAULT not used 2017-12-19 00:24:38 +01:00
Laurent Destailleur
d4afb8300d Fix several pb of duplicate functions in some cases 2017-12-19 00:15:22 +01:00
Laurent Destailleur
2e87318b58 Fix sql error 2017-12-18 19:15:42 +01:00
Laurent Destailleur
2204790602 Fix filter on project id when id is list with comma 2017-12-18 19:04:57 +01:00
Neil Orley
0817873267 NEW Create an order using an existing proposal
Create an order using an existing proposal.
2017-12-18 16:13:54 +01:00
Laurent Destailleur
1351a43a30 FIX Maxi debug of permission for users external or restricted to sales
representatives
2017-12-18 16:13:05 +01:00
Neil Orley
d8dac909d6 NEW Add error message
Returns the error message when the API can't add a new line in a proposal
2017-12-18 14:36:41 +01:00
Neil Orley
ee6b0d7237 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-12-18 14:36:29 +01:00
Laurent Destailleur
98b82d712a NEW Revenue stamp can be a percent
FIX Revenue stamp not visible on the transfer payment page
2017-12-18 12:43:03 +01:00
Laurent Destailleur
8e12551f17 Fix not employee must not appear on page to create salaries 2017-12-18 11:55:34 +01:00
Laurent Destailleur
54db0d31b4 Fix GETPOST for intcomma 2017-12-18 11:32:24 +01:00
Laurent Destailleur
6f9822ddb3 Fix link for payment no set 2017-12-17 22:03:42 +01:00
Laurent Destailleur
713af7f6df Debug module website 2017-12-17 20:25:45 +01:00
Laurent Destailleur
d6fb3aecba Clean code 2017-12-17 16:26:34 +01:00
Laurent Destailleur
8d671b2b26 Debug website module 2017-12-17 16:24:47 +01:00
Laurent Destailleur
5cd003973b Fix add payment when using multiple payment 2017-12-16 22:36:28 +01:00
Laurent Destailleur
d895e1be9f NEW Show list of tracked events into the module config page. 2017-12-16 22:26:25 +01:00
Laurent Destailleur
9f2a42b67d NEW Can filter on user on unalterable log 2017-12-16 21:50:58 +01:00
Laurent Destailleur
4abcbae79f NEW The unalterable log can be browse by any user with he permission 2017-12-16 21:36:36 +01:00
Laurent Destailleur
e90a6b8c0f Option THEME_HIDE_BORDER_ON_INPUT to restore border on inputfields work
also with md theme.
2017-12-16 20:52:49 +01:00
Laurent Destailleur
2163db446b NEW Can test signature of a version from API 2017-12-16 17:24:23 +01:00
Laurent Destailleur
fcf50c01b9 Fix translation 2017-12-16 15:33:29 +01:00
Laurent Destailleur
790a82aa6f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-16 15:11:52 +01:00
Laurent Destailleur
394eeb3cd9 Fix rendering MD files of images by adding a css 2017-12-16 15:11:40 +01:00
Laurent Destailleur
6bace33366 Merge pull request #7955 from fappels/7.0_fix_migration
Fix migration script
2017-12-16 01:15:29 +01:00
Laurent Destailleur
ecb782f0b4 Merge pull request #7956 from aspangaro/7.0-b5
FIX : Edit accountancy in loan
2017-12-16 01:09:41 +01:00
Laurent Destailleur
6524fce9b7 Merge pull request #7959 from AurelienC/patch-1
Fix Resolve bug for REST API PUT task
2017-12-16 01:05:54 +01:00
Laurent Destailleur
9cdf322bfb Fix scrutinizer bugs 2017-12-15 22:14:28 +01:00
Laurent Destailleur
929893bd49 Fix regression introduced with task comments 2017-12-15 20:07:35 +01:00
Laurent Destailleur
db91a88c59 Fix error message and migration 2017-12-15 19:54:57 +01:00
Laurent Destailleur
ebdbddb7fd Fix error message and migration 2017-12-15 19:50:39 +01:00
Laurent Destailleur
8bb89f6bf4 Fix look and feel v6 2017-12-15 17:24:36 +01:00
Laurent Destailleur
e774beffc3 Fix the symbol of Yuan must be before amount 2017-12-15 17:17:35 +01:00
Laurent Destailleur
1a3fbc092d Fix method not found 2017-12-15 17:07:32 +01:00
Laurent Destailleur
5ae13ea9d6 Fix navigation in bank direct debit orders 2017-12-15 17:05:01 +01:00
Laurent Destailleur
5af153550d Debug blockedlog:
- Add a track into log when we disable/enable module
- Add a protection to avoid disable of module when recording was started
- Better compatibility with multicompany
- Can filter on ref and amount
- Add a permission to read the blockedlog
- Add more information on payments/invoice/thirdparty into log
- Reset of module data after a migration from v6 (not compatible)
2017-12-15 16:56:08 +01:00
Neil Orley
4c852d1b6f NEW Set a proposal to draft
Set a proposal to draft
2017-12-15 16:34:30 +01:00
Neil Orley
f4e8ce0598 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-12-15 16:23:38 +01:00
Laurent Destailleur
fb0169cbb8 Back link to module page 2017-12-15 10:46:11 +01:00
Laurent Destailleur
4a75d847e2 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-15 10:36:47 +01:00
Laurent Destailleur
2eea3a1afa Fix backlink of module setup pages 2017-12-15 10:36:35 +01:00
Neil Orley
ea971fd5c3 Merge branch 'develop-api' of https://github.com/Oeris/dolibarr into develop-api 2017-12-15 10:03:04 +01:00
Neil Orley
e61d625577 FIX error message 2017-12-15 10:02:23 +01:00
Neil Orley
d35fc67cfc Unknown 2017-12-15 10:00:50 +01:00
Neil Orley
5ae74f8ae1 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-12-15 09:56:02 +01:00
Alexandre SPANGARO
24ae3d5879 NEW : Add search on date and accounting account in various payment list 2017-12-15 07:04:05 +01:00
Laurent Destailleur
9a08ee269e Menu not visible 2017-12-14 23:43:04 +01:00
Laurent Destailleur
b8302f5bf0 Code comment 2017-12-14 21:28:51 +01:00
Laurent Destailleur
3b10f826f9 Css 2017-12-14 17:37:32 +01:00
Laurent Destailleur
541a1e0f7c Better message 2017-12-14 17:26:12 +01:00
Laurent Destailleur
d7e5d554ab Better message 2017-12-14 17:18:26 +01:00
Laurent Destailleur
4a9b61047f Filter on blockedlog 2017-12-14 17:08:43 +01:00
Laurent Destailleur
427f1490f8 Fix css 2017-12-14 13:52:32 +01:00
Aurélien
88b456a542 Resolve bug for REST API PUT task
An error occured when I was trying to PUT task despite all rigths.

Ressource 'task' --> 'tasks'
2017-12-14 11:53:48 +01:00
Alexandre SPANGARO
0c8ff80af0 FIX : Edit accountancy in loan 2017-12-14 06:57:17 +01:00
Laurent Destailleur
c119d7dbb9 Code comment 2017-12-13 23:37:34 +01:00
fappels
bb700494a1 Fix Collation update missing for llx_expeditiondet_batch 2017-12-13 20:39:37 +01:00
Laurent Destailleur
d59824cd69 Fix generic GETPOST 2017-12-13 13:19:15 +01:00
fappels
88d6e1ac0e Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-12-13 10:43:18 +01:00
Laurent Destailleur
cc2c31d940 Fix typo 2017-12-12 16:31:59 +01:00
Laurent Destailleur
247c380d18 Several fixes 2017-12-12 16:11:40 +01:00
Laurent Destailleur
2ce3810001 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-12 15:04:43 +01:00
Laurent Destailleur
6afa12773d Fix syntax error 2017-12-12 15:04:31 +01:00
Laurent Destailleur
3f5bfa21c3 Merge pull request #7945 from mistraloz/patch-4
Fix #7921 : For invoice with "/" in ref
2017-12-12 15:00:07 +01:00
Laurent Destailleur
f886aac75a Merge pull request #7944 from lampi87/develop
public holiday in austria
2017-12-12 14:59:23 +01:00
Laurent Destailleur
676e5a1bca Merge pull request #7943 from aspangaro/7.0-b4
FIX : Various payment
2017-12-12 14:54:44 +01:00
Laurent Destailleur
1ad7ec5ad1 Test on bad entity 2017-12-12 13:23:39 +01:00
Laurent Destailleur
06e63615e3 complete api detection 2017-12-12 13:05:22 +01:00
Laurent Destailleur
e9eeb59068 Revert "Add invoice label in supplier invoice web service"
This reverts commit 8b288d99ff.
2017-12-12 11:45:12 +01:00
Laurent Destailleur
8b288d99ff Add invoice label in supplier invoice web service 2017-12-12 11:43:53 +01:00
Laurent Destailleur
af1028576d Fix on search all (trim search + search from smartphone). 2017-12-12 11:31:30 +01:00
Laurent Destailleur
1251807f54 Fix several pb in links to projects on create page 2017-12-12 10:37:51 +01:00
Laurent Destailleur
9314dcb046 Fix regression 2017-12-12 10:13:48 +01:00
Laurent Destailleur
118b6ce140 Code comment 2017-12-12 03:10:54 +01:00
Laurent Destailleur
9880ef7364 Fix module website 2017-12-12 01:40:34 +01:00
Laurent Destailleur
48aada6090 Export of website 2017-12-11 21:27:43 +01:00
Laurent Destailleur
6f3c839d65 Fix error management 2017-12-11 18:58:08 +01:00
Laurent Destailleur
dbefb93e0f Error management 2017-12-11 18:25:23 +01:00
Laurent Destailleur
bb7c03906e Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/lib/files.lib.php
	htdocs/societe/list.php
2017-12-11 15:25:09 +01:00
Laurent Destailleur
1593792cdd Fix loading data after first install 2017-12-11 14:56:12 +01:00
Mistral Oz - LWEP
7cd785d59a Fix #7921 : For invoice with "/" in ref
Fix #7921 : For invoice with "/" in ref
2017-12-11 14:47:07 +01:00
Laurent Destailleur
8189be0ac4 Fix warning 2017-12-11 14:17:26 +01:00
Laurent Destailleur
dd4b3081c5 Module builder 2017-12-11 14:11:19 +01:00
Laurent Destailleur
7efbcfa1e9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-11 13:50:49 +01:00
Laurent Destailleur
338f8d978a Fix generation of doc in modulebuilder 2017-12-11 13:50:26 +01:00
Laurent Destailleur
acf2d2ee9a Fix scrutinizer reported bugs 2017-12-11 11:48:11 +01:00
Alexander Lampret
46aeb7068c public holiday in austria 2017-12-11 10:51:58 +01:00
Alexandre SPANGARO
7b935a96bf FIX : Various payment 2017-12-11 07:03:37 +01:00
Laurent Destailleur
066e04f33d Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop 2017-12-11 00:22:05 +01:00
Laurent Destailleur
dbd96d1ac7 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/actions_sendmails.inc.php
	htdocs/loan/card.php
	htdocs/loan/class/loan.class.php
2017-12-10 21:46:23 +01:00
Laurent Destailleur
d836d68801 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-10 21:29:35 +01:00
Laurent Destailleur
e640831653 Merge pull request #7553 from atm-maxime/new_menu_expense_holidays
Add detailed menus in HRM module
2017-12-10 21:15:51 +01:00
Laurent Destailleur
c6c248fa28 Merge pull request #7930 from aspangaro/7.0-7
Fix : Accountancy some cleaning
2017-12-10 21:10:30 +01:00
Laurent Destailleur
f7b663379a Fix PHP 7.2 2017-12-10 21:04:59 +01:00
Laurent Destailleur
3415ce4664 Merge pull request #7938 from aspangaro/7.0-b3
FIX : Debug various_payment
2017-12-10 20:59:45 +01:00
Laurent Destailleur
e01195f4f1 Merge pull request #7935 from aspangaro/7.0-b1
FIX : v7 sql error on init database
2017-12-10 20:58:05 +01:00
Laurent Destailleur
7d553f58f5 Debug website module 2017-12-10 20:34:35 +01:00
Laurent Destailleur
748aee9a54 Fix javascript error 2017-12-10 19:54:04 +01:00
Laurent Destailleur
d701a7617b Fix province nadorgg into nador 2017-12-10 19:04:21 +01:00
Laurent Destailleur
2dae21259e Fix the switch show more/less 2017-12-10 19:03:18 +01:00
Laurent Destailleur
e1f0483b23 Fix grabber of url when url is on second level dir. More phpunits 2017-12-10 17:59:19 +01:00
Laurent Destailleur
02d9e93ed4 Fix badge and use of data-html instead of html tag 2017-12-10 15:46:35 +01:00
Laurent Destailleur
4443c0f0a0 Fix style 2017-12-10 15:24:47 +01:00
Alexandre SPANGARO
ac95ccd872 FIX : Debug various_payment 2017-12-10 14:05:36 +01:00
Alexandre SPANGARO
cc2ea35c9a FIX : data 2017-12-10 08:46:50 +01:00
Alexandre SPANGARO
918f25983c FIX : v7 sql data 2017-12-10 08:27:13 +01:00
Alexandre SPANGARO
ff9c714f88 FIX : v7 sql error on init database 2017-12-10 08:02:57 +01:00
Laurent Destailleur
472d7b591e Fix hook for formmail and translation 2017-12-10 02:01:36 +01:00
Laurent Destailleur
57c7fa6ae9 Sync transifex 2017-12-10 01:17:32 +01:00
Laurent Destailleur
8d20473ffd Fix date of extrafields 2017-12-09 23:19:29 +01:00
Laurent Destailleur
1128b66b30 Fix ref of contract 2017-12-09 20:58:06 +01:00
Laurent Destailleur
e270295f5c Fix modulebuilder 2017-12-09 20:40:11 +01:00
Laurent Destailleur
cc813df2a5 Fix modulebuilder 2017-12-09 20:17:47 +01:00
Laurent Destailleur
f22e7ee24a Fixes 2017-12-09 17:29:19 +01:00
Laurent Destailleur
e3dcff7f5b Fix substition for menus title and urls 2017-12-09 15:35:01 +01:00
Laurent Destailleur
55b9921661 Fix package rpm 2017-12-09 13:45:06 +01:00
Alexandre SPANGARO
1269d98df2 Merge remote-tracking branch 'uptream/develop' into 7.0-7
# Conflicts:
#	htdocs/accountancy/admin/export.php
#	htdocs/accountancy/class/accountancyexport.class.php
#	htdocs/accountancy/journal/expensereportsjournal.php
2017-12-09 06:14:34 +01:00
Alexandre SPANGARO
065ef4e5c2 Fix : Accountancy some cleaning 2017-12-09 06:00:13 +01:00
Laurent Destailleur
47e9ab5738 Fix search on date on blocked logs 2017-12-09 00:40:22 +01:00
Laurent Destailleur
701ae7d21b Fix responsive 2017-12-08 20:15:28 +01:00
Laurent Destailleur
3ef215c3eb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-08 19:23:41 +01:00
Laurent Destailleur
a5bdadf432 Fix menu with smartphone 2017-12-08 19:23:13 +01:00
Laurent Destailleur
c0f7d836b8 Merge pull request #7927 from atm-alexis/NEW_filter_date_for_blockedlog
NEW filter date for blockedlog
2017-12-08 19:22:42 +01:00
alexis Algoud
9dfe309ef2 NEW filter date for blockedlog 2017-12-08 17:15:24 +01:00
Laurent Destailleur
95cb5025a2 Fix length of month too large
More complete template
2017-12-08 16:15:41 +01:00
Laurent Destailleur
56b5eab2e4 Merge pull request #7911 from atm-alexis/NEW_blockedlog_reset_warning
NEW warning on module blocked log reset if country code is FR
2017-12-08 13:47:44 +01:00
Laurent Destailleur
2c62ea5fac Merge pull request #7915 from ATM-Marc/NEW_hook_openelements_dashboard
New hook to extend homepage open elements dashboard
2017-12-08 13:39:52 +01:00
Laurent Destailleur
ac56e61cdf Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-08 13:14:12 +01:00
Laurent Destailleur
f85e79e250 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/class/html.formfile.class.php
	htdocs/filefunc.inc.php
	htdocs/holiday/class/holiday.class.php
2017-12-08 13:13:53 +01:00
Laurent Destailleur
c2ad58895f Merge pull request #7919 from atm-maxime/link_create_event
Fix : link to create action is not a button but a top list link
2017-12-08 13:02:21 +01:00
Laurent Destailleur
acd4e0b083 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-08 12:38:33 +01:00
Laurent Destailleur
df5768c176 Fix missing translation 2017-12-08 12:38:22 +01:00
Laurent Destailleur
f0bdf3a537 Merge pull request #7917 from IonAgorria/fix-7914
FIX #7914: More informative error message in dynamics prices
2017-12-08 10:41:06 +01:00
Laurent Destailleur
50150cf897 Merge pull request #7918 from atm-maxime/develop
Fix scrutinizer
2017-12-08 10:35:24 +01:00
Laurent Destailleur
7e358afa39 Merge pull request #7920 from atm-maxime/fix_button_createevent
Fix : no need for action button on cards, link is now available
2017-12-08 10:35:10 +01:00
Laurent Destailleur
94570528d0 Merge pull request #7922 from atm-maxime/new_mainmenuicons
Add icons on home page menu
2017-12-08 10:31:02 +01:00
alexis Algoud
62cd77d999 NEW automatic activation of external module on country set 2017-12-08 10:13:03 +01:00
Laurent Destailleur
cf5265d405 Minor fix 2017-12-07 21:44:12 +01:00
Maxime Kohlhaas
6b278a6740 Add icons on home page menu 2017-12-07 16:01:52 +01:00
Maxime Kohlhaas
8a39e2a413 Fix : no need for action button on cards, link is now available 2017-12-07 00:36:23 +01:00
Maxime Kohlhaas
3fb8ec5067 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new_menu_expense_holidays 2017-12-06 23:52:02 +01:00
Maxime Kohlhaas
fd26d95533 Ruleset 250 to 300 cyclomatic complexity 2017-12-06 23:51:57 +01:00
Maxime Kohlhaas
2a64eb2983 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-12-06 23:45:37 +01:00
Maxime Kohlhaas
50203cdf01 Fix : link to create action is not a button but a top list link 2017-12-06 23:44:34 +01:00
Laurent Destailleur
74a63ca18c Fix scrutinizer 2017-12-06 23:43:59 +01:00
Laurent Destailleur
98149ae316 Fix regression 2017-12-06 23:31:42 +01:00
Maxime Kohlhaas
0fa77160d9 Fix scrutinizer 2017-12-06 23:21:58 +01:00
Ion
669e080670 More informative error message in dynamics price 2017-12-06 14:51:29 +01:00
Marc de Lima Lucio
d43acefac4 Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_hook_openelements_dashboard 2017-12-06 12:39:50 +01:00
Marc de Lima Lucio
32d911b1df NEW: hook to enrich homepage open elements dashboard 2017-12-06 12:31:00 +01:00
Laurent Destailleur
56b0279ed7 Fix translation 2017-12-05 20:46:36 +01:00
Laurent Destailleur
2c19c0a10e Fix test 2017-12-05 20:16:28 +01:00
Laurent Destailleur
c6e1087834 Fix test on vat amount 2017-12-05 19:47:46 +01:00
Laurent Destailleur
776b7f03b6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-05 19:28:12 +01:00
Laurent Destailleur
005006c508 Update changelog 2017-12-05 19:26:08 +01:00
Laurent Destailleur
ccd4f74f51 Fix PHPunit 2017-12-05 19:24:26 +01:00
Laurent Destailleur
21ba8509c9 Merge pull request #7910 from ATM-Nicolas/6.0_fix_project_conf
NEW link project from other company conf
2017-12-05 19:18:07 +01:00
Alexis Algoud
ad46bf9a94 NEW option to avoid countries to disable there blockedlog 2017-12-05 18:30:48 +01:00
Alexis Algoud
cc9b55cb45 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into NEW_blockedlog_reset_warning 2017-12-05 18:08:53 +01:00
Laurent Destailleur
5ab7fa7422 Fix location on good page 2017-12-05 15:48:24 +01:00
Laurent Destailleur
3a9bf455e2 FIX #7870 2017-12-05 13:38:24 +01:00
Laurent Destailleur
93311e3817 FIX #7885 2017-12-05 12:31:57 +01:00
ATM-Nicolas
bdf1e30ef3 Merge branch 'develop' into 6.0_fix_project_conf 2017-12-05 12:20:48 +01:00
Laurent Destailleur
22d61426a1 FIX #7903 2017-12-05 11:53:19 +01:00
alexis Algoud
a2df87ab15 NEW warning on module blocked log reset if country code is FR
fix wrong paste click
2017-12-05 11:40:42 +01:00
Laurent Destailleur
8019f73f99 Fix: protection to not delete invoice if invoice is in bookkeeping 2017-12-05 10:01:30 +01:00
ATM-Nicolas
36bcd26e27 FIX : link project from other company conf 2017-12-05 09:21:24 +01:00
Laurent Destailleur
78c4b7f912 Fix look and feel v7 2017-12-04 20:17:07 +01:00
Laurent Destailleur
c1791b87b4 Fix status tracked 2017-12-04 18:04:52 +01:00
Laurent Destailleur
c6d035392f Fix status message inverted 2017-12-04 17:58:21 +01:00
Laurent Destailleur
db4a96c96b Add payment delete into blockedlog 2017-12-04 17:55:22 +01:00
Laurent Destailleur
3cd7d0af11 Fix ref of invoice in blockedlog 2017-12-04 17:51:05 +01:00
Laurent Destailleur
0e4f82439b Add event BILL_DELETE into blockedlog module 2017-12-03 21:47:37 +01:00
Laurent Destailleur
2e2ab54d19 Fix parameter in delete line 2017-12-03 20:51:26 +01:00
Laurent Destailleur
d2adec01b0 Add option MAIL_SMTP_USE_FROM_FOR_HELO to fix smtps best practice 2017-12-03 20:18:00 +01:00
Laurent Destailleur
58edc06ac3 Add option MAIL_SMTP_USE_FROM_FOR_HELO to fix smtps best practice 2017-12-03 20:15:04 +01:00
Laurent Destailleur
b41213f9a1 Add option MAIL_SMTP_USE_FROM_FOR_HELO to fix smtps best practice 2017-12-03 20:08:53 +01:00
Laurent Destailleur
9b5f7099f7 Code comment 2017-12-03 19:50:15 +01:00
Laurent Destailleur
cc05bb3c8c Fix duplicate errors 2017-12-03 19:36:59 +01:00
Laurent Destailleur
1b3680c200 Fix missing css 2017-12-03 12:21:38 +01:00
Laurent Destailleur
11286dee4a Delete of payment 2017-12-03 11:59:16 +01:00
Laurent Destailleur
9f1eba6b75 Fix write in blockedlog 2017-12-03 11:48:09 +01:00
Laurent Destailleur
081d31a56e Debug php backup for new mysql version 2017-12-03 11:45:34 +01:00
Laurent Destailleur
2458244ee3 Fix css 2017-12-02 16:24:38 +01:00
Laurent Destailleur
0a6633da6e Fix error message 2017-12-02 15:56:56 +01:00
Laurent Destailleur
5d7214c4e8 Sync transifex 2017-12-02 15:20:59 +01:00
Laurent Destailleur
1f4a079f01 Fix bug reported by scrutinizers 2017-12-02 15:03:14 +01:00
Laurent Destailleur
e57c8f324d Fix style 2017-12-02 14:57:27 +01:00
Laurent Destailleur
f51c96a7c6 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-02 14:15:59 +01:00
Laurent Destailleur
dc04ab3164 Missing field in website module 2017-12-02 13:24:21 +01:00
Laurent Destailleur
7b47ef3ca1 Change order or field 2017-12-02 11:34:56 +01:00
Laurent Destailleur
fa8b913d24 Change order or field 2017-12-02 11:24:33 +01:00
Laurent Destailleur
e8327fd9a1 Fix the eatby/sellby date was not visible. 2017-12-02 10:43:01 +01:00
Laurent Destailleur
0a73daba01 Security: on target=_blank, we must have rel="noopener" 2017-12-02 03:04:52 +01:00
Laurent Destailleur
46b281f703 Fix for #7697 2017-12-01 19:29:29 +01:00
Laurent Destailleur
89ef597690 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-01 18:12:52 +01:00
Laurent Destailleur
64d29709d5 FIX #7881 error not reported/blocking when subprodut need lot 2017-12-01 18:12:29 +01:00
Laurent Destailleur
4969ae2abb Fix missing the badge on virtual product tab 2017-12-01 17:48:51 +01:00
Laurent Destailleur
9ed679d19a FIX #7882 2017-12-01 17:22:32 +01:00
Laurent Destailleur
e36b62f539 Merge pull request #7900 from fappels/7.0_fix_warehouse_label_ref-
Fix dispatch not adapted for label to ref change for warehouse
2017-12-01 16:26:21 +01:00
Laurent Destailleur
1ce155728f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/modules/mailings/fraise.modules.php
2017-12-01 16:25:13 +01:00
fappels
1c72dc608f Fix travis 2017-12-01 16:22:34 +01:00
Laurent Destailleur
c8f661021c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-12-01 15:58:58 +01:00
Laurent Destailleur
471f99c24c Fix look and feel v7 2017-12-01 15:58:35 +01:00
Laurent Destailleur
1d2b5dbe97 Merge pull request #7892 from atm-maxime/fix_contactlist_empty
Fix filters on contact list must always appear
2017-12-01 15:54:03 +01:00
Laurent Destailleur
ce32da6217 Fix debugs APIs 2017-12-01 15:39:18 +01:00
Laurent Destailleur
e3671da37f Fix edit shipment line when line is a not predefined product 2017-12-01 14:33:06 +01:00
Laurent Destailleur
09e611aa21 Move status of blockedlog to experimental 2017-12-01 13:41:37 +01:00
Laurent Destailleur
46b015d205 Fix usage of option STOCK_SUPPORTS_SERVICES 2017-12-01 13:40:24 +01:00
fappels
cec490dff5 Fix dispatch not adapted for label to ref change for warehouse 2017-12-01 12:57:56 +01:00
Laurent Destailleur
a0231b5c60 Fix responsive 2017-12-01 12:55:28 +01:00
Laurent Destailleur
670465fcd8 Fix responsive and search 2017-12-01 12:01:17 +01:00
Laurent Destailleur
b871c7e6ca Translation key 2017-11-30 15:16:01 +01:00
Laurent Destailleur
25bccfde8b Debug blockedlog module 2017-11-30 15:13:23 +01:00
Laurent Destailleur
8987e923f1 Update doc 2017-11-30 14:23:59 +01:00
Laurent Destailleur
6796c08cb8 Debug/rewrite Blockedlog 2017-11-30 14:21:55 +01:00
Laurent Destailleur
39fdd1b37d Use correct link to changelog 2017-11-30 11:16:28 +01:00
Laurent Destailleur
dc692f333d Work on blockedlog 2017-11-30 10:45:55 +01:00
Maxime Kohlhaas
879a0812d7 Fix filters on contact list must always appear 2017-11-29 20:04:15 +01:00
Laurent Destailleur
33032a5474 Look and feel v6 2017-11-29 18:13:22 +01:00
Laurent Destailleur
c269dcc4d5 Fix scrutinizer 2017-11-29 17:58:13 +01:00
Laurent Destailleur
d9c416ee17 Complete example 2017-11-29 17:51:08 +01:00
Laurent Destailleur
9508c3e0b9 Fix trigger was not called 2017-11-29 16:34:44 +01:00
Laurent Destailleur
4245ad6e2a Return error messages 2017-11-29 16:26:19 +01:00
Laurent Destailleur
682afe8918 Fix scrutinizer 2017-11-29 16:25:12 +01:00
Laurent Destailleur
2693e5db6d Fix the trigger COMPANY_MODIFY provide information of thirdparty merged 2017-11-29 16:24:58 +01:00
Laurent Destailleur
9af3ff2926 Merge pull request #7883 from hregis/develop_member
Fix: move default fields before extrafields for best visibility
2017-11-29 15:03:39 +01:00
Laurent Destailleur
f9aaddb658 Add spec for french ecompte 2017-11-29 14:08:14 +01:00
Laurent Destailleur
755b7a2717 Start 7.0 beta 2017-11-29 09:34:55 +01:00
Regis Houssin
310e91ad01 Fix: move default fields before extrafields for best visibility 2017-11-28 13:10:21 +01:00
Laurent Destailleur
9dcec5d6cf Sync transifex 2017-11-28 12:32:23 +01:00
Laurent Destailleur
3b98a06ebb Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/modules/mailings/fraise.modules.php
2017-11-28 12:18:01 +01:00
Laurent Destailleur
07bdd3213a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-28 12:16:13 +01:00
Laurent Destailleur
430c72bf0f Merge pull request #7879 from ptibogxiv/patch-7
fix for multicompany in mailing
2017-11-28 12:16:00 +01:00
Laurent Destailleur
c1e6d35ca5 Merge pull request #7878 from atm-florian/dev_informize_extrafield_list_search
factorization of extrafields into list
2017-11-28 12:14:47 +01:00
Laurent Destailleur
222c53a756 Merge pull request #7877 from atm-alexis/fix_print_password_is_clear_after_login
fix print password is visible into link after login
2017-11-28 12:13:37 +01:00
Laurent Destailleur
f8d6897888 Fix bug 2017-11-28 12:08:04 +01:00
Laurent Destailleur
b14cb7a97f Debug accountancy 2017-11-28 11:49:11 +01:00
Laurent Destailleur
ef786f2271 Debug accountancy module 2017-11-28 11:31:55 +01:00
Laurent Destailleur
a15a57317b Debug accountancy module 2017-11-28 11:12:13 +01:00
Laurent Destailleur
b63fb1f854 Support of VAT NPR in accounting module 2017-11-27 22:18:10 +01:00
Laurent Destailleur
a9d3e90b70 Big debug of accountancy module 2017-11-27 21:53:22 +01:00
ptibogxiv
10b0eafba7 Update fraise.modules.php 2017-11-27 18:12:52 +01:00
Laurent Destailleur
48f226a825 Fix translation 2017-11-27 17:15:03 +01:00
Laurent Destailleur
533a82187a NEW Add a protection so we can't journalize non balanced transactions 2017-11-27 17:12:48 +01:00
ptibogxiv
ea9071512d Update fraise.modules.php 2017-11-27 17:08:15 +01:00
Laurent Destailleur
8954d52e32 Fix edit dictionary 2017-11-27 16:07:48 +01:00
ptibogxiv
0a5a50263d fix for multicompany 2017-11-27 16:07:40 +01:00
Laurent Destailleur
57d4f28cba Enhance usability of accounting module 2017-11-27 15:51:28 +01:00
alexis Algoud
e6f7fe4ce6 fix print password is visible into link after login 2017-11-27 15:29:19 +01:00
florian HENRY
94285ae494 factorization of extrafeild into list 2017-11-27 15:24:29 +01:00
Laurent Destailleur
de115f8150 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-27 14:56:59 +01:00
Laurent Destailleur
b55d085f2d Merge pull request #7872 from atm-alexis/fix_include_for_ajax_select_product_supplier_order
fix include for ajax select product supplier order
2017-11-27 14:55:11 +01:00
Laurent Destailleur
c77b39bf1e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-27 14:52:51 +01:00
Laurent Destailleur
807bfbb696 Merge pull request #7867 from frederic34/bank
info bank
2017-11-27 14:50:00 +01:00
Laurent Destailleur
f129d62259 Merge pull request #7873 from Dolibarr/scrutinizer-patch-4
Scrutinizer Auto-Fixes
2017-11-27 14:48:57 +01:00
Scrutinizer Auto-Fixer
aab2799981 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2017-11-27 13:48:36 +00:00
Laurent Destailleur
bdd56ae925 Picto 2017-11-27 14:42:11 +01:00
Laurent Destailleur
f9e99e93c3 Fux utf8 trouble on direct printing message 2017-11-27 14:34:29 +01:00
Laurent Destailleur
69725fe62f Fix setup of direct print with google docs driver 2017-11-27 13:55:27 +01:00
Laurent Destailleur
43c60ec224 Fix error management at wrong place 2017-11-27 13:45:59 +01:00
alexis Algoud
61a3131fc4 fix include for ajax select product supplier order 2017-11-27 10:59:46 +01:00
Laurent Destailleur
cf274a7e3f Fix CSS 2017-11-26 22:23:21 +01:00
Laurent Destailleur
b142ac1c06 CSS 2017-11-26 22:12:11 +01:00
Laurent Destailleur
e4d0213916 Removed duplicate code 2017-11-26 22:06:14 +01:00
Laurent Destailleur
d340d7bae5 Fix CSS 2017-11-26 21:56:41 +01:00
Laurent Destailleur
ffe2be377c Fix navigation 2017-11-26 20:43:37 +01:00
Laurent Destailleur
a0406bc741 Standardize view of events for products 2017-11-26 20:24:20 +01:00
Laurent Destailleur
ae906270f3 Debug module variant 2017-11-26 18:43:43 +01:00
Laurent Destailleur
2c07886360 Debug module variant 2017-11-26 15:08:00 +01:00
Laurent Destailleur
0b470bef80 Add phpunit for make_substitutions 2017-11-26 10:24:33 +01:00
Laurent Destailleur
1ec6c13ece Debug module variant 2017-11-26 10:13:32 +01:00
Laurent Destailleur
8352aee9f7 NEW Add option EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS 2017-11-26 00:14:54 +01:00
Laurent Destailleur
5bdb7d1b98 Fix line "none" must not be visible if there is lines 2017-11-25 23:28:00 +01:00
Laurent Destailleur
6a9056a924 Fix line "none" must not be visible if there is lines 2017-11-25 23:26:14 +01:00
Laurent Destailleur
7e40ee5e4b Fix substitution key for constant ok with php 5.3 2017-11-25 23:16:15 +01:00
Laurent Destailleur
a48fe55832 Fix language file of external module not visible in trans tool 2017-11-25 22:53:58 +01:00
Laurent Destailleur
c02528a479 NEW Accept substitution key __[ABC]__ replaced with value of const ABC 2017-11-25 19:55:31 +01:00
Laurent Destailleur
5935ad868a Fix the from robot must be visible only on test page 2017-11-25 19:23:27 +01:00
Laurent Destailleur
3d48e509bd Clean code 2017-11-25 19:16:15 +01:00
Laurent Destailleur
2fc5d9fefb The form to test email can now use all sending profiles. 2017-11-25 18:52:47 +01:00
Laurent Destailleur
a529725c5c Fix lang code must be null if not defined 2017-11-25 17:42:46 +01:00
Laurent Destailleur
e6b16815aa Fix responsive 2017-11-25 17:25:27 +01:00
Laurent Destailleur
e1484caa59 Fix responsive 2017-11-25 17:21:53 +01:00
Laurent Destailleur
4c8b8dcba5 Fix sort order 2017-11-25 16:53:37 +01:00
Laurent Destailleur
9b8011f75b Fix class not found 2017-11-25 16:52:04 +01:00
Laurent Destailleur
1ea9137863 Fix sort order 2017-11-25 16:21:44 +01:00
Laurent Destailleur
5ba4a57b61 Fix sort on last actions 2017-11-25 16:05:45 +01:00
Laurent Destailleur
e99f190ff1 Save search context on list of template invoices 2017-11-25 15:56:36 +01:00
Laurent Destailleur
dbcb38dd3b Use short label on table 2017-11-25 15:13:39 +01:00
Laurent Destailleur
1d97dd2bd8 NEW can filter on status of template invoices 2017-11-25 15:08:19 +01:00
Laurent Destailleur
bb1efb42ce Update doc 2017-11-25 14:58:16 +01:00
Laurent Destailleur
6a8388dd57 Add table for online signature 2017-11-25 14:11:34 +01:00
Laurent Destailleur
5bc2b34386 Fix error in api to get a member 2017-11-25 13:30:08 +01:00
Laurent Destailleur
7d3325c087 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	dev/dolibarr_changes.txt
	htdocs/user/class/api_users.class.php
2017-11-25 13:17:38 +01:00
Laurent Destailleur
77509ee37a Removed deprecated apis 2017-11-25 13:14:28 +01:00
Laurent Destailleur
a5dda258cd Fix scrutinizer 2017-11-25 12:18:23 +01:00
Frédéric FRANCE
6a91b16995 info bank 2017-11-25 12:13:03 +01:00
Laurent Destailleur
0b9a3087ea Fix bug reported by scrutinizer 2017-11-25 12:11:02 +01:00
Laurent Destailleur
944d666d1a Fix bugs 2017-11-25 11:27:24 +01:00
Laurent Destailleur
aaf08ade2f Fix bug reported by scrutinizer 2017-11-25 11:21:31 +01:00
Laurent Destailleur
412c4e335d Fix method of herited object has same signature than parent 2017-11-25 11:10:52 +01:00
Laurent Destailleur
bdecef56f9 FIX list of module not complete when module mb_strlen not available 2017-11-25 02:32:25 +01:00
Laurent Destailleur
88841ccbae FIX #7590 2017-11-25 01:58:11 +01:00
Laurent Destailleur
d90f68837a Missing migration line 2017-11-25 00:59:25 +01:00
Laurent Destailleur
3edc18696d Merge pull request #5906 from defrance/patch-34
introduce SHIPPING on proposal (like in order)
2017-11-25 00:57:27 +01:00
Laurent Destailleur
0ec8c3c296 Merge branch 'develop' into patch-34 2017-11-25 00:57:10 +01:00
Laurent Destailleur
6876049779 Update 4.0.0-5.0.0.sql 2017-11-25 00:56:24 +01:00
Laurent Destailleur
b8251bac97 Fix rename files with accents 2017-11-25 00:48:19 +01:00
Laurent Destailleur
4cff4c6935 Simplify and standardize code for agenda pages 2017-11-25 00:12:45 +01:00
Laurent Destailleur
c16a150a70 NEW Remove background on agenda view when event is a not busy event. 2017-11-24 20:02:46 +01:00
Laurent Destailleur
7ea96d53a2 Minor fixes 2017-11-24 18:12:01 +01:00
Laurent Destailleur
63d2d38c5f Fix export stock with lot 2017-11-24 17:47:40 +01:00
Laurent Destailleur
8659d97e97 Fix export of lot must use properties of lot from product_lot 2017-11-24 17:44:19 +01:00
Laurent Destailleur
4f4f929efb Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/facture/class/facture.class.php
	htdocs/holiday/class/holiday.class.php
2017-11-24 17:02:14 +01:00
Laurent Destailleur
0370368d04 Restore lost field during merge 2017-11-24 16:46:50 +01:00
Laurent Destailleur
e109be4a23 Merge pull request #7865 from atm-maxime/new_export_stock_valo
New add pmp and cost price in product stock export
2017-11-24 16:44:16 +01:00
Laurent Destailleur
b54e42f852 Merge branch 'develop' into new_export_stock_valo 2017-11-24 16:42:19 +01:00
Laurent Destailleur
d7f5f14f46 Merge branch 'develop' into new_export_stock_valo 2017-11-24 16:40:36 +01:00
Laurent Destailleur
9836f42bc8 Merge pull request #7862 from atm-john/add_puschasesjournal_hook
Add new doActions hook
2017-11-24 16:37:26 +01:00
Laurent Destailleur
06de67cb8a Update purchasesjournal.php 2017-11-24 16:37:19 +01:00
Laurent Destailleur
b052722cf1 Merge pull request #7861 from hregis/develop_member
Fix: wrong table name and id field name
2017-11-24 16:36:22 +01:00
Laurent Destailleur
e22d13cf55 Merge pull request #7860 from IonAgorria/resources-country
Add country to resource
2017-11-24 16:35:52 +01:00
Laurent Destailleur
aa2397ff1d Merge pull request #7859 from vvnt/patch-9
modPropale.class.php permissions in English
2017-11-24 16:34:02 +01:00
Laurent Destailleur
8bd2707678 Merge pull request #7858 from vvnt/patch-8
modFacture.class.php permissions in English
2017-11-24 16:33:42 +01:00
Laurent Destailleur
a18824050c Merge pull request #7857 from vvnt/patch-7
modSociete.class.php permissions in English
2017-11-24 16:33:22 +01:00
Laurent Destailleur
21764ed0cf Merge pull request #7856 from frederic34/patch-1
Update html.form.class.php
2017-11-24 16:33:00 +01:00
Laurent Destailleur
438a68968f Fix regression 2017-11-24 16:28:24 +01:00
Laurent Destailleur
831099fef8 Debug modulebuilder 2017-11-24 16:24:42 +01:00
Laurent Destailleur
5ee85821fc Debug modulebuilder 2017-11-24 15:47:38 +01:00
Laurent Destailleur
9f235e1ff6 Standardize database: field ref of warehouse was renamed label -> ref 2017-11-24 15:27:00 +01:00
Laurent Destailleur
3db52b5f9e Debug responsive of v7 2017-11-24 14:23:25 +01:00
Laurent Destailleur
8450c78dff Fix warning on late surveys 2017-11-24 10:06:42 +01:00
Laurent Destailleur
6d5f2b2f21 Fix filters on surveys 2017-11-24 10:00:46 +01:00
Laurent Destailleur
f0d0969a3b Better name for generated page of barcodes 2017-11-24 09:30:21 +01:00
Laurent Destailleur
abe13d108b Clean code used for autocompletion 2017-11-24 09:23:18 +01:00
Laurent Destailleur
9c22b5f335 Replace deprecated dol_print_graph with DolGraph 2017-11-23 20:24:05 +01:00
Laurent Destailleur
38ef5890dc Replace deprecated dol_print_graph with DolGraph 2017-11-23 18:47:24 +01:00
Maxime Kohlhaas
cad2fedf70 New add pmp and cost price in product stock export 2017-11-23 18:41:48 +01:00
Laurent Destailleur
5cf21fef05 Use autocompletion on list of taxes 2017-11-23 15:46:52 +01:00
Laurent Destailleur
39d00b2ea9 Standardize code 2017-11-23 15:24:25 +01:00
Laurent Destailleur
9bc6acdf0e Fix syntax error 2017-11-23 15:23:45 +01:00
Laurent Destailleur
6a3dc91414 Standardize code 2017-11-23 15:22:32 +01:00
Laurent Destailleur
b93e35cdd2 Fix a lot of request to use the IN getentity instead of =
Fix a lot of request to use left join on type of payment table
2017-11-23 15:06:16 +01:00
Laurent Destailleur
295b4483d4 Enhance the repair.php tool 2017-11-23 13:23:16 +01:00
Regis Houssin
2a7b04e795 Fix: wrong table name and id field name 2017-11-23 12:18:49 +01:00
John
d8f18e18ce Add new doActions hook 2017-11-23 12:08:33 +01:00
Laurent Destailleur
b22dfcf533 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-23 09:49:25 +01:00
Laurent Destailleur
657d1137c0 Disable field if overwrite transaction is off 2017-11-23 09:49:15 +01:00
Frédéric FRANCE
0ee30171db Update html.form.class.php 2017-11-23 08:36:10 +01:00
Laurent Destailleur
5b77fe393e Fix: contact not preselected 2017-11-23 00:59:43 +01:00
Ion
6428c2157c Add country to resource 2017-11-23 00:26:25 +01:00
vvnt
09f4abd38e modPropale.class.php permissions in English 2017-11-22 23:22:43 +01:00
vvnt
10ba9a2fee modFacture.class.php permissions in English 2017-11-22 23:16:15 +01:00
vvnt
1b646f755d modSociete.class.php permissions in English 2017-11-22 23:11:36 +01:00
Laurent Destailleur
5a2fe13958 Fix travis 2017-11-22 21:36:01 +01:00
Laurent Destailleur
b0cecab22b Removed useless code 2017-11-22 21:26:24 +01:00
Laurent Destailleur
240f67d82b Disable tab if not on develop mode 2017-11-22 21:23:42 +01:00
Laurent Destailleur
5fa8db1650 Work on timesheets 2017-11-22 21:19:40 +01:00
Laurent Destailleur
b405a877b9 Use automcomplete on resource combo list 2017-11-22 14:47:35 +01:00
Laurent Destailleur
adce4b5b7b Debug multi contact on event.
Prepare also code to manage properties of attendees of event
2017-11-22 14:42:47 +01:00
Laurent Destailleur
fd5cb736ce Merge pull request #6961 from atm-ph/new_event_with_multi_contact
New multi contacts on actioncomm
2017-11-22 12:05:04 +01:00
Laurent Destailleur
1509a4f125 Merge pull request #7840 from frederic34/bankjournal
align export bankjournal on others
2017-11-22 11:57:27 +01:00
Laurent Destailleur
aa91b9075a Fix cancel button 2017-11-22 11:54:02 +01:00
Laurent Destailleur
d2b3fc5813 Merge pull request #7849 from IonAgorria/resources-card
NEW: Merge resource/add.php to resource/card.php
2017-11-22 11:33:56 +01:00
Laurent Destailleur
30d0c4f210 Merge pull request #7845 from vvnt/patch-6
modSociete.class.php (spelling correction)
2017-11-22 11:33:03 +01:00
Laurent Destailleur
918a51b9da Merge pull request #7844 from vvnt/patch-5
modPropale.class.php (spelling correction)
2017-11-22 11:28:25 +01:00
Laurent Destailleur
f6cc441c2e Merge pull request #7843 from vvnt/patch-4
Update modFacture.class.php (Spelling correction)
2017-11-22 11:28:05 +01:00
Laurent Destailleur
7c3dcc076a Merge pull request #7835 from ptibogxiv/patch-3
Fix import date
2017-11-22 11:23:35 +01:00
Laurent Destailleur
62da0160e1 Merge pull request #7780 from fappels/develop_update_tablednd
FIX #3551 and #6823 table drag and drop not working.
2017-11-22 11:22:14 +01:00
Laurent Destailleur
e0cd0bd7ee Merge pull request #7833 from elarifr/patch-accountancy-export-class
FIX Export to Quadra format date is wrong
2017-11-22 11:19:42 +01:00
Laurent Destailleur
46d1318a32 Merge pull request #7828 from papoteur-mga/develop
Fix:[proposals]Allow lines to be added from REST API
2017-11-22 11:16:32 +01:00
Laurent Destailleur
fd07d15423 Merge pull request #7850 from hregis/develop_member
NEW add possibility to remove address field
2017-11-22 11:15:23 +01:00
Laurent Destailleur
c3d8ef2104 Update functions.lib.php 2017-11-22 11:14:52 +01:00
Regis Houssin
848a27283b Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_member 2017-11-22 09:51:57 +01:00
Regis Houssin
1595bb1148 NEW add possibility to remove address field 2017-11-22 09:51:46 +01:00
Ion
7c6622f5b3 Merge resource/add.php to resource/card.php 2017-11-21 20:12:55 +01:00
vvnt
c74eef03dd modSociete.class.php (spelling correction)
Minor spelling correction.
2017-11-21 15:17:02 +01:00
vvnt
005be3f69b modPropale.class.php (spelling correction)
Minor spelling correction
2017-11-21 15:13:13 +01:00
vvnt
98998a7060 Update modFacture.class.php 2017-11-21 15:07:53 +01:00
Laurent Destailleur
2b95679b84 Add info to help spam fight 2017-11-21 14:09:15 +01:00
Laurent Destailleur
9bdd31e05a Module builder 2017-11-21 12:28:34 +01:00
Laurent Destailleur
533979987f Work on module builder 2017-11-21 11:56:49 +01:00
Laurent Destailleur
a630e665d9 Work on modulebuilder 2017-11-21 11:50:57 +01:00
Laurent Destailleur
ff9a62e519 Fix trackid from emailings 2017-11-21 11:15:33 +01:00
Laurent Destailleur
4b4412d5da Standardize file names for ECM 2017-11-20 19:40:34 +01:00
Laurent Destailleur
e19ca7b6d4 Work on generic filemanager 2017-11-20 18:19:41 +01:00
Frédéric FRANCE
6d33cc3980 align export bankjournal on others 2017-11-20 15:02:11 +01:00
fappels
8d318337d9 Check hound barking 2017-11-20 14:56:12 +01:00
fappels
37caa28e7e Update tablednd to v1.0 RC 2017-11-20 10:25:02 +01:00
Laurent Destailleur
818f43e7ad Work on generic filemanager 2017-11-19 22:04:24 +01:00
ptibogxiv
16e791913f Fix import date
fix import date when creation
2017-11-19 21:56:50 +01:00
Laurent Destailleur
6953420ce8 Support for ar_EG as laternative of ar_AS 2017-11-19 21:25:21 +01:00
Laurent Destailleur
5849efd9fc Work on public sharing files 2017-11-19 20:44:57 +01:00
Laurent Destailleur
04091e2c1a Sync transifex 2017-11-19 20:43:04 +01:00
Laurent Destailleur
e4b91ceb38 Add ar_EG 2017-11-19 20:33:06 +01:00
elarifr
c7129cdd71 quadra format date is wrong
need amount in cent without decimal symbol
need to remove accent as it give two ascii and break import
2017-11-19 19:42:16 +01:00
Laurent Destailleur
4ad0d5df43 Fix scrutinizer issues 2017-11-19 16:55:28 +01:00
Laurent Destailleur
248a359ac9 Fix phpcs 2017-11-19 16:30:05 +01:00
Laurent Destailleur
304819a726 Work on module builder 2017-11-19 16:26:39 +01:00
Laurent Destailleur
4938a0ba2a Add param forcenowrap on tooltip function 2017-11-19 12:41:37 +01:00
Laurent Destailleur
47afe470eb Merge small js into lib_header.js.php
Move filemanager.tpl.php
CSS enhancement
2017-11-19 12:22:01 +01:00
Papoteur
dfffd7497e Correction of the previous commit.
Place the convertion into object at the good place.
2017-11-19 11:46:34 +01:00
Laurent Destailleur
9f5b73f4e2 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

Conflicts:
	htdocs/core/actions_linkedfiles.inc.php
	htdocs/core/ajax/ajaxdirpreview.php
	htdocs/website/index.php
2017-11-18 22:19:15 +01:00
Laurent Destailleur
9b1470dab5 Work on generic filemanager component 2017-11-18 22:13:19 +01:00
Papoteur
f3f182b5bc [proposals]Allow lines to be added from REST API
Prevously, only void lines was added. Need to convert array lines to object in this case.
2017-11-18 16:21:54 +01:00
Laurent Destailleur
7288c18574 Work on generic filemanager component 2017-11-18 15:41:30 +01:00
Laurent Destailleur
90684750c1 CSS 2017-11-18 13:09:12 +01:00
atm-ph
fbc761cbac Fix rename TContactId into socpeopleassigned 2017-11-18 12:36:03 +01:00
Laurent Destailleur
bcaccb1829 Add layout into link of sub resources to solve undesired cache effect 2017-11-18 12:35:25 +01:00
atm-ph
15a8f2037b Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new_event_with_multi_contact 2017-11-18 11:54:21 +01:00
Laurent Destailleur
f284cd6c0f Fix phpcs 2017-11-18 02:15:56 +01:00
Laurent Destailleur
14946a0dfa Fix sort on status 2017-11-18 02:14:04 +01:00
Laurent Destailleur
a00353f332 Fix link to create invoice from template on list 2017-11-18 02:07:52 +01:00
Laurent Destailleur
56036d3024 Fix css 2017-11-18 02:03:10 +01:00
Laurent Destailleur
fc1441086c Fix status in template invoice 2017-11-18 02:01:04 +01:00
Laurent Destailleur
80bdb45be8 Look and feel v6 - Show status of thirdparty in dol_banner 2017-11-18 01:48:16 +01:00
Laurent Destailleur
7ddf1669ef Look and feel v6 - Show status of thirdparty in dol_banner 2017-11-18 01:34:20 +01:00
Laurent Destailleur
742bf29c65 Look and feel v6 - Show status of thirdparty in dol_banner 2017-11-18 01:29:42 +01:00
Laurent Destailleur
03cc685037 NEW Add a status enabled/disabled on recurring invoices 2017-11-18 00:54:23 +01:00
Laurent Destailleur
cf0d67d71c Generation of pdf become default value 2017-11-17 23:57:32 +01:00
Laurent Destailleur
2caeafc03b NEW Compatibility with PHP 7.2 2017-11-17 18:32:37 +01:00
Laurent Destailleur
bbf755f0b1 Fix for PHP7.2 2017-11-17 18:20:24 +01:00
Laurent Destailleur
b07895a26a Fix for php7.2 2017-11-17 18:04:55 +01:00
Laurent Destailleur
ede1f3fdfc PHP7.2 2017-11-17 17:53:20 +01:00
Laurent Destailleur
5d8674a9f4 Fix php7.2 2017-11-17 17:35:29 +01:00
Laurent Destailleur
9a70f6eed6 Fix for php 7.2 2017-11-17 17:29:21 +01:00
Laurent Destailleur
2d23d71489 Add php uniu version 2017-11-17 17:27:02 +01:00
Laurent Destailleur
7349b5d793 Fix php 7.2 2017-11-17 17:23:56 +01:00
Laurent Destailleur
0b349bef60 Test php 7.2 2017-11-17 17:15:23 +01:00
Laurent Destailleur
87bfe3292c Add php 7.2 2017-11-17 17:13:30 +01:00
Laurent Destailleur
e7121cda81 Disable some test with php 7.2 2017-11-17 17:11:35 +01:00
Laurent Destailleur
0be11e5e45 Fix phpunit 2017-11-17 16:06:55 +01:00
Laurent Destailleur
2705030006 Code comment 2017-11-17 15:34:15 +01:00
Laurent Destailleur
2cb190fc5c Fix return code 2017-11-17 15:27:59 +01:00
Laurent Destailleur
776f999b71 Merge branch 'develop' into develop_update_tablednd 2017-11-17 15:10:09 +01:00
Laurent Destailleur
77a0762fc1 Fix comment 2017-11-17 15:07:32 +01:00
Laurent Destailleur
2f6dfc2387 Merge pull request #7800 from atm-maxime/new_deposit_convert_unpaid
NEW deposits can be converted even if unpaid
2017-11-17 15:05:33 +01:00
Laurent Destailleur
ead629708c Look and feel v6 2017-11-17 14:57:14 +01:00
Laurent Destailleur
405275693f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/product/stock/replenishorders.php
	htdocs/projet/activity/perday.php
2017-11-17 14:20:08 +01:00
Laurent Destailleur
25a2e6f577 FIX #7824 2017-11-17 13:56:41 +01:00
Laurent Destailleur
97d38f32ad Merge pull request #7822 from atm-maxime/new_contract_replicate_extraf
New extrafields replicated on contract creation
2017-11-17 13:20:10 +01:00
Laurent Destailleur
68f477eaf7 Merge pull request #7818 from dolibarr95/patch-29
Fix : syntax error in dol_print_graph()
2017-11-17 13:18:11 +01:00
Laurent Destailleur
7946f4a612 Merge pull request #7817 from grandoc/new_branch_15_11_17
better handle of errors
2017-11-17 13:09:35 +01:00
Laurent Destailleur
2077f7ad96 Update expensereport.class.php 2017-11-17 13:09:03 +01:00
Laurent Destailleur
acc2fcbddd Update expensereport.class.php 2017-11-17 13:04:33 +01:00
Laurent Destailleur
d326641072 Merge pull request #7813 from hregis/develop_ldap
Fix: missing encrypt datafor llx_const
2017-11-17 13:03:22 +01:00
Laurent Destailleur
481b810fd2 Merge pull request #7810 from frederic34/patch-1
fix trigger when module not enabled
2017-11-17 12:59:59 +01:00
Laurent Destailleur
3b3b017226 Merge pull request #7809 from defrance/patch-102
Expensereport Normalize link and generate document
2017-11-17 12:58:30 +01:00
Laurent Destailleur
f33b5067ad Upgrade branch 3.0 of RESTLER (still 3.0.0 RC6)
This upgrade Swagger from 1.2 to 2.0
2017-11-17 12:55:27 +01:00
Laurent Destailleur
a5a9b9b23f Removed deprecated REST API
Prepare code to be compatible with swagger v2
2017-11-17 12:50:34 +01:00
Laurent Destailleur
92753273b9 Fix upload api for invoices and bad id for bank account 2017-11-17 11:44:52 +01:00
Laurent Destailleur
ba372bfc5c Fix typo 2017-11-16 23:11:49 +01:00
Laurent Destailleur
f708450276 Fix sql error 2017-11-16 22:57:25 +01:00
Laurent Destailleur
e06087888b NEW Show line "other filtered task" when using filter on timesheet. 2017-11-16 22:55:04 +01:00
Laurent Destailleur
f153d9c9ff Fix time spent counted twice 2017-11-16 19:41:31 +01:00
Laurent Destailleur
0d192df1fd Standardize interface 2017-11-16 18:33:56 +01:00
Laurent Destailleur
4f25bc5e3b NEW detection of edge browser 2017-11-16 14:44:55 +01:00
Frédéric FRANCE
0d79cc50b0 Merge remote-tracking branch 'upstream/develop' into patch-1 2017-11-16 13:41:24 +01:00
Laurent Destailleur
a7aa3ee438 Rename file 2017-11-16 12:21:21 +01:00
Laurent Destailleur
d7f512311b Doc 2017-11-16 12:19:31 +01:00
Laurent Destailleur
c527189088 Standardize page name 2017-11-16 12:18:25 +01:00
Laurent Destailleur
19d0283b63 Fix doxygen 2017-11-16 12:13:23 +01:00
Laurent Destailleur
4d198534a2 Clean CSS files 2017-11-16 12:09:34 +01:00
Laurent Destailleur
e6d02cebe7 Complete templates 2017-11-16 12:09:17 +01:00
Maxime Kohlhaas
1f5c2ec13f New extrafields replicated on contract creation 2017-11-15 21:20:30 +01:00
Laurent Destailleur
612dfb91ff Add more img templates for medias dir 2017-11-15 21:01:05 +01:00
Laurent Destailleur
d4d26eac9b More templates into medias directory 2017-11-15 20:41:04 +01:00
Laurent Destailleur
5c3d8acfbb Work on website 2017-11-15 19:47:07 +01:00
Laurent Destailleur
e760568a78 Test prerequisite in DLL before unzip files 2017-11-15 13:21:56 +01:00
Laurent Destailleur
07c0b5d616 Code comment 2017-11-15 13:15:08 +01:00
Neil Orley
d97cf63a16 NEW Classify the order as invoiced in the REST API
Classify the order as invoiced
FIX variable name
2017-11-15 12:14:28 +01:00
Laurent Destailleur
f68b2bdeca Use the confirmation when deleting from mass action everywhere. 2017-11-15 11:39:11 +01:00
Laurent Destailleur
33910b9cc9 Add the trackid for emails sent from leave request card. 2017-11-15 11:29:22 +01:00
dolibarr95
c6c1552c01 syntax error
bad syntax when add an url in dol_print_graph()
2017-11-15 11:11:45 +01:00
Philippe GRAND
5615416d1a better handle of errors 2017-11-15 11:09:18 +01:00
Neil Orley
42d1072dee NEW Tag the order as validated (opened) in the REST API
Tag the order as validated (opened)
2017-11-15 10:55:39 +01:00
Neil Orley
8e869688f5 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-11-15 10:42:00 +01:00
Laurent Destailleur
f37320590d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-15 10:40:53 +01:00
Laurent Destailleur
c85acbfc11 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/comm/propal/class/propal.class.php
	htdocs/compta/facture/fiche-rec.php
	htdocs/core/class/commonobject.class.php
	htdocs/core/modules/import/import_xlsx.modules.php
	htdocs/install/repair.php
2017-11-14 19:47:33 +01:00
Laurent Destailleur
366ade4030 Code comment 2017-11-14 19:42:34 +01:00
Laurent Destailleur
501f5b8292 Merge duplicate translation key 2017-11-14 18:26:39 +01:00
Laurent Destailleur
451d3ed8ed NEW Add API to activate/unactivate a contract 2017-11-14 17:51:04 +01:00
Regis Houssin
a4b96f00df Fix: missing encrypt datafor llx_const 2017-11-14 16:00:34 +01:00
Neil Orley
9b2611933d NEW Create an invoice using an existing order
Create an invoice using an existing order using the REST API
2017-11-14 15:49:09 +01:00
Laurent Destailleur
e37252d83a Fix div not closed 2017-11-14 15:17:10 +01:00
Laurent Destailleur
a50589c3c9 NEW Better behaviour when using a text browser 2017-11-14 15:10:46 +01:00
Neil Orley
b334428d55 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-11-14 14:44:12 +01:00
Neil Orley
e513ed09f6 Change the way pa_ht is calculated 2017-11-14 14:43:50 +01:00
Frédéric FRANCE
4dca97401d Update llx_actioncomm.sql 2017-11-14 13:18:31 +01:00
Laurent Destailleur
0e2f64af72 CSS 2017-11-14 12:18:02 +01:00
Laurent Destailleur
fa92c53ff6 Fix pb when showing dictionaries 2017-11-14 11:13:24 +01:00
Frédéric FRANCE
96031b0787 Update listactions.php 2017-11-14 11:05:58 +01:00
Frédéric FRANCE
7a76a3f497 fix trigger when module not enabled 2017-11-14 10:20:43 +01:00
BENKE Charlene
0553e331fe Update card.php
Normalize link and generate document
2017-11-14 08:48:41 +01:00
Laurent Destailleur
11cb9c0d81 Code simpler 2017-11-14 01:57:50 +01:00
Laurent Destailleur
d0d1d646fd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-14 01:35:16 +01:00
Laurent Destailleur
49ca901475 Merge pull request #7803 from atm-alexis/NEW_burger_menu_list_action
NEW burger menu and hooks on list action
2017-11-14 01:35:03 +01:00
Laurent Destailleur
3dc06977af Update listactions.php 2017-11-14 01:33:44 +01:00
Laurent Destailleur
59d9ab731e Add param $idwarehouse to settodraft 2017-11-14 01:29:28 +01:00
Laurent Destailleur
a12186a0b8 Use HTTP response code 304 instead of 500 when nothing is done 2017-11-14 01:26:02 +01:00
Laurent Destailleur
765a2097bc Merge pull request #7804 from Oeris/develop-api
NEW Update in the order REST API
2017-11-14 01:24:18 +01:00
Laurent Destailleur
4212000caf Update api_orders.class.php 2017-11-14 01:21:06 +01:00
Laurent Destailleur
bf05a0b8e0 Update api_orders.class.php 2017-11-14 01:19:04 +01:00
Laurent Destailleur
010e542fe4 CSS 2017-11-14 01:15:02 +01:00
Laurent Destailleur
31e152274c NEW Add 2 new automatic classification in workflow module 2017-11-14 01:00:57 +01:00
Laurent Destailleur
2d78136781 Standardize field length 2017-11-13 18:04:14 +01:00
Laurent Destailleur
53bfbcf5db NEW Ad performances indexes on calendar events 2017-11-13 17:05:07 +01:00
Neil Orley
d2a67e152b Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-11-13 14:39:09 +01:00
Laurent Destailleur
97c9549087 Fix ref supplier must be output if it exists, even for free products 2017-11-13 11:30:41 +01:00
Laurent Destailleur
d59ad412a4 Clean code 2017-11-13 11:01:09 +01:00
Laurent Destailleur
40024c4264 Fix doxygen 2017-11-13 10:39:22 +01:00
alexis Algoud
19a2c2fe06 Merge branch 'NEW_burger_menu_list_action' of github.com:atm-alexis/dolibarr into develop 2017-11-13 10:05:29 +01:00
Laurent Destailleur
9a8423ba5e Start to show work on repeat events 2017-11-13 02:46:13 +01:00
Laurent Destailleur
f33182acc5 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-12 20:49:53 +01:00
Laurent Destailleur
53a523ba9d Module builder 2017-11-12 20:45:06 +01:00
Laurent Destailleur
fdcbf082fd Fix css 2017-11-12 19:39:02 +01:00
Laurent Destailleur
bf121f9b3c Work on saving supplier_ref into database lines 2017-11-12 19:29:03 +01:00
Laurent Destailleur
955ed7dbbf NEW Show the supplier ref into supplier cards 2017-11-12 15:30:21 +01:00
Laurent Destailleur
2668b80599 Standardize code 2017-11-12 14:21:34 +01:00
Laurent Destailleur
15fc8ce33b Fix responsive on agenda setup page 2017-11-12 14:02:27 +01:00
Laurent Destailleur
186c8cdbf0 Fix selection of contact into creation of event 2017-11-12 13:40:05 +01:00
Laurent Destailleur
836f6bf3c9 Fix search filter when using extrafields 'links' 2017-11-12 12:39:23 +01:00
Alexis Algoud
7922fd0281 NEW add burger menu to list action comm 2017-11-11 18:41:35 +01:00
Laurent Destailleur
3b4cbf54d7 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-11 18:23:08 +01:00
Laurent Destailleur
a4632ea2c9 Merge pull request #7799 from hregis/develop_ldap
Fix: Avoid ldap error
2017-11-11 18:00:21 +01:00
Laurent Destailleur
0cd8aa8a49 Merge pull request #7798 from hregis/develop_extrafields
Fix: missing status 3 (only on form)
2017-11-11 17:59:33 +01:00
Laurent Destailleur
b5d63de708 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-11 17:49:51 +01:00
Laurent Destailleur
7c4cbdc229 Merge pull request #7797 from hregis/develop_bug
Fix: remove var_dump
2017-11-11 17:49:33 +01:00
Laurent Destailleur
7e1e710d28 Merge pull request #7796 from IonAgorria/fix-price-dynamic
Fix: price dynamic bugs
2017-11-11 17:49:00 +01:00
Laurent Destailleur
cba3a3846f Merge pull request #7790 from frederic34/facrecmodelpdf
NEW generate also document when invoice is build from recurring template
2017-11-11 17:42:26 +01:00
Laurent Destailleur
34c87407f1 Merge pull request #7789 from Oeris/develop-api
NEW Get the list of delivery times
2017-11-11 17:38:54 +01:00
Laurent Destailleur
cb6bf91044 Merge pull request #7787 from libersoft/feature/correct-italian-address-format
NEW Support Italian addresses format. Fixes #7785
2017-11-11 17:38:29 +01:00
Laurent Destailleur
2fe831db63 Merge pull request #7779 from atm-maxime/new_dict_filter_country
New dictionnaries are now pre-filtered on company country
2017-11-11 17:30:26 +01:00
Laurent Destailleur
6608dd72bd Merge pull request #7776 from frederic34/exportadmin
correct merge
2017-11-11 17:23:42 +01:00
Laurent Destailleur
b60870097b Standardize code 2017-11-11 17:21:11 +01:00
Laurent Destailleur
75e5d80eb6 Better help on mass invoicing from orders 2017-11-11 17:09:15 +01:00
Laurent Destailleur
d1860b87f8 NEW Add a confirmation for all mass action 'delete' 2017-11-11 16:34:11 +01:00
Laurent Destailleur
01a41237bf CSS 2017-11-11 14:20:08 +01:00
Maxime Kohlhaas
60fcddb9e4 NEW deposits can be converted even if unpaid 2017-11-11 12:07:55 +01:00
Laurent Destailleur
d938a56282 Clean code 2017-11-11 01:10:17 +01:00
Laurent Destailleur
bf0017ffaf Fix column 2017-11-11 00:30:16 +01:00
Laurent Destailleur
b8cbb84e7c Clean code 2017-11-11 00:28:00 +01:00
Laurent Destailleur
debc0480dd CSS 2017-11-10 20:20:59 +01:00
Laurent Destailleur
a029b16795 css 2017-11-10 18:27:03 +01:00
Laurent Destailleur
cb03b2f307 NEW Can sort joined files on thirdparty and user card. 2017-11-10 18:14:29 +01:00
Regis Houssin
56829656ba Fix: Avoid ldap error 2017-11-10 17:57:11 +01:00
Regis Houssin
3ffe1b6725 Fix: missing status 3 (only on form) 2017-11-10 16:51:37 +01:00
Neil Orley
4dfb0a8f1b NEW add the ability to regenerate an pdf for the order module
add the ability to regenerate an pdf for the order module
2017-11-10 16:42:06 +01:00
Neil Orley
c68f717071 NEW Update availability
Add the ability to update availability while updating an invoice using the REST API
2017-11-10 16:22:20 +01:00
Regis Houssin
dd93a1793a Fix: remove var_dump 2017-11-10 16:12:17 +01:00
Neil Orley
182fe4a90f Change HTTP response code when nothing modified 2017-11-10 15:48:43 +01:00
Neil Orley
73fe991aed NEW Return the order object when validate
Return the order object when the order is validated using the REST API
2017-11-10 15:46:53 +01:00
Laurent Destailleur
beacf4225f Work on filemanager 2017-11-10 15:44:43 +01:00
Neil Orley
4e9dae5129 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-11-10 15:44:31 +01:00
Laurent Destailleur
c2d7b88bdd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-10 13:51:59 +01:00
Laurent Destailleur
ab78007a54 Work on filemanager generic component 2017-11-10 13:45:38 +01:00
Ion
cb463d186a Error when fetching empty expression 2017-11-10 12:32:54 +01:00
Ion
e95ee4b878 Fix old parseProductSupplier call 2017-11-10 12:32:54 +01:00
Ion
fdf260a1da Use __METHOD__ on dynamic prices syslog 2017-11-10 12:32:54 +01:00
Ion
f642289160 Add missing arg in supplier min price 2017-11-10 12:32:49 +01:00
Laurent Destailleur
11cc82e6d2 Update doc 2017-11-10 10:15:50 +01:00
Frédéric FRANCE
5621e85c00 comment 2017-11-10 00:26:01 +01:00
Frédéric FRANCE
6f647f8a40 generate doc on cron jobs 2017-11-09 23:39:28 +01:00
Laurent Destailleur
788d22d62d Can sort on link in bookmark page 2017-11-09 18:54:33 +01:00
Laurent Destailleur
9d3cf8f217 Fix can use tooltip with popup even for column titles 2017-11-09 18:50:15 +01:00
Laurent Destailleur
f6a0603fb0 Clean code/constant 2017-11-09 18:16:15 +01:00
Ion Agorria
aa0b811f73 Undefined variable detection in price parser 2017-11-09 17:12:55 +01:00
Ion
e528a82051 Remove price dynamic internal var 2017-11-09 17:12:55 +01:00
Laurent Destailleur
a2daef3450 Update doc 2017-11-09 16:13:39 +01:00
Laurent Destailleur
9b07f33649 Clear code 2017-11-09 09:50:55 +01:00
Laurent Destailleur
d18f65a6e2 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

Conflicts:
	htdocs/core/lib/functions.lib.php
2017-11-09 01:25:41 +01:00
Laurent Destailleur
ad71a22994 Code comment 2017-11-09 01:21:02 +01:00
Laurent Destailleur
c8a551e7de Reorganize javascript at end of page. 2017-11-09 01:00:43 +01:00
Neil Orley
e025167747 Modify getAvailability comments 2017-11-08 17:17:25 +01:00
Neil Orley
ac64ada264 NEW Get the list of delivery times
Get the list of delivery times using the REST API
2017-11-08 17:15:28 +01:00
Valerio Baldisserotto
15a501467e FR: Support Italian address format. Fixes #7785 2017-11-08 11:43:52 +01:00
Laurent Destailleur
864e747f51 CSS 2017-11-07 19:46:28 +01:00
Laurent Destailleur
9f2e9ce6ef Shorter translation 2017-11-07 19:38:31 +01:00
fappels
b38265bc15 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop_update_tablednd
fix  Conflicts in ChangeLog
2017-11-07 16:34:21 +01:00
fappels
14bc066454 Update for new tablednd compatibility 2017-11-07 16:25:57 +01:00
fappels
6ef72a033b Update tablednd jquery plugin to latest git master 2017-11-07 16:15:59 +01:00
Laurent Destailleur
f8a44431b5 Fix visibility of extrafields 2017-11-07 13:41:59 +01:00
Laurent Destailleur
14a43ba4d2 FIX sort on a date that is result of a MIN with mysql 2017-11-07 13:33:24 +01:00
Laurent Destailleur
bc79aced6c Fix extrafields with column perms not filled are not visible 2017-11-07 12:33:13 +01:00
Maxime Kohlhaas
82ea46c740 New dictionnaries are now pre-filtered on company country 2017-11-07 10:49:04 +01:00
Frédéric FRANCE
45afbae49c some change 2017-11-07 10:47:58 +01:00
Laurent Destailleur
2ab943f85a Fix size of image by using fa picto 2017-11-07 00:18:55 +01:00
Frédéric FRANCE
d39804e7b5 Merge remote-tracking branch 'upstream/develop' into exportadmin 2017-11-06 21:41:09 +01:00
Laurent Destailleur
e7abc92f97 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/bank/transfer.php
	htdocs/core/lib/functions.lib.php
2017-11-06 21:37:19 +01:00
Laurent Destailleur
9cc923f317 Fix for ch accounting account. 2017-11-06 21:12:29 +01:00
Laurent Destailleur
ea42fe28d2 Test ok on travis 2017-11-06 20:39:24 +01:00
Frédéric FRANCE
7f44faf0be correct merge 2017-11-06 20:29:57 +01:00
Laurent Destailleur
d90e3e88c2 NEW Add method executeCLI and a phpunit 2017-11-06 20:24:12 +01:00
Laurent Destailleur
1f1809dd3e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-06 19:29:14 +01:00
Laurent Destailleur
bc093ef969 FIX #7775 Order of deletion in delete method (trigger first) 2017-11-06 19:27:10 +01:00
Laurent Destailleur
40cb301915 Merge pull request #7773 from frederic34/accountingexport
NEW Can setup csv accounting export from admin config
2017-11-06 19:06:06 +01:00
Laurent Destailleur
45fc5701ae NEW Add a profile to import product translations 2017-11-06 12:59:58 +01:00
Laurent Destailleur
8429de031f Code comment 2017-11-06 11:32:02 +01:00
Laurent Destailleur
fe103f0492 Remove too verbose log 2017-11-06 11:14:16 +01:00
Laurent Destailleur
ea5dd3eb3d NEW Add REST API for supplier proposals 2017-11-06 11:06:31 +01:00
Laurent Destailleur
534c50f46e Move api that are admin features into a dedicated /admin api 2017-11-06 09:55:31 +01:00
Laurent Destailleur
34bd785785 Prepre 7.0 (not stable code hidden) 2017-11-06 09:30:30 +01:00
Laurent Destailleur
fa999dfa65 Merge pull request #7742 from aspangaro/7.0-accountancyproductvariant
NEW Accountancy Add variant on sell account for intracommunity sales & export sales
2017-11-06 09:25:14 +01:00
Frédéric FRANCE
9a052084c7 Merge branch 'develop' into accountingexport 2017-11-05 21:13:17 +01:00
Frédéric FRANCE
ea910adeb2 Merge branch 'develop' into accountingexport 2017-11-05 21:11:41 +01:00
Laurent Destailleur
7139cbb490 Fix regression 2017-11-05 19:00:43 +01:00
Laurent Destailleur
a329f7dc75 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	build/exe/doliwamp/doliwamp.iss
	htdocs/accountancy/customer/list.php
	htdocs/accountancy/supplier/list.php
2017-11-05 18:50:14 +01:00
Laurent Destailleur
0f298fdd68 Merge pull request #7772 from MagicFab/develop
FIX 7751 Improved missing Windows component message
2017-11-05 18:43:07 +01:00
Laurent Destailleur
d4d370d8c4 Merge pull request #7769 from aspangaro/7.0-7
Small code improve on bookkeeping card movement
2017-11-05 18:40:49 +01:00
Laurent Destailleur
8a8842c8f0 Merge pull request #7768 from hregis/develop_bug
Fix: move transversal mode management in multicompany module
2017-11-05 18:39:26 +01:00
Laurent Destailleur
d0e354f729 Merge pull request #7766 from aspangaro/7.0-6
FIX Missing fields for the table bookeeping_tmp on migration
2017-11-05 18:38:01 +01:00
Laurent Destailleur
fd8f65341b Merge pull request #7765 from bomuux/patch-3
Fix: vat reports now include expense reports vat
2017-11-05 18:37:25 +01:00
Laurent Destailleur
3bca988968 Merge pull request #7764 from grandoc/new_branch_03_11_17
fix : Warning: A non-numeric value encountered
2017-11-05 18:35:35 +01:00
Laurent Destailleur
eb66a890cb Merge pull request #7763 from grandoc/develop
fix : Warning: A non-numeric value encountered
2017-11-05 18:35:14 +01:00
Laurent Destailleur
1e939ec90c Merge pull request #7761 from hregis/develop_member
Fix: broken feature (add more attr and css class)
2017-11-05 18:33:43 +01:00
Laurent Destailleur
aa7e9e156a Merge pull request #7762 from atm-maxime/new_socmerge_cat
NEW merge categories while merging thirdparties
2017-11-05 18:30:53 +01:00
Laurent Destailleur
21a0f11395 Merge pull request #7760 from Oeris/develop-api
NEW Adds the payment reference to the return of the function getListOfPayements
2017-11-05 18:29:59 +01:00
Laurent Destailleur
202d36d582 Work on modulebuilder 2017-11-05 18:15:59 +01:00
Fabian Rodriguez
504219cedc Improved missing Windows component message, see #7751 2017-11-05 10:46:43 -05:00
Frédéric FRANCE
bb252846e3 accounting export admin config 2017-11-05 11:48:41 +01:00
Alexandre SPANGARO
7d524f3364 Small code improve on bookkeeping card movement 2017-11-05 08:45:05 +01:00
Laurent Destailleur
e4ba6cfa10 Debu website module 2017-11-05 03:57:26 +01:00
Laurent Destailleur
c78c06776b Fix bug reported by scrutinizer 2017-11-05 03:39:27 +01:00
Laurent Destailleur
91950ccbc7 Fix regression in getRandomPassword 2017-11-05 03:03:17 +01:00
Laurent Destailleur
a066bbcd89 Debug filemanager 2017-11-05 02:50:02 +01:00
Laurent Destailleur
ef6fcbbc67 Clean code to have the filemanager beeing a reusable component 2017-11-05 02:04:05 +01:00
Laurent Destailleur
05ee3e3825 Fix show message "files uploaded" only once even when n files. 2017-11-05 01:06:34 +01:00
Laurent Destailleur
51c705a84b NEW Reduce size of HTML page by removing duplicate tooltips 2017-11-05 01:00:15 +01:00
Laurent Destailleur
8aec77fd8b Fix restore the blockui on refresh 2017-11-05 00:48:19 +01:00
Laurent Destailleur
d8ef24ff0b Clean code of the filemanager 2017-11-05 00:37:21 +01:00
Laurent Destailleur
800fe9e1d8 Add warning test to avoid sql errors 2017-11-04 20:03:08 +01:00
Laurent Destailleur
6802f1f5b8 Debug module builder 2017-11-04 17:20:08 +01:00
Laurent Destailleur
bac6a434f4 Add link to make a direct download on card 2017-11-04 17:11:58 +01:00
Laurent Destailleur
403067812d Modulebuilder 2017-11-04 16:42:32 +01:00
Regis Houssin
ef44dfc472 Fix: move transversal mode management in multicompany module 2017-11-04 15:40:35 +01:00
Laurent Destailleur
86eb028beb Repair datec empty for products 2017-11-04 15:25:52 +01:00
Laurent Destailleur
141bef0b8a Fix translation and css 2017-11-04 15:21:35 +01:00
Alexandre SPANGARO
26cb4bc6f6 FIX Missing fields for the table bookeeping_tmp on migration 2017-11-04 08:10:05 +01:00
Alexandre SPANGARO
7e3103356b Merge remote-tracking branch 'uptream/develop' into 7.0-accountancyproductvariant
# Conflicts:
#	htdocs/install/mysql/migration/6.0.0-7.0.0.sql
2017-11-04 07:14:28 +01:00
fappels
4cccf8602c Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-11-03 23:56:16 +01:00
bomuux
0a2d8a820b FIX: make vat reports work with expensereports
function tax_by_date : Fixed sql query for expense reports vat, now returning pad vat for expense report, previously returning nothing.
2017-11-03 21:06:56 +01:00
Laurent Destailleur
e78406e120 Debug cronjob 2017-11-03 20:04:18 +01:00
Philippe GRAND
acc69b1f80 fix : Warning: A non-numeric value encountered 2017-11-03 19:52:02 +01:00
Philippe GRAND
c31f852f67 fix : Warning: A non-numeric value encountered 2017-11-03 19:37:54 +01:00
Laurent Destailleur
f32f3ff17f Better default function to generate passwords 2017-11-03 18:02:17 +01:00
Laurent Destailleur
a72703d316 Fix deprecated code 2017-11-03 17:29:25 +01:00
Laurent Destailleur
048766bd24 Fix sql error 2017-11-03 17:24:14 +01:00
Laurent Destailleur
cd70e1506b Work on common core code 2017-11-03 17:20:08 +01:00
Laurent Destailleur
4ac8cb9168 Fix sql syntax 2017-11-03 16:31:33 +01:00
Laurent Destailleur
c479efa480 Fix encoding with select2 2017-11-03 16:29:23 +01:00
Laurent Destailleur
a346a1a5e9 Work on website module 2017-11-03 15:56:16 +01:00
Maxime Kohlhaas
73d3cc7ce3 New : merge categories while merging thirdparties 2017-11-03 15:23:18 +01:00
Regis Houssin
2d4717b745 Fix: broken feature (add more attr and css class) 2017-11-03 14:46:45 +01:00
Laurent Destailleur
458be3c814 Clean translation files 2017-11-03 14:38:00 +01:00
Laurent Destailleur
55386a3ae2 Work on website module 2017-11-03 13:52:03 +01:00
Laurent Destailleur
fa1fbe7db7 Work on websiteaccounts 2017-11-03 13:25:49 +01:00
Neil Orley
3ecccadb8b NEW Adds the payment reference to the return of the function getListOfPayements
Adds the payment reference to the return of the function getListOfPayements
2017-11-03 13:04:23 +01:00
Laurent Destailleur
ce3e586bd0 Fix doxygen 2017-11-03 11:44:31 +01:00
Laurent Destailleur
4381c35835 Standardize code 2017-11-03 11:42:40 +01:00
Laurent Destailleur
5f5c7a9126 NEW Show user id of web process in system info - web server 2017-11-03 11:42:24 +01:00
Alexandre SPANGARO
2d17e4094c Merge remote-tracking branch 'uptream/develop' into 7.0-accountancyproductvariant
# Conflicts:
#	htdocs/install/mysql/migration/6.0.0-7.0.0.sql
2017-11-03 06:18:27 +01:00
Laurent Destailleur
2a2c0aaa5f Clean and debug code to execute CLI commands 2017-11-02 20:17:27 +01:00
Laurent Destailleur
26b01792b2 Code comment 2017-11-02 17:58:46 +01:00
Laurent Destailleur
608f87d03b Set focus on first field to fill. 2017-11-02 16:14:24 +01:00
Laurent Destailleur
309e83a946 Remove the "add" in addpayment. Action in API is hosted by the method 2017-11-02 16:06:44 +01:00
Laurent Destailleur
36f7f32205 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-02 16:02:24 +01:00
Laurent Destailleur
d70f9e053e Remove the get in url. The GET is already in the method. 2017-11-02 16:01:13 +01:00
Laurent Destailleur
93ab4cadff Merge pull request #7753 from Oeris/develop-api
NEW Add REST API to add payment line to a specific invoice
2017-11-02 15:54:22 +01:00
Laurent Destailleur
952bea4026 Merge pull request #7746 from fappels/7.0_new_shipment_update
New to #7702 option to add and delete lot from line
2017-11-02 15:44:52 +01:00
Laurent Destailleur
bdb685ddc4 Merge branch 'develop' into 7.0_new_shipment_update 2017-11-02 15:44:38 +01:00
Laurent Destailleur
feb04b4a22 Merge branch 'develop' into 7.0_new_shipment_update 2017-11-02 15:43:31 +01:00
Laurent Destailleur
f5e1ca3178 Fix break on project 2017-11-02 15:33:04 +01:00
Laurent Destailleur
1b28c45e2c PERF Links in getNomUrl use only one tag a instead of 2. 2017-11-02 15:19:14 +01:00
Neil Orley
be36a79e45 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-11-02 15:03:16 +01:00
Neil Orley
5febdf7bae NEW Add payment line to a specific invoice using the REST API
Add payment line to a specific invoice using the REST API
2017-11-02 15:01:38 +01:00
Laurent Destailleur
1f33c251fa Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-11-02 14:17:08 +01:00
Laurent Destailleur
e39c73a916 Fix translation 2017-11-02 14:16:28 +01:00
Laurent Destailleur
4d02984ae0 Merge pull request #7749 from hregis/develop_member
Fix: move some check in multicompany module
2017-11-02 13:52:36 +01:00
Laurent Destailleur
15272f6555 Return error code 2017-11-02 13:47:53 +01:00
Laurent Destailleur
fd86c470a8 FIX #7651 #7748 #7542 2017-11-02 13:47:29 +01:00
Regis Houssin
19f1cd7787 Fix: move some check in multicompany module 2017-11-02 13:16:00 +01:00
Laurent Destailleur
38e620d656 Fix edit of incoterm from the shipments tab 2017-11-02 12:48:40 +01:00
Laurent Destailleur
cfacfab6cf NEW Show badge with nbr of shipment on shimpen tab of order
NEW Add button cancel on shipment creation
2017-11-02 12:38:36 +01:00
fappels
28604b4d82 New add delete lot
Add empty lot row for adding new lot
When lot qty 0, lot will be deleted from line.
2017-11-02 11:44:36 +01:00
Laurent Destailleur
cd8acf8f12 Fix CSS 2017-11-02 11:07:47 +01:00
Laurent Destailleur
5e657626c3 Merge pull request #7702 from fappels/7.0_new_shipment_update
NEW #5711 Add shipment line deleting and editing for draft shipments.
2017-11-02 11:00:45 +01:00
Laurent Destailleur
c226fc69d1 Update actioncomm.class.php 2017-11-02 10:45:27 +01:00
Laurent Destailleur
417642ba39 Standardize interface (search on date modification) 2017-11-02 10:33:04 +01:00
Laurent Destailleur
7efa780b82 Merge pull request #7743 from aspangaro/7.0-general_ledger
NEW General ledger : Add field date_creation and selected field
2017-11-02 10:14:21 +01:00
Laurent Destailleur
dbd85321b3 Merge pull request #7735 from grandoc/new_branc_30_10_17
Warning: trim() expects parameter 1 to be string, array given in /htt…
2017-11-02 09:58:57 +01:00
Laurent Destailleur
6ea558b639 Update functions.lib.php 2017-11-02 09:58:22 +01:00
Laurent Destailleur
d137cef843 Merge pull request #7707 from aspangaro/7.0-SPEC1
SPEC #7013 : use database type "double" to store monetary values
2017-11-02 09:54:34 +01:00
Laurent Destailleur
5df4912324 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	ChangeLog
2017-11-02 09:45:13 +01:00
Laurent Destailleur
e184cac2c5 FIX Search into language is ok for file into external modules two. 2017-11-01 19:58:46 +01:00
Laurent Destailleur
a98452ae36 Move translation 2017-11-01 10:52:42 +01:00
Laurent Destailleur
219364703f Sync transifex 2017-11-01 10:48:21 +01:00
Laurent Destailleur
f26d970d58 Remove option MAIN_HTML5_PLACEHOLDER (on by default now) 2017-11-01 10:17:24 +01:00
Alexandre SPANGARO
f9e801b4a7 Update works 2017-11-01 08:42:17 +01:00
Alexandre SPANGARO
7c0ff3a32f Merge remote-tracking branch 'uptream/develop' into 7.0-general_ledger 2017-11-01 07:58:20 +01:00
Alexandre SPANGARO
2a5382b24e Add language 2017-11-01 07:24:48 +01:00
Alexandre SPANGARO
8d3beef161 Add fields in product card 2017-11-01 07:19:36 +01:00
Laurent Destailleur
4220d02dd4 Debug module blocked log 2017-10-31 23:57:37 +01:00
Laurent Destailleur
9458c80c48 Work on reminders 2017-10-31 23:10:29 +01:00
Alexandre SPANGARO
cc26095467 Update database 2017-10-31 22:04:50 +01:00
Laurent Destailleur
1db68b2a32 Translation 2017-10-31 19:37:41 +01:00
Laurent Destailleur
2094ae1a57 NEW Add filter on event code on automatic filling setup page 2017-10-31 19:28:34 +01:00
fappels
3e58f7c609 Fix create line extra fields 2017-10-31 17:20:29 +01:00
fappels
3f5112ff48 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into 7.0_new_shipment_update 2017-10-31 16:49:54 +01:00
fappels
f7df9e1d1f Fix travis 2017-10-31 16:49:39 +01:00
Laurent Destailleur
d39a19e976 Replace on/off img tick with fa-font 2017-10-31 12:32:30 +01:00
Laurent Destailleur
bd94ec0f1d Use fontawesome for picto for on/off default. 2017-10-31 12:25:06 +01:00
Laurent Destailleur
29bb0b37ef Translation 2017-10-31 11:50:56 +01:00
Laurent Destailleur
068f5e32cb NEW Tooltip for substitutions variables on tooltips on admin pages 2017-10-31 11:17:44 +01:00
Laurent Destailleur
32303d30fa Fix search on special char in module list 2017-10-31 10:46:23 +01:00
Alexandre SPANGARO
a0d186bae6 Merge remote-tracking branch 'uptream/develop' into 7.0-SPEC1 2017-10-31 05:53:05 +01:00
Laurent Destailleur
b29f32171c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	ChangeLog
	htdocs/comm/action/class/actioncomm.class.php
	htdocs/contrat/card.php
	htdocs/core/lib/project.lib.php
	htdocs/filefunc.inc.php
2017-10-30 18:22:26 +01:00
Laurent Destailleur
b7c5844d35 Update template 2017-10-30 17:40:34 +01:00
Philippe GRAND
f904c46a10 Warning: trim() expects parameter 1 to be string, array given in /httpdocs/core/lib/functions.lib.php on line 520 2017-10-30 14:22:34 +01:00
fappels
08f931b73c Only show show lot from same src warehouse.
When shipping from multiple warehouse, only allow lot from same src
warehouse. (expeditiondet_batch is on to many from expeditiondet).
2017-10-30 12:39:06 +01:00
Laurent Destailleur
b74399abf6 Code comment 2017-10-30 02:56:40 +01:00
Laurent Destailleur
39506df4dd Add business_vat_id in stripe payment 2017-10-30 02:33:54 +01:00
Laurent Destailleur
b11727885e Translation 2017-10-30 01:44:18 +01:00
Laurent Destailleur
9edc8f6eb6 FIX Searching translation should not be case sensitive 2017-10-30 01:32:17 +01:00
Laurent Destailleur
bbe1c9c494 NEW Can download PDF document from the payment page 2017-10-30 00:45:47 +01:00
Laurent Destailleur
76b0e7ee5a NEW Add option PROPOSAL/ORDER/INVOICE_ALLOW_EXTERNAL_DOWNLOAD 2017-10-29 21:24:54 +01:00
fappels
a9ceb46f97 Add parameter to load all lot from lines of object in cache
If you want use the lot stock selector in mutiple lines you can add
lines array. If you don't give a product id or a lines array, no lot
numbers will be loaded.
2017-10-29 20:40:56 +01:00
Laurent Destailleur
0d09e1d223 Enhance purge 2017-10-29 20:12:02 +01:00
Laurent Destailleur
bb5bfabd7d Enhance the script purge-data.php to purge remote database 2017-10-29 20:08:09 +01:00
fappels
cd5c678534 Only update new lot number 2017-10-29 19:01:42 +01:00
Laurent Destailleur
64107b7625 Include module name in generated sql files 2017-10-29 18:53:08 +01:00
Laurent Destailleur
02cae88a8c Fix date output 2017-10-29 17:50:50 +01:00
Laurent Destailleur
33aa0f3160 Code comment 2017-10-29 17:49:24 +01:00
Laurent Destailleur
75bbcdf575 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-29 11:29:01 +01:00
Laurent Destailleur
d569218162 Fix 'separate' extrafields must be visible by default.
Sandardize name of list pages (must end with _list.php)
2017-10-29 11:23:20 +01:00
Alexandre SPANGARO
e7832e3c44 Correct PR 2017-10-29 07:16:04 +01:00
Alexandre SPANGARO
63707dbe10 Merge remote-tracking branch 'uptream/develop' into 7.0-SPEC1 2017-10-29 06:58:04 +01:00
Alexandre SPANGARO
16e4e8ada1 Fix SPEC1 2017-10-29 06:56:05 +01:00
Alexandre SPANGARO
7a719c6be6 NEW General ledger : Add field and selected field 2017-10-29 05:37:50 +01:00
Laurent Destailleur
da1afa80cf Merge pull request #7718 from Oeris/develop-api
FIX wrong paramters name in the usecreditnote method
2017-10-28 22:00:29 +02:00
Laurent Destailleur
46f95e14fa Fix select2 search 2017-10-28 17:34:46 +02:00
Laurent Destailleur
adc4db0f85 Standardize code 2017-10-28 16:55:25 +02:00
Laurent Destailleur
b9ca66943f Try to introduce param forcesandbox to test online payment easier 2017-10-28 16:32:19 +02:00
Laurent Destailleur
9676b83574 Google tag enabled also on mobile 2017-10-28 16:00:46 +02:00
Laurent Destailleur
00db7e16ec Clean code 2017-10-28 16:00:07 +02:00
Laurent Destailleur
9e382a7f1b Can disabled output of notify messages 2017-10-28 13:36:23 +02:00
Laurent Destailleur
1a49a2bb94 Clean css/code 2017-10-28 11:00:02 +02:00
Laurent Destailleur
9a5d532786 Fix website 2017-10-27 18:45:12 +02:00
Laurent Destailleur
013ab9405e Work on website module 2017-10-27 17:58:38 +02:00
Laurent Destailleur
815faf4c91 Fix css for website 2017-10-27 16:00:37 +02:00
Laurent Destailleur
01af1e3252 Work on website module 2017-10-27 15:42:48 +02:00
Laurent Destailleur
a40bebec40 Fix translation of module descriptions 2017-10-27 13:06:14 +02:00
Laurent Destailleur
dd6ccf5095 Fix template 2017-10-27 10:48:48 +02:00
Laurent Destailleur
1adfc02724 Fix hook not visible when using old syntax 2017-10-27 10:05:21 +02:00
Neil Orley
9a1c684870 FIX wrong paramters name in the usecreditnote method
Rename 'creditnoteid' with 'discountid' in the URI
Rename 'creditId' with 'discountid' in the method
2017-10-27 10:02:17 +02:00
Neil Orley
fbabacf19a Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-10-27 09:48:24 +02:00
Laurent Destailleur
e31223d7be Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-27 02:33:14 +02:00
Laurent Destailleur
5285f3ee15 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-27 02:12:55 +02:00
Laurent Destailleur
e4645cf2c5 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/blockedlog/class/blockedlog.class.php
	htdocs/contrat/card.php
	htdocs/societe/card.php
2017-10-27 02:12:35 +02:00
Laurent Destailleur
a00cf6b28b Merge pull request #7708 from Elimig/patch-3
Fix don't show title in tooltip
2017-10-27 01:55:14 +02:00
Laurent Destailleur
00b505a71c Fix sql syntax 2017-10-27 01:48:05 +02:00
Laurent Destailleur
44f441f07b Merge pull request #7706 from aspangaro/7.0-pcg6
NEW Add The Moroccan chart of accounts
2017-10-27 01:42:45 +02:00
Laurent Destailleur
1e03c8f085 Merge branch 'develop' into 7.0-pcg6 2017-10-27 01:42:38 +02:00
Laurent Destailleur
5ba64fe620 Merge branch 'develop' into 7.0-pcg6 2017-10-27 01:42:03 +02:00
Laurent Destailleur
ba9ed52bc0 Fix sql norm (string must be ') 2017-10-27 01:40:41 +02:00
Laurent Destailleur
54746a55b5 Merge pull request #7705 from aspangaro/7.0-pcg5
NEW Add The SYSCOHADA chart of accounts
2017-10-27 01:17:47 +02:00
Laurent Destailleur
ee1996ad37 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2017-10-27 01:16:51 +02:00
Laurent Destailleur
740c89365d Code comment 2017-10-27 00:42:44 +02:00
Laurent Destailleur
6a9837528e Merge pull request #7703 from Oeris/develop-api
FIX Data related to customer moved to thirparties api
2017-10-27 00:42:10 +02:00
Laurent Destailleur
a741a6bb3e Update api_thirdparties.class.php 2017-10-27 00:41:56 +02:00
Laurent Destailleur
f4a06aef3f Update api_invoices.class.php 2017-10-27 00:36:06 +02:00
Laurent Destailleur
9283aaf6aa Fix scrutinizer 2017-10-27 00:07:58 +02:00
Laurent Destailleur
90bd9f2f4f Fix trad 2017-10-26 20:57:23 +02:00
Laurent Destailleur
a1f862eba6 NEW Enhance framework so we can use html/icons into SELECT options. 2017-10-26 20:06:23 +02:00
Laurent Destailleur
0a1b381bc5 Tired with emails 2017-10-26 18:50:27 +02:00
Laurent Destailleur
315fce701b Fix migration pgsql 2017-10-26 18:46:44 +02:00
Laurent Destailleur
653f5fcbbf Remove warning 2017-10-26 18:40:12 +02:00
Laurent Destailleur
708666349f Minor fix 2017-10-26 18:35:32 +02:00
Laurent Destailleur
d1e7577eed Fix sql field can't be named 'offset' (reserved word). 2017-10-26 18:30:01 +02:00
Laurent Destailleur
8058712d47 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/accountancy/customer/index.php
	htdocs/contrat/class/contrat.class.php
	htdocs/product/list.php
2017-10-26 17:06:11 +02:00
Laurent Destailleur
6163a3d54d Code comment 2017-10-26 16:57:17 +02:00
Laurent Destailleur
ffee915498 Fix field not serial with pgsql 2017-10-26 15:10:52 +02:00
Laurent Destailleur
67e5d72bd0 Fix doxygen 2017-10-26 14:56:07 +02:00
Laurent Destailleur
89baa0b307 Work on website 2017-10-26 14:49:30 +02:00
Laurent Destailleur
8282c17803 Fix clone page of website 2017-10-26 14:16:59 +02:00
Laurent Destailleur
82b333e423 Fix migration to select2 4.0.5 2017-10-26 14:06:23 +02:00
Laurent Destailleur
5f5cbec1cf Debug module website 2017-10-26 13:09:11 +02:00
Laurent Destailleur
caa24e1a68 Fix width of tooltips 2017-10-26 12:34:53 +02:00
Laurent Destailleur
4f6304624a NEW Add api validate and close on contracts 2017-10-26 12:32:22 +02:00
Neil Orley
dcc5adf93b Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-10-26 11:07:50 +02:00
Laurent Destailleur
6d6c4bf088 Fix export web site 2017-10-26 10:43:47 +02:00
Laurent Destailleur
3accb9d658 Fix warning 2017-10-26 03:35:57 +02:00
Laurent Destailleur
e36cd21d5d Fix sql 2017-10-26 03:20:43 +02:00
Laurent Destailleur
e865f41b86 NEW Extrafields "link to object" now use a combo selection and getNomUrl 2017-10-26 02:55:43 +02:00
Laurent Destailleur
66d2c29fe1 Work on modulebuilder and website module 2017-10-26 01:02:13 +02:00
Laurent Destailleur
ff9a6ca01b Work on module builder 2017-10-25 22:23:54 +02:00
Laurent Destailleur
b64d60d381 Fix dos file 2017-10-25 22:06:24 +02:00
Laurent Destailleur
202712be94 Work on module builder 2017-10-25 22:02:07 +02:00
Neil Orley
da0a205a10 NEW Deduct an available credit to an existing invoice
Deduct an available credit to an existing invoice using the REST API
2017-10-25 17:09:37 +02:00
Neil Orley
3e53a2ecff FIX merging conflict 2017-10-25 14:52:33 +02:00
Neil Orley
ff760eb8d5 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-10-25 14:46:44 +02:00
Neil Orley
257acb6679 NEW Insert a discount in a specific invoice using the REST API
Add ability to insert a discount in a specific invoice.
2017-10-25 14:41:12 +02:00
Neil Orley
0f98572c2b FIX Filter didn't work for credit note
Modify the SQL request to be able to filter on credit note
2017-10-25 14:04:36 +02:00
Elimig
9ad2073b7e Update list.php
Fixed bug of non-uploading title in tooltip
2017-10-25 12:03:22 +02:00
Laurent Destailleur
bb996019c2 NEW Support visibility on extrafields 2017-10-25 11:42:14 +02:00
Neil Orley
cb71e921fd NEW Get credit notes or deposits of a thirdparty
Ability to filter : available or applied
Returns a list of credit notes or deposits
2017-10-25 11:39:23 +02:00
Neil Orley
ec6a19a123 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api-down-payments 2017-10-25 09:57:53 +02:00
Alexandre SPANGARO
ecbc393c96 FIX SPEC #7013 : use database type "numeric" to store monetary values 2017-10-24 21:14:31 +02:00
Laurent Destailleur
f381361c8b Work on modulebuilder 2017-10-24 19:57:36 +02:00
Alexandre SPANGARO
735f296b7f Update pcg_type 2017-10-24 19:31:24 +02:00
Alexandre SPANGARO
22d2598ea1 NEW Add The Moroccan chart of accounts 2017-10-24 19:23:09 +02:00
Alexandre SPANGARO
17e8b6c84c NEW Add The SYSCOHADA chart of accounts 2017-10-24 19:12:42 +02:00
Laurent Destailleur
f24204c79a Error management after extrafield update 2017-10-24 19:04:40 +02:00
Laurent Destailleur
0b120dd1a9 Prepare code to remove hooks on extrafield update 2017-10-24 18:45:34 +02:00
Laurent Destailleur
9f0f5eb5e8 Fix translation of extrafields type 2017-10-24 18:05:43 +02:00
Laurent Destailleur
72441de1ec Fix length of fk_mainmenu and fk_leftmenu 2017-10-24 17:35:53 +02:00
Laurent Destailleur
d2f723045c Work on website and modulebuilder 2017-10-24 17:30:05 +02:00
fappels
6bf57962dc Fix travis 2017-10-24 15:48:22 +02:00
fappels
eaf3958be7 Revert "Add entrepot id to expedition batch fetchAll"
This reverts commit 5342785a49.
2017-10-24 15:45:49 +02:00
Laurent Destailleur
9dc4933ba0 Debug 2017-10-24 15:32:01 +02:00
Laurent Destailleur
3f4c2b54d7 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-24 15:22:59 +02:00
Laurent Destailleur
7b661685cc Debug modBlockedLog module 2017-10-24 15:22:46 +02:00
Neil Orley
b4c484cf0b NEW Get available assets of an invoice using the REST API
Returns a list of paid down-payments, available avoirs, etc. with the payments detail
2017-10-24 14:29:28 +02:00
Neil Orley
327f31611c FIX Data related to customer moved to thirparties api
Related to commit : b6825703b4
2017-10-24 14:21:22 +02:00
Laurent Destailleur
576db84445 Merge pull request #7701 from mistraloz/patch-2
Feature Request : Name of invoice when they are Draft (instead of "Pr…
2017-10-24 13:06:33 +02:00
Laurent Destailleur
78133244f8 Merge pull request #7699 from dolibarr95/patch-27
FIX: wrong price clone Suppliers orders
2017-10-24 13:02:03 +02:00
Laurent Destailleur
169d454811 Update fournisseur.commande.class.php 2017-10-24 13:01:48 +02:00
Laurent Destailleur
5ee666e894 Merge pull request #7698 from aspangaro/7.0-pcg4
NEW Add The Tunisia chart of accounts
2017-10-24 13:00:05 +02:00
Laurent Destailleur
e58a52c52b Merge branch 'develop' into 7.0-pcg4 2017-10-24 12:59:59 +02:00
Laurent Destailleur
9b5ae12477 Merge pull request #7696 from aspangaro/7.0-pcg3
NEW Add The Luxembourg chart of accounts
2017-10-24 12:58:19 +02:00
Laurent Destailleur
deeebac540 Merge branch 'develop' into 7.0-pcg3 2017-10-24 12:58:09 +02:00
Laurent Destailleur
110f2fc5da Merge pull request #7695 from aspangaro/7.0-pcg2
NEW Add The Switzerland chart of accounts
2017-10-24 12:54:48 +02:00
Laurent Destailleur
e2060e7541 Merge pull request #7694 from aspangaro/7.0-pcg1
NEW Add The developed French chart of accounts 2014
2017-10-24 12:52:22 +02:00
Laurent Destailleur
2187cfeee9 Merge pull request #7693 from aspangaro/7.0-label_operation_on_general_ledger
Update balance export
2017-10-24 12:51:14 +02:00
Laurent Destailleur
e9d851ef34 Merge pull request #7691 from Oeris/develop-api
NEW Retrieves available discounts and payments details from a specific invoice
2017-10-24 12:49:55 +02:00
Laurent Destailleur
8592e1b1e8 Update api_invoices.class.php 2017-10-24 12:49:37 +02:00
Laurent Destailleur
b6825703b4 Update api_invoices.class.php 2017-10-24 12:47:15 +02:00
Laurent Destailleur
8e17bfa4cb Merge pull request #7689 from Elimig/patch-2
FIX project pie chart status selection
2017-10-24 12:42:32 +02:00
Laurent Destailleur
2a1280c715 Merge pull request #7661 from atm-ph/fix_6_0_no_hook_recap_compta
NEW External module can interact with the customer summary page
2017-10-24 12:39:31 +02:00
Neil Orley
c34a6db13a Rename assets with avoirs 2017-10-24 11:53:39 +02:00
Neil Orley
41104de7ce NEW Get available assets of an invoice using the REST API
Returns a list of paid down-payments, available avoirs, etc. with the payments detail
2017-10-24 11:47:25 +02:00
fappels
914b8c1c71 cleanup 2017-10-24 11:45:11 +02:00
fappels
0c38944daa Fix delete multi warehouse line 2017-10-24 11:37:17 +02:00
Neil Orley
02c8f7f905 Modify rights check in the getPayments method 2017-10-24 11:25:31 +02:00
mistraloz
36adda92c2 Feature Request : Name of invoice when they are Draft (instead of "Prov....") #7669
Feature Request : Name of invoice when they are Draft (instead of "Prov....") #7669
-> Change only the tooltip with ref_supplier or ref_client
2017-10-24 11:17:02 +02:00
fappels
7f7e621ea9 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into 7.0_new_shipment_update 2017-10-24 10:53:34 +02:00
fappels
ba189277ee Fix update extrafield 2017-10-24 10:53:11 +02:00
Neil Orley
0a43a12420 NEW Get a payment list of a given invoice using the REST API
Add the getpayments method to retrieve a list of payments of a given invoice
2017-10-24 10:50:38 +02:00
Neil Orley
37cad81a68 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-10-24 10:50:17 +02:00
Laurent Destailleur
15bed6d5e8 Force reload of module 2017-10-24 10:28:15 +02:00
Laurent Destailleur
4d4f1ab6ec Fix html entities 2017-10-24 10:09:20 +02:00
Laurent Destailleur
d47ab77123 Check module is on 2017-10-24 10:02:33 +02:00
Laurent Destailleur
6b65a9ac56 Fix position of resource menu 2017-10-24 09:58:32 +02:00
Laurent Destailleur
e257da6b19 Reload of menu auguria done when required 2017-10-24 09:47:18 +02:00
dolibarr95
a3dfbf854a Try to fix #7692
`$this->fk_soc` is empty replace by `$this->socid`
2017-10-24 09:22:13 +02:00
Alexandre SPANGARO
eb6ba2ba55 NEW Add The Tunisia chart of accounts 2017-10-24 07:19:07 +02:00
Alexandre SPANGARO
9e673f7c87 NEW Add The Luxembourg chart of accounts 2017-10-24 07:07:28 +02:00
Alexandre SPANGARO
d43c186777 NEW : Add The accountancy Switzerland chart of accounts 2017-10-24 06:40:54 +02:00
Alexandre SPANGARO
8ba2fb8d4a New : Add The developed accountancy french plan 2014 2017-10-24 06:05:19 +02:00
Alexandre SPANGARO
67b2646dcc Update balance export 2017-10-24 05:35:46 +02:00
fappels
b2cd2290e1 Update card for line update 2017-10-23 22:18:15 +02:00
fappels
fe2acb2cb6 Add form select for lot numbers 2017-10-23 22:17:24 +02:00
fappels
5342785a49 Add entrepot id to expedition batch fetchAll 2017-10-23 22:16:40 +02:00
fappels
6571083a78 Add line id to detail_entrepot object
Add line id to detail_entrepot object.
Add expedition batch id to update batch in line update
2017-10-23 22:16:00 +02:00
Laurent Destailleur
28ae602b7e NEW Chart of account is loaded when selected into accounting setup 2017-10-23 20:42:09 +02:00
Laurent Destailleur
e0c9c00827 Add field to list 2017-10-23 20:17:57 +02:00
Laurent Destailleur
2a75f09070 NEW Use autocompletion on selection of chart of account 2017-10-23 20:14:14 +02:00
Laurent Destailleur
ef628025d2 NEW Add and edit country for chart of accounts systems 2017-10-23 20:01:38 +02:00
Laurent Destailleur
9df3f5c75e Migration of data 2017-10-23 19:18:17 +02:00
Laurent Destailleur
f083ac5e6b Prepare database to store country int accounting_system table 2017-10-23 18:56:09 +02:00
Neil Orley
2a9ddf7437 Remove whitespace 2017-10-23 16:49:00 +02:00
Neil Orley
bd0079b3f1 NEW Retrieve available discounts and payments details from an invoice
Adds the ability to get availbales discounts and payments details of a specific invoice unsing the REST API.
2017-10-23 16:45:49 +02:00
Elimig
dbad8636ef update index.php
I propose to the maintainer a variation to code at line number 97 to show only the statuses enabled in the pie chart.
2017-10-23 13:48:45 +02:00
Laurent Destailleur
a4b152ff1b Fix get lines of contracts done in one request instead of 2 2017-10-23 13:28:45 +02:00
Laurent Destailleur
53d2f29cdd Fix regression 2017-10-23 10:27:50 +02:00
Laurent Destailleur
109d9cab85 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-23 10:21:56 +02:00
Laurent Destailleur
f675be650e Fix missing field in migration v6 2017-10-23 10:21:45 +02:00
atm-ph
c8871bffc9 Fix duplicate html id 2017-10-23 09:01:58 +02:00
Laurent Destailleur
ead08c17d8 Discard loading of chart of account 2017-10-22 23:52:50 +02:00
Laurent Destailleur
3ccf782b41 More accurate return code 2017-10-22 21:25:59 +02:00
Laurent Destailleur
7825cc9f6d Fix to avoid infinite loop 2017-10-22 21:21:24 +02:00
Laurent Destailleur
f4f47c6732 NEW Remove tooltip tipTip library replaced with standatd jquery tooltip 2017-10-22 21:15:08 +02:00
Laurent Destailleur
285203ed0e Reduce diplicate code 2017-10-22 17:00:35 +02:00
Laurent Destailleur
36ad17cc95 Work on module builder 2017-10-22 16:45:18 +02:00
Laurent Destailleur
812687e10c FIX Restore feature to enable a module during CLI upgrade 2017-10-22 16:08:52 +02:00
Laurent Destailleur
1fe1cb986a Fix AUTO_INCREMENT PRIMARY KEY does not need NOT NULL 2017-10-22 15:51:07 +02:00
Laurent Destailleur
b3fb348b0e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-22 15:42:31 +02:00
Laurent Destailleur
c6e5115d34 Set default limit to 100 on all rest api that list 2017-10-22 15:42:19 +02:00
Laurent Destailleur
efb369f857 Merge pull request #7497 from atm-florian/dev_accountancy
NEW : lettrage in accountancy
2017-10-22 15:28:53 +02:00
Laurent Destailleur
b9bbba813a Update company.lib.php 2017-10-22 15:28:03 +02:00
Laurent Destailleur
98674f6d82 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/fourn/facture/card.php
	htdocs/societe/class/api_contacts.class.php
	htdocs/societe/class/api_thirdparties.class.php
2017-10-22 15:01:35 +02:00
Laurent Destailleur
f3c6442a93 Code comment 2017-10-22 14:44:50 +02:00
Laurent Destailleur
78ffe15a04 Code comment 2017-10-22 14:03:59 +02:00
Laurent Destailleur
097d5fd623 Fix phpunit 2017-10-22 13:12:06 +02:00
Laurent Destailleur
4247038d01 Add phpunit test 2017-10-22 13:06:27 +02:00
Laurent Destailleur
83c1928034 Fix duplicate methods 2017-10-22 12:21:44 +02:00
Laurent Destailleur
cb4d863e83 Fix phpunit 2017-10-22 04:34:28 +02:00
Laurent Destailleur
a8443e1614 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-22 04:23:51 +02:00
Laurent Destailleur
4a1834ee29 #7411 2017-10-22 04:23:17 +02:00
Laurent Destailleur
d3f2e19691 Merge pull request #7680 from Nicos-git/OdtGeneration
NEW Add product unit fields for ODT substitution
2017-10-22 04:14:17 +02:00
Laurent Destailleur
ba2dd953b4 Update commondocgenerator.class.php 2017-10-22 04:13:49 +02:00
Laurent Destailleur
764e215ca1 Update commondocgenerator.class.php 2017-10-22 04:12:46 +02:00
Laurent Destailleur
b9c0ea3691 Update commondocgenerator.class.php 2017-10-22 04:07:54 +02:00
Laurent Destailleur
c9fceaad3c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/bank/index.php
	htdocs/fourn/facture/card.php
2017-10-22 04:04:26 +02:00
Laurent Destailleur
5984222794 FIX #7679 2017-10-22 03:47:36 +02:00
Laurent Destailleur
fb843430bf FIX #7671 2017-10-22 03:22:31 +02:00
Laurent Destailleur
6bd0550bdd Remove rowid into script. Must use the autoincrement. 2017-10-22 02:58:31 +02:00
Laurent Destailleur
76d0549682 Merge pull request #7668 from simnandez/develop
NEW: Add Chile accounting plan
2017-10-22 02:53:35 +02:00
Laurent Destailleur
9c59b63343 Merge pull request #7667 from mistraloz/patch-1
Fix Error Column 'date_m' cannot be null
2017-10-22 02:45:02 +02:00
Laurent Destailleur
fb13419de8 Merge pull request #7665 from dolibarr95/patch-26
Fix: missing logo in SQL and $companystatic
2017-10-22 02:43:19 +02:00
Laurent Destailleur
605c9c45e4 Merge pull request #7656 from atm-maxime/fix_accounting_mode
Fix #7584
2017-10-22 02:21:53 +02:00
Laurent Destailleur
4c58e4f98a Update compta.php 2017-10-22 02:21:34 +02:00
Laurent Destailleur
210fb5206c Update index.php 2017-10-22 02:21:04 +02:00
Laurent Destailleur
f4db4373ea Update defaultaccounts.php 2017-10-22 02:20:29 +02:00
Laurent Destailleur
728e36f70f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/api/index.php
	htdocs/comm/propal/class/api_proposals.class.php
	htdocs/comm/propal/class/propal.class.php
	htdocs/compta/facture/class/api_invoices.class.php
	htdocs/core/actions_massactions.inc.php
	htdocs/core/actions_sendmails.inc.php
2017-10-22 01:43:33 +02:00
Nicolas Leichtle
fc2a834e41 New Add product unit fields for ODT substitution 2017-10-21 23:54:49 +02:00
Laurent Destailleur
99b88265d3 Fix larger select2 combo 2017-10-21 21:05:00 +02:00
Laurent Destailleur
475db3172a NEW Remove js library fileupload that was not used by core code. 2017-10-21 19:40:17 +02:00
Laurent Destailleur
dbcf3ddbe8 NEW Upgrade jquery select2 to 4.0.4 2017-10-21 19:05:24 +02:00
Juanjo Menent
b8c2c1a907 Merge remote-tracking branch 'upstream/develop' into develop 2017-10-21 14:58:52 +02:00
Laurent Destailleur
270bd13f55 FIX Error when adding a bookmark after using an external GET bookmark 2017-10-21 14:52:58 +02:00
Laurent Destailleur
1426737a26 Work on website 2017-10-21 12:26:14 +02:00
Laurent Destailleur
e74aae18eb CSS 2017-10-21 12:25:51 +02:00
Laurent Destailleur
19a5780f7f Clean code 2017-10-20 23:49:20 +02:00
Laurent Destailleur
3bca0ad07d More modern picto for switch on/off
Work on website module
2017-10-20 21:39:19 +02:00
Juanjo Menent
f18980a209 NEW: Add Chile accounting plan 2017-10-20 19:02:04 +02:00
Juanjo Menent
c54d1eee1c Merge remote-tracking branch 'upstream/develop' into develop 2017-10-20 19:00:25 +02:00
Laurent Destailleur
0e397b3e81 Work on website module 2017-10-20 18:44:03 +02:00
Laurent Destailleur
ab4f5a3aea Clean code 2017-10-20 18:15:43 +02:00
Laurent Destailleur
985675d680 Clean code 2017-10-20 18:04:46 +02:00
Laurent Destailleur
5c189449e1 Move default value for user expense report on tab expense report 2017-10-20 17:02:26 +02:00
Laurent Destailleur
6165bcdbd0 NEW Can export list of stock movements 2017-10-20 14:52:01 +02:00
Juanjo Menent
47b1cf5a91 NEW: Add Chile accounting plan 2017-10-20 11:55:47 +02:00
mistraloz
649d958204 Fix Error Column 'date_m' cannot be null
Dans un document (facture, devis, ...), dans l'onglet document, si on s'y rend alors que le document n'existe pas encore, il est créé en base. 
Pour une raison que je ne comprends pas bien, date_m est inseré en base s'il est défini et différent de 0, or il est initialisé à '' (vide). Il est donc inseré et non conforme au MCD. 

Faut d'avoir l'historique sur l'évolution de ce module, j'ai trouvé plus simple d'initialiser date_m à la date actuelle lors de sa création. A voir si c'est ou non la meilleure solution.
2017-10-20 11:48:20 +02:00
Juanjo Menent
6137a17fa6 NEW: Add Chile accounting plan 2017-10-20 10:56:58 +02:00
dolibarr95
03eb69172e logo
Add logo in sql and in $companystatic in order to load the picture in getNomUrl.
2017-10-20 09:17:18 +02:00
Laurent Destailleur
5b70468cac Better translation 2017-10-20 04:25:49 +02:00
Laurent Destailleur
a16f0e4356 NEW The gantt diagram is now sensitive to hours
NEW Add a group task line for tasks on same level on gantt diagram
2017-10-20 04:15:44 +02:00
Laurent Destailleur
daa7847ab3 NEW All search boxes are available on smartphone 2017-10-20 01:18:21 +02:00
Laurent Destailleur
34d933af29 Default value for graph widget show all graphs 2017-10-20 00:27:52 +02:00
Laurent Destailleur
413807708f Move translation key into main file 2017-10-19 20:59:36 +02:00
Laurent Destailleur
d82af57b57 NEW Add tab "Expense report" on user card 2017-10-19 20:56:23 +02:00
Laurent Destailleur
abd5251330 Better responsive 2017-10-19 19:53:29 +02:00
Laurent Destailleur
5e2d6620f2 Merge pull request #7655 from atm-maxime/new_eldy_sticky_menu
NEW option to fix top menu with eldy theme (hidden conf)
2017-10-19 19:29:07 +02:00
Laurent Destailleur
f1a0e13718 Merge pull request #7646 from atm-maxime/new_hrm_detailed_user
NEW hrm details output on user
2017-10-19 19:21:29 +02:00
Laurent Destailleur
f67350db72 Merge pull request #7647 from BackrndSource/patch-2
FIX: Some errors from html.form.class.php not translated on fourn/commande/card.php
2017-10-19 19:19:21 +02:00
Laurent Destailleur
1202853001 Fix syntax error 2017-10-19 19:12:00 +02:00
Laurent Destailleur
e41dcd173e Sync language 2017-10-19 17:55:24 +02:00
Laurent Destailleur
9c45e86a1c Introduce main_doc into table of objects to know what is main doc.
Work on option PROPOSAL_USE_ONLINE_SIGN
2017-10-19 11:40:40 +02:00
atm-ph
0f35b361bc Fix can't interact with recap data page 2017-10-19 10:42:11 +02:00
Laurent Destailleur
1b563dbf76 Rename table 2017-10-19 09:29:34 +02:00
Laurent Destailleur
30dad0be12 Split file of chart of account to prepare to load files after install 2017-10-19 09:28:59 +02:00
Laurent Destailleur
a818422302 Update jsgantt to 1.7.5.4 2017-10-18 21:24:17 +02:00
Laurent Destailleur
7f85d73001 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/adherents/card.php
	htdocs/comm/propal/list.php
	htdocs/commande/list.php
	htdocs/compta/facture/list.php
	htdocs/contrat/card.php
	htdocs/expensereport/card.php
	htdocs/fichinter/list.php
	htdocs/fourn/commande/card.php
	htdocs/fourn/commande/list.php
	htdocs/fourn/facture/card.php
	htdocs/fourn/paiement/card.php
	htdocs/livraison/card.php
	htdocs/modulebuilder/template/myobject_list.php
	htdocs/societe/rib.php
	htdocs/supplier_proposal/list.php
	htdocs/user/card.php
2017-10-18 19:51:29 +02:00
Laurent Destailleur
41c1dd2822 Code comment 2017-10-18 19:41:28 +02:00
Maxime Kohlhaas
4224ea6c56 Fix use conf instead of global var 2017-10-18 19:09:29 +02:00
Laurent Destailleur
cfeab01996 Prefill hour/min to 23:59 when creating a task 2017-10-18 18:50:30 +02:00
Laurent Destailleur
428c3e973d FIX for combo on rtl languages 2017-10-18 18:36:10 +02:00
fappels
146f17faa6 Add delete line to expedition card 2017-10-18 18:18:17 +02:00
Maxime Kohlhaas
8f3a197940 New eldy theme top menu fixed (hidden conf) 2017-10-18 18:18:02 +02:00
fappels
2ea687a60b Add Line triggers, Improve line error handling, ...
Add triggers,
Improve line error handling,
use line->insert in create_line
2017-10-18 17:01:17 +02:00
Laurent Destailleur
34e09315cc Code comment 2017-10-18 15:35:51 +02:00
Laurent Destailleur
99239cbb38 Add API close to close an order 2017-10-18 15:34:03 +02:00
florian HENRY
63f3ac2f2b Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into dev_accountancy 2017-10-18 14:49:06 +02:00
florian HENRY
b5fc559889 travis 2017-10-18 14:48:58 +02:00
Laurent Destailleur
8e4cb2ea79 Update doc/test 2017-10-18 12:09:11 +02:00
Laurent Destailleur
66538c7c0f Position of method 2017-10-18 11:34:49 +02:00
Laurent Destailleur
69b131b919 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/comm/propal/card.php
	htdocs/societe/class/api_thirdparties.class.php
2017-10-18 11:28:20 +02:00
Laurent Destailleur
07a6f75b95 Update changelog 2017-10-18 11:25:41 +02:00
Laurent Destailleur
037b90f2f3 NEW The comment when closing a proposal is added to commercial proposal 2017-10-18 11:23:16 +02:00
Laurent Destailleur
d40dda83cf Add API "close" for proposals
Standardize code
2017-10-18 11:10:08 +02:00
Laurent Destailleur
347883b7be Code comment 2017-10-18 10:39:36 +02:00
florian HENRY
4273e507c5 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into
dev_accountancy

Conflicts:
	htdocs/accountancy/bookkeeping/thirdparty_lettrage.php
	htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php
	htdocs/accountancy/class/lettering.class.php
2017-10-18 09:52:56 +02:00
Maxime Kohlhaas
9875d1b7cc Missing comments 2017-10-17 19:46:06 +02:00
Laurent Destailleur
536e1a95c7 Add SEPA file example 2017-10-17 14:20:39 +02:00
Laurent Destailleur
6bcdf2ff75 Test replacement of img switcher with FA css 2017-10-17 14:03:22 +02:00
Laurent Destailleur
3a97a3e2ad Move key "Translation" into main file.
Add direct link to edit on transifex
2017-10-17 13:05:55 +02:00
Laurent Destailleur
5b880cf45f Merge pull request #7645 from frederic34/transedit
enhance admin translation
2017-10-17 11:48:19 +02:00
Laurent Destailleur
d70c215ab8 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/bank/bankentries.php
	htdocs/fourn/facture/card.php
2017-10-17 11:14:58 +02:00
Laurent Destailleur
8b140ab069 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-17 10:44:29 +02:00
Laurent Destailleur
eb1fdca157 NEW Can create intervention from a proposal 2017-10-17 10:44:18 +02:00
Laurent Destailleur
082d59439f Fix add missing seconds when adding event so sort order on date is ok 2017-10-17 10:43:37 +02:00
Darkjeff
458616e74b Merge branch 'develop' of https://github.com/Darkjeff/dolibarr into develop 2017-10-17 09:13:37 +02:00
Darkjeff
db1aa4eeac Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-10-17 09:11:18 +02:00
BackrndSource
df388df3ff Update html.form.class.php
$lang->load('errors') is needed to load the traductions for:

$return.= '<font class="error">'.$langs->trans("ErrorYourCountryIsNotDefined").'</div>';
$return.= '<font class="error">'.$langs->trans("ErrorSupplierCountryIsNotDefined").'</div>';
2017-10-16 22:56:16 +02:00
Maxime Kohlhaas
25fa7d0564 New : add salaries, expense reports and leave requests in HRM tab of user card 2017-10-16 21:42:57 +02:00
Laurent Destailleur
768c623a89 Merge pull request #7644 from atm-florian/dev_extrafield_default_value
FIX : Extrafield default value admin/defaultvalues.php enabled
2017-10-16 21:42:50 +02:00
Maxime Kohlhaas
f7cadfbed1 Fix function declaration 2017-10-16 21:42:24 +02:00
Laurent Destailleur
8b78b12926 Merge pull request #7642 from BackrndSource/patch-1
Fix #7641 Fix update of note_public and note_private on societe class
2017-10-16 21:39:24 +02:00
Frédéric FRANCE
23e2c95af6 enhance admin translation 2017-10-16 21:22:13 +02:00
florian HENRY
51ce8bf2a5 js 2017-10-16 21:08:09 +02:00
florian HENRY
17db813a4e Logical variable name suffix/prefix 2017-10-16 21:05:12 +02:00
Laurent Destailleur
b7c1b6b9d0 Merge pull request #7638 from hregis/develop_member
New usage of attributes
2017-10-16 21:03:30 +02:00
florian HENRY
695740142a FIX : Extrafield default value admin/defaultvalues.php enabled 2017-10-16 20:54:53 +02:00
Laurent Destailleur
75ed44c704 Merge pull request #7636 from Dolibarr/scrutinizer-patch-3
Scrutinizer Auto-Fixes
2017-10-16 20:54:24 +02:00
Laurent Destailleur
ebe0664aff Merge branch 'develop' into scrutinizer-patch-3 2017-10-16 20:54:15 +02:00
Laurent Destailleur
3b1b83a046 Look and feel v6 2017-10-16 20:53:23 +02:00
Laurent Destailleur
0b83513fe0 Merge pull request #7635 from papoteur-mga/develop
Add Autofill button for amount to pay in charge payment page
2017-10-16 20:26:53 +02:00
Laurent Destailleur
41464bf5ac Merge pull request #7633 from defrance/patch-101
template file not only odt/ods
2017-10-16 20:25:20 +02:00
Laurent Destailleur
45ac8367bd NEW Add API for contracts 2017-10-16 17:56:59 +02:00
BackrndSource
fdcab4c6e1 Update societe.class.php
fix error for function update()
Now it updates the note_public and note_private.
2017-10-16 17:16:44 +02:00
Laurent Destailleur
f7fe011e98 Add CRLF before 'boundary' word. Use \r\n on wordwrap. 2017-10-16 14:31:28 +02:00
Regis Houssin
46d9ef01c6 Fix: use new usage 2017-10-16 11:18:52 +02:00
Laurent Destailleur
82348cc1e9 NEW Can filter on date on the page showing existing bindings 2017-10-16 10:17:57 +02:00
Laurent Destailleur
87814af7b6 Move function colorIsLight into functions.lib.php
Fix scrutinizer bugs.
2017-10-16 09:29:10 +02:00
Laurent Destailleur
afdc176f47 Fix scrutinizer 2017-10-16 08:52:00 +02:00
Scrutinizer Auto-Fixer
bd5bffa72c Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2017-10-16 06:47:05 +00:00
fappels
907ae36cdf Add insert, update and delete methods to line class
Cleanup properties
Add insert, line and delete methods
2017-10-15 17:58:22 +02:00
fappels
51264d4683 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-10-15 17:28:00 +02:00
Papoteur
75835dd7fd Add Autofill button for amount to pay in charge payment page 2017-10-15 13:33:48 +02:00
BENKE Charlene
c44207f7d3 template file not only odt/ods 2017-10-14 12:39:39 +02:00
Laurent Destailleur
f853dbc152 Add spec for SEPA 2017-10-14 02:55:07 +02:00
Laurent Destailleur
56e27d785a CSS on report 2017-10-14 01:03:59 +02:00
Laurent Destailleur
b90770c30c NEW Can rename (so reorder) bank receipts 2017-10-13 23:38:57 +02:00
Laurent Destailleur
d06f260b94 Fix amount format 2017-10-13 23:13:26 +02:00
Laurent Destailleur
07d16afe3b Save one space 2017-10-13 23:10:40 +02:00
Laurent Destailleur
c014786446 NEW On reconciliation, show balance including all reconciliated fields 2017-10-13 23:07:27 +02:00
Laurent Destailleur
e17c92b11c Code comment 2017-10-13 22:40:33 +02:00
Laurent Destailleur
ab280feaa5 Move datepicker vars into lib_heas.js.php 2017-10-13 22:37:46 +02:00
Laurent Destailleur
4296df45af Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/class/html.form.class.php
	htdocs/projet/list.php
	htdocs/user/card.php
2017-10-13 22:01:56 +02:00
Laurent Destailleur
4b43faf0c1 Fix lose filter 2017-10-13 21:44:38 +02:00
Laurent Destailleur
afd83a4454 Fix navigation on bank receipts 2017-10-13 21:25:27 +02:00
Laurent Destailleur
c28dec8dc2 Fix balance no more visible 2017-10-13 21:04:20 +02:00
Laurent Destailleur
5092c41d94 Look and feel v6 2017-10-13 20:04:11 +02:00
Laurent Destailleur
1f2555d7c6 Add link other invoices of third party on supplier card to 2017-10-13 19:51:36 +02:00
Laurent Destailleur
8b64f979ef Fix multiple upload was broken 2017-10-13 15:49:39 +02:00
Laurent Destailleur
c1c3725eb6 The website grabber rocks 2017-10-13 15:23:38 +02:00
Laurent Destailleur
4b0b83f203 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-13 13:29:07 +02:00
Laurent Destailleur
7e9cba23d5 Merge pull request #7630 from Dolibarr/scrutinizer-patch-2
Scrutinizer Auto-Fixes
2017-10-13 13:28:52 +02:00
Scrutinizer Auto-Fixer
165741517e Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2017-10-13 11:28:26 +00:00
Laurent Destailleur
02ce9c5e62 Fix doxygen 2017-10-13 13:25:55 +02:00
Laurent Destailleur
9aa1f4725e Fix scrutinizer 2017-10-13 13:22:24 +02:00
Laurent Destailleur
d12019d1b5 Fix from scrutinizer 2017-10-13 13:10:36 +02:00
Laurent Destailleur
7c9993ef0e Various fixes 2017-10-13 12:14:57 +02:00
Laurent Destailleur
4677e06b3b Better height of popup on tooltip using dialog 2017-10-13 12:05:36 +02:00
Laurent Destailleur
8113321062 Start to work on email sender profiles 2017-10-13 12:02:26 +02:00
Laurent Destailleur
ec54621b62 FIX Tooltip using dialog are kept into visible screen 2017-10-13 11:08:30 +02:00
Laurent Destailleur
0ac33d46c2 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-13 10:35:38 +02:00
Laurent Destailleur
2b55fb81b9 Standardize substition keys. 2017-10-13 10:35:21 +02:00
atm-ph
bab43b043e Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new_event_with_multi_contact 2017-10-13 09:52:56 +02:00
Laurent Destailleur
4b3d84cf02 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-13 02:02:37 +02:00
Laurent Destailleur
6fcc0bfdca Remove deprecated option 2017-10-13 02:02:13 +02:00
Laurent Destailleur
9940f3fc38 Merge pull request #7625 from tuxgasy/develop_shipment_billed
[New] Use billed field from database on fetch shipping
2017-10-13 01:18:14 +02:00
Laurent Destailleur
194fb2dbc8 Merge pull request #7615 from hregis/develop_extrafields
NEW add translation column for extrafields list
2017-10-13 00:47:45 +02:00
Laurent Destailleur
b7aeccf237 Merge pull request #7622 from hregis/develop_member
NEW documents REST API return list of documents by element
2017-10-13 00:45:19 +02:00
Laurent Destailleur
a57fe329cb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-12 23:49:48 +02:00
Laurent Destailleur
e0a8f03f06 Disable prof id 4,5,6 by default 2017-10-12 23:45:53 +02:00
TuxGasy
6455e6d472 Use billed field from database on fetch shipping 2017-10-12 21:19:24 +02:00
Laurent Destailleur
86f7add355 FIX Default value was not set 2017-10-12 19:12:52 +02:00
Laurent Destailleur
6497ca5394 prepare tzuserrel 2017-10-12 18:14:02 +02:00
Laurent Destailleur
8c5cf9ea45 Fix date output 2017-10-12 18:04:47 +02:00
Laurent Destailleur
31aa1faa32 Fix bookmark edit 2017-10-12 17:18:05 +02:00
Laurent Destailleur
074eda016b Fix redirect to bookmark only if not external link 2017-10-12 17:12:42 +02:00
Laurent Destailleur
1fba58b9ce Fix bookmark list 2017-10-12 17:09:17 +02:00
Laurent Destailleur
50da6a0c9e Prepare code for removing adodb 2017-10-12 14:59:38 +02:00
Laurent Destailleur
45b4572ad4 Label shorter 2017-10-12 13:30:28 +02:00
Laurent Destailleur
3f36cf23f5 NEW Break lines per project on the new timesheet page 2017-10-12 13:17:22 +02:00
Regis Houssin
151fb72183 NEW documents REST API return list of documents by element 2017-10-12 12:28:10 +02:00
Laurent Destailleur
f8eca95c82 Better param desc 2017-10-12 02:59:00 +02:00
Laurent Destailleur
3dbd7e600f Fix param desc 2017-10-12 02:47:53 +02:00
Laurent Destailleur
4a93b709ad Add param desc on payment link 2017-10-12 02:46:49 +02:00
Laurent Destailleur
ca0af5cddf NEW Bulk action validate on customer invoices 2017-10-12 02:25:17 +02:00
Laurent Destailleur
5fd6a27c62 Fix position of top menu 2017-10-12 02:16:54 +02:00
Laurent Destailleur
1d92e80788 Fix line addr in xml sepa file 2017-10-12 02:07:51 +02:00
Laurent Destailleur
08c94f11b6 FIX SEPA file if address is empty 2017-10-12 01:44:26 +02:00
Laurent Destailleur
dd15884f83 Fix recur - rcur 2017-10-12 01:35:04 +02:00
Laurent Destailleur
7c29bb5818 Fix must use differently FRST and SEPA 2017-10-12 01:24:19 +02:00
Laurent Destailleur
5f401839d6 Fix verif 2017-10-12 00:42:48 +02:00
Laurent Destailleur
15bcbc8b43 FIX Check on bank info for sepa must be done on iban/swift not on ban 2017-10-12 00:38:59 +02:00
Laurent Destailleur
31ab73ff3c Fix when verif is called several times 2017-10-12 00:12:26 +02:00
Laurent Destailleur
56e437a6c3 Bed fetch 2017-10-12 00:03:24 +02:00
Laurent Destailleur
5715f44fe6 Better error messages 2017-10-12 00:02:24 +02:00
Laurent Destailleur
8674867db2 Fix creation/edit rum number 2017-10-11 23:43:42 +02:00
Laurent Destailleur
918738ce46 Set creation date 2017-10-11 23:06:49 +02:00
Laurent Destailleur
d36af4a46a RUM number start with RUM- 2017-10-11 23:06:23 +02:00
Laurent Destailleur
0d0030cff4 Fix use of sender profiles 2017-10-11 19:57:53 +02:00
Laurent Destailleur
37272b264c Fix sql 2017-10-11 19:45:18 +02:00
Laurent Destailleur
56be9e2b60 Introduce table c_email_senderprofile to have several profils 2017-10-11 19:41:45 +02:00
Laurent Destailleur
bcf56e3140 Introduce table c_email_senderprofile to have several profils 2017-10-11 19:41:19 +02:00
Regis Houssin
c9066afa36 NEW add translation column for extrafields list 2017-10-11 14:22:59 +02:00
Laurent Destailleur
1e7f726168 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-11 12:21:52 +02:00
Laurent Destailleur
99afa3a3e0 Use a shorter key for column title 2017-10-11 12:19:44 +02:00
Laurent Destailleur
efac9ddb12 Merge pull request #7613 from hregis/develop_extrafields
Fix: label not translated if special lang file used
2017-10-11 11:58:44 +02:00
Laurent Destailleur
f23a82b9a7 Merge pull request #7614 from dolibarr95/patch-25
Fix : translation error
2017-10-11 11:57:51 +02:00
Laurent Destailleur
118b3cdf79 Update admin_extrafields_view.tpl.php 2017-10-11 11:56:22 +02:00
Laurent Destailleur
2759e2552e Merge pull request #7609 from dolibarr95/patch-24
Update : Add class in module list table
2017-10-11 11:53:33 +02:00
Laurent Destailleur
e13c92f60d Merge pull request #7607 from hregis/develop_picto
NEW add image object_phoning_mobile.png
2017-10-11 11:51:30 +02:00
Laurent Destailleur
cf3dd4be12 Merge pull request #7606 from dolibarr95/patch-23
NEW More picto for phone
2017-10-11 11:51:07 +02:00
Laurent Destailleur
acc83db220 Merge pull request #7605 from dolibarr95/patch-22
Fix : Wrong test in technical services provided
2017-10-11 11:49:18 +02:00
Laurent Destailleur
eb995bb7ad Merge pull request #7603 from hregis/develop_bug5
Fix: force jquery cal if MAIN_POPUP_CALENDAR=eldy (showDP commented)
2017-10-11 11:48:46 +02:00
Laurent Destailleur
5aa3352e58 Restore TODO for future feature 2017-10-11 11:48:38 +02:00
Laurent Destailleur
051d49732d Keep compatiblity of status key 2017-10-11 11:36:24 +02:00
Laurent Destailleur
5b6ca68760 Merge pull request #7600 from ruistrecht-alt/Fix_STATUS_ACCEPTED_in_commande
Fix STATUS_ACCEPTED in commande
2017-10-11 11:33:28 +02:00
Laurent Destailleur
e644f7df58 Merge pull request #7597 from hregis/develop_member
NEW add company alias name when create company from member
2017-10-11 11:31:55 +02:00
Laurent Destailleur
eb75c2f98e Merge pull request #7596 from hregis/develop_bug2
Fix: wrong POST GET name
2017-10-11 11:30:36 +02:00
dolibarr95
1b3f746ce0 Fix translation error
InvoiceProForma translation is available in bills.lang
2017-10-11 11:16:01 +02:00
Regis Houssin
7e79c3a795 Fix: label not translated if special lang file used 2017-10-11 10:10:27 +02:00
Laurent Destailleur
d404d8be9f Debug to make MAIN_ODT_AS_PDF workign with unoconv 2017-10-10 18:54:30 +02:00
dolibarr95
0abc16b27f Add class
Add oddeven class to tr tag
2017-10-10 14:55:42 +02:00
Laurent Destailleur
f93ecc1584 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	ChangeLog
	htdocs/filefunc.inc.php
	htdocs/projet/activity/perweek.php
	htdocs/projet/element.php
2017-10-10 11:24:17 +02:00
Regis Houssin
ce6d6dcfbc NEW add image object_phoning_mobile.png 2017-10-10 10:37:57 +02:00
dolibarr95
572a64bdbf display mobile picto
runs with #6617
2017-10-10 10:19:04 +02:00
Regis Houssin
4530f94fa6 Fix: restore parameters, needed for save in place 2017-10-10 10:07:52 +02:00
Regis Houssin
9ff0855812 Fix: datepicker.js.php is needed for the translation !! 2017-10-10 10:04:16 +02:00
dolibarr95
7943a14fa2 Wrong test
https://github.com/Dolibarr/dolibarr/issues/7604#issuecomment-335387587
2017-10-10 09:43:03 +02:00
Regis Houssin
88e700ae12 Fix: add month names short 2017-10-10 09:30:07 +02:00
Regis Houssin
f51c0db705 NEW add translation and possibility to change month and year 2017-10-10 09:16:14 +02:00
Regis Houssin
00db16e0de Fix: force jquery cal if MAIN_POPUP_CALENDAR=eldy (showDP commented) 2017-10-10 08:49:00 +02:00
Laurent Destailleur
0b7aa20464 Add link to ChangeLog 2017-10-09 22:52:26 +02:00
Laurent Destailleur
3b6f6c4027 Translation 2017-10-09 19:51:42 +02:00
Laurent Destailleur
dd69f76212 Move translation key 2017-10-09 19:21:25 +02:00
Rui Strecht
666e62b440 Fixed issue with inexistent constant in commande STATUS_ACCEPTED 2017-10-09 17:54:15 +01:00
Rui Strecht
e1fa96cc6a Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-10-09 17:19:31 +01:00
Laurent Destailleur
9427655dd0 Option PROJECT_LINES_PERxxx_SHOW_THIRDPARTY is the default 2017-10-09 18:18:34 +02:00
Laurent Destailleur
4de1ade605 Fix mix collation 2017-10-09 18:15:10 +02:00
Regis Houssin
dcf497f332 Fix: add $confirm value inside doAction hook parameters 2017-10-09 17:55:14 +02:00
Laurent Destailleur
15911a9b64 Fix illegal mix collation 2017-10-09 17:45:08 +02:00
Regis Houssin
2bd66290a3 Fix: for avoid scroll bar 2017-10-09 16:58:17 +02:00
Regis Houssin
625e440653 Fix: wrong test 2017-10-09 16:50:20 +02:00
Laurent Destailleur
4e34c13e49 Debug 2017-10-09 16:49:17 +02:00
Regis Houssin
e2206d9bf2 Fix: uniformize substitution tags 2017-10-09 16:33:22 +02:00
Laurent Destailleur
aa07db2f38 NEW A module can change order of element in the quick search combo 2017-10-09 16:17:55 +02:00
Regis Houssin
86c301f197 Fix: uniformize parameters 2017-10-09 15:49:10 +02:00
Regis Houssin
16b766182c NEW view company name if different of fullname in dol_banner 2017-10-09 15:35:08 +02:00
Laurent Destailleur
084dc7798d Standardize use of function getCommonSubstitutionArray 2017-10-09 14:51:42 +02:00
Laurent Destailleur
8f24a86352 NEW If max nb of generation is reached, date for next gen is striked 2017-10-09 14:16:22 +02:00
Laurent Destailleur
6402d5a2e4 Fix translation 2017-10-09 13:30:08 +02:00
Regis Houssin
ecd55c67e3 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_member 2017-10-09 12:40:28 +02:00
Regis Houssin
f2d9288db5 NEW add company alias name when create company from member 2017-10-09 12:38:44 +02:00
fappels
a4726eba20 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-10-09 11:44:14 +02:00
Rui Strecht
4a06ca9885 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-10-09 10:37:27 +01:00
Regis Houssin
4a30448ff4 Fix: use fullname instead id is more explicit 2017-10-09 11:34:28 +02:00
Regis Houssin
3d3f6d14b5 Fix: uniformize fields size and maxlength compared to db size 2017-10-09 11:26:49 +02:00
Laurent Destailleur
725e57b73e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-09 11:20:15 +02:00
Regis Houssin
64d9b625ff Fix: wrong POST GET name 2017-10-09 11:03:16 +02:00
Laurent Destailleur
1fd712d712 Fix help 2017-10-09 10:59:39 +02:00
Laurent Destailleur
14b667c9f1 Merge pull request #7587 from hregis/develop_admin
NEW add doActions hook in admin ihm
2017-10-09 10:48:52 +02:00
Laurent Destailleur
245c048b40 Merge pull request #7577 from OPEN-DSI/fix_0001
Fix carriage return when get full address formated for output on documents
2017-10-09 10:48:26 +02:00
Laurent Destailleur
e405e5d020 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-09 10:43:53 +02:00
Laurent Destailleur
3e0ccd6312 FIX #7585 2017-10-09 10:43:19 +02:00
Laurent Destailleur
bd8beb45b9 Merge pull request #7595 from Nicos-git/RestAPI
FIX: REST function addTimeSpent
2017-10-09 09:55:13 +02:00
KHELIFA
d77dfb9199 Fix return chariot 2017-10-09 09:26:25 +02:00
Nicolas Leichtle
5f2c5a6c53 New Extend REST POST function "/documents" to support projects and tasks 2017-10-08 23:26:35 +02:00
Laurent Destailleur
67c33840cf Code comment 2017-10-08 23:19:19 +02:00
Nicolas Leichtle
b110eb517d Merge branch 'develop' into RestAPI 2017-10-08 23:15:14 +02:00
Laurent Destailleur
33624e1001 NEW Attaching doc automatically in email is now a parameter of template. 2017-10-08 16:34:42 +02:00
Laurent Destailleur
ce7ce82801 Enhance email template editor 2017-10-08 14:51:10 +02:00
Laurent Destailleur
4c23363400 Fix creation of tax payment 2017-10-07 21:27:18 +02:00
Laurent Destailleur
ad0fa3c33a Look and feel v6 2017-10-07 21:13:54 +02:00
Laurent Destailleur
8aa924fa08 NEW The bank account is visible on payment of taxes 2017-10-07 21:03:46 +02:00
Laurent Destailleur
df2f73bdc3 Fix quick search on product/services 2017-10-07 20:36:32 +02:00
Laurent Destailleur
e40bffb0d5 Fix bug reported by scrutinizer 2017-10-07 20:21:47 +02:00
Laurent Destailleur
f89676126e Update translation tools 2017-10-07 20:11:35 +02:00
Regis Houssin
6401c8a58e NEW add doActions hook in admin ihm 2017-10-07 20:05:02 +02:00
Laurent Destailleur
c771ce524f Fix lose filter 2017-10-07 18:25:04 +02:00
Laurent Destailleur
5d24aa4830 Fix sql 2017-10-07 14:54:31 +02:00
Laurent Destailleur
ad57a8480f Merge pull request #7462 from tysauron/patch-15
NEW Adding Field "First date of expire" + filter on contract list
2017-10-07 14:16:31 +02:00
Laurent Destailleur
6271c90904 Update list.php 2017-10-07 14:15:47 +02:00
Laurent Destailleur
42ebb1ce4d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-07 14:11:13 +02:00
Laurent Destailleur
af1d2bfffd Standardize code 2017-10-07 14:11:01 +02:00
Laurent Destailleur
7465daa0da Merge pull request #7583 from hregis/develop_admin
NEW add '$moreatt' parameter in picto_from_langcode function
2017-10-07 13:45:16 +02:00
Laurent Destailleur
66978a3bb4 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2017-10-07 13:44:27 +02:00
Laurent Destailleur
762879b95b Merge pull request #7586 from Dolibarr/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2017-10-07 13:39:39 +02:00
Laurent Destailleur
04d110220c Merge pull request #7582 from Oeris/develop-api
NEW Delete a line of invoice using the REST API
2017-10-07 13:29:04 +02:00
Laurent Destailleur
1b399dc8dd Update api_invoices.class.php 2017-10-07 13:28:04 +02:00
Laurent Destailleur
b91667e69c Merge pull request #7579 from OPEN-DSI/fix_0003
New add test dates order for start and end dates of a line of a contract
2017-10-07 13:16:53 +02:00
Laurent Destailleur
d1ad6e0263 Update card.php 2017-10-07 13:16:39 +02:00
Laurent Destailleur
0a88633f59 Merge pull request #7580 from OPEN-DSI/fix_0004
Fix concat desc of lines when create contract from proposal or other
2017-10-07 13:13:44 +02:00
Scrutinizer Auto-Fixer
328d39bc71 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2017-10-07 11:09:31 +00:00
Laurent Destailleur
74deb05527 Clean code. Use constant for status of supplier order process. 2017-10-07 13:04:31 +02:00
Laurent Destailleur
41716281ed Fix demo 2017-10-07 11:44:07 +02:00
Laurent Destailleur
2c126c4164 Fix typo 2017-10-07 03:10:48 +02:00
Laurent Destailleur
6a3be553f7 Start to work on common js part. 2017-10-07 03:08:01 +02:00
Laurent Destailleur
4347bc06a2 do no transform data:image 2017-10-07 02:40:03 +02:00
Laurent Destailleur
3cc48f156f The new website module become wonderfull 2017-10-07 02:29:27 +02:00
Laurent Destailleur
aa3fd067fc Fix regex UNGREEDY 2017-10-06 23:54:45 +02:00
Laurent Destailleur
8e187c2759 Debug module website 2017-10-06 22:49:08 +02:00
Regis Houssin
e0e10ff830 NEW add '$moreatt' parameter in picto_from_langcode function 2017-10-06 20:53:41 +02:00
Neil Orley
925a86b2ba NEW Delete a line of invoice using the REST API
Adds the ability to delete a line of an invoice using the REST API
Rename a post action with a "verb"
2017-10-06 20:49:58 +02:00
Neil Orley
3bacb7ce39 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-10-06 20:49:48 +02:00
Rui Strecht
f03f3fbc2f Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-10-06 18:57:54 +01:00
Laurent Destailleur
de71de61af Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-06 18:52:38 +02:00
Neil Orley
313a432c33 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-10-06 18:49:23 +02:00
Laurent Destailleur
df38f60617 Export website into zip 2017-10-06 18:29:18 +02:00
KHELIFA
dadd3842a0 Fix concat desc of lines when create contract from proposal or other 2017-10-06 18:01:03 +02:00
KHELIFA
e715a680bf New add test dates order for start and end dates of a line of a contract 2017-10-06 17:58:15 +02:00
Laurent Destailleur
8d47969d29 Merge pull request #7578 from OPEN-DSI/fix_0002
NEW add a new notification for the signed closed event of a proposal.
2017-10-06 17:36:23 +02:00
Laurent Destailleur
c7a0f467cc Fix var unknown 2017-10-06 17:03:32 +02:00
Laurent Destailleur
1140016b67 Merge pull request #7575 from hregis/develop_admin
Fix: for avoid problem with currentcontext
2017-10-06 16:47:10 +02:00
KHELIFA
88ab3a9cab Add a new notification for the event that has successfully closed a proposal. 2017-10-06 16:15:40 +02:00
Rui Strecht
9a984c9821 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-10-06 14:45:47 +01:00
Laurent Destailleur
43d85af5ae Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-06 15:23:10 +02:00
Regis Houssin
4ea3d27ced Fix: for avoid problem with currentcontext 2017-10-06 15:19:43 +02:00
KHELIFA
dc87133e0b Fix carriage return when get full address formated for output on documents 2017-10-06 15:06:59 +02:00
Laurent Destailleur
f9d9642340 FIX #6981 2017-10-06 14:07:28 +02:00
Laurent Destailleur
777486d74c Keep usage of function dol_hash to encrypt a non encrypted data 2017-10-06 13:13:51 +02:00
Laurent Destailleur
2d549a6191 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-06 13:09:42 +02:00
Laurent Destailleur
4bc7eb0ec1 Merge pull request #7520 from hregis/develop_ldap
Fix: Set LDAP password when LDAP key changed
2017-10-06 13:09:28 +02:00
Laurent Destailleur
2148622d40 Clean code 2017-10-06 12:55:48 +02:00
Laurent Destailleur
ad12aff31d Merge pull request #7573 from inoveaconseil/patch-12
Add constant to manage update_price function
2017-10-06 12:48:55 +02:00
Laurent Destailleur
52582fb38d Merge pull request #7571 from hregis/develop_admin
NEW add doActions hook in company admin
2017-10-06 12:42:57 +02:00
Laurent Destailleur
cbe92242f3 Merge pull request #7574 from Dolibarr/scrutinizer-patch-4
Scrutinizer Auto-Fixes
2017-10-06 12:42:18 +02:00
Laurent Destailleur
304828c37f Merge pull request #7569 from Dolibarr/scrutinizer-patch-3
Scrutinizer Auto-Fixes
2017-10-06 12:41:52 +02:00
Scrutinizer Auto-Fixer
98d994f3d4 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2017-10-06 10:41:36 +00:00
Laurent Destailleur
ef3d86333c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/projet/activity/perday.php
2017-10-06 12:38:50 +02:00
Laurent Destailleur
73f5d21ff8 Add button to make a leave request on the "leave" tab of user. 2017-10-06 12:36:11 +02:00
Laurent Destailleur
06b18a740e NEW Add date of birth on user card.
NEW Show expected worked hours on the timesheet form.
2017-10-06 12:08:01 +02:00
Rui Strecht
5a53e61940 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-10-06 10:06:47 +01:00
Laurent Destailleur
7871498724 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-06 11:03:03 +02:00
Laurent Destailleur
7b1fe6e5af Look and feel v6 2017-10-06 11:02:44 +02:00
Rui Strecht
1ea8bd2ed9 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-10-06 09:58:33 +01:00
Laurent Destailleur
edacf6789b Remove dead code 2017-10-06 10:47:58 +02:00
Laurent Destailleur
848aadb48a FIX Do not lose selected id after ENTER the TAB on autocomplete 2017-10-06 10:47:02 +02:00
Inovea Conseil
2f3f04c2b1 Add constant to manage update_price function
Some external module want no update price after a trigger because they have a other method to calculate the total (ex: with a extrafield).
2017-10-06 10:42:25 +02:00
Neil Orley
c6c8344937 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-10-06 09:49:48 +02:00
Regis Houssin
e1311340a7 NEW add doActions hook in company admin 2017-10-06 08:45:59 +02:00
Scrutinizer Auto-Fixer
f59d87f06d Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2017-10-06 00:42:32 +00:00
Laurent Destailleur
67c571f952 Increase cyclomatic complexity threshold 2017-10-06 01:59:26 +02:00
Laurent Destailleur
e644d9d53f Fix syntax code 2017-10-06 01:49:07 +02:00
Laurent Destailleur
c06a78145c Rename function to avoid duplicate 2017-10-06 01:27:41 +02:00
Laurent Destailleur
801a5180d6 Fix scrutinizer bug reports 2017-10-06 01:16:19 +02:00
Regis Houssin
6adae89c47 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_ldap

Conflicts:
	htdocs/install/mysql/migration/6.0.0-7.0.0.sql
2017-10-05 17:18:41 +02:00
Neil Orley
20395b749f Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-10-05 13:28:01 +02:00
Laurent Destailleur
86e751bd45 Merge pull request #7563 from aspangaro/7.0-label_operation_on_general_ledger
Fix : problems on accountancy & presentation
2017-10-05 10:35:28 +02:00
Laurent Destailleur
ad63dc8b78 Merge pull request #7562 from hregis/develop_bug
Fix: minimal num, maj and special character with value 0 not work
2017-10-05 10:29:28 +02:00
Laurent Destailleur
f0b314dfd7 Change signature of file to match other urls to link/download files. 2017-10-05 10:25:06 +02:00
Laurent Destailleur
1cacfe4935 Merge pull request #7560 from Oeris/develop-api
NEW Generates the document before downloading using REST API
2017-10-05 10:04:08 +02:00
Laurent Destailleur
2a2cd30e19 Fix code 2017-10-05 10:00:43 +02:00
Laurent Destailleur
4730611333 Add language file button 2017-10-05 09:54:48 +02:00
Laurent Destailleur
04a56d4bd9 Fix phpunit 2017-10-05 09:34:09 +02:00
Alexandre SPANGARO
2f49b00f6c Fix : some small problems on accountancy 2017-10-05 06:56:13 +02:00
Alexandre SPANGARO
f1b7b36a11 Fix : problem on column in customer to bind index 2017-10-05 05:38:02 +02:00
Alexandre SPANGARO
9993e796ee Merge remote-tracking branch 'uptream/develop' into 7.0-label_operation_on_general_ledger 2017-10-05 05:12:56 +02:00
Regis Houssin
8a79198769 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_ldap

Conflicts:
	htdocs/core/class/comment.class.php
2017-10-04 20:00:39 +02:00
Laurent Destailleur
6540bc0061 Fix doxygen 2017-10-04 19:48:11 +02:00
Regis Houssin
1cee16a802 Fix: minimal num, maj and special character with value 0 not work 2017-10-04 18:32:52 +02:00
Rui Strecht
7b60d75579 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-10-04 16:07:54 +01:00
Neil Orley
0202f8d488 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-10-04 16:51:22 +02:00
Laurent Destailleur
ded55f41fb Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/class/commonobject.class.php
2017-10-04 16:08:22 +02:00
Neil Orley
a3096b4e9d NEW Generates the document before downloading using REST API
Generates the document before downloading using REST API
2017-10-04 15:59:54 +02:00
Laurent Destailleur
a74d6074a3 FIX Generation of invoice from bulk action "Bill Orders" 2017-10-04 14:27:10 +02:00
Laurent Destailleur
8e0da9bfeb Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/holiday/document.php
2017-10-04 13:32:53 +02:00
Laurent Destailleur
10142522e0 Fix typo 2017-10-04 13:30:43 +02:00
Regis Houssin
c563c3d3ac Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_ldap 2017-10-04 13:19:07 +02:00
Regis Houssin
537fc63da5 Fix: add by error 2017-10-04 13:18:48 +02:00
Laurent Destailleur
9b3826a54c Invert left and right (my own comment on left) 2017-10-04 13:17:16 +02:00
Laurent Destailleur
85606126a9 Standardize code for events 2017-10-04 12:58:13 +02:00
Regis Houssin
a259057dd3 Fix: Found non escaped string 2017-10-04 12:42:41 +02:00
Regis Houssin
fd2188a8c7 Fix: remove back quote 2017-10-04 12:25:08 +02:00
Rui Strecht
097438d7a3 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-10-04 11:22:35 +01:00
Regis Houssin
a124f47dcd Fix: PHPCS 2017-10-04 12:07:17 +02:00
Regis Houssin
66ad30feb0 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_ldap 2017-10-04 11:23:50 +02:00
Regis Houssin
723bc4d436 NEW add ldap_rename for avoid password if ldap key changed 2017-10-04 11:22:41 +02:00
Laurent Destailleur
2dee81125a Hide comment feature for the moment 2017-10-04 11:18:31 +02:00
Laurent Destailleur
75a7e086b3 Merge pull request #7427 from atm-arnaud/NEW_comment_generic_element
New comment generic element
2017-10-04 11:13:39 +02:00
Laurent Destailleur
e7ac828cc7 Merge pull request #7551 from hregis/develop_bug_restapi
Fix: refactorization of "getListForItem" function
2017-10-04 10:59:55 +02:00
Laurent Destailleur
7f11138f19 Merge pull request #7555 from frederic34/patch-1
can't clean search_type in holiday list
2017-10-04 10:57:27 +02:00
fappels
02a427c608 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-10-04 10:19:29 +02:00
Frédéric FRANCE
69314e08ac can't clean search_type in holiday list 2017-10-04 10:12:51 +02:00
Regis Houssin
59bf61f9b3 NEW add possibility to disabled the LDAP trigger 2017-10-04 09:22:18 +02:00
Regis Houssin
feea6246c2 NEW add possibility to hide LDAP tab for non admin 2017-10-04 09:13:41 +02:00
Regis Houssin
8d3ad9ddc8 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_ldap 2017-10-04 08:43:07 +02:00
Laurent Destailleur
436ec93084 FIX is_erasable report bad value when thirdparty was not loaded 2017-10-04 03:22:41 +02:00
Laurent Destailleur
7cf4ec772a Restore original travis setup 2017-10-04 02:56:45 +02:00
Laurent Destailleur
a6cf934973 Add log 2017-10-04 02:46:01 +02:00
Laurent Destailleur
bd3a76ee84 Debug travis 2017-10-04 02:00:38 +02:00
Laurent Destailleur
5b8e9f7269 Debug travis 2017-10-04 01:53:55 +02:00
Laurent Destailleur
3a41f2bddb Fix test when numbering ref is only numeric char. 2017-10-04 01:27:19 +02:00
Laurent Destailleur
f380747e20 More accurate error code 2017-10-04 01:11:19 +02:00
Laurent Destailleur
c08f33507f More accurate error code 2017-10-04 00:51:25 +02:00
Laurent Destailleur
8794e54eba Try to fix phpunit 2017-10-03 22:52:57 +02:00
Laurent Destailleur
4c90e1c10d Add link to modules Ids 2017-10-03 21:13:28 +02:00
Rui Strecht
be5481f51a Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-10-03 18:44:43 +01:00
Regis Houssin
45de1ca21e Fix: check security 2017-10-03 19:09:46 +02:00
Regis Houssin
4537e5472b Fix: refactorization of "getListForItem" function 2017-10-03 19:01:54 +02:00
Laurent Destailleur
5ddd77c950 Fix We must use dol_escape_htmltag for input field not dol_htmlentities 2017-10-03 18:35:35 +02:00
Laurent Destailleur
eeb36464b7 Merge pull request #7524 from hregis/develop_mc
Fix: command not found with escapeshellarg !
2017-10-03 18:06:49 +02:00
Laurent Destailleur
386c8215ee Update security_file.php 2017-10-03 18:06:32 +02:00
Laurent Destailleur
2f02015c30 Update security_file.php 2017-10-03 17:58:50 +02:00
Laurent Destailleur
c22cd1cfe9 Fix test on entity must always be done using the "IN" instead of "=" 2017-10-03 17:41:22 +02:00
Regis Houssin
ed5dca652d Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_bug_restapi 2017-10-03 17:32:40 +02:00
Laurent Destailleur
d0ce98cbea Merge branch 'hregis-develop_dict' into develop 2017-10-03 17:25:32 +02:00
Laurent Destailleur
f2e0ff0d30 Merge branch 'develop_dict' of https://github.com/hregis/dolibarr into hregis-develop_dict 2017-10-03 17:25:01 +02:00
Laurent Destailleur
1f11dcb4bd Fix no loose of configuration of action auto after upgrade Close #7527 2017-10-03 17:21:18 +02:00
Regis Houssin
a88938ace4 Fix: use GETPOST 2017-10-03 17:11:42 +02:00
Regis Houssin
9c2d053f74 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_mc 2017-10-03 17:01:39 +02:00
Laurent Destailleur
b40012d08f Merge pull request #7535 from Oeris/develop-api
NEW Set invoices as draft using the REST API
2017-10-03 16:46:12 +02:00
Laurent Destailleur
a76f99921b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-03 16:39:57 +02:00
Laurent Destailleur
2b2832da22 Add option FACTURE_PAYMENTS_ON_SUBSIDIARY_COMPANIES - Close #7548 2017-10-03 16:38:22 +02:00
Laurent Destailleur
df0f39f973 Merge pull request #7547 from atm-maxime/fix_import_updatekeys
Fix : GETPOST for update keys in import module
2017-10-03 16:26:21 +02:00
Laurent Destailleur
927445ac47 Merge pull request #7544 from hregis/develop_bug
Fix: travis error
2017-10-03 16:25:06 +02:00
Laurent Destailleur
12ec00428f Merge branch 'develop' into develop_bug 2017-10-03 16:24:44 +02:00
Laurent Destailleur
adc77be6d4 Merge pull request #7541 from frederic34/patch-1
ref can be null
2017-10-03 16:22:39 +02:00
Laurent Destailleur
e43ac0c6c5 Update define_holiday.php 2017-10-03 16:22:25 +02:00
Laurent Destailleur
0f194d6715 Update llx_holiday.sql 2017-10-03 16:21:44 +02:00
Laurent Destailleur
cb4a52a8cd Merge branch 'develop' into patch-1 2017-10-03 16:21:13 +02:00
Laurent Destailleur
422a3425a8 Merge pull request #7539 from defrance/patch-28
unable to delete salaries
2017-10-03 16:16:49 +02:00
Laurent Destailleur
64fcbfffb1 Fix PHPCS 2017-10-03 16:05:15 +02:00
Laurent Destailleur
d2c4da5156 Update doc 2017-10-03 16:03:26 +02:00
Laurent Destailleur
a501a20487 NEW Search filters in lists are restored when using "back to list" 2017-10-03 16:00:52 +02:00
Laurent Destailleur
99acd1b974 Fix cancel button on create 2017-10-03 14:58:53 +02:00
Laurent Destailleur
2f20de2457 Fix cancel button on create 2017-10-03 14:57:38 +02:00
Laurent Destailleur
9d6498f2a4 NEW Search filters in lists are restored when using "back to list" 2017-10-03 14:50:52 +02:00
Maxime Kohlhaas
a88bcb5299 Add detailed menus in HRM module 2017-10-03 13:49:30 +02:00
Regis Houssin
f8f4ff6d21 Fix: missing include api_categories class 2017-10-03 13:07:07 +02:00
Regis Houssin
db8d27f0fe Fix: wrong type value 2017-10-03 12:08:25 +02:00
Maxime Kohlhaas
e0e7e60048 Fix : GETPOST for update keys in import module 2017-10-03 11:28:13 +02:00
Rui Strecht
8b4b270720 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-10-03 09:32:22 +01:00
Laurent Destailleur
1fc292fa56 FIX Bad preview on scroping when special file names 2017-10-03 10:11:03 +02:00
Regis Houssin
32e3845667 Fix: travis error 2017-10-03 10:08:25 +02:00
Laurent Destailleur
793f1318de Fix sanitize uploaded filename 2017-10-03 09:35:45 +02:00
Frédéric FRANCE
1d2f7dec50 Update define_holiday.php 2017-10-03 08:02:47 +02:00
Alexandre SPANGARO
0acb391b36 Fix : label_operation on general ledger 2017-10-03 05:27:08 +02:00
Frédéric FRANCE
dd76672c27 ref can be null 2017-10-03 00:30:42 +02:00
Laurent Destailleur
26564cc79c Allow : into file names 2017-10-02 20:38:15 +02:00
Laurent Destailleur
46698192b4 NEW Bulk delete actions available on leave requests 2017-10-02 20:32:31 +02:00
Laurent Destailleur
20b91a8d5f Fix type of leave request not visible in list 2017-10-02 19:36:54 +02:00
BENKE Charlene
41ba7af9fe unable to delete salaries
compta/salaries/cards ask for a salarie/payement/delete right to delete
2017-10-02 18:49:25 +02:00
Laurent Destailleur
fea5746618 Standardize look and feel on leave request module 2017-10-02 18:17:16 +02:00
Laurent Destailleur
97d399595f Add unique key on table to follow leave request counter per type 2017-10-02 17:45:01 +02:00
Laurent Destailleur
3208d8d3ac Fix phpcs 2017-10-02 13:52:18 +02:00
Laurent Destailleur
75e7281054 Add resource for NACE 2017-10-02 12:41:50 +02:00
Laurent Destailleur
a23065c3df Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-10-02 12:20:18 +02:00
Laurent Destailleur
138f8cd7ea Fix url to explorer no more working 2017-10-02 12:20:03 +02:00
Regis Houssin
e65b21a3bf Fix: change the parameter value of dol_getIdFromCode 2017-10-02 11:59:17 +02:00
Neil Orley
503129c9f4 Rename method draft and paid to settodraft and settopaid 2017-10-02 11:51:54 +02:00
Regis Houssin
09e71f1390 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-10-02 11:51:27 +02:00
Laurent Destailleur
d021288ec3 Merge pull request #7534 from atm-gauthier/FIX_invalid_foreach
FIX : invalid foreach protection
2017-10-02 11:21:40 +02:00
Neil Orley
5b91a6a37b NEW Sets an invoice as paid using the REST API
Adds the ability to set an invoice as paid using the REST API
2017-10-02 11:17:46 +02:00
Neil Orley
91a1d6c17e NEW Set invoices as draft using the REST API
Adds the ability to set an invoice status as draft using the REST API
Change response when validating an invoice: before returned 200 + text message, now returns an invoice object
2017-10-02 10:55:34 +02:00
Darkjeff
c6d0cad2f5 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-10-02 09:56:19 +02:00
gauthier
8f969d61e2 FIX : invalid foreach protection 2017-10-02 09:23:04 +02:00
florian HENRY
18bd2c4445 fix travis 2017-10-02 09:04:22 +02:00
Regis Houssin
475c881e67 Fix: add missing ldap fields 2017-10-02 09:00:07 +02:00
Regis Houssin
c1b6f59c1b Fix: restore possible ldap keys 2017-10-02 08:43:53 +02:00
Laurent Destailleur
989f285d32 Replace table with div 2017-10-02 01:23:07 +02:00
Laurent Destailleur
3f3a5e0921 Merge pull request #7499 from atm-gauthier/NEW_custom_meteo
New custom meteo
2017-10-02 00:48:52 +02:00
Laurent Destailleur
88554a74a9 Merge pull request #7532 from AXeL-dev/develop
Fix: payment form & user first/last name position
2017-10-02 00:37:35 +02:00
Laurent Destailleur
6dbc02022f Merge pull request #7529 from Nicos-git/develop
NEW: Add project related fields to ODT
2017-10-02 00:36:46 +02:00
Laurent Destailleur
48c3d0e3f2 Update commondocgenerator.class.php 2017-10-02 00:36:15 +02:00
Laurent Destailleur
f15ce54c05 Update commondocgenerator.class.php 2017-10-02 00:34:55 +02:00
Laurent Destailleur
c118f4a317 Merge pull request #7511 from Oeris/develop-api
NEW Get a list of payments terms
2017-10-02 00:13:30 +02:00
Laurent Destailleur
a81d458829 Merge pull request #7509 from dolibarr95/patch-21
NEW Add the attribute accept to the input form for file upload
2017-10-02 00:12:03 +02:00
Laurent Destailleur
03c08b1de4 Merge pull request #7507 from dolibarr95/patch-20
Line missing (error 500)
2017-10-02 00:10:03 +02:00
Laurent Destailleur
94ae6c62e6 Add htmlheader field for each page 2017-10-02 00:08:00 +02:00
Laurent Destailleur
e13f29b4c8 Add ID of page 2017-10-01 21:29:49 +02:00
Laurent Destailleur
8180967652 Enhance fetch of external page for module website 2017-10-01 20:37:41 +02:00
AXeL-dev
46800afac9 FIX: missing variables in payment form 2017-10-01 18:38:08 +01:00
AXeL-dev
f7dcf1ca45 FIX: wrong user first name/last name position in user tooltip 2017-10-01 18:35:06 +01:00
AXeL-dev
5df0f4c2fd FIX: in payment form, label does not fill with GET method 2017-10-01 18:33:22 +01:00
Laurent Destailleur
f785203c0d Creating a page from an external url can grab images too. 2017-10-01 18:27:54 +02:00
Laurent Destailleur
b3939f12b9 Enhance the default value feature 2017-10-01 15:06:43 +02:00
Laurent Destailleur
3ddd5d3d3a The default value feature is sensitive to url parameters. 2017-10-01 14:54:17 +02:00
Nicolas Leichtle
629c6d93f6 FIX: REST function addTimeSpent 2017-10-01 14:33:59 +02:00
Laurent Destailleur
b7810d95b9 Fix permissions 2017-09-30 20:43:15 +02:00
Laurent Destailleur
2c1f1ec651 Try to fix autocomplete 2017-09-30 20:31:20 +02:00
Laurent Destailleur
e23a88732e Fix default value on extrafields 2017-09-30 20:05:34 +02:00
Laurent Destailleur
47c0231fb8 Fix error management 2017-09-30 19:12:12 +02:00
Laurent Destailleur
a43dcbd0c5 Fix no "now" link on search of a date extrafield in list 2017-09-30 18:57:21 +02:00
Laurent Destailleur
976cbd5f83 Fix javascript error and input field for password extrafield in list 2017-09-30 18:52:33 +02:00
Laurent Destailleur
9ba8b9bf7e Fix stay on create form if creation fails 2017-09-30 18:19:20 +02:00
Nicolas Leichtle
95cc007b39 NEW: Add project related fields to ODT 2017-09-30 15:40:17 +02:00
Laurent Destailleur
fa6c3eff80 More PHPunit on invoice deletion 2017-09-30 12:53:24 +02:00
Laurent Destailleur
0feae17ef5 Fix file not always defined 2017-09-30 11:51:34 +02:00
Regis Houssin
cb9d627f02 Fix: Set LDAP password when LDAP key changed 2017-09-30 11:51:22 +02:00
Regis Houssin
46cc23c568 Fix: $this->pass is empty if DATABASE_PWD_ENCRYPTED is used 2017-09-30 10:41:35 +02:00
Regis Houssin
df1603de6d Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_ldap 2017-09-30 08:56:50 +02:00
Laurent Destailleur
0e15aef44f CSS 2017-09-30 00:30:58 +02:00
Laurent Destailleur
02f069713e Standardize code 2017-09-29 17:43:32 +02:00
Regis Houssin
7134884a08 Revert "Fix: wrong contante value"
This reverts commit ffc4f5021a.
2017-09-29 16:57:25 +02:00
Regis Houssin
ffc4f5021a Fix: wrong contante value 2017-09-29 16:03:05 +02:00
Regis Houssin
7e7dd6c126 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_ldap 2017-09-29 16:01:48 +02:00
Laurent Destailleur
b50a0df6fb Tab notes and linked files supported by module builder 2017-09-29 15:44:43 +02:00
Laurent Destailleur
d2d77d4625 Module builder 2017-09-29 15:19:49 +02:00
Regis Houssin
9490e13c21 Fix: command not found with escapeshellarg ! 2017-09-29 14:52:05 +02:00
Laurent Destailleur
abc86d72f6 Module builder 2017-09-29 13:41:59 +02:00
Laurent Destailleur
9654c4f168 New extrafields are visible into list by default 2017-09-29 13:29:48 +02:00
Laurent Destailleur
f007f9e7e5 NEW Add new property visible dy default on lists on extrafields 2017-09-29 13:26:44 +02:00
Regis Houssin
76c89aed9b Fix: add lastname 2017-09-28 19:13:26 +02:00
Regis Houssin
35b290a7df Fix: Trad already exists 2017-09-28 19:04:33 +02:00
Regis Houssin
660c5dd03d Fix: avoid ldap error when firstname and lastname is empty 2017-09-28 18:49:33 +02:00
Regis Houssin
f58fb6b6f6 Fix: syntax error 2017-09-28 18:29:11 +02:00
Regis Houssin
8a09472def Fix: civility_id is not an integer ! 2017-09-28 18:23:06 +02:00
Neil Orley
7374a2accd NEW Download a document using the REST API
Adds the ability to download a document using the REST API
The document is sent in a base64 encoded format.
The API will return :

{
  "filename": "CO1709-0002.pdf",
  "content": "JVBERi0xLjMKJ...",
  "encoding": "MIME base64 (base64_encode php function, http://php.net/manual/en/function.base64-encode.php)"
}
2017-09-28 12:14:49 +02:00
Neil Orley
3788fda063 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop-api 2017-09-28 12:12:25 +02:00
Rui Strecht
b6103b69ff Merge branch 'develop' of https://github.com/ruistrecht-alt/dolibarr; branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-28 09:35:35 +01:00
Laurent Destailleur
e878f3cfd5 No more need of contacts on each tab by default 2017-09-27 20:15:56 +02:00
Laurent Destailleur
6bdfa99fc2 FIX The backtopage 2017-09-27 20:07:01 +02:00
Laurent Destailleur
fdc1aa2a03 NEW Move contacts of a thirdparty on tab Contacts/Addresses 2017-09-27 19:56:03 +02:00
Rui Strecht
b2c7113ed3 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-27 18:49:17 +01:00
Laurent Destailleur
7a0b8c3964 Translation 2017-09-27 18:23:49 +02:00
Laurent Destailleur
8242469e40 FIX The unique index on email templates can work now. 2017-09-27 18:16:28 +02:00
Regis Houssin
a38668033d Fix: missing modification 2017-09-27 17:46:17 +02:00
Laurent Destailleur
f1f4a2fb44 Add email template to send SEPA mandate 2017-09-27 17:40:14 +02:00
Regis Houssin
9823d6622c Fix: use default $shared value 2017-09-27 17:40:02 +02:00
Regis Houssin
20684b4505 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/core/modules/rapport/pdf_paiement.class.php
	htdocs/core/modules/rapport/pdf_paiement_fourn.class.php
2017-09-27 17:22:18 +02:00
Laurent Destailleur
be60e66d62 Uniformsize code/options 2017-09-27 16:29:33 +02:00
gauthier
4084da28d1 FIX : revert wrong code 2017-09-27 15:21:36 +02:00
arnaud
f29ea35dc8 Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_comment_generic_element 2017-09-27 14:56:52 +02:00
Neil Orley
bb4b2c5d88 NEW Get the list of payments terms
Adds the ability to get the list of payments terms using the REST API.
2017-09-27 12:34:41 +02:00
Neil Orley
8c8868d76d Remove spaces 2017-09-27 12:32:18 +02:00
Neil Orley
b8afabfd0b Change RestException return code 503 to 400 (Bad request) when the request is incorrect : SQL error or wrong sqlfilter
Add comment to getPaymentTypes function
Change the "API class for" description from "payment type" to "dictionaries"
Change Copyright to add all previous devs
2017-09-27 12:27:47 +02:00
Neil Orley
154d5c876c NEW Get the list of payments terms
Adds the ability to get the list of payments terms using the REST API.
2017-09-27 12:24:19 +02:00
dolibarr95
00862913d8 Add the attribute accept to input tag
I know this is not a security check but it is more convenient for the user when in a form only images or pdf are accepted for example.
see : 
*https://www.w3.org/wiki/HTML/Elements/input/file
*https://www.w3schools.com/TagS/att_input_accept.asp

Hope every body needs it.
tks
2017-09-27 11:12:38 +02:00
Rui Strecht
f05495b439 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-27 09:34:32 +01:00
gauthier
1694737e0b NEW : new param on load_board() function in ActionComm class to avoid duplicate code 2017-09-27 10:09:21 +02:00
dolibarr95
3849da4fe4 Line missing (error 500)
Create an instance of ProductFournisseur.
2017-09-27 09:09:38 +02:00
Laurent Destailleur
8ae798f2e5 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-26 22:11:27 +02:00
Laurent Destailleur
f1a563625b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/actions_massactions.inc.php
	htdocs/install/mysql/migration/5.0.0-6.0.0.sql
2017-09-26 22:11:00 +02:00
Laurent Destailleur
d232f8e3d5 Merge pull request #7500 from dolibarr95/patch-19
Try to fix 7492
2017-09-26 20:57:37 +02:00
Laurent Destailleur
7cf1a41853 Try to replace error into warning, so we can still make the order if qty too low 2017-09-26 20:57:09 +02:00
Laurent Destailleur
68708d7344 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-26 20:32:00 +02:00
Laurent Destailleur
938989d2e4 Update doc 2017-09-26 20:31:39 +02:00
Laurent Destailleur
36b199e78c Merge pull request #7433 from tysauron/patch-11
For use ajax combobox for societe and contacts in action card create.
2017-09-26 20:13:52 +02:00
Laurent Destailleur
4dd737fe44 Merge pull request #7503 from fappels/develop
Dispatch clean code and remove deprecated code
2017-09-26 20:06:44 +02:00
Laurent Destailleur
6b9e754221 Merge pull request #7496 from papoteur-mga/rapports_paiements
Rapports paiements
2017-09-26 20:02:09 +02:00
Laurent Destailleur
5b0440e66b Merge pull request #7491 from Oeris/6.0-api
NEW get payment types using the REST API + consolidates REST dictionary APIs
2017-09-26 19:58:22 +02:00
Laurent Destailleur
53997c5d8c Merge pull request #7488 from AurelienC/patch-1
FIX Solve bug with alias name shown on wrong thirdparty in list
2017-09-26 19:35:24 +02:00
Rui Strecht
d6037f269c Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-26 16:27:23 +01:00
Laurent Destailleur
7178bf0132 Work on direct external link for dolibarr objects 2017-09-26 16:56:33 +02:00
fappels
ca6ad909e7 remove deprecated file 2017-09-26 16:23:00 +02:00
fappels
7d965f58d6 Clean code 2017-09-26 16:21:28 +02:00
Laurent Destailleur
d7dd6ed334 Fix undefined var 2017-09-26 16:15:22 +02:00
fappels
35835a8b09 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-09-26 16:13:17 +02:00
gauthier
d270a8e009 FIX : same than precedent commit 2017-09-26 16:09:40 +02:00
gauthier
8de9c5cd36 FIX : forgotten php doc on function parameter 2017-09-26 14:18:26 +02:00
dolibarr95
7b106bc642 Try to fix 7492
check if enough quantity
2017-09-26 14:13:11 +02:00
Laurent Destailleur
d1bee67b40 FIX #3991 2017-09-26 13:09:19 +02:00
florian HENRY
6fcfe89565 NEW : lettrage in accountancy 2017-09-26 13:02:29 +02:00
Laurent Destailleur
e140878458 NEW Can import local tax rates in prices 2017-09-26 13:00:09 +02:00
Papoteur
cc9954e95e Clean debug messages 2017-09-26 12:51:14 +02:00
Laurent Destailleur
74a2a4c257 Better translation 2017-09-26 12:34:18 +02:00
gauthier
7f938bc517 NEW : unexistant function load_state_board() on several objects 2017-09-26 12:32:58 +02:00
Papoteur
50d639f1fa Add total and subtotal in payments reports 2017-09-26 12:10:51 +02:00
Papoteur
cbe1683fe7 Invoice number on one line instead of two (issue#7487) 2017-09-26 11:30:28 +02:00
Papoteur
d2c55ea07b Factorize code between payments reports client/provider 2017-09-26 11:27:53 +02:00
Rui Strecht
ae47b8d3e6 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-26 09:50:19 +01:00
Neil Orley
f5be144beb NEW Consolidates REST dictionary APIs into a single tree and a single file
The php code of the files "htdocs / api / class / api_dictionary * .class.php" has been integrated into a single file: "htdocs / api / class / api_dictionary.class.php".
2017-09-26 10:48:35 +02:00
Laurent Destailleur
4f76545b62 Add missing fields to manage localtax on supplier products 2017-09-26 10:47:08 +02:00
Rui Strecht
542d00a230 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-26 09:40:26 +01:00
Laurent Destailleur
5482f80c0e Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-26 10:30:47 +02:00
Neil Orley
ceb868493e NEW get payement types using the REST API
Adds the ability to get payments types using the REST API
2017-09-26 10:12:42 +02:00
gauthier
79049f55b7 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into NEW_custom_meteo 2017-09-26 09:56:00 +02:00
Aurélien
a350a06755 Solve bug with alias name display
The bug display the alias name on the following name between brackets after name column.
2017-09-25 21:15:35 +02:00
Laurent Destailleur
f1791b5bf4 Better translation 2017-09-25 19:58:38 +02:00
Laurent Destailleur
c9e9f60f8f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/filefunc.inc.php
2017-09-25 19:55:52 +02:00
Rui Strecht
6115093d8f Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-25 18:33:10 +01:00
Laurent Destailleur
698b13a229 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-25 19:08:29 +02:00
Laurent Destailleur
58bc30ae9a Add indian vat 2017-09-25 19:08:17 +02:00
Laurent Destailleur
845a33653a Fix translation 2017-09-25 19:07:57 +02:00
Laurent Destailleur
051ca6fdc4 Merge pull request #7162 from hguibourgdev/patch-5
NEW Can show stock in alert even if alter is set to 0
2017-09-25 18:17:18 +02:00
Laurent Destailleur
278f37fe5a Merge pull request #7485 from hregis/develop_trad
Fix: uniformize code
2017-09-25 18:13:58 +02:00
Laurent Destailleur
dc362fcd30 NEW Can show currency in list of bank accounts 2017-09-25 18:11:03 +02:00
Laurent Destailleur
fcdbc66bb1 Merge pull request #7122 from atm-florian/develop_fixtransfert
NEW : Can transfer from bank account to bank account with different currencies
2017-09-25 17:36:52 +02:00
Laurent Destailleur
aeeda250c7 Merge pull request #7443 from salnaSrc/myFixes
Add hidden option WORKFLOW_CLASSIFY_IF_AMOUNTS_ARE_DIFFERENTS
2017-09-25 17:28:28 +02:00
Laurent Destailleur
4504fd8c48 Merge pull request #7483 from peckpeck/permit_any_variant_separator
NEW Add a parameter to specify char used as separator for variant product label
2017-09-25 17:20:29 +02:00
gauthier
3cec308586 NEW : langs 2017-09-25 17:19:56 +02:00
gauthier
3db52aed78 NEW : calcul percentage ok 2017-09-25 17:13:50 +02:00
Regis Houssin
16941f1d9d Fix: uniformize code 2017-09-25 16:46:13 +02:00
Rui Strecht
7fd690df3b Merge branch 'develop' of https://github.com/ruistrecht-alt/dolibarr; branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-25 14:58:58 +01:00
gauthier
6fa1929d5c NEW : change description on click 2017-09-25 12:26:15 +02:00
Benoît Peccatte
0ffffa3019 Add a parameter to specify variant identifier separator 2017-09-25 12:05:12 +02:00
Laurent Destailleur
7b9facc76a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-25 11:43:12 +02:00
Laurent Destailleur
a9fabf117e Code comment 2017-09-25 11:42:59 +02:00
Laurent Destailleur
53d931dd11 Merge pull request #7481 from dolibarr95/patch-17
Fix 7470
2017-09-25 11:34:00 +02:00
Laurent Destailleur
c3e6577609 Merge pull request #7416 from hregis/develop_ldap
NEW add members types ldap group management
2017-09-25 11:30:35 +02:00
Rui Strecht
31f06f2c71 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-25 09:20:10 +01:00
dolibarr95
6ee15f1c45 Fix 7470
php warning when  MAIN_MODULE_xxxxx_DIR exists but the module does not have a directory.
2017-09-25 09:01:47 +02:00
Regis Houssin
d592664150 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-09-25 06:48:26 +02:00
Regis Houssin
92ff974c5b Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_ldap 2017-09-25 06:47:34 +02:00
Laurent Destailleur
e3da4188e2 GETPOST must not clean data for text input. 2017-09-25 00:16:52 +02:00
Laurent Destailleur
3f9cae745c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-24 23:40:57 +02:00
Laurent Destailleur
af384f14ae FIX #7477 2017-09-24 23:40:42 +02:00
Laurent Destailleur
cee57129d6 Merge pull request #7467 from Oeris/6.0-api
NEW get and post lines of an invoice using the REST API
2017-09-24 22:01:33 +02:00
Laurent Destailleur
934edd9f5a Merge branch 'develop' into 6.0-api 2017-09-24 22:01:07 +02:00
Laurent Destailleur
ddefdd12fb Merge pull request #7460 from dvasseur/develop
FIX: REST API, date field not used for invoices creation
2017-09-24 21:56:41 +02:00
Laurent Destailleur
707c8fde5e Merge pull request #7474 from hregis/develop_trad
Fix: phpcs error
2017-09-24 21:47:31 +02:00
Laurent Destailleur
2285e9bc0b Merge branch 'develop' into develop_trad 2017-09-24 21:47:17 +02:00
Laurent Destailleur
971e59395c Fix phpcs 2017-09-24 21:46:14 +02:00
Laurent Destailleur
7a6180858e Fix phpunit 2017-09-24 21:12:50 +02:00
Laurent Destailleur
2e511badf9 Code comment 2017-09-24 21:02:20 +02:00
Laurent Destailleur
3482b12933 Comment deprecated js code 2017-09-24 20:55:48 +02:00
Laurent Destailleur
4246cf24f3 Perf enhancement: Remove one include of js. 2017-09-24 20:36:27 +02:00
Laurent Destailleur
49e9326a6d Code comment 2017-09-24 19:50:32 +02:00
Regis Houssin
b48fe684d3 Fix: wrong return when cancel 2017-09-24 17:43:01 +02:00
Regis Houssin
06ee9f4775 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_ldap 2017-09-24 16:10:55 +02:00
Regis Houssin
0cdca6f3eb Fix: phpcs error 2017-09-24 11:10:33 +02:00
Laurent Destailleur
c65f794f87 Code comment 2017-09-24 10:29:48 +02:00
Laurent Destailleur
fac4ebec22 Code comment 2017-09-24 10:26:43 +02:00
Laurent Destailleur
f4b35a304b Update doc 2017-09-24 02:32:21 +02:00
Laurent Destailleur
97ece5fda9 CSS 2017-09-24 01:49:59 +02:00
Laurent Destailleur
87a75a0ad7 CSS not bold on jnotify messages 2017-09-24 01:46:00 +02:00
Laurent Destailleur
91d303465d NEW Can add html content on right of tabs 2017-09-24 01:39:06 +02:00
Laurent Destailleur
b9f2a53b36 Debug modulebuilder 2017-09-23 23:51:49 +02:00
Laurent Destailleur
b4e461e7ea Debug modulebuilder 2017-09-23 18:17:34 +02:00
Laurent Destailleur
bee94b32d9 Debug modulebuilder 2017-09-23 15:12:25 +02:00
Laurent Destailleur
7d580105c8 Fix css 2017-09-23 13:02:25 +02:00
Laurent Destailleur
414f633e75 Fix css 2017-09-23 12:59:49 +02:00
Laurent Destailleur
91beb3a4d6 Debug modulebuilder 2017-09-23 11:39:09 +02:00
Laurent Destailleur
35d00fd2ec Fix wrap on lites_total 2017-09-23 09:28:31 +02:00
Laurent Destailleur
839f3ca41d NEW Can use an url like $conf->global>-MYPARAM for menu urls 2017-09-23 03:22:48 +02:00
Laurent Destailleur
a94f2b07e1 Fix css 2017-09-23 02:46:33 +02:00
Laurent Destailleur
57adc28256 Work on modulebuilder 2017-09-23 01:45:03 +02:00
Laurent Destailleur
96aed9c29d Work on modulebuilder 2017-09-22 23:38:25 +02:00
Regis Houssin
791c385e5b Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_ldap

Conflicts:
	htdocs/adherents/card.php
2017-09-22 20:26:22 +02:00
Laurent Destailleur
63ec14e47d Convert sode to send member info email into new generic email template
system.
2017-09-22 20:18:11 +02:00
Laurent Destailleur
f990667b1a NEW Can send email from the member card using email templates. 2017-09-22 17:48:38 +02:00
Laurent Destailleur
8578a1b825 NEW Option "one email per recipient" when using bulk actions emails. 2017-09-22 17:04:26 +02:00
Laurent Destailleur
6d7db96359 NEW Option "one email per recipient" when using bulk actions emails. 2017-09-22 16:31:05 +02:00
Rui Strecht
bffe21d058 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-22 14:35:37 +01:00
Laurent Destailleur
d4bde2a4ea Fix date substitution for contracts 2017-09-22 15:12:36 +02:00
Laurent Destailleur
252f038468 Mutualize code of substitutions for emails 2017-09-22 14:34:31 +02:00
Neil Orley
9498fca5e1 Add of implementation notes with an exemple 2017-09-22 12:24:42 +02:00
Neil Orley
1aedc4a793 Change the term 'order' by 'invoice' 2017-09-22 12:18:11 +02:00
Neil Orley
ad6778a1cf NEW post lines of an invoice using the REST API
Adds the ability to post a new lins in an invoice using the REST API
2017-09-22 12:08:11 +02:00
Neil Orley
f985b1ede6 NEW GET lines of an invoice in the REST API
Adds the ability to get lines of an invoice using the REST API
2017-09-22 12:00:54 +02:00
Neil Orley
4cd89abffc Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0-api 2017-09-22 11:58:37 +02:00
Laurent Destailleur
236cf853e5 Sort list of invoice template 2017-09-22 11:47:36 +02:00
Laurent Destailleur
bd45ea5a03 Split page for invoice template into card + list. Add more filters. 2017-09-22 11:28:53 +02:00
Rui Strecht
a34a49d1ce Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-22 09:49:38 +01:00
Laurent Destailleur
292095f0c6 NEW Can filter on type of email template 2017-09-22 10:11:51 +02:00
tysauron
e6e3e8ca68 Adding Field "First date of expire" + filter
Ajout d'une colonnes "1er date de fin" avec filtre par mois année et choix "<" ou ">" 
Le filtre exclue toutes les lignes fermé.
Permet de voir les contrat a renouvelé prochainement
Présélection du mois encours.
2017-09-22 02:43:42 +02:00
Laurent Destailleur
9875d20eaf Add more columns in list of invoices templates 2017-09-21 18:35:47 +02:00
David
9dab694bb0 FIX: REST API, date field not used for invoices creation 2017-09-21 17:48:12 +02:00
gauthier
d51c22a012 NEW : customizable meteo in value or percentage 2017-09-21 17:28:00 +02:00
Rui Strecht
72b8a22900 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-21 15:39:25 +01:00
fappels
02f6bc7b4f Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-09-21 14:43:10 +02:00
Laurent Destailleur
a3347e83b3 Better error message 2017-09-21 14:04:25 +02:00
Laurent Destailleur
57358f0ce5 NEW Provide a way to download a file from a public URL for files in ECM 2017-09-21 14:02:42 +02:00
Laurent Destailleur
96efe43e3c NEW Provide a way to download a file from a public URL. 2017-09-21 12:48:07 +02:00
Regis Houssin
71fc5a99d6 Fix: list already load in trigger 2017-09-21 12:19:14 +02:00
Regis Houssin
01f9d59e75 Fix: use another method 2017-09-21 12:16:01 +02:00
Laurent Destailleur
296e678c1b Solve url too long with paybox 2017-09-21 12:02:46 +02:00
Laurent Destailleur
cb90ab124b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-21 11:54:49 +02:00
Laurent Destailleur
23604a2b54 NEW Add hidden option PROJECT_DISABLE_UNLINK_FROM_OVERVIEW 2017-09-21 11:54:37 +02:00
Laurent Destailleur
8a06a1f433 Code comment 2017-09-21 11:50:36 +02:00
Laurent Destailleur
dafeb4c651 Merge pull request #6806 from mikee2/develop
New fields in Segment.php
2017-09-21 11:42:31 +02:00
Laurent Destailleur
5980651103 Merge branch 'develop' into develop 2017-09-21 11:41:30 +02:00
Laurent Destailleur
e56840b9ec Clean deprecated code 2017-09-21 11:35:18 +02:00
Laurent Destailleur
d71916af7b Merge pull request #7437 from tysauron/patch-12
Rename "->fk_action"   in  "->type_id"
2017-09-21 11:26:38 +02:00
Laurent Destailleur
ee01ebba0f Merge pull request #7441 from tysauron/patch-13
For use ajax select company
2017-09-21 11:19:39 +02:00
Laurent Destailleur
beac7a7439 Work on direct download links 2017-09-20 21:29:27 +02:00
Laurent Destailleur
0eb416d4af Fix removal of a file 2017-09-20 20:41:40 +02:00
Laurent Destailleur
2831f90b42 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-20 19:36:33 +02:00
Laurent Destailleur
2f317c5834 Debug online payment using unique form 2017-09-20 19:34:14 +02:00
Laurent Destailleur
81596b503c Merge pull request #7445 from hregis/develop_trad
Fix: check if array and check empty value if required
2017-09-20 17:38:00 +02:00
Laurent Destailleur
1cedd63c4e Merge pull request #7440 from tysauron/patch-14
Bug get socid with old object sosciete
2017-09-20 17:34:25 +02:00
Laurent Destailleur
577c64cc37 WIP work on param download on payment page 2017-09-20 17:23:36 +02:00
Neil Orley
b62e08efc3 Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0-api 2017-09-20 15:40:38 +02:00
Laurent Destailleur
1d6213ea7d Add picto for cheque payment 2017-09-20 15:29:47 +02:00
Regis Houssin
1314e00bc6 Fix: check if array and check empty value if required 2017-09-20 14:46:51 +02:00
Regis Houssin
1f59e4f7e9 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_ldap 2017-09-20 12:47:35 +02:00
Pilon David
78b45bd972 Update interface_20_modWorkflow_WorkflowManager.class.php 2017-09-20 09:41:32 +02:00
tysauron
3220225af3 Bug get socid with old object sosciete 2017-09-20 00:53:48 +02:00
tysauron
8bb3130aab For use ajax select company 2017-09-20 00:35:52 +02:00
Laurent Destailleur
cfd29841e1 NEW Option STOCK_SUPPORTS_SERVICES become visible. 2017-09-19 23:42:20 +02:00
Laurent Destailleur
04e1458a3f Fix clean parameters 2017-09-19 22:03:44 +02:00
Laurent Destailleur
8dfa87fcf6 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-19 19:30:28 +02:00
Laurent Destailleur
ffe2ee8232 Standardize code 2017-09-19 19:00:28 +02:00
Laurent Destailleur
c38ed54990 Disable old datepicker 2017-09-19 17:31:37 +02:00
tysauron
5643d4e867 Rename "->fk_action" in "->type_id"
(is old name)
2017-09-19 17:26:18 +02:00
Laurent Destailleur
5f7631a95d NEW Days where user is on vacation use different colors in timesheet. 2017-09-19 17:07:39 +02:00
Laurent Destailleur
2a04d497da Use a different css into timespent entry page when user is on holiday 2017-09-19 16:40:55 +02:00
tysauron
0803e03ca9 For use ajax combobox for societe and contacts in action card create. 2017-09-19 14:53:34 +02:00
Laurent Destailleur
77d1a15016 Activate warning for french "Loi Finance 2016" 2017-09-19 12:03:48 +02:00
Darkjeff
e8bd0c8f6b Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-09-19 09:13:57 +02:00
Laurent Destailleur
0b67ac36f1 Show image on tool page 2017-09-19 02:01:05 +02:00
Laurent Destailleur
b723d2c2d2 Fix scrutinizer bugs 2017-09-19 01:39:22 +02:00
Laurent Destailleur
89bfb81cc7 Fix repair 2017-09-19 01:05:13 +02:00
Laurent Destailleur
1e33495f42 Fix remove warnings 2017-09-19 00:31:51 +02:00
Laurent Destailleur
ed932db3a3 Merge pull request #7426 from hregis/develop_bug
Fix: avoid Warning: A non-numeric value encountered
2017-09-19 00:27:40 +02:00
Laurent Destailleur
777e1e1efa Merge pull request #7429 from Gitdyr/develop
Fix: Changed "Solde" to "Balance"
2017-09-19 00:25:40 +02:00
Kjeld Borch Egevang
ee99483b0d Changed "Solde" to "Balance". 2017-09-18 22:30:08 +02:00
Rui Strecht
7848d99b2c Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-18 16:42:40 +01:00
arnaud
e7bb7a3588 Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_comment_generic_element 2017-09-18 17:28:03 +02:00
arnaud
9795f48046 NEW comment system working with all objects 2017-09-18 17:27:29 +02:00
Regis Houssin
cdd1473cfa Fix: avoid Warning: A non-numeric value encountered 2017-09-18 16:30:01 +02:00
Laurent Destailleur
da6b1e92b2 NEW Add the total in the perday view of the time spent form. 2017-09-18 14:18:34 +02:00
Rui Strecht
e74f4b8b11 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-18 12:25:54 +01:00
Laurent Destailleur
85d59b32b3 Add timespent entry into HR top menu too
Faster update of total of timespent
2017-09-18 13:15:24 +02:00
Regis Houssin
f550e27579 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_ldap 2017-09-18 12:15:01 +02:00
Laurent Destailleur
1760972166 Merge pull request #7419 from hregis/develop_trad
Fix: wrong image url and file not present
2017-09-18 11:43:21 +02:00
Rui Strecht
0e1772cf66 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-18 10:43:05 +01:00
Laurent Destailleur
230644070b Better detection of log to include merge labels 2017-09-18 11:42:05 +02:00
Laurent Destailleur
cc1b7c06ef Merge pull request #7417 from defrance/patch-27
NEW Can add link to other element on a donation
2017-09-18 11:17:40 +02:00
Laurent Destailleur
594e13180a Merge pull request #7415 from azawawi/develop
Fix example comment typo
2017-09-18 11:16:55 +02:00
Laurent Destailleur
0355b0d9ed Merge pull request #7414 from aspangaro/7.0-4
Accountancy - Finish moving admin to specific menu & some cleaning
2017-09-18 11:16:36 +02:00
Regis Houssin
bb0cb8adf4 Fix: remove unused file 2017-09-18 11:04:55 +02:00
Laurent Destailleur
dff4249e97 NEW Can include extrafields into member card templates 2017-09-18 10:48:49 +02:00
Regis Houssin
8389555882 Fix: wrong image url and file not present 2017-09-18 10:33:54 +02:00
Regis Houssin
a03ef95eaa Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/install/mysql/tables/llx_c_payment_term.sql
2017-09-18 09:11:04 +02:00
Laurent Destailleur
291a0d46e6 Fix edit of categories 2017-09-18 01:39:39 +02:00
Laurent Destailleur
3f7b705674 Use correct term accounting for codes 2017-09-18 00:48:09 +02:00
Laurent Destailleur
aea7318fae Fix search on ref customer 2017-09-18 00:07:00 +02:00
Laurent Destailleur
d1fd1df345 Add column position on some dictionaries table 2017-09-17 22:52:29 +02:00
Laurent Destailleur
90ab6a1f30 Fix box activity again 2017-09-17 21:29:25 +02:00
Laurent Destailleur
f4b8489bd6 Fix box activity again 2017-09-17 21:24:30 +02:00
Laurent Destailleur
0ed5b329a7 Fix box activity again 2017-09-17 21:21:12 +02:00
Laurent Destailleur
e244ee6715 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-17 21:17:04 +02:00
BENKE Charlene
ae2e0a70ae Update card.php 2017-09-17 20:45:00 +02:00
BENKE Charlene
7ee0b1061b Link feature on donation 2017-09-17 20:43:42 +02:00
Laurent Destailleur
fb15b2aab0 Fix activity box 2017-09-17 20:36:45 +02:00
Laurent Destailleur
9dbd88f0ba FIX Calculation in the activity box 2017-09-17 20:17:51 +02:00
Laurent Destailleur
41e19e723b Fix look and feel v6 2017-09-17 20:05:36 +02:00
Laurent Destailleur
dece156a99 NEW Add supplier proposals into stats of product page. 2017-09-17 18:08:43 +02:00
Laurent Destailleur
a3c555049d NEW Add supplier proposals into stats of product page. 2017-09-17 18:08:23 +02:00
Laurent Destailleur
fa18e788b5 Fix must use photo of user 2017-09-17 17:29:00 +02:00
Laurent Destailleur
fc7d27c75c Fix bad constant 2017-09-17 17:19:18 +02:00
Laurent Destailleur
ab5724e7ff Mutualize code for forms to send emails. Remove thousand line of code. 2017-09-17 17:12:14 +02:00
Regis Houssin
1f88e624c2 Fix: add ldap import/export script 2017-09-17 10:42:00 +02:00
Laurent Destailleur
e014ac6ea9 NEW Send by email available in bulk for expense report 2017-09-16 22:03:25 +02:00
Regis Houssin
d9b3a4e456 Fix: phpcs 2017-09-16 21:58:05 +02:00
Regis Houssin
bdc425c203 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_ldap 2017-09-16 21:41:55 +02:00
Regis Houssin
87b81fb2fd NEW add members types ldap group management 2017-09-16 21:41:30 +02:00
Laurent Destailleur
b4eab24490 Add project into list of customer orders 2017-09-16 20:32:28 +02:00
Laurent Destailleur
432df8eacf NEW Enabled sending email in bulk actions for supplier orders 2017-09-16 20:31:33 +02:00
Laurent Destailleur
0fec777d0e NEW On bulk email from a list, can uncheck "Join main document".
NEW Show direct preview link on contract
2017-09-16 18:31:30 +02:00
Regis Houssin
4ab1f68102 Fix: check connectivity for avoid ldap errors 2017-09-16 17:12:51 +02:00
Regis Houssin
f584212700 Fix: use >0 instead !isnull 2017-09-16 16:06:34 +02:00
Laurent Destailleur
318e285ba2 NEW Add protection to avoid to send to much emails using builk actions 2017-09-16 16:00:58 +02:00
Laurent Destailleur
630dc92a13 NEW Mass PDF Merging is available on contracts 2017-09-16 15:39:52 +02:00
Laurent Destailleur
c7e841b340 FIX Must use pdf format page as default for merging PDF. 2017-09-16 15:36:04 +02:00
Laurent Destailleur
e56b41c1ae Clean code 2017-09-16 13:28:13 +02:00
Laurent Destailleur
52f89ef2c0 FIX Better protection to no send email when we change limit 2017-09-16 13:26:43 +02:00
Laurent Destailleur
0cf67944fa Clean code 2017-09-16 13:14:46 +02:00
Laurent Destailleur
9077b5f374 Translation 2017-09-16 12:48:51 +02:00
Laurent Destailleur
ad40d27324 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/actions_sendmails.inc.php
2017-09-16 12:22:18 +02:00
Regis Houssin
9653280be9 New: big refactorization and uniformize code 2017-09-16 10:54:20 +02:00
Laurent Destailleur
b099e0a135 Fix translation of dolistore interface 2017-09-16 10:42:23 +02:00
Laurent Destailleur
695c231e78 Update code comment 2017-09-16 10:26:27 +02:00
Laurent Destailleur
bd7c4fe940 NEW Summary of last events on a card are sorted on decreasing date. 2017-09-16 10:12:44 +02:00
Ahmad M. Zawawi
5fd7cdff5c Fix example comment typo 2017-09-16 10:53:16 +03:00
Laurent Destailleur
4e7e6cc658 Fix W3C 2017-09-16 09:15:10 +02:00
Laurent Destailleur
baa32f6ed8 FIX Responsive 2017-09-16 09:13:57 +02:00
Alexandre SPANGARO
c2e1e2491d Accountancy - Finish moving admin to specific menu & some cleaning 2017-09-16 06:53:29 +02:00
Laurent Destailleur
a6b600c8a1 Fix regression in unit tests 2017-09-16 03:54:23 +02:00
Laurent Destailleur
961d475a9d More complete substitution system.
Add __CONTRACT_NEXT_EXPIRATION_DATE__  and
__CONTRACT_NEXT_EXPIRATION_DATETIME__
2017-09-16 03:45:29 +02:00
Laurent Destailleur
a4086b52ef NEW Can send email from contract card 2017-09-16 01:34:15 +02:00
Laurent Destailleur
b13dbf1f06 Clean code. Make selection of template working even if public. 2017-09-16 00:49:46 +02:00
Laurent Destailleur
f4de75afc3 FIX Position of signature on strato template 2017-09-16 00:49:00 +02:00
Laurent Destailleur
8773a6860f Fix HTML5 use of <br> is preferred to <br /> 2017-09-15 23:49:04 +02:00
Laurent Destailleur
ffb3823655 Allow null in stock alert threshold to be compatible with #7162 2017-09-15 23:38:03 +02:00
Laurent Destailleur
a8b4d216e5 Fix PHPCS 2017-09-15 23:21:42 +02:00
Rui Strecht
39341f0095 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-15 18:52:14 +01:00
Laurent Destailleur
3c9532841f Fix regression db => this->db 2017-09-15 19:37:23 +02:00
Rui Strecht
36e634ae4c Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-15 18:34:25 +01:00
Rui Strecht
33d00d508e Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into develop 2017-09-15 18:32:03 +01:00
Laurent Destailleur
ac1d701d6f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-15 19:22:24 +02:00
Laurent Destailleur
5fc255075e Merge pull request #7413 from hregis/develop_trad
Fix: translation
2017-09-15 19:21:51 +02:00
Laurent Destailleur
89993e0f3f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-15 19:09:02 +02:00
Laurent Destailleur
55e31796d2 Code comment 2017-09-15 19:08:39 +02:00
Laurent Destailleur
2fcedcad74 Merge pull request #7410 from atm-florian/dev_better_propal_singend_form
NEW: confirm form style to accept or reject proposal
2017-09-15 18:58:25 +02:00
Laurent Destailleur
b63b0933e7 Update card.php 2017-09-15 18:57:39 +02:00
Laurent Destailleur
9d9d5d6dc8 Merge pull request #7399 from ptibogxiv/develop
FIX multicompany
2017-09-15 18:55:29 +02:00
Regis Houssin
767240698f Fix: wrong var name 2017-09-15 18:31:22 +02:00
Regis Houssin
3ca90df524 Fix: translation 2017-09-15 18:21:50 +02:00
Regis Houssin
7f57f737b3 New: Ping ldap server before ldap_connect for avoid waiting 2017-09-15 18:02:52 +02:00
Regis Houssin
cbd8cb8cb7 Fix: missing merge conflict 2017-09-15 17:32:49 +02:00
Regis Houssin
db17eb80ec Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/compta/facture/class/paymentterm.class.php
2017-09-15 16:45:49 +02:00
Laurent Destailleur
88397436c0 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-15 16:41:24 +02:00
Laurent Destailleur
a0e5868fd9 Fix typo 2017-09-15 16:41:10 +02:00
florian HENRY
c9df299418 NEW: confirm form style to accept or reject proposal 2017-09-15 16:06:25 +02:00
Laurent Destailleur
3debd0f49d Merge pull request #7406 from tysauron/patch-10
Performance enhancement. Param to avoid loading all users of a user group
2017-09-15 16:01:19 +02:00
Laurent Destailleur
6b2e8f3614 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-15 15:58:46 +02:00
Laurent Destailleur
56460f877e Merge pull request #7404 from atm-florian/dev_add_search_on_extrafield_contractline
Add search on extrafields on contract service list
2017-09-15 15:58:30 +02:00
Laurent Destailleur
3dbf4cf176 Update services.php 2017-09-15 15:58:02 +02:00
Laurent Destailleur
2b2c465311 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-15 15:57:20 +02:00
Laurent Destailleur
8dcd864477 Rename var $mode to avoid conflicts 2017-09-15 15:57:07 +02:00
Laurent Destailleur
3c7c53f321 Update services.php 2017-09-15 15:55:43 +02:00
Laurent Destailleur
c930ba1669 Merge pull request #7403 from hregis/develop_bug
Fix: avoid Warning: A non-numeric value encountered
2017-09-15 15:52:25 +02:00
Laurent Destailleur
25c4dba8a0 Merge pull request #7402 from hregis/develop_ldap
NEW: Add hook addAdminLdapOptions and doAction in ldap admin page
2017-09-15 15:51:38 +02:00
Laurent Destailleur
5f0819d3b4 Merge branch 'develop' into develop 2017-09-15 15:50:28 +02:00
Laurent Destailleur
a2b4e887bb Merge pull request #7405 from tysauron/patch-9
Beaucoup beaucoup plus rapide
2017-09-15 15:46:51 +02:00
Laurent Destailleur
5e34b121dd Add more robust php unit to detect not escaped sql. Fix not escaped sql 2017-09-15 15:41:07 +02:00
Rui Strecht
1b30af4d0a Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-15 14:34:43 +01:00
Laurent Destailleur
77056d9adb NEW All setup of accountancy can be done from menu "Accountancy-Setup" 2017-09-15 14:09:42 +02:00
Rui Strecht
06b0146232 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-15 13:00:25 +01:00
Laurent Destailleur
1a78e2a055 Mutualize/share code of all payments modes 2017-09-15 13:43:16 +02:00
Rui Strecht
fd27c29354 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-15 12:32:32 +01:00
tysauron
4f15c90aee Pour ne pas charger les membres d'un groupe lorsque l'on charge les groupe d'un user (sinon avec 200 user et 30 groupes = 6000 objects . trop lourd) 2017-09-15 12:58:13 +02:00
tysauron
2abb38afdf Beaucoup beaucoup plus rapide
Pour moi passe de 4 secondes a 0,8 (grosse base)
2017-09-15 12:48:57 +02:00
florian HENRY
db319803ec add sreach on extrafeilds on contract service list 2017-09-15 12:17:18 +02:00
Laurent Destailleur
e254554461 Code comment 2017-09-15 11:28:21 +02:00
Laurent Destailleur
1ffcb5d94e FIX background color not visible in emailing view 2017-09-15 11:24:32 +02:00
Laurent Destailleur
0ade500535 Better support of text editor when no js available. 2017-09-15 11:19:56 +02:00
Regis Houssin
25cd1ee27a Fix: avoid Warning: A non-numeric value encountered 2017-09-15 11:19:19 +02:00
Regis Houssin
a213a5d5fd Fix: missing empty $object 2017-09-15 11:12:56 +02:00
Laurent Destailleur
e02c220c08 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-15 11:04:27 +02:00
Regis Houssin
b9e0879847 NEW: Add hook addAdminLdapOptions and doAction in ldap admin page
NEW: complete_head_from_modules() in ldap_prepare_head()
2017-09-15 10:57:22 +02:00
Laurent Destailleur
f5d2283093 USe second parameter in GETPOST 2017-09-15 10:52:53 +02:00
Laurent Destailleur
0873260b8a USe second parameter in GETPOST 2017-09-15 10:50:50 +02:00
Laurent Destailleur
8f5206accf NEW The lot of a product uses the link and picto when shown into list. 2017-09-15 10:45:41 +02:00
ptibogxiv
5cba2f0daf Update list.php 2017-09-15 01:58:55 +02:00
Laurent Destailleur
3b40c95107 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/categories/class/categorie.class.php
2017-09-14 21:57:14 +02:00
Rui Strecht
70a881ad47 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-14 17:56:37 +01:00
Laurent Destailleur
24cd407cd3 FIX Missing upgrade of fields 2017-09-14 16:52:33 +02:00
Laurent Destailleur
1054b9fc69 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-14 15:21:33 +02:00
Laurent Destailleur
fb634725df Merge #7266 2017-09-14 15:21:13 +02:00
Laurent Destailleur
2f80618545 Merge pull request #7390 from atm-arnaud/FIX_task_comment_design
Fix task comment design
2017-09-14 12:21:58 +02:00
Laurent Destailleur
4b43c97808 Update time.php 2017-09-14 12:21:41 +02:00
Laurent Destailleur
ed9c401ca6 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-14 12:20:26 +02:00
Laurent Destailleur
6aeeb0bd73 Merge pull request #7388 from reeperbahnause/patch-3
FIX #7349 Change Class from Invoices to SupplierInvoices
2017-09-14 12:16:59 +02:00
Laurent Destailleur
51d1c35399 Merge pull request #7380 from tysauron/patch-8
$soc->getAvailableDiscounts .   where soc not set.
2017-09-14 12:12:20 +02:00
Regis Houssin
a494e01f00 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/install/mysql/migration/6.0.0-7.0.0.sql
2017-09-14 12:07:19 +02:00
Laurent Destailleur
165c3ac112 Merge pull request #7374 from EmisFR/develop
Fix dates in commande and remisecheque for PostgreSQL
2017-09-14 12:05:51 +02:00
Laurent Destailleur
1cab73b605 Update remisecheque.class.php 2017-09-14 12:05:34 +02:00
Laurent Destailleur
fd7602382c Merge pull request #7373 from atm-arnaud/FIX_time_without_projectid
FIX time.php crashed without project id in param if project isn't linked to a company
2017-09-14 12:02:16 +02:00
Laurent Destailleur
14d000f011 Update time.php 2017-09-14 12:01:32 +02:00
Laurent Destailleur
74b55d8e8d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-14 11:49:43 +02:00
Laurent Destailleur
defb01c551 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-14 09:56:14 +02:00
Laurent Destailleur
2390d20232 Update travis 2017-09-14 09:56:02 +02:00
Laurent Destailleur
76f94f32ae Fix deletion of company 2017-09-14 09:53:39 +02:00
Laurent Destailleur
93cfde15b2 Try to reduce travis load 2017-09-14 09:37:57 +02:00
Laurent Destailleur
b7c8b30fac Try to reduce travis load 2017-09-14 09:36:38 +02:00
Laurent Destailleur
e51dd970d3 Try to reduce travis load 2017-09-14 09:34:52 +02:00
Laurent Destailleur
3cd4aa434d Try to reduce travis load 2017-09-14 09:33:10 +02:00
Laurent Destailleur
6a650be43d Try to reduce travis load 2017-09-14 09:24:17 +02:00
Laurent Destailleur
205989b64b Fix phpunit 2017-09-14 09:16:57 +02:00
Laurent Destailleur
51e5959765 Fix travis 2017-09-14 08:26:13 +02:00
Laurent Destailleur
322af9e2df Fix travis 2017-09-14 08:25:04 +02:00
Laurent Destailleur
d225cce446 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-14 08:23:42 +02:00
Laurent Destailleur
b3b00f63e4 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-13 22:30:43 +02:00
Laurent Destailleur
eadfbfe2bd Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/facture/class/facture.class.php
	htdocs/core/lib/functions2.lib.php
2017-09-13 20:57:53 +02:00
Rui Strecht
5c81443a9f Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-13 14:46:57 +01:00
Laurent Destailleur
7767ac2aa7 FIX Several problem with the last event box on project/tasks 2017-09-13 15:12:54 +02:00
Laurent Destailleur
149ab80b3a The event array of an object is visible even if no event yet recorded. 2017-09-13 14:18:36 +02:00
arnaud
ad017495f4 FIX task comment design 2017-09-13 12:09:01 +02:00
arnaud
4b6553d360 FIX comment color and create colorIsLight function 2017-09-13 10:43:44 +02:00
reeperbahnause
317c5ace3c FIX #7349 Change Class from Invoices to SupplierInvoices
FIX #7349 Change Class from Invoices to SupplierInvoices
2017-09-12 22:32:07 +02:00
Laurent Destailleur
1a056d29d2 Debug search on dolistore 2017-09-12 21:02:18 +02:00
Laurent Destailleur
d340ce6380 Fix bugs 2017-09-12 19:59:27 +02:00
Laurent Destailleur
892ab420a7 Avoid duplicate function 2017-09-12 19:52:05 +02:00
Laurent Destailleur
724817139d Start remove $GLOBALS 2017-09-12 19:49:07 +02:00
Laurent Destailleur
2cdea7e37c Fix bug reported by scrutinizer 2017-09-12 19:21:26 +02:00
Laurent Destailleur
6370e2f514 Force type of object 2017-09-12 19:03:30 +02:00
Laurent Destailleur
47d2350ad4 Fix bugs reported by scrutinizer 2017-09-12 19:03:12 +02:00
Laurent Destailleur
725600e000 Fix typo 2017-09-12 18:37:54 +02:00
Rui Strecht
bafd64e5fa Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-12 16:10:20 +01:00
Laurent Destailleur
71ce82b6b9 NEW Better autoselect customer or supplier fields to save clicks 2017-09-12 16:51:10 +02:00
Laurent Destailleur
c5bf5c7e67 Minor fixes 2017-09-12 15:26:44 +02:00
Laurent Destailleur
dc61c53d39 Balance automatically set on good year according to fiscal start month 2017-09-12 15:22:23 +02:00
Laurent Destailleur
85cad6d537 Add TODO 2017-09-12 15:10:51 +02:00
Laurent Destailleur
c9c91193de Code comment 2017-09-12 14:56:56 +02:00
Laurent Destailleur
bc15a0f8e0 Fix search criteria list 2017-09-12 14:50:12 +02:00
Laurent Destailleur
3d4134df7a Translation 2017-09-12 14:39:20 +02:00
Laurent Destailleur
c5961d8386 Pass user to the delete function 2017-09-12 14:34:33 +02:00
Laurent Destailleur
531ebc4c48 Fix merge 2017-09-12 13:53:55 +02:00
Laurent Destailleur
f411476718 Fix default value of filter 2017-09-12 13:52:19 +02:00
Laurent Destailleur
5dcbebbd46 NEW Add filters on month/year on the accountancy binding tools 2017-09-12 13:48:45 +02:00
Laurent Destailleur
a4665e17d4 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/accountancy/customer/index.php
	htdocs/accountancy/expensereport/index.php
	htdocs/compta/facture/class/facture-rec.class.php
	htdocs/fichinter/class/fichinter.class.php
	htdocs/societe/class/societe.class.php
	htdocs/societe/list.php
2017-09-12 13:26:25 +02:00
Laurent Destailleur
16092bc9f0 Clean code 2017-09-12 13:13:57 +02:00
Laurent Destailleur
3001ee5fe7 Fix title of reports 2017-09-12 13:05:34 +02:00
Laurent Destailleur
d0a0bf57b6 NEW The "Show detail by account" accepts 3 values: yes, no, if non zero 2017-09-12 12:52:48 +02:00
tysauron
afac908fda $soc->getAvailableDiscounts . where soc not set. 2017-09-12 12:35:06 +02:00
Laurent Destailleur
627dd15b44 Suggested link for online payment use the generic link 2017-09-12 12:18:26 +02:00
Laurent Destailleur
cda8c6e41a Fix ref must be 50 2017-09-12 11:51:51 +02:00
Laurent Destailleur
fcf82f1163 Enhancement into setup of member module 2017-09-12 11:17:23 +02:00
fappels
e8d0fb3bd9 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-09-11 18:07:57 +02:00
Stéphane BERTHELOT
66f671f4c8 Fix dates in commande and remisecheque for PostgreSQL (should be treated like strings) 2017-09-11 18:01:24 +02:00
arnaud
adc78296aa FIX time.php crashed without project id in param 2017-09-11 16:56:50 +02:00
Rui Strecht
5213ce60c5 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-11 15:56:48 +01:00
Laurent Destailleur
07b040a8eb Save space 2017-09-11 16:31:44 +02:00
Laurent Destailleur
8cb9e8c2da Add $object into hooks 2017-09-11 16:26:01 +02:00
Laurent Destailleur
f0f6df4c90 Fix tables declaration 2017-09-11 15:23:49 +02:00
Laurent Destailleur
1f56800a50 Merge pull request #7341 from atm-arnaud/NEW_task_discussion
New task discussion
2017-09-11 15:20:13 +02:00
Laurent Destailleur
78ffbd1095 Merge pull request #7369 from hregis/develop_bug
Fix: remove table prefix
2017-09-11 15:06:01 +02:00
Laurent Destailleur
403f11759c Merge pull request #7363 from Gitdyr/develop
Danish accounts for accounting
2017-09-11 14:50:58 +02:00
Laurent Destailleur
80c00a0ba4 Merge pull request #7362 from reeperbahnause/patch-2
fix #7361 missing generateDocument function
2017-09-11 14:46:03 +02:00
Laurent Destailleur
22b8818100 FIX #7359 2017-09-11 14:41:46 +02:00
Laurent Destailleur
dcc9cb4a16 Some fixes in various payment 2017-09-11 14:29:27 +02:00
Laurent Destailleur
59ab52c718 FIX hidden option MAIN_PROPAGATE_CONTACTS_FROM_ORIGIN 2017-09-11 13:39:03 +02:00
Regis Houssin
092b87bbda Fix: add llx_actioncomm in $childtablesoncascade 2017-09-11 13:36:03 +02:00
Rui Strecht
bddf292881 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-11 11:52:47 +01:00
Laurent Destailleur
7d42a58230 Fix no more fk_soc in this table 2017-09-11 12:46:01 +02:00
Regis Houssin
f8938f308d Fix: remove table prefix 2017-09-11 08:17:25 +02:00
Regis Houssin
b5de8da3a6 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/core/modules/modFacture.class.php
2017-09-11 08:07:55 +02:00
Laurent Destailleur
34221fc163 CSS of payment page 2017-09-11 03:38:39 +02:00
Laurent Destailleur
974f99ddb2 Increase length of title field 2017-09-11 02:54:21 +02:00
Laurent Destailleur
c8cb66d227 Missing translation 2017-09-11 02:54:06 +02:00
Laurent Destailleur
9253207842 NEW template invoices support substition key
__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__
__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__
2017-09-11 02:11:31 +02:00
Laurent Destailleur
3e6ac36025 Try a fix for dol_time_plus_duree when date is 2017-09-01 00:00 and
timezone > 0
2017-09-11 02:09:48 +02:00
Laurent Destailleur
ca5ef5cb11 FIX dateSelector was not taken into account 2017-09-11 01:20:15 +02:00
Laurent Destailleur
86b28a01c7 FIX Clean bad parameters when inserting line of template invoice 2017-09-11 01:04:53 +02:00
Laurent Destailleur
25ec124411 Better autosize of extrafields 2017-09-11 00:19:42 +02:00
Laurent Destailleur
cb0c7d6594 Standardize search field name 2017-09-11 00:10:23 +02:00
Laurent Destailleur
cb7456239b Remove deprecated file 2017-09-11 00:03:05 +02:00
Laurent Destailleur
cf56da8102 NEW Default filter and sort order can use partial list of query
parameters to set the qualified URLs.
2017-09-11 00:02:52 +02:00
Laurent Destailleur
903df90f8a NEW Can edit with delete/insert a forced translation 2017-09-10 22:46:08 +02:00
Laurent Destailleur
3afc90c88f Fix missing translation 2017-09-10 22:26:45 +02:00
Laurent Destailleur
9f1e349506 Add hidden option message ONLINE_PAYMENT_MESSAGE_FORMIFVAT 2017-09-10 22:24:26 +02:00
Laurent Destailleur
2ae135baf1 NEW Add view of status of template invoice 2017-09-10 20:47:45 +02:00
Laurent Destailleur
e7abb39ee2 NEW Template invoices are visible on the customer tab 2017-09-10 19:28:20 +02:00
Laurent Destailleur
01664a135d Removed not used field 2017-09-10 18:01:34 +02:00
Laurent Destailleur
2db71cb773 Fix missing tables into childtables 2017-09-10 18:01:20 +02:00
Gitdyr
7f8d791d39 Revert "Remove processing by htmlentities()"
This reverts commit e555233dc1.
2017-09-10 07:24:38 +02:00
Gitdyr
68a8ef6e2d Fixed. 2017-09-09 22:21:55 +02:00
Gitdyr
8dbf4bfaee Danish accounting accounts. 2017-09-09 21:19:02 +02:00
reeperbahnause
698a047573 fix #7361 missing generateDocument function
fix #7361  
Function generateDocument was missing for Class Fichinter
2017-09-09 20:00:09 +02:00
Kjeld Borch Egevang
e555233dc1 Remove processing by htmlentities()
When translated texts contain international characters they are unintentionally changed by htmlentities().

You can see the problem at the admin/index.php page (language set to French):

  Les paramètres dans le menu Configuration -> Soci&eacute;t&eacute;/Organisation sont requis car les données définies sont utilisées dans l'affichage Dolibarr et pour personnaliser le comportement par défaut du logiciel (pour les fonctionnalités liées à un pays par exemple).
2017-09-09 11:29:30 +02:00
Laurent Destailleur
026f9d8e2a Can set a dedicated message on payment forms 2017-09-09 10:54:30 +02:00
Laurent Destailleur
c7537732d2 NEW Can set a dedicated message on payment forms 2017-09-09 10:03:09 +02:00
Laurent Destailleur
591834a807 Add a message on payment forms 2017-09-09 09:54:42 +02:00
Laurent Destailleur
66cba0ad61 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-09 09:43:49 +02:00
Laurent Destailleur
b645aeb954 Fix lang loading 2017-09-09 09:41:07 +02:00
Laurent Destailleur
4f52871c67 Merge pull request #7345 from AXeL-dev/develop
fix hidepriceinlabel when using ajax autocompleter
2017-09-08 21:22:38 +02:00
Laurent Destailleur
87126343a6 Fix new menu 2017-09-08 15:03:08 +02:00
Laurent Destailleur
e2ccac68c5 Fix PHP7.2 2017-09-08 14:45:11 +02:00
Laurent Destailleur
75172966c2 Fix selection of email templates 2017-09-08 14:40:39 +02:00
Laurent Destailleur
59721bf8ed Fix code comment 2017-09-08 13:33:52 +02:00
Laurent Destailleur
259cca0230 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/admin/dict.php
	htdocs/admin/mails_templates.php
2017-09-08 13:30:54 +02:00
Laurent Destailleur
48765eb28b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-08 13:24:24 +02:00
Laurent Destailleur
152416a6d7 Fix bad param 2017-09-08 13:24:10 +02:00
Laurent Destailleur
b7197530c2 NEW Each user can edit its own email template (menu tools) 2017-09-08 12:48:01 +02:00
AXeL-dev
a615a46a5a fix hidepricelabel when using ajax autocompleter 2017-09-08 11:06:55 +01:00
fappels
5a7a4964fe Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-09-08 11:37:46 +02:00
arnaud
fdd758abb4 FIX empty test on conf fortask comment was bad 2017-09-08 09:17:22 +02:00
arnaud
3a782856f7 Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_task_discussion 2017-09-08 09:15:02 +02:00
arnaud
7f5950c958 FIX multiple comments not reset on fetch 2017-09-08 09:14:34 +02:00
Rui Strecht
9b64b064ce Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-07 18:28:13 +01:00
Laurent Destailleur
c546243f00 Merge pull request #7328 from Dolibarr/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2017-09-07 17:56:24 +02:00
arnaud
680fab313c NEW preload comments in task 2017-09-07 16:47:52 +02:00
arnaud
82440fd399 Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_task_discussion 2017-09-07 16:24:34 +02:00
arnaud
8906c95eea NEW comments system on task 2017-09-07 16:23:51 +02:00
Laurent Destailleur
a9e44a2cf5 NEW Enhance the anti XSS filter 2017-09-07 13:54:49 +02:00
Laurent Destailleur
cff9ff01c8 Better disconnect with exotic connection mode 2017-09-07 13:30:18 +02:00
Regis Houssin
66e548427c Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/compta/resultat/clientfourn.php
	htdocs/core/lib/functions.lib.php
	htdocs/install/mysql/migration/6.0.0-7.0.0.sql
2017-09-07 10:50:35 +02:00
Laurent Destailleur
53a2ef45a5 Fix upgrade 2017-09-06 22:42:01 +02:00
Laurent Destailleur
08eff908bc Fix missing field in some env 2017-09-06 21:39:33 +02:00
Rui Strecht
e1c54664d1 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-06 18:59:18 +01:00
Laurent Destailleur
25254a19fc Fix back to link 2017-09-06 19:56:01 +02:00
Laurent Destailleur
7c2c496823 Fix pagination on account list page 2017-09-06 19:53:28 +02:00
Laurent Destailleur
b4abb7151f Use autocomplete on multi selection of accounts for group definition 2017-09-06 19:42:41 +02:00
Rui Strecht
114105cd54 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-06 18:39:27 +01:00
Laurent Destailleur
859d0dfe97 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/filefunc.inc.php
2017-09-06 19:24:42 +02:00
Laurent Destailleur
7a6f3d899c Fix initial data 2017-09-06 19:21:46 +02:00
Rui Strecht
4d060a273f Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-06 10:38:15 +01:00
Laurent Destailleur
0c066b471d Debug modulebuilder 2017-09-05 22:33:55 +02:00
Laurent Destailleur
f29a4c1fb1 Make accountancy pages responsive 2017-09-05 20:42:34 +02:00
Laurent Destailleur
48c526f87d Debug report for accounting module 2017-09-05 12:53:25 +02:00
Rui Strecht
75ce9742e4 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-05 10:08:16 +01:00
Laurent Destailleur
f23a681dc0 Clean code 2017-09-05 10:16:08 +02:00
Laurent Destailleur
a0cdf784da Standardize code 2017-09-05 09:43:22 +02:00
Laurent Destailleur
4b11332927 Debug edit accounting groups 2017-09-05 09:42:05 +02:00
Laurent Destailleur
c1d31c34cd Work on reports per date 2017-09-05 02:26:23 +02:00
Laurent Destailleur
e1fa37f7ff Work on reports per date 2017-09-05 02:13:02 +02:00
Laurent Destailleur
987303a6ca Nb of sql requests divided by 2 from report per personalized categories 2017-09-05 02:12:37 +02:00
Rui Strecht
e8221b8a81 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-04 15:41:34 +01:00
Laurent Destailleur
8de51ede18 Add warning to warn against json emulation 2017-09-04 13:22:21 +02:00
Laurent Destailleur
9304df21a0 Clean code 2017-09-04 13:17:18 +02:00
Laurent Destailleur
c15454e62b Fix method to delete a bookkeeping record 2017-09-04 13:09:26 +02:00
Laurent Destailleur
4c8945e460 Fix bad use 2017-09-04 12:59:54 +02:00
Laurent Destailleur
c3daad7545 Fix not reachable code 2017-09-04 12:55:32 +02:00
Rui Strecht
94e6900662 Merge remote-tracking branch 'origin/develop' into develop 2017-09-04 11:44:13 +01:00
Scrutinizer Auto-Fixer
c2d32aaf18 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2017-09-04 10:42:51 +00:00
Laurent Destailleur
ee32cce33a Fix error reported by scrutinizer 2017-09-04 12:23:44 +02:00
Laurent Destailleur
5c7d2ffdc2 Fix get of contractlineid 2017-09-04 12:22:03 +02:00
Laurent Destailleur
aa56de88cb Fix doc 2017-09-04 11:22:53 +02:00
Laurent Destailleur
3e9679f273 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-04 10:20:17 +02:00
Laurent Destailleur
c5567fafd4 Enhancement for smartphone 2017-09-04 09:25:53 +02:00
Laurent Destailleur
14f41493bb NEW Show country and vat number into company tooltip 2017-09-03 20:49:36 +02:00
Rui Strecht
96521af778 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-03 17:30:03 +01:00
Laurent Destailleur
ead7810ee7 Add VAT number into thirdparty list 2017-09-03 17:50:38 +02:00
Laurent Destailleur
75b8462c03 Fix error output 2017-09-03 17:47:45 +02:00
Laurent Destailleur
084ea049d8 Minor bugs 2017-09-03 16:07:21 +02:00
Laurent Destailleur
cf175b0777 Use return code on activateAll and closeAll 2017-09-03 15:40:36 +02:00
Laurent Destailleur
f963afa505 Fix warning 2017-09-03 15:21:17 +02:00
Laurent Destailleur
07fc0ed3ff NEW Add a button "Activate all services" on contracts 2017-09-03 14:26:27 +02:00
Laurent Destailleur
c6cbf2345d FIX Management of default value in extrafields when default is '0' 2017-09-03 14:25:54 +02:00
Laurent Destailleur
a4d3e48773 FIX inert of extra field must not change extrafield values in memory 2017-09-03 12:40:49 +02:00
Laurent Destailleur
acb87ad8ea addline must return id of contract 2017-09-03 12:02:48 +02:00
Laurent Destailleur
e549e6cde1 Error management 2017-09-03 04:16:43 +02:00
Laurent Destailleur
ca93be5eed Fix priority of crons 2017-09-03 02:40:00 +02:00
Laurent Destailleur
a3d5d97d05 Fix translation 2017-09-03 02:19:38 +02:00
Laurent Destailleur
cf5c34c8fb Remove useless link 2017-09-03 02:13:55 +02:00
Laurent Destailleur
ec0d277123 Code comment 2017-09-03 00:46:28 +02:00
Rui Strecht
a228248918 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-02 23:46:01 +01:00
Laurent Destailleur
e6f0e76988 Add option MAIN_DISABLE_DEFAULT_FILTER_FOR_QUICK_SEARCH 2017-09-02 15:30:00 +02:00
Laurent Destailleur
75e639db6c Fix error management 2017-09-02 15:23:53 +02:00
Laurent Destailleur
3beee569a6 Enhance support of default value in extrafields 2017-09-02 15:18:41 +02:00
Rui Strecht
ceafef56b3 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop 2017-09-02 13:35:19 +01:00
Laurent Destailleur
9923c87fd8 Fix translation of extrafields 2017-09-02 13:03:14 +02:00
Laurent Destailleur
36eb21c135 Fix translation of extrafields 2017-09-02 13:02:01 +02:00
Laurent Destailleur
e5400a4a36 Fix translation of extrafields 2017-09-02 13:01:41 +02:00
Laurent Destailleur
7f7b4cddb4 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-02 12:37:02 +02:00
Laurent Destailleur
a6a5602572 NEW Can set email of thirdparty as unique and/or mandatory 2017-09-02 12:36:53 +02:00
Laurent Destailleur
015bc51c43 Fix regression adding a false error message 2017-09-02 12:17:29 +02:00
Laurent Destailleur
c1e54b7e23 Merge pull request #7315 from aspangaro/7.0-f2
NEW Add project on a various payment
2017-09-02 00:45:36 +02:00
Laurent Destailleur
91e75b5812 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-02 00:34:16 +02:00
Laurent Destailleur
9fe5eb3c87 Fix double translation 2017-09-02 00:33:18 +02:00
Laurent Destailleur
4644a39be5 Merge pull request #7322 from ruistrecht-alt/NEW_Add_Region_to_third_party_societe_list
NEW Added regions to third party/societe lists, can be filtered
2017-09-02 00:13:20 +02:00
Laurent Destailleur
32c6acefd2 Merge pull request #7321 from ruistrecht-alt/NEW_Add_region_to_state/province_form_field
NEW Added Region name to state/province form field
2017-09-02 00:10:25 +02:00
Laurent Destailleur
58b08c7de8 Clean code 2017-09-01 23:56:59 +02:00
Laurent Destailleur
08ea82ae95 Merge pull request #7314 from QuentinSu/cashdeskResearchArea
Fix barcode reader on POS
2017-09-01 23:25:33 +02:00
Laurent Destailleur
407febc141 Fix travis 2017-09-01 22:49:33 +02:00
Laurent Destailleur
bc446999dd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-09-01 19:37:45 +02:00
Laurent Destailleur
55691bfbc2 Work on generic payment module 2017-09-01 19:37:34 +02:00
Laurent Destailleur
1a5f96123a Work on generic payment module 2017-09-01 19:30:56 +02:00
Laurent Destailleur
796684713f Work on generic payment module 2017-09-01 18:49:55 +02:00
Laurent Destailleur
30eefb34aa Fix payment suffix 2017-09-01 18:03:26 +02:00
Laurent Destailleur
d71359b634 Update data 2017-09-01 17:42:04 +02:00
Laurent Destailleur
4b9f54e571 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/install/mysql/data/llx_accounting.sql
	htdocs/install/mysql/migration/5.0.0-6.0.0.sql
	htdocs/install/mysql/tables/llx_holiday_config.sql
2017-09-01 17:34:57 +02:00
Laurent Destailleur
9b51810653 Clean code 2017-09-01 17:30:09 +02:00
Rui Strecht
9b65578ff7 Merge branch 'NEW_Add_region_to_state/province_form_field' into develop 2017-09-01 16:25:48 +01:00
Rui Strecht
7107fba8c5 Merge branch 'NEW_Add_Region_to_third_party_societe_list' into develop 2017-09-01 16:25:39 +01:00
Rui Strecht
1ee0077e4e Fix: Added name to contributors 2017-09-01 16:10:19 +01:00
Laurent Destailleur
bda507d191 Fix nostop option 2017-09-01 17:07:26 +02:00
Rui Strecht
cd8362498f NEW Added regions to third party/societe lists, can be filtered 2017-09-01 16:07:07 +01:00
Laurent Destailleur
920d6270c3 Fix missing the nostop tag 2017-09-01 16:54:06 +02:00
Rui Strecht
9443cb0c1b NEW Added Region name to state/province form field 2017-09-01 15:53:06 +01:00
Laurent Destailleur
e663314cb1 Clean code 2017-09-01 16:38:56 +02:00
Laurent Destailleur
c02355c8c3 FIX Bad condition on sms log debug 2017-09-01 16:37:45 +02:00
Laurent Destailleur
e13792a555 Fix data for account categories 2017-09-01 15:31:35 +02:00
Laurent Destailleur
61cf69f2bb NEW Include a color syntaxed HTML editor for emailing edition. 2017-09-01 13:09:13 +02:00
Laurent Destailleur
9a0576ff79 Enhance website module 2017-09-01 12:19:55 +02:00
Laurent Destailleur
1da71d48cd Work on export site 2017-09-01 11:10:03 +02:00
Alexandre SPANGARO
c4d2ca661f Merge remote-tracking branch 'uptream/develop' into 7.0-f2
# Conflicts:
#	htdocs/install/mysql/migration/6.0.0-7.0.0.sql
2017-09-01 07:24:55 +02:00
Alexandre SPANGARO
84fcbb724e Add project on various_payment 2017-09-01 07:21:27 +02:00
Laurent Destailleur
31a74d448c Work on accounting reports. 2017-08-31 22:38:30 +02:00
Laurent Destailleur
8248bc1c64 Uniformize code of accounting report 2017-08-31 15:44:36 +02:00
Quentin Sutkowski
c761eb592e Fix barcode reader on POS
Solve the keyboard emulation issue with a barcode reader on cashdesk module research area.
2017-08-31 11:15:55 +02:00
atm-ph
8188abd4cd Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new_event_with_multi_contact 2017-08-31 11:09:02 +02:00
Laurent Destailleur
c31febc4e0 Fix bad var 2017-08-31 03:41:04 +02:00
Laurent Destailleur
f230c67032 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-31 03:38:18 +02:00
Laurent Destailleur
9146bb336e Work on merging all payment modes in one page 2017-08-31 03:34:57 +02:00
Regis Houssin
8e8f94df11 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/compta/facture/card.php
	htdocs/compta/facture/class/facture-rec.class.php
2017-08-30 19:33:23 +02:00
Laurent Destailleur
5c885e9f93 Merge pull request #7310 from viki53/patch-1
Fix README typos and improve some grammar
2017-08-30 16:37:59 +02:00
Corentin H
da0c9c2749 Fix README typos and improve some grammar 2017-08-30 14:41:22 +02:00
Alexandre SPANGARO
e081653cef Add fk_projet in table various_payment 2017-08-30 06:38:33 +02:00
Laurent Destailleur
8f34de1036 NEW Can include tag {uuu} into some numbering masks to replace with user 2017-08-29 19:44:35 +02:00
Laurent Destailleur
4d908c2dd0 Merge pull request #7299 from atm-maxime/new_expense_numbering
New : add expense report numbering mask
2017-08-29 18:24:17 +02:00
Laurent Destailleur
d5c345d5cd Merge pull request #7301 from aspangaro/7.0-1
NEW Add search field for date on supplier payment page
2017-08-29 18:23:18 +02:00
Laurent Destailleur
560d975063 Code comment 2017-08-29 12:59:13 +02:00
Laurent Destailleur
9312005318 NEW Move accountancy features into a dedicated menu 2017-08-29 12:43:47 +02:00
Laurent Destailleur
7aa09d8b71 NEW Can create thirdparty from card proposal, order or invoice 2017-08-28 18:37:16 +02:00
Laurent Destailleur
f1633d72f8 Fix hide type, allow autoselect 2017-08-28 17:55:01 +02:00
Alexandre SPANGARO
bc2ed17703 Merge remote-tracking branch 'uptream/develop' into 7.0-1
# Conflicts:
#	htdocs/fourn/facture/paiement.php
2017-08-28 14:54:16 +02:00
Laurent Destailleur
a60cd49fb0 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/actions_sendmails.inc.php
	htdocs/core/class/CMailFile.class.php
	htdocs/filefunc.inc.php
2017-08-28 12:53:02 +02:00
Alexandre SPANGARO
afdc96ef26 New : Add search field for date on supplier payment page 2017-08-28 06:10:28 +02:00
Laurent Destailleur
b4769d37d6 Increase emailing title length 2017-08-28 00:06:38 +02:00
Laurent Destailleur
b12800d174 FIX link in to email and option for tls 2017-08-28 00:06:19 +02:00
Laurent Destailleur
1b1ce4fdf5 Code comment 2017-08-27 19:40:43 +02:00
Laurent Destailleur
f33289ed6a Better examples 2017-08-27 19:15:06 +02:00
Maxime Kohlhaas
a288ee65e0 Add lang trans 2017-08-27 18:02:35 +02:00
Maxime Kohlhaas
350b24f32b Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new_expense_numbering 2017-08-27 17:53:19 +02:00
Maxime Kohlhaas
4c5bf88492 New use numbering mask on validate 2017-08-27 17:52:44 +02:00
Laurent Destailleur
e04dd3c807 Fix php unit 2017-08-27 15:05:35 +02:00
Laurent Destailleur
a4ea9d9c03 Add login screenshots 2017-08-27 14:33:53 +02:00
Laurent Destailleur
6c93c6f6cc Fix PHPunit 2017-08-27 13:38:42 +02:00
Laurent Destailleur
64bbf35812 Debug modulebuilder 2017-08-27 13:28:37 +02:00
Laurent Destailleur
76b4a2ce06 Can set language file to use for label key of extra field 2017-08-27 12:52:26 +02:00
Laurent Destailleur
502ac19a0a Fix regression on categories 2017-08-27 12:28:59 +02:00
Laurent Destailleur
3f7eea2e0a NEW Can set language on extrafields 2017-08-27 12:12:02 +02:00
Maxime Kohlhaas
9eeacd8982 Fix const name 2017-08-27 10:58:01 +02:00
Maxime Kohlhaas
61fadfd0e1 New numbering module for expense report + admin setup 2017-08-27 10:49:51 +02:00
Laurent Destailleur
f10e89aa9f Fix utf8 bom forbidden 2017-08-27 00:33:50 +02:00
Laurent Destailleur
c573df4f0e Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/user/card.php
2017-08-26 22:33:56 +02:00
Laurent Destailleur
271d0c86c6 Fix sql install 2017-08-26 21:03:13 +02:00
Laurent Destailleur
c08d0aeda5 Clean duplicate accounting account 2017-08-26 21:01:26 +02:00
Laurent Destailleur
03eb870576 Fix sql syntax error 2017-08-26 20:16:12 +02:00
Laurent Destailleur
49a2f4f0c6 Fix sql 2017-08-26 20:13:01 +02:00
Laurent Destailleur
254d92070f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-26 19:58:01 +02:00
Laurent Destailleur
c64a21f47b Fix regression in cleaning sql 2017-08-26 19:57:22 +02:00
Laurent Destailleur
2346dc6d40 Merge pull request #7295 from defrance/patch-24
Little cleaning code
2017-08-26 19:37:50 +02:00
Laurent Destailleur
b3f77ed9f7 Merge pull request #7276 from atm-john/new_develop_extrafields_facture_rec
NEW extrafield on facture_rec
2017-08-26 19:26:09 +02:00
Laurent Destailleur
55c4ef7ffc Merge pull request #7227 from Darkjeff/dev-report
Dev report from bookkeeping
2017-08-26 19:20:57 +02:00
Laurent Destailleur
d9a85e6d3b FIX Install run_sql function accept -- into sql content. 2017-08-26 19:19:23 +02:00
Laurent Destailleur
77af3b96d3 Showempty on language list 2017-08-26 18:45:10 +02:00
BENKE Charlene
831947b6d1 Little cleaning code
$bottomlastpage is same in two case
2017-08-26 16:37:32 +02:00
Laurent Destailleur
ebe84b6ac5 Fix run sql with large data 2017-08-26 16:24:55 +02:00
Laurent Destailleur
5ed22b64fb Show if module add objects tables 2017-08-26 16:04:24 +02:00
Laurent Destailleur
632119a5c5 Show if module add dictionary data 2017-08-26 15:46:35 +02:00
Laurent Destailleur
f2a437fa89 Enhance modulebuilder 2017-08-26 15:22:13 +02:00
Laurent Destailleur
a9e7f8b9e6 Fix trans 2017-08-25 21:27:19 +02:00
Laurent Destailleur
54cc1ac800 Merge emailing target selectors. 2017-08-25 21:20:27 +02:00
Laurent Destailleur
d108d04add NEW Can filter on the "other" column on emailing target list 2017-08-25 19:26:48 +02:00
Laurent Destailleur
7329d21dcd Fix lang selection 2017-08-25 17:13:33 +02:00
Laurent Destailleur
9d380a8b8a NEW Can edit the language into the email templates editor. 2017-08-25 16:38:45 +02:00
John
040071b07b Change copyright comment 2017-08-25 16:25:40 +02:00
John
c9643109df Fix comment doc 2017-08-25 16:21:34 +02:00
Laurent Destailleur
7030d0d596 Add combo on ldap selection 2017-08-25 15:04:55 +02:00
Laurent Destailleur
999ac8eccd Complete module template 2017-08-24 23:49:33 +02:00
Laurent Destailleur
99a27162fb Complete module template 2017-08-24 20:17:23 +02:00
Laurent Destailleur
c29d78bd0e Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-24 14:57:44 +02:00
John
0653a5d177 Merge branch 'develop' of github.com:Dolibarr/dolibarr into new_develop_extrafields_facture_rec 2017-08-24 14:35:01 +02:00
Laurent Destailleur
4337001418 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/societe/list.php
2017-08-24 14:26:45 +02:00
Laurent Destailleur
8e6546497a Code comment 2017-08-24 13:43:36 +02:00
Laurent Destailleur
7da6f93d7e FIX select of category
FIX pb with extrafield list and key '0'
2017-08-24 13:23:15 +02:00
Laurent Destailleur
17f44ad980 NEW Can make a specific setup for SMTP sending for emailing module 2017-08-24 02:02:00 +02:00
Regis Houssin
1befd9c67f Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/install/mysql/migration/6.0.0-7.0.0.sql
2017-08-23 21:05:36 +02:00
Laurent Destailleur
9f5718f00a Fix php unit 2017-08-23 19:38:06 +02:00
Laurent Destailleur
90afbcb034 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/admin/bank.php
	htdocs/core/lib/functions.lib.php
2017-08-23 17:02:53 +02:00
Laurent Destailleur
d90a23efb6 Fix for old php 2017-08-23 17:00:50 +02:00
Laurent Destailleur
4c243d3b9e Fix index declaration must be moved into the .key.sql files. 2017-08-23 15:18:54 +02:00
Regis Houssin
2f537a1ade Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/compta/charges/index.php
	htdocs/compta/paiement/list.php
	htdocs/install/mysql/migration/6.0.0-7.0.0.sql
2017-08-22 18:49:40 +02:00
Laurent Destailleur
9cd5c8a564 Code comment 2017-08-22 18:34:58 +02:00
Laurent Destailleur
e05ac34966 Fix remove var_dump 2017-08-22 18:03:37 +02:00
Laurent Destailleur
64c4f899f3 Fix charset management with ace 2017-08-22 18:00:54 +02:00
Laurent Destailleur
687ccbfa10 Fix output keywords 2017-08-22 15:58:57 +02:00
Laurent Destailleur
a2b41a30fc Fix duplicate header in website module 2017-08-22 15:44:28 +02:00
Laurent Destailleur
ec56ff59d6 Fix invalid link after renaming a website key. 2017-08-22 15:32:45 +02:00
Laurent Destailleur
109e0f7179 Fix typo 2017-08-22 15:31:37 +02:00
Laurent Destailleur
db9cc4683a Fix php warning 2017-08-22 15:29:40 +02:00
John
b18104788e New extrafield on facture_rec 2017-08-22 15:22:41 +02:00
Laurent Destailleur
a5d210195c Add option MAIN_DISABLE_DOLISTORE_SEARCH 2017-08-22 14:55:01 +02:00
Laurent Destailleur
42666a0146 Fix bad link 2017-08-22 14:51:47 +02:00
Laurent Destailleur
14cd150762 NEW Introduce experimental feature to search dolistore from application 2017-08-22 14:47:01 +02:00
Laurent Destailleur
493eb08528 Merge pull request #7258 from homer8173/homer8173-dolistore-module
New Dolistore module
2017-08-22 13:42:08 +02:00
Laurent Destailleur
d945047794 Remove log 2017-08-22 13:15:56 +02:00
Laurent Destailleur
5cf684f5a2 NEW Popup for preview of image add a button "Original size" 2017-08-22 13:14:10 +02:00
Laurent Destailleur
927da89c89 Revert bad change 2017-08-22 11:52:34 +02:00
Laurent Destailleur
c398450f27 Merge pull request #6598 from defrance/patch-1
Improved logging of sales and purchasing prices
2017-08-22 11:43:55 +02:00
Laurent Destailleur
681623c3ab Merge branch 'develop' into patch-1 2017-08-22 11:43:25 +02:00
Laurent Destailleur
7d57cd6913 Update productcustomerprice.class.php 2017-08-22 11:38:32 +02:00
Laurent Destailleur
f8ac586105 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-22 11:19:08 +02:00
Laurent Destailleur
30c39d246b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-22 11:18:56 +02:00
Laurent Destailleur
9966631871 Merge pull request #7274 from hregis/develop_travis
Fix: Travis error "Missing parameter name"
2017-08-22 10:46:47 +02:00
Laurent Destailleur
5e67cb6dc6 Merge pull request #7273 from hregis/develop_mc
Fix: virtualmin script update
2017-08-22 10:44:53 +02:00
Laurent Destailleur
c3183a9b03 Merge pull request #7271 from defrance/patch-23
FIX Bad ojbject for extrafields
2017-08-22 10:36:51 +02:00
Laurent Destailleur
b3d1cdf84c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/expensereport/card.php
2017-08-22 10:11:32 +02:00
Regis Houssin
e86d3d7905 Fix: Travis error "Missing parameter name" 2017-08-22 09:47:33 +02:00
Laurent Destailleur
1fe23e3fec Move french text into english 2017-08-22 09:24:26 +02:00
Laurent Destailleur
731f826a55 NEW jquery date selector become default date selector 2017-08-22 09:23:35 +02:00
Regis Houssin
77180db1a3 Fix: wrong app name 2017-08-22 08:35:16 +02:00
Regis Houssin
1a39f388ce Fix: virtualmin script update 2017-08-22 08:31:23 +02:00
Laurent Destailleur
348a42542d Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/theme/eldy/style.css.php
2017-08-21 13:29:08 +02:00
Laurent Destailleur
2104ab9aed Disable event reminder 2017-08-21 13:11:29 +02:00
Laurent Destailleur
0e173d85ae Fix translation 2017-08-21 13:01:14 +02:00
Laurent Destailleur
70dcace0a1 Fix regression syntax 2017-08-21 12:52:47 +02:00
Laurent Destailleur
fe724a2e69 Fix syntax error 2017-08-21 12:35:43 +02:00
fappels
a4b3bfdf90 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-08-21 11:05:49 +02:00
Laurent Destailleur
b48f501a0c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-21 11:04:09 +02:00
Laurent Destailleur
48f2e465fa Better info style 2017-08-21 11:01:24 +02:00
Laurent Destailleur
2e6a211577 Clean code 2017-08-21 04:17:28 +02:00
Laurent Destailleur
583fc485a9 Work on website module 2017-08-21 03:13:44 +02:00
Laurent Destailleur
eedf5e0a22 FIX delete dir when there is symlinks 2017-08-21 01:24:34 +02:00
Laurent Destailleur
e7ae82f9b3 Fix clone of web site 2017-08-21 01:04:30 +02:00
Laurent Destailleur
4f6363bff8 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-21 00:49:47 +02:00
Laurent Destailleur
a9b033e82f Can clone a website 2017-08-21 00:40:45 +02:00
Laurent Destailleur
b9511fd4c6 FIX Do not delete files into sym links 2017-08-21 00:40:32 +02:00
Laurent Destailleur
083cb33a6c Clean ecm code 2017-08-20 23:16:20 +02:00
Laurent Destailleur
11be4c8632 Remove useless code 2017-08-20 21:26:18 +02:00
Laurent Destailleur
2321091170 NEW Move the upload input on top right in ECM module 2017-08-20 21:23:19 +02:00
Laurent Destailleur
d911749b17 Remove deprecated constant 2017-08-20 19:47:55 +02:00
Laurent Destailleur
b1121f9f61 Better mode to clean not corrctly removed modules. 2017-08-20 19:27:12 +02:00
Laurent Destailleur
188653a85d Work on website module 2017-08-20 18:50:51 +02:00
Darkjeff
9078f36883 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-08-20 17:47:06 +02:00
Laurent Destailleur
5c5c4046a1 Prepare setup for email reminder 2017-08-20 16:07:22 +02:00
BENKE Charlene
05754d4690 Bad ojbject for extrafields
https://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/59536-extrafields-commande-dans-expedition
2017-08-19 13:26:50 +02:00
Laurent Destailleur
5d76227948 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-18 23:22:36 +02:00
Laurent Destailleur
260beed512 NEW Generated files are now indexed in database 2017-08-18 23:19:55 +02:00
Laurent Destailleur
097b660c41 Mutualize code 2017-08-18 16:25:00 +02:00
Laurent Destailleur
22a7c9bd6b Merge pull request #7220 from guerrierk/develop
NEW|Add possibility to propose last num releve in conciliation
2017-08-17 23:42:07 +02:00
Laurent Destailleur
c16cb15ce3 Merge pull request #7102 from tuxgasy/develop_docker
Add docker-compose.yml file to build development environment based on Docker
2017-08-17 22:36:58 +02:00
Laurent Destailleur
185b865d83 Merge pull request #7060 from defrance/patch-18
TPL refactoring
2017-08-17 22:36:06 +02:00
Laurent Destailleur
dcc6822c3c Merge pull request #7056 from defrance/patch-17
Refactoring tpl Folder
2017-08-17 22:34:47 +02:00
Laurent Destailleur
4d46b2ae58 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/modules/propale/doc/pdf_azur.modules.php
	htdocs/filefunc.inc.php
2017-08-17 22:21:30 +02:00
Laurent Destailleur
0dd5bcde40 Merge pull request #7135 from apachler/develop
NEW Added functionality to get order customer contact as contact_xx tags
2017-08-17 18:28:23 +02:00
Laurent Destailleur
e9eefb170f Merge pull request #7212 from ATM-Marc/NEW_price_formObjectOptions_hook
NEW hook formObjectOptions in the form setting product selling price
2017-08-17 18:25:30 +02:00
Laurent Destailleur
d95a39b191 Merge pull request #7245 from fappels/develop_supplier_order_PDF_pictures
New show product picture in supplier proposals
2017-08-17 18:23:45 +02:00
Laurent Destailleur
40b3c7c4d5 Merge pull request #7253 from altatof/fix_restrictedarea_parms
FIX : same logic for setting fieldvalue and fieldtype
2017-08-17 17:22:36 +02:00
Laurent Destailleur
1de5c28b2a Merge pull request #7262 from homer8173/patch-1
Fix link
2017-08-17 17:19:16 +02:00
Norbert Penel
c82f363c10 Fix link 2017-08-14 13:21:47 +02:00
TuxGasy
700da4308e update README for docker 2017-08-11 19:01:01 +02:00
Norbert Penel
34a7c7667d Add Dolistore module
Explore and find dolistore modules directly in your Dolibarr
2017-08-11 14:40:29 +02:00
altatof
650e4eaa50 FIX : same logic for setting fieldvalue and fieldtype 2017-08-10 16:41:09 +02:00
Darkjeff
f75deb939d Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-08-10 14:54:32 +02:00
Darkjeff
855728ccb1 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-08-10 14:49:09 +02:00
Laurent Destailleur
e6ad3f44b8 Merge pull request #7242 from bomuux/patch-1
FIX: printFieldListValue Hook, $obj never set.
2017-08-10 13:03:55 +02:00
Laurent Destailleur
54b8fff0d8 Merge pull request #7241 from atm-florian/dev_manageextrafieldswithmultientity
fix : Better management for exstrafeild management
2017-08-10 13:01:51 +02:00
Darkjeff
58f9bf6bab Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-08-09 16:43:12 +02:00
fappels
34153eec7f Add reading of picture paths 2017-08-07 22:36:12 +02:00
fappels
7fc359df5d Fix pic position when VAT column hidden 2017-08-07 21:48:01 +02:00
fappels
3ef4b0fd2b Add pictures to pdf muscadet 2017-08-07 21:47:45 +02:00
fappels
ea5dcbf611 Fix constant to show pics and remove pics column line 2017-08-07 21:35:30 +02:00
bomuux
52523be3ce FIX: printFieldListValue Hook, $obj never set.
Replaced $obj by $task_time, that should be the useful object.
2017-08-06 18:35:25 +02:00
Laurent Destailleur
18468e3f18 Debug modulebuilder 2017-08-05 11:45:54 +02:00
Laurent Destailleur
66ffc9ca47 Debug modulebuilder 2017-08-05 11:44:27 +02:00
Laurent Destailleur
180b7d3c11 Debug modulebuilder 2017-08-05 11:35:42 +02:00
Laurent Destailleur
ea18a0a3ee Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-05 10:36:09 +02:00
Laurent Destailleur
702ecffa3c Debug modulebuilder 2017-08-05 10:35:12 +02:00
florian HENRY
f6a1e7685c Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into dev_manageextrafieldswithmultientity 2017-08-04 17:13:53 +02:00
florian HENRY
03e935f493 Better management 2017-08-04 17:11:40 +02:00
Laurent Destailleur
1bd992dae9 Merge pull request #7238 from atm-florian/dev_manageextrafieldswithmultientity
NEW : manageme extrafields with multientity
2017-08-04 15:39:31 +02:00
Laurent Destailleur
402e6bf650 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/bank/various_payment/card.php
	htdocs/compta/bank/various_payment/index.php
	htdocs/compta/paiement/list.php
	htdocs/core/modules/modCron.class.php
2017-08-04 15:39:00 +02:00
Laurent Destailleur
5b7c144f95 FIX Bad link in ECM 2017-08-04 13:45:20 +02:00
Laurent Destailleur
c107a77722 NEW Can filter on document name in ECM module for automatic tree 2017-08-04 13:10:51 +02:00
Laurent Destailleur
f4a44ced80 Update module template 2017-08-04 11:25:10 +02:00
florian HENRY
8fd45383e2 NEW : manageme extrafields with multientity 2017-08-04 09:00:11 +02:00
Laurent Destailleur
f058fa1938 Better detection if a module provide triggers 2017-08-03 12:19:31 +02:00
Laurent Destailleur
00a1893d93 Better help 2017-08-03 12:04:13 +02:00
Laurent Destailleur
8cd2235b4b Start to introduce cron for email reminder. 2017-08-03 11:42:22 +02:00
Laurent Destailleur
166e6cb68b Fix error counting in cron 2017-08-03 11:22:37 +02:00
Laurent Destailleur
dc6b1caae3 Fix list of cron jobs 2017-08-03 11:01:43 +02:00
Laurent Destailleur
46010d7892 Fix travis error 2017-08-03 04:00:50 +02:00
Laurent Destailleur
10662e24e0 Fix travis 2017-08-03 03:58:42 +02:00
Laurent Destailleur
81b11100b0 Prepare code to clone site an fetch external page 2017-08-03 01:45:31 +02:00
Laurent Destailleur
26730faa4c Enhance module builder. The file MyObject.txt is no more required. 2017-08-02 23:50:17 +02:00
Laurent Destailleur
c43df7cda8 Fix translation 2017-08-02 22:47:06 +02:00
Laurent Destailleur
92d45a9dc0 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-02 22:31:05 +02:00
Laurent Destailleur
fa752348c8 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/compta/bank/various_payment/index.php
	htdocs/contact/list.php
	htdocs/langs/en_US/errors.lang
2017-08-02 17:56:09 +02:00
Laurent Destailleur
b6a7ce6822 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-08-01 10:22:37 +02:00
Laurent Destailleur
ba221650cf Start to work on using the jquery date selector. 2017-08-01 01:25:30 +02:00
Laurent Destailleur
a8d9dff506 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-31 19:32:08 +02:00
Laurent Destailleur
d2b662c671 Add field fk_user in bookkeeping (the user who valiated the accounting
document. Will be used for statistics purpose only).
2017-07-31 19:31:52 +02:00
Regis Houssin
0dc0fe81fc Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-07-31 07:40:01 +02:00
Laurent Destailleur
69357dd91c Merge pull request #7113 from atm-ph/new_develop_expense_report
NEW Add expense report rules and ik
2017-07-31 02:33:49 +02:00
Laurent Destailleur
8c287174b0 Merge pull request #7215 from aspangaro/6.0-d1
Debug various_payment
2017-07-31 02:32:46 +02:00
Laurent Destailleur
80f096a9d8 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-31 02:09:15 +02:00
GUERRIER Kevin
b6b3ab3f1b NEW Add Next/Previous button on operation date of bank line
Operation date has to be frequently updated because some bank change them in many case. With this feature, this value can be updated simply like the value date.
2017-07-29 15:07:27 +02:00
GUERRIER Kevin
ded6b40489 Add possibility to propose last num releve in conciliation 2017-07-29 14:21:58 +02:00
Laurent Destailleur
6253986ae5 Fix translation source 2017-07-28 23:32:29 +02:00
Laurent Destailleur
b0e62f9d24 Enhance image replacement 2017-07-28 17:17:40 +02:00
Laurent Destailleur
8bba9fa149 Factorize duplicate code 2017-07-28 15:32:15 +02:00
Laurent Destailleur
46586f3055 Can export Websites pages.
Work on export to be able to use the generic declaration of fields.
2017-07-28 14:54:13 +02:00
Laurent Destailleur
8d0f21866c Fix head instead of header 2017-07-28 13:05:24 +02:00
Laurent Destailleur
7d5c28b76f Fix website css edition 2017-07-28 12:11:20 +02:00
Laurent Destailleur
cb5b0f3352 NEW Module "Product variants" is moved as stable. 2017-07-28 11:20:01 +02:00
Alexandre SPANGARO
d8c6bc4a67 Fix: informations (Add account & correct tooltip) 2017-07-28 07:42:02 +02:00
Alexandre SPANGARO
5a932f993d Fix: function length_accountg has been moved in getNomUrl 2017-07-28 07:27:04 +02:00
Alexandre SPANGARO
0e23873945 Fix: SQL error in payment list 2017-07-28 07:18:41 +02:00
Alexandre SPANGARO
66067f980b Fix: cancel in create mode 2017-07-28 07:00:52 +02:00
Alexandre SPANGARO
95672e3bf0 Merge remote-tracking branch 'uptream/6.0' into 6.0-d1 2017-07-28 06:40:47 +02:00
Alexandre SPANGARO
0e86bfb6d4 Fix : delete function 2017-07-28 06:40:15 +02:00
Alexandre SPANGARO
fb4727c408 Add a specific entry in tax menu for various payment 2017-07-28 06:27:04 +02:00
Marc de Lima Lucio
2cb89b2d8b Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_price_formObjectOptions_hook 2017-07-27 17:16:58 +02:00
Marc de Lima Lucio
677d50df5b NEW: add 'formObjectOptions' hook to the form setting the product selling price 2017-07-27 17:11:15 +02:00
atm-ph
1f3f9e40b1 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new_develop_expense_report 2017-07-27 16:01:53 +02:00
Laurent Destailleur
ec27eb5b1e Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/contact/list.php
	htdocs/societe/list.php
2017-07-27 02:09:40 +02:00
Laurent Destailleur
537a6ae622 Add id and import id 2017-07-27 02:05:11 +02:00
Laurent Destailleur
5c0d4e10cf Can add technical id or import_key 2017-07-27 01:47:27 +02:00
Laurent Destailleur
e5a5d537aa Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-26 19:30:45 +02:00
Darkjeff
6a3af93618 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into dev-report 2017-07-26 16:02:41 +02:00
Regis Houssin
89a9049ccb Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-07-26 15:25:17 +02:00
Laurent Destailleur
dac0b6c2a7 Fix regression 2017-07-26 13:46:27 +02:00
Laurent Destailleur
8c681f6a96 Code ment 2017-07-26 12:08:38 +02:00
Laurent Destailleur
1e0d8b13c3 FIX syntax error with pgsql and frequency lost during cron update. 2017-07-26 12:08:28 +02:00
TuxGasy
d09ca6f3da Move all docker files into build/docker 2017-07-26 11:41:12 +02:00
Laurent Destailleur
8e36b11c7a Fix translation 2017-07-26 10:56:51 +02:00
Laurent Destailleur
d0682c76d6 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-26 10:12:54 +02:00
Laurent Destailleur
9ca874fde4 Add cronjobs view in modulebuilder 2017-07-26 10:11:39 +02:00
Regis Houssin
acd5780e32 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-07-26 08:58:56 +02:00
Laurent Destailleur
760d2617a0 Can disable the search of previous/next in dol_banner 2017-07-25 23:03:28 +02:00
Laurent Destailleur
bd85d87e3e Fix pb with .svg 2017-07-25 23:02:48 +02:00
Laurent Destailleur
fb5a7370bf Add missing field 2017-07-25 21:40:55 +02:00
Laurent Destailleur
521d61c5ef Close #4512 2017-07-25 21:22:22 +02:00
Laurent Destailleur
5b9ac2a7a9 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/index.php
2017-07-25 21:11:36 +02:00
Laurent Destailleur
e160d2e16f Merge pull request #7101 from Darkjeff/Bookkeeping-V6
Bookkeeping add date lim reglement
2017-07-25 20:55:33 +02:00
Laurent Destailleur
c5267154b9 Merge branch 'develop' into Bookkeeping-V6 2017-07-25 20:54:37 +02:00
Laurent Destailleur
dafe1194c4 Merge pull request #7100 from tuxgasy/develop_addmoresummary_hook
Close: add new hook addMoreBoxStatsCustomer
2017-07-25 20:32:10 +02:00
Laurent Destailleur
f4857af7aa Update card.php 2017-07-25 20:31:41 +02:00
Laurent Destailleur
86d7644acc Fix regression syntax error 2017-07-25 20:28:29 +02:00
Laurent Destailleur
82c25e5978 Fix syntax error 2017-07-25 20:17:58 +02:00
Laurent Destailleur
e35a9747c9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-25 20:13:19 +02:00
Laurent Destailleur
7e192559d6 Merge pull request #7055 from defrance/patch-16
Let's time to refactoring the tpl folder
2017-07-25 20:11:31 +02:00
Laurent Destailleur
6c9242b605 Merge pull request #7201 from atm-florian/dev_extrafields_table_uniformisation
NEW new columns into extrafields table to get update create information
2017-07-25 20:04:50 +02:00
Laurent Destailleur
0e23b04fab Update extrafields.class.php 2017-07-25 20:04:10 +02:00
Laurent Destailleur
6e8498465a Update extrafields.class.php 2017-07-25 20:01:47 +02:00
Laurent Destailleur
6fcb54b2d6 FIX #7072 2017-07-25 19:57:51 +02:00
Laurent Destailleur
764b47cf47 Merge pull request #7202 from atm-florian/dev_depositinvoicemoreexplicit
NEW : Deposit invoice more explicit in invoice line description
2017-07-25 19:22:42 +02:00
Laurent Destailleur
7838ec6ed8 Merge pull request #7203 from atm-florian/dev_regen_invoice
NEW : generate invoice PDF on disount application or payment
2017-07-25 19:12:53 +02:00
Laurent Destailleur
420c521304 Merge pull request #7200 from hguibourgdev/patch-14
NEW : Add toolkit for StockLimit
2017-07-25 18:32:48 +02:00
Laurent Destailleur
5bf10737d9 Merge branch 'develop' into patch-14 2017-07-25 18:32:36 +02:00
Laurent Destailleur
4ef36746bd Merge pull request #7199 from hguibourgdev/patch-13
NEW : Add toolkit for StockLimit and DesiredStock
2017-07-25 18:31:12 +02:00
Laurent Destailleur
87e44141d6 Merge pull request #7198 from joseplluis/patch-3
Fix supplier invoice permission on board
2017-07-25 13:33:59 +02:00
Laurent Destailleur
149e1f9c67 Merge pull request #7195 from atm-florian/6.0
fix : Various misspelling class (eclipse Oxygen standard PHP control)
2017-07-25 13:31:40 +02:00
Laurent Destailleur
2f4602e201 Merge pull request #7192 from hregis/develop_mc
Fix: remove unused $_COOKIE['DOLENTITY']
2017-07-25 13:25:49 +02:00
Laurent Destailleur
d511fed504 Enhance modulebuilder 2017-07-25 12:44:55 +02:00
florian HENRY
cdcbff2a85 NEW : generate invoice PDF on disount application or payment 2017-07-25 12:20:51 +02:00
florian HENRY
d2ecebdddd new :new column into extrafeild table to get update create information 2017-07-25 11:57:36 +02:00
florian HENRY
0dba6f3383 NEW : Deposit invoice more explicit in invocie line description 2017-07-25 11:32:41 +02:00
Laurent Destailleur
dcf5fd20bb Fix navigation on card generated by modulebuilder 2017-07-25 10:38:39 +02:00
Laurent Destailleur
80da181802 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-25 09:55:29 +02:00
Laurent Destailleur
bfd1fa3984 Enhance modulebuilder 2017-07-25 02:56:19 +02:00
Laurent Destailleur
13cd203502 Enhance modulebuilder 2017-07-25 01:54:54 +02:00
Laurent Destailleur
f6ab691c08 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-25 01:22:29 +02:00
Laurent Destailleur
e62a8d7bfa Debug modulebuilder 2017-07-25 01:22:06 +02:00
Laurent Destailleur
fd84711a1c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-25 00:33:56 +02:00
Laurent Destailleur
70341d6169 Debug modulebuilder 2017-07-25 00:33:43 +02:00
Laurent Destailleur
1d7674906f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-25 00:23:09 +02:00
Laurent Destailleur
9f3a5462b2 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-25 00:00:55 +02:00
hguibourgdev
6b9d25708b NEW : Add toolkit for StockLimit 2017-07-24 21:05:21 +02:00
Laurent Destailleur
1877a3b6fa Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-24 21:04:07 +02:00
hguibourgdev
e1f8cfd474 NEW : Add toolkit for StockLimit and DesiredStock 2017-07-24 20:59:46 +02:00
Josep Lluís
5f144ca940 Update index.php 2017-07-24 16:39:08 +02:00
Josep Lluís
50262491e6 Fix supplier invoice permission on board
Fix reading supplier invoice permission on main board
2017-07-24 16:24:53 +02:00
Laurent Destailleur
67a442cd9a Uniformize fields 2017-07-24 11:53:57 +02:00
florian HENRY
b9d5f4ba10 fix : Various misspelling class (eclipse Oxygen standard PHP control) 2017-07-24 09:02:32 +02:00
Laurent Destailleur
73c7aa378e Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/contrat/list.php
	htdocs/fichinter/list.php
2017-07-23 20:30:03 +02:00
Laurent Destailleur
6421ec3139 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/core/class/doleditor.class.php
2017-07-23 19:27:40 +02:00
Laurent Destailleur
f3de6cfd32 Support for robots and .htaccess file 2017-07-23 17:44:26 +02:00
Laurent Destailleur
7eee529c9f Can use - and _ into website alias 2017-07-23 16:28:56 +02:00
Laurent Destailleur
336400d9ea Can clone a page onto another website 2017-07-23 16:20:53 +02:00
Regis Houssin
c934f1bd13 Fix: remove unused old code 2017-07-23 12:07:20 +02:00
Regis Houssin
63b8835885 Fix: remove unused $_COOKIE['DOLENTITY'] 2017-07-23 11:42:18 +02:00
Regis Houssin
2efb86b5d8 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-07-23 10:36:14 +02:00
Laurent Destailleur
764c7ac792 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/websites/index.php
2017-07-22 20:46:02 +02:00
Laurent Destailleur
437d620fe4 Add support of language in website module 2017-07-22 20:01:29 +02:00
Laurent Destailleur
854a6ca3d5 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-22 16:40:45 +02:00
Regis Houssin
26df1389f4 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/install/mysql/migration/5.0.0-6.0.0.sql
2017-07-21 20:42:21 +02:00
Laurent Destailleur
f97ecd0a45 The css files is also parsed with function to clean images 2017-07-21 20:16:53 +02:00
Laurent Destailleur
2514c02817 Fix when there is several php part in same page 2017-07-21 19:01:06 +02:00
Laurent Destailleur
f3271791f8 Work on website module 2017-07-21 18:33:45 +02:00
Laurent Destailleur
c83ab91052 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-21 17:55:55 +02:00
Laurent Destailleur
b9df364fbe Fix include 2017-07-21 17:55:43 +02:00
Laurent Destailleur
a2b450a2a1 Merge pull request #7123 from defrance/patch-21
Adding Hook for tooltip on project
2017-07-21 15:18:27 +02:00
Laurent Destailleur
874e96fc38 Merge branch 'develop' into patch-21 2017-07-21 15:18:18 +02:00
Laurent Destailleur
929d14c816 Merge pull request #7078 from atm-florian/dev_prodlist
NEW : filter on extrafield on product list (as in company list)
2017-07-21 15:15:11 +02:00
Laurent Destailleur
6d97deb1c3 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-21 15:13:14 +02:00
Laurent Destailleur
1851080b31 Merge pull request #7152 from dolibarr95/patch-14
'int' for $rate variable
2017-07-21 15:07:00 +02:00
Laurent Destailleur
5965bec501 Update multicurrency.php 2017-07-21 15:06:53 +02:00
Laurent Destailleur
3716645b8b Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-21 15:03:21 +02:00
Laurent Destailleur
dc7e00ccc6 Merge pull request #7178 from atm-florian/fix_save_attachement_in_event_sendbymail
fix missing line into PR #6012
2017-07-21 15:00:56 +02:00
Laurent Destailleur
5f4dd26303 Merge pull request #7182 from hregis/develop_trad
NEW add specific translation for title of documents (Invoice, Order, Proposal)
2017-07-21 14:59:58 +02:00
Laurent Destailleur
094e55f326 Merge pull request #7179 from camlafit/patch-rib
Allow RUM on creation
2017-07-21 14:58:56 +02:00
Laurent Destailleur
d07741ada1 Merge branch 'develop' into patch-rib 2017-07-21 14:58:33 +02:00
Laurent Destailleur
27682d9ef3 Update rib.php 2017-07-21 14:52:54 +02:00
Laurent Destailleur
aacef21cb8 Can clone a page 2017-07-21 13:38:13 +02:00
Laurent Destailleur
0d15bf5de1 Fix ducplicate code 2017-07-21 12:55:50 +02:00
Laurent Destailleur
374e46af00 Fix ducplicate code 2017-07-21 12:53:15 +02:00
Laurent Destailleur
168f167934 Tooltip 2017-07-21 12:42:21 +02:00
Laurent Destailleur
058e88c6f3 Fix title in html header 2017-07-21 12:26:11 +02:00
Laurent Destailleur
23d9353a3d Fix title in html header 2017-07-21 12:21:48 +02:00
Laurent Destailleur
a6960187f4 Fix missing css 2017-07-21 12:01:16 +02:00
Laurent Destailleur
827e04f130 Fix missing css 2017-07-21 11:58:55 +02:00
Regis Houssin
48d79357a0 New: add specific translation for title of documents 2017-07-21 10:03:09 +02:00
Laurent Destailleur
302ee97d31 Debug module website 2017-07-21 02:51:56 +02:00
Laurent Destailleur
522f21e528 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/public/websites/index.php
2017-07-21 02:32:01 +02:00
Laurent Destailleur
28254655e9 Debug module website 2017-07-21 02:30:02 +02:00
Laurent Destailleur
1fd3ab56a8 Fix edit of css and htmlheader 2017-07-21 00:01:27 +02:00
Laurent Destailleur
df61a5f045 Debug module website 2017-07-20 20:05:49 +02:00
Laurent Destailleur
dfb49fc47b Fix update tms 2017-07-20 18:36:18 +02:00
Laurent Destailleur
7760594643 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/langs/en_US/website.lang
	htdocs/theme/eldy/style.css.php
	htdocs/websites/class/website.class.php
	htdocs/websites/index.php
2017-07-20 18:31:58 +02:00
Darkjeff
dcc3febf6f add bookkkeeping in report turnover 2017-07-20 18:22:53 +02:00
Darkjeff
8454c30bbb Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-07-20 16:55:26 +02:00
Laurent Destailleur
2f3128410b Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-20 16:49:56 +02:00
Laurent Destailleur
2621c55bf4 Link of preview is enabled only if setup is correct. 2017-07-20 11:51:30 +02:00
Laurent Destailleur
1e7aa4d9b4 Work on module website 2017-07-19 16:38:00 +02:00
cam.lafit
f0d95fcbd9 fixup! Allow RUM on creation step 2017-07-19 16:29:56 +02:00
cam.lafit
69aed8ac7f Allow RUM on creation step
* close #4932
2017-07-19 16:27:34 +02:00
fappels
3d338c2957 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-07-18 23:35:28 +02:00
florian HENRY
f701a52d2d fix missing line into PR 6012 2017-07-18 19:33:25 +02:00
Darkjeff
05f6e2c142 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-07-18 18:24:31 +02:00
Regis Houssin
c8bd11660d Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-07-18 15:23:43 +02:00
Laurent Destailleur
1bc2bba953 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-18 15:15:50 +02:00
Laurent Destailleur
6665416d97 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-18 15:15:31 +02:00
Laurent Destailleur
782cde37b3 Merge pull request #7175 from ATM-Marc/NEW_units_import_products
NEW add fk_unit field into product/service import/export
2017-07-18 14:49:59 +02:00
Laurent Destailleur
636c6ea880 Merge pull request #7163 from hguibourgdev/patch-6
Update list.php
2017-07-18 14:42:26 +02:00
Laurent Destailleur
b2c00ac463 Merge pull request #7161 from hguibourgdev/patch-4
Patch 4
2017-07-18 14:38:34 +02:00
Laurent Destailleur
c10852bea3 Merge pull request #7158 from articoder-infosec/patch-1
Reason: similar change is present elsewhere in the code.
2017-07-18 14:33:41 +02:00
Laurent Destailleur
ba660a041c Update index.php 2017-07-18 14:33:32 +02:00
Laurent Destailleur
04678f92da Merge pull request #7165 from hregis/develop_bug2
Fix: add upgrade 6 to 7 in travis
2017-07-18 14:29:32 +02:00
Laurent Destailleur
86926a28ec Fix css 2017-07-18 14:27:51 +02:00
Laurent Destailleur
a416ec4258 Try to fix travis 2017-07-18 14:25:07 +02:00
Laurent Destailleur
5c296c679e Enhance source code editor 2017-07-18 13:42:07 +02:00
Laurent Destailleur
6db2aeff20 Fix source code editor 2017-07-18 12:00:18 +02:00
Marc de Lima Lucio
447fdd542d Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW_units_import_products 2017-07-18 10:30:43 +02:00
Laurent Destailleur
cfe7216577 Removed constant PROJECT_DEFAULT_PUBLIC (become useless) 2017-07-18 10:23:25 +02:00
Marc de Lima Lucio
3a05b6a164 NEW add fk_unit field into product/service import/export 2017-07-18 10:20:16 +02:00
Laurent Destailleur
fc53a8b576 Fxi copyright 2017-07-18 03:21:59 +02:00
Laurent Destailleur
98ef978b2a NEW Introduce code syntax coloration with mode 'ace' for DolEditor. 2017-07-18 03:18:16 +02:00
Laurent Destailleur
ae7f2ac253 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-17 20:21:35 +02:00
Darkjeff
7031a5844f Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-07-17 18:41:35 +02:00
Laurent Destailleur
b6c9823ad4 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-17 16:45:47 +02:00
Laurent Destailleur
b7a6c7d049 Fix log file name not set during install 2017-07-17 16:23:24 +02:00
Laurent Destailleur
5c0e581d5a Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-16 13:01:07 +02:00
Regis Houssin
9bb1431fd9 Fix: change version 2017-07-16 08:06:58 +02:00
Regis Houssin
200f232164 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-07-16 07:51:20 +02:00
Laurent Destailleur
75ec7a309c Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-15 21:25:14 +02:00
hguibourgdev
4633d1ae7e Update list.php
FIX copy-paste error (sell versus buy)
2017-07-15 19:04:10 +02:00
hguibourgdev
3825e7fd52 Update replenish.php
FIX ">=" instead of ">" for alert test in order to work when negatif stock are allowed
2017-07-15 18:55:52 +02:00
Articoder InfoSec Team
8ef5fcd90a Reason: similar change is present elsewhere in the code
Notes: please review carefully before accepting. patch propagation. manual test run. 
Reviewed By: https://github.com/dchichkov 
Cherry picked from:
===
From 0d62bd704e Mon Sep 17 00:00:00 2001
From: Juanjo Menent <jmenent@2byte.es>
Date: Wed, 22 Jun 2016 18:59:51 +0200
Subject: [PATCH] Fix: Bad column totalizing if MAIN_SHOW_HT_ON_SUMMARY activated
2017-07-14 15:57:22 -07:00
Laurent Destailleur
0fc56d2bcd Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-14 15:26:03 +02:00
Laurent Destailleur
6a272523c0 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-14 15:22:57 +02:00
Laurent Destailleur
2188135fb2 Prepare 7.0 alpha 2017-07-14 14:41:25 +02:00
Laurent Destailleur
3ac85e10c5 NEW Add mass action "validate" on supplier invoices.
NEW Add date_valid and date_pointoftax on supplier invoices.
2017-07-14 14:40:09 +02:00
Laurent Destailleur
bbc8994d36 Fix css 2017-07-14 13:28:21 +02:00
Laurent Destailleur
201db3b720 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

Conflicts:
	htdocs/projet/tasks/task.php
2017-07-14 00:24:49 +02:00
Laurent Destailleur
f9a99f506f Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-14 00:17:49 +02:00
dolibarr95
de24c0e367 Keep alpha for $rate var 2017-07-13 16:21:02 +02:00
dolibarr95
c36c2408c2 'int' for $rate variable
see : 
https://github.com/Dolibarr/dolibarr/pull/7149#issuecomment-315076031
2017-07-13 15:31:46 +02:00
Laurent Destailleur
dec1ae863b Merge pull request #7142 from atm-alexis/FIX_task_view_without_thirdparty
FIX empty thirdparty getNomUrl() call without thirdparty
2017-07-13 14:31:08 +02:00
Laurent Destailleur
cbd9adc052 Update task.php 2017-07-13 14:30:50 +02:00
Laurent Destailleur
7079e6d4bc Update task.php 2017-07-13 14:29:47 +02:00
Laurent Destailleur
80210dfb18 Merge pull request #7140 from hregis/develop_bug_restapi
Fix: error during upgrade process
2017-07-13 14:28:07 +02:00
Laurent Destailleur
24863337da Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-12 20:34:22 +02:00
Laurent Destailleur
25f9d782dc NEW Add non intrusive js library to make syntaxic coloring of textarea 2017-07-12 12:30:07 +02:00
Alexis Algoud
f1d451eb12 FIX empty thirdparty getNomUrl() call without thirdparty 2017-07-11 23:06:33 +02:00
Regis Houssin
cb6b81d897 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-07-11 19:10:22 +02:00
Regis Houssin
be837a22da Fix: error during upgrade process 2017-07-11 18:43:36 +02:00
Laurent Destailleur
d34146b127 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-11 12:54:21 +02:00
Laurent Destailleur
32d5edf5b9 Fix warning when module position is not correct 2017-07-11 12:54:03 +02:00
Laurent Destailleur
be0536f882 Merge pull request #7136 from AlainRnet/patch-6
Update card.php
2017-07-10 21:38:33 +02:00
florian HENRY
8e3c2af7ee Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
dev_prodlist

Conflicts:
	htdocs/accountancy/class/accountancycategory.class.php
2017-07-10 16:16:11 +02:00
AlainRnet
7a12118ce4 Update card.php
Limitation of the number of characters that is not limited in the third card as described here: https://www.dolibarr.fr/forum/5-bugs-sur-la-version-cvs-ou-demo/59229-taille-limitee-de-l-adesse-mail-des-contacts
2017-07-10 15:41:26 +02:00
Andreas Pachler
0932ebd6c8 Added functionality to get order customer contact as contact_xx tags 2017-07-10 14:09:21 +02:00
florian HENRY
262e23bc41 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_fixtransfert

Conflicts:
	htdocs/compta/bank/transfer.php
2017-07-10 13:48:22 +02:00
Laurent Destailleur
6b4cecd0a8 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-09 19:43:21 +02:00
fappels
71fd9d324c Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-07-09 08:19:45 +02:00
Laurent Destailleur
eec10660ab Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-08 22:19:33 +02:00
Laurent Destailleur
4d560a8e03 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2017-07-08 22:18:12 +02:00
Laurent Destailleur
ff2b2e5b64 Merge pull request #7129 from AlainRnet/patch-6
Update main.lang
2017-07-08 21:55:32 +02:00
Darkjeff
f44f8b90e9 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-07-08 09:31:35 +02:00
AlainRnet
8d1c8e2da7 Update main.lang
StatusInterInvoiced missing and I don't know its wording.
2017-07-08 08:09:02 +02:00
phf
6ab0ec4b1b Fix travis and rename 2 fields 2017-07-07 10:22:37 +02:00
BENKE Charlene
3a89591fb4 Adding Hook for tooltip on project 2017-07-06 15:48:22 +02:00
florian HENRY
ffb8c684d0 NEW : Can transmer from bank account to bank account with different
currency
2017-07-06 13:40:26 +02:00
TuxGasy
bec5bde363 Move addMoreBoxStatsCustomer after table tag 2017-07-06 12:18:54 +02:00
Darkjeff
82f9344010 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-07-05 20:45:11 +02:00
phf
49b8689f2d Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new_event_with_multi_contact 2017-07-05 11:02:39 +02:00
phf
b8865c425f Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new_develop_expense_report 2017-07-05 10:48:01 +02:00
phf
1beec51928 New expense report rules and ik (index kilometers) - MAIN_USE_EXPENSE_IK - MAIN_USE_EXPENSE_RULE 2017-07-05 10:44:52 +02:00
TuxGasy
67f11103a3 fix indent 2017-07-04 21:56:47 +02:00
florian HENRY
13e8443e6a Merge remote-tracking branch 'origin/develop' into dev_prodlist
Conflicts:
	htdocs/accountancy/class/accountancycategory.class.php
2017-07-03 14:40:18 +02:00
TuxGasy
bb6b8015fe Add docker-compose.yml file to build development environment based on Docker 2017-07-03 12:30:41 +02:00
Regis Houssin
3f882cb33a Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-07-03 09:24:05 +02:00
Darkjeff
30153f8c2e add in bookkeeping date lim reglement
Date lim reglement for export Sage and Iris
correct avoir when write in bookkeeping
2017-07-03 07:21:15 +02:00
Darkjeff
535bd4dcb8 Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-07-03 06:19:16 +02:00
TuxGasy
1f9bd2538e new addMoreBoxStatsCustomer hook 2017-07-02 22:20:07 +02:00
Darkjeff
d33be2c83b Merge remote-tracking branch 'refs/remotes/Dolibarr/develop' into develop 2017-07-02 15:28:36 +02:00
florian HENRY
adf4c343c3 Merge branch 'develop' into dev_prodlist 2017-06-29 16:32:07 +02:00
florian HENRY
53510ac660 NEW : filter on extrafield on product list (as in company list) 2017-06-29 10:14:48 +02:00
Regis Houssin
fa247ffd98 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-06-29 08:51:42 +02:00
BENKE Charlene
01c3e6fb82 TPL refactoring 2017-06-26 23:06:24 +02:00
BENKE Charlene
d34a8f4284 Refactoring tpl Folder 2017-06-26 14:15:36 +02:00
BENKE Charlene
fe749cbd95 Update bloc_showhide.tpl.php 2017-06-25 22:27:38 +02:00
BENKE Charlene
34727286f1 Let's time to refactoring the tpl folder
Propose to refactoring all the file present in /tpl folder for hamonisation with the rest of dolibarr file.
Good resolution for this summer
2017-06-25 22:03:06 +02:00
ptibogxiv
ca5366bd12 Merge pull request #1 from ptibogxiv/ptibogxiv-patch-1
Update index.php
2017-06-25 01:28:14 +02:00
ptibogxiv
3e93f27d98 Update index.php 2017-06-25 01:27:41 +02:00
Regis Houssin
2fffd2fa6f Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-06-20 23:26:21 +02:00
Regis Houssin
909826e24f Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-06-20 06:25:35 +02:00
Regis Houssin
c50b180e18 Fix: revert fix 2017-06-19 07:32:14 +02:00
Regis Houssin
544d051fe3 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-06-19 07:06:57 +02:00
Regis Houssin
dcc152d4a4 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-06-18 06:52:20 +02:00
Regis Houssin
a0299042e4 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-06-17 12:05:33 +02:00
mikee2
6a35047020 Updated to use dolibarr timme functions
Redefined macro strings to adapt to dolibarr date functions return values. Keep same macro names when possible to avoid breaking existing code. Some macro holders (not commonly used) have been dropped because non existing values in dolibarr date functions.

Per eldy request changed php date functions with dolibarr's internal date functions to match users time zone. Now dates are those of the user's timezone so check that is is correctly defined in user's profile.
2017-06-14 12:53:29 +02:00
Regis Houssin
cd095e99c9 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-06-14 12:16:10 +02:00
Regis Houssin
773abff80e Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-06-12 21:24:10 +02:00
Regis Houssin
8b0354cfdf Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/compta/paiement/class/paiement.class.php
	htdocs/install/mysql/migration/5.0.0-6.0.0.sql
2017-06-11 16:43:31 +02:00
Regis Houssin
d1233755f6 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-06-11 11:41:02 +02:00
Regis Houssin
cc75916599 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-06-11 11:26:24 +02:00
Regis Houssin
6cac4b15d3 Fix: Parameter must be an array or an object that implements Countable 2017-06-11 06:54:40 +02:00
Regis Houssin
3445c9d329 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict

Conflicts:
	htdocs/core/lib/functions.lib.php
2017-06-11 06:27:49 +02:00
Regis Houssin
735a24fb07 Fix: remove debug 2017-06-09 15:43:43 +02:00
Regis Houssin
fc08adff0f Fix: syntax error 2017-06-09 14:44:29 +02:00
Regis Houssin
2864d43148 Fix: missing all logs 2017-06-09 14:31:19 +02:00
Regis Houssin
d4edca5857 Revert "Fix: show all logs"
This reverts commit cfe667a3ce.
2017-06-09 14:30:02 +02:00
Regis Houssin
cfe667a3ce Fix: show all logs 2017-06-09 14:29:04 +02:00
Regis Houssin
460a6f0fb7 Fix: phpunit : Unexpected 'print' (T_PRINT) 2017-06-09 14:15:29 +02:00
Regis Houssin
0e8f36dc92 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-06-09 14:00:48 +02:00
Regis Houssin
1056473cdc Try to fix travis error 2017-06-09 13:45:36 +02:00
Regis Houssin
6dfb8e33c9 Fix: try to debug 2017-06-09 12:12:25 +02:00
Regis Houssin
0a442365a7 Revert "Fix: try to add functions.lib.php to avoid phpunit error"
This reverts commit 4bd7bb86a7.
2017-06-09 11:46:26 +02:00
Regis Houssin
4bd7bb86a7 Fix: try to add functions.lib.php to avoid phpunit error 2017-06-09 10:13:24 +02:00
Regis Houssin
58b3d86b49 Fix: errors 2017-06-09 09:40:43 +02:00
Regis Houssin
fa58f0f3e8 Fix: add entity filter 2017-06-09 09:25:15 +02:00
Regis Houssin
c95b5a4567 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-06-09 08:04:08 +02:00
Regis Houssin
4c70908ea2 Fix: entity field in combobox 2017-06-08 18:52:01 +02:00
Regis Houssin
0546f28823 Fix: Travis error 2017-06-08 18:38:24 +02:00
Regis Houssin
73557151d2 Fix: better test if entity equal 0 2017-06-08 18:27:32 +02:00
Regis Houssin
3bddbd3bdf Fix: better test 2017-06-08 18:20:27 +02:00
Regis Houssin
ade915af5f New: add dictionnary sharing (multicompany) 2017-06-08 16:36:42 +02:00
Regis Houssin
4b98a1aefd Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict 2017-06-08 15:05:45 +02:00
phf
d6d451b54a Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into new_event_with_multi_contact 2017-06-08 12:03:59 +02:00
phf
711f9696aa New multi contacts on actioncomm 2017-06-08 12:02:39 +02:00
Regis Houssin
1baa620688 Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into
develop_dict
2017-06-08 10:33:26 +02:00
Regis Houssin
44dba391c1 New: add dictionnary sharing (multicompany) 2017-06-08 10:24:16 +02:00
mikee2
637e1a8d21 Update Segment.php
Add additional needed fields so that you can invoice yearly items. Have number and text descriptions to avoid future changes that may break existing invoices.
2017-05-06 10:49:37 +02:00
BENKE Charlie
9871bc3d9a Update 5.0.0-6.0.0.sql 2017-03-26 19:35:00 +02:00
BENKE Charlie
d60f1d8402 add price_level on product_customer_price_log
fk_soc can be 0 when generic price is stored on log
2017-03-26 19:29:16 +02:00
BENKE Charlie
d8018f7937 add trigger on product price add/update 2017-03-26 19:16:19 +02:00
BENKE Charlie
3299e5f889 PRODUCT_PRICE_SUPPLIER_NO_LOG test inverted
if PRODUCT_PRICE_SUPPLIER_NO_LOG is empty, no log is stored
if PRODUCT_PRICE_SUPPLIER_NO_LOG is not empty log is stored
they are inversion
@eldy maybe add more field in this table
2017-03-26 19:13:10 +02:00
BENKE Charlie
965f73940a just add a comment to launch again travis... 2016-10-31 13:35:32 +01:00
BENKE Charlie
a7786a2900 Update 4.0.0-5.0.0.sql 2016-10-21 23:06:18 +02:00
BENKE Charlie
3c9663d3e8 Introduce SHIPPING on propal (like order) 2016-10-21 23:04:07 +02:00
4714 changed files with 549755 additions and 143669 deletions

View File

@@ -1,16 +0,0 @@
build
build.xml
ChangeLog
composer.json
CONTRIBUTING.md
COPYING
COPYRIGHT
dev
doc
Dockerfile
INSTALL
README-FR.md
README.md
robots.txt
scripts
test

0
.gitignore vendored Executable file → Normal file
View File

View File

@@ -37,6 +37,7 @@ php:
- '5.6'
- '7.0'
- '7.1'
- '7.2'
#- hhvm only with dist: trusty
- nightly
@@ -71,6 +72,8 @@ matrix:
env: DB=postgresql
- php: '7.0'
env: DB=postgresql
- php: '7.1'
env: DB=postgresql
- php: hhvm
env: DB=postgresql
- php: nightly
@@ -79,7 +82,7 @@ matrix:
notifications:
email:
on_success: never # [always|never|change] default: change
on_failure: change # [always|never|change] default: always
on_failure: never # [always|never|change] default: always
irc:
channels:
- "chat.freenode.net#dolibarr"
@@ -123,7 +126,10 @@ install:
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
composer -n require phpunit/phpunit ^4
fi
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
composer -n require phpunit/phpunit ^5
fi
if [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
composer -n require phpunit/phpunit ^5
fi
echo
@@ -163,7 +169,7 @@ before_script:
#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, 7.1 and nightly!
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1, 7.2 and nightly!
echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
fi
phpenv rehash
@@ -237,7 +243,7 @@ before_script:
echo "Setting up Apache + FPM"
# enable php-fpm
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
# Copy the included pool
cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf
fi
@@ -313,30 +319,34 @@ script:
php upgrade2.php 3.9.0 4.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade390400-2.log
php step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log
php upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log
php upgrade2.php 4.0.0 5.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade400500-2.log
php upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log
php step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log
php upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log
php upgrade2.php 5.0.0 6.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade500600-2.log
php upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log
php step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log
php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.log
php upgrade2.php 6.0.0 7.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_SUPPLIERPROPOSAL > $TRAVIS_BUILD_DIR/upgrade600700-2.log
php step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log
cd -
set +e
echo
#cat $TRAVIS_BUILD_DIR/upgrade400500-2.log
#cat $TRAVIS_BUILD_DIR/upgrade500600.log
#cat $TRAVIS_BUILD_DIR/upgrade500600-2.log
#cat $TRAVIS_BUILD_DIR/upgrade500600-3.log
#cat /tmp/dolibarr_install.log
- |
echo "Unit testing"
# Ensure we catch errors. Set this to +e if you want to go to the end to see log file.
phpunit --version
# Ensure we catch errors. Set this to +e if you want to go to the end to see dolibarr.log file.
set -e
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
set +e
- |
#echo "Output dolibarr.log"
#echo cat documents/dolibarr.log
#cat documents/dolibarr.log
after_script:
- |

View File

@@ -34,12 +34,11 @@ Swift Mailer 5.4.2-DEV MIT license Yes
Stripe 4.7.0 MIT licence Yes Library for Stripe module
JS libraries:
jQuery 1.11.3 MIT License Yes JS library
jQuery UI 1.11.4 GPL and MIT License Yes JS library plugin UI
jQuery select2 3.5.2 GPL and Apache License Yes JS library plugin for sexier multiselect
jQuery 3.1.1 MIT License Yes JS library
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
jQuery FileUpload 5.0.3 GPL and MIT License Yes JS library to upload files
jQuery Flot 0.8.3 MIT License Yes JS library to build graph
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place)
@@ -49,10 +48,10 @@ jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
jQuery Tiptip 1.3 GPL and MIT License Yes JS library for tooltips
jsGanttImproved 1.7.5.2 BSD License Yes JS library (to build Gantt reports)
jsGanttImproved 1.7.5.4 BSD License Yes JS library (to build Gantt reports)
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer
Ace 1.2.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
For licenses compatibility informations:
http://www.gnu.org/licenses/licenses.en.html

502
ChangeLog
View File

@@ -2,8 +2,505 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 7.0.3 compared to 7.0.2 *****
FIX: 7.0 task contact card without withproject parameters
FIX: #8722
FIX: #8762
FIX: #8813
FIX: #8858 #8860 Backport better compatibility fix
FIX: #8893 to get formatted price as substitution vars
FIX: Avoid converting into reduction twice and draft invoice
FIX: bad result on fetch ProductStockEntrepot
FIX: Bad substitution key used for default send proposal email
FIX: button to pay still visible when amount null used
FIX: clause must not be there
FIX: Contact tab not visible when using canvas
FIX: dol_delete_file must work in a context without db handler loaded
FIX: entity test must be on product_fourn_price table and not product table
FIX: Fetch shipping will now fetch project id
FIX: If we enable 3 steps for supplier order approbation, we must not delete all fourn rights def.
FIX: intervention: extrafield error when calling insertExtrafields
FIX: It's not possible to remove a contact which is assigned to an event #8852
FIX: javascript showempty error
FIX: Keep supplier proposal price for supplier order
FIX: link for projets not linked to a thirdparties
FIX: Missing extrafields in export of stock or products
FIX: missing filters during ordering
FIX: missing filters during reordering
FIX: missing parenthesis
FIX: need to filter on aa.entity for same accounting accounts available in several entities
FIX: picto for type in product link in accountany list is wrong
FIX: Problems in accountancy module when using multicompany module.
FIX: proposal: missing contact type translation key
FIX: pu_ht_devise was not converted to numeric so decimals were lost when calculating total_ht_devise
FIX: Select user on add time spent form
FIX: shipment: fk_proje(c)t not handled in fetch() and update() methods
FIX: sometimes amounts are identical but php find them different.
FIX: supplier order: product supplier ref not saved on addline
FIX: test is_erasable() must be done before call function delete() too to avoid delete invoice with &action=delete in url
FIX: wrong var name $search_month_lim
***** ChangeLog for 6.0.6 compared to 6.0.6 *****
***** ChangeLog for 7.0.2 compared to 7.0.1 *****
FIX: #8023
FIX: #8259 can't update contact birthday with REST API
FIX: #8359
FIX: #8389
FIX: #8478 !empty instead of count to avoid warning
FIX: #8488
FIX: #8559 Bug to generate cheque receipt
FIX: #8571
FIX: #8574
FIX: #8580
FIX: #8650
FIX: actioncomm export: type filtering not working
FIX: Add a test to avoid to reset binding by error.
FIX: addline on invoice supplier manage rank on its own if not provided
FIX: Add warning when expense report line not into range
FIX: avoid Error: Call to undefined method mysqli::get_charset()
FIX: avoid focus problem when select2 is in a modal dialog window
FIX: Binding pages must start on fiscal month not calendar month
FIX: button "Classify bill" on supplier order was not visible
FIX: Button receive products not visible
FIX: can bypass the CSRF protection with url with domain inside
FIX: Can't edit option PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY
FIX: commonobject: don't require notnull field if default set
FIX: CommonObject: don't require 'notnull' field if 'default' set
FIX: cron script disabled if module disabled
FIX: CVE-2018-10092
FIX: CVE-2018-10094
FIX: CVE-2018-10095
FIX: CVE-2018-9019
FIX: CWE-89
FIX: Data on income/expense report was always 0
FIX: default addupdatedelete actions: uniformize add/update value checks
FIX: default currency not set on supplier order creation from commercial menu #8459
FIX: delete all product variants of a parent product
FIX: Detail per account not visible when total < 0
FIX: DOL_AUTOSET_COOKIE was not correctly setting value of cookie
FIX: don't print empty date in CommonObject::showOutputField
FIX: dont print empty date in CommonObject::showOutputField
FIX: Draft invoice must be excluded from report
FIX: environment shown on cron card
FIX: Error in ContractLigne not return to Contract
FIX: extrafields price and double were lost during a failed post.
FIX: File name not visible in email preview
FIX: filter/sorting on extrafield on contact list from contact tab
FIX: Initial month on report income/expense per predefined group
FIX: issue #8037
FIX: Issue #8455
FIX: issue #8470
FIX: label in getnomurl projectlist
FIX: limit access of email template page to internal users
FIX: look and feel v7 "back to" for bookkeeping record
FIX: Max nb of generation of recurring invoice should not show warning
FIX: missing english name for object
FIX: Missing include
FIX: missing User object with API REST
FIX: modulebuilder: could not create html fields
FIX: modulebuilder: handle 'price' fieldtype
FIX: multiple creation of same event
FIX: Name of user not visible on journalizing expense report payments
FIX: Not approved holidays must not be visible into timesheet
FIX: Only approved expense report must be journalized
FIX: payment term doc-specific label was not used
FIX: payment term doc-specific label was not used (issue #8414)
FIX: project category is type 6 not 5
FIX: Projet is not prefilled when created from overwiew page
FIX: Related contact printed in societe agenda
FIX: Removed error when no error on accounting setup page
FIX: remove var_dump
FIX: sanitize setup params
FIX: selectForFormsList: entity checked even is object not multi-entity managed
FIX: service creation, right is tested regarding the product type
FIX: some localtaxes errors
FIX: Some report have data when several chart of accounts exists
FIX: sql error using no category
FIX: SQL Injection CWE-89
FIX: Support or multicompany for sheduled jobs
FIX: Test on mandatory status when closing proposal failed
FIX: to allow IRPF not null even if main VAT is null.
FIX: update wrong datetime extrafield
FIX: Use priority to define order of sheduled jobs
FIX: various modulebuilder-related issues
FIX: view of balance before field
FIX: weird password autocompletion in Goocle Chrome (issue #8479)
FIX: weird password autocompletion in Google Chrome (issue #8479)
FIX: When clearing filter, we must not save tmp criterias in session
FIX: With x extrafields, request for multicompany label was done x times
FIX: several XSS
FIX: zip not filtered
***** ChangeLog for 7.0.1 compared to 7.0.0 *****
FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php
FIX: #8200
FIX: #8219
FIX: #8232
FIX: #8269
FIX: #8277
FIX: #8285 Extrafields now reported by /api/index.php/agendaevents/{id}
FIX: #8289 add a configuration for stock calculation
FIX: Activate all also if there are inactive services
FIX: add planned delivery to order exports
FIX: approval date was not visible if leave was canceled after
FIX: avoid "Array" on screen
FIX: Avoid empty value to fk_multicurrency attribute
FIX: Bad var for substitution of free text
FIX: Can't activate tasks on projects configuration
FIX: Can use odx templates that does not include lines tags
FIX: check shipping on delete order
FIX: check verif exped on delete order
FIX: comment on tasks
FIX: country must not be mandatory for accounting report groups
FIX: css
FIX: Delete tasks on project delete will now trigger TASK_DELETE
FIX: Do not lose filter when editing comment of a time spent in task view
FIX: duplicate confirm message. Missing reposition class
FIX: Duplicate product_type asignement on order addline
FIX: email use the validate user instead of approver in holiday approval
FIX: Error management in leave request
FIX: for nondisplay of fk_element 's id in REST API response
FIX: Generic substitution of constant disabled for sensitive constant
FIX: if we make a mistake with situation_percent, now we can correct it. before situation_final was always set to 1 and no way to go back
FIX: Import process must stop after ending line nb to import
FIX: Infinite loop on deletion of temp file when there is symbolic links
FIX: Input of holiday for subordinates was ko
FIX: invoice creation fails when next date not defined
FIX: Label of event show twice
FIX: letter for month March
FIX: Look and feel v7
FIX: Make a redirect after the remove_file action to avoid deletion done
FIX: migration script for product photo
FIX: missing email of customer in stripe info payments
FIX: missing object entity in fetch
FIX: Missing restore_lastsearch_values
FIX: multicompany compatibility and fix reports
FIX: natural search double quote
FIX: navigation and filters on holiday list
FIX: Parameter must be an array or an object that implements Countable
FIX: Payment mode not correctly set in donation and document
FIX: Permission in list of holiday
FIX: Properties updated if update successfull.
FIX: reverse field to have object loaded in doaction
FIX: Saving wrong localtax on order addline
FIX: Search criteria on vat
FIX: security report by DIGITEMIS CYBERSECURITY & PRIVACY
FIX: show status on societe banner
FIX: solve column mismatch in user card with multicompany transverse mode + code cleanup
FIX: Subscription events not recorded into agenda
FIX: Subscription not correctly log in blockedlog
FIX: Temporary dir for mail files must be cleaned at beginning of form
FIX: Trad and creation date in subscription create
FIX: translation of holiday types
FIX: Unknown column 'pl.amount_requested' in compta/prelevement/factures.php
FIX: Useless clean of tree
FIX: Use of undefined constant _ROWS_2
FIX: warning when adding ECM files using old photo path
***** ChangeLog for 7.0.0 compared to 6.0.5 *****
For users:
NEW: Add a preview icon after files that can be previewed (pdf + images)
NEW: When payment is registered, PDF of invoices are also regenerated so payments
appears with no need to click on regenerate.
NEW: #5711 Add shipment line deleting and editing for draft shipments.
NEW: Accept substitution key __(ABC)__ replaced with value of translation of key ABC
NEW: Accept substitution key __[ABC]__ replaced with value of const ABC
NEW: Accountancy Add fields for sale accounting account for intracommunity sales & export sales
NEW: Add a button "Activate all services" on contracts
NEW: Add a confirmation for all mass action 'delete'
NEW: Add a group task line for tasks on same level on gantt diagram
NEW: Add and edit country for chart of accounts systems
NEW: add a new notification for the signed closed event of a proposal.
NEW: Add a parameter to specify char used as separator for variant product label
NEW: Add a profile to import product translations
NEW: Add a protection so we can't journalize non balanced transactions
NEW: Add a status enabled/disabled on recurring invoices
NEW: add burger menu to list action comm
NEW: Add button cancel on shipment creation
NEW: Add chart of account for england
NEW: Add Chile accounting plan
NEW: Add class in societe/card.php
NEW: add company alias name when create company from member
NEW: Add date of birth on user card.
NEW: Add date_valid and date_pointoftax on supplier invoices.
NEW: Added Region name to state/province form field
NEW: Added regions to third party/societe lists, can be filtered
NEW: Add error message
NEW: Add expense report rules and ik
NEW: Add filter on event code on automatic filling setup page
NEW: Add filters on month/year on the accountancy binding tools
NEW: add fk_unit field into product/service import/export
NEW: add 'formObjectOptions' hook to the form setting the product selling price
NEW: Add hidden option PROJECT_DISABLE_UNLINK_FROM_OVERVIEW
NEW: add image object_phoning_mobile.png
NEW: Adding Field "First date of expire" + filter on contract list
NEW: add ldap_rename for avoid password if ldap key changed
NEW: Add mass action "validate" on supplier invoices.
NEW: add members types ldap group management
NEW: Add new property visible dy default on lists on extrafields
NEW: Add Next/Previous button on operation date of bank line
NEW: Add option EXPENSEREPORT_ALLOW_OVERLAPPING_PERIODS
NEW: Add option PROPOSAL/ORDER/INVOICE_ALLOW_EXTERNAL_DOWNLOAD
NEW: Add product unit fields for ODT substitution
NEW: Add project on a various payment
NEW: Add project related fields to ODT
NEW: Add protection to avoid to send to much emails using builk actions
NEW: Add search field for date on supplier payment page
NEW: Add search on date and accounting account in various payment list
NEW: add specific translation for title of documents (Invoice, Order, Proposal)
NEW: Adds the payment reference to the return of the function getListOfPayements
NEW: Add supplier proposals into stats of product page.
NEW: Add tab "Expense report" on user card
NEW: add the ability to regenerate a pdf for the order module
NEW: Add The accountancy Switzerland chart of accounts
NEW: Add The developed French chart of accounts 2014
NEW: Add The Luxembourg chart of accounts
NEW: Add The Moroccan chart of accounts
NEW: Add The Switzerland chart of accounts
NEW: Add The SYSCOHADA chart of accounts
NEW: Add the total in the perday view of the time spent form.
NEW: Add The Tunisia chart of accounts
NEW: Add toolkit for StockLimit and DesiredStock
NEW: add translation and possibility to change month and year
NEW: Add view of status of template invoice
NEW: All search boxes are available on smartphone
NEW: All setup of accountancy can be done from menu "Accountancy-Setup"
NEW: Attaching doc automatically in email is now a parameter of template.
NEW: automatic activation of external module on country set
NEW: Better autoselect customer or supplier fields to save clicks
NEW: Better behaviour when using a text browser
NEW: Break lines per project on the new timesheet page
NEW: Bulk action validate on customer invoices
NEW: Bulk delete actions available on leave requests
NEW: burger menu and hooks on list action
NEW: Can add html content on right of tabs
NEW: Can add link to other element on a donation
NEW: Can create intervention from a proposal
NEW: Can create thirdparty from card proposal, order or invoice
NEW: Can download PDF document from the payment page
NEW: Can edit the language into the email templates editor.
NEW: Can edit with delete/insert a forced translation
NEW: Can export list of stock movements
NEW: Can filter on date on the page showing existing bindings
NEW: Can filter on document name in ECM module for automatic tree
NEW: can filter on status of template invoices
NEW: Can filter on the "other" column on emailing target list
NEW: Can filter on type of email template
NEW: Can filter on user on unalterable log
NEW: Can import local tax rates in prices
NEW: Can include extrafields into member card templates
NEW: Can include tag {uuu} into some numbering masks to replace with user
NEW: Can make a specific setup for SMTP sending for emailing module
NEW: Can rename (so reorder) bank receipts
NEW: Can send email from contract card
NEW: Can send email from the member card using email templates.
NEW: Can set a dedicated message on payment forms
NEW: Can set email of thirdparty as unique and/or mandatory
NEW: Can setup csv accounting export from admin config
NEW: Can show currency in list of bank accounts
NEW: Can show stock in alert even if alter is set to 0
NEW: Can sort joined files on thirdparty and user card.
NEW: Can transfer from bank account to bank account with different currencies
NEW: Can use an url like $conf->global>-MYPARAM for menu urls
NEW: change description on click
NEW: Chart of account is loaded when selected into accounting setup
NEW: Classify the order as invoiced in the REST API
NEW: comments system on task
NEW: comment system working with all objects
NEW: Compatibility with PHP 7.2
NEW: confirm form style to accept or reject proposal
NEW: Create an invoice using an existing order
NEW: Create an order using an existing proposal
NEW: customizable meteo in value or percentage
NEW: Days where user is on vacation use different colors in timesheet.
NEW: Deduct an available credit to an existing invoice
NEW: Default filter and sort order can use partial list of query
NEW: Deposit invoice more explicit in invoice line description
NEW: deposits can be converted even if unpaid
NEW: detection of edge browser
NEW: Each user can edit its own email template (menu tools)
NEW: Enabled sending email in bulk actions for supplier orders
NEW: Enhance the anti XSS filter
NEW: extrafield on facture_rec
NEW: Extrafields "link to object" now use a combo selection and getNomUrl
NEW: filter date for blockedlog
NEW: filter on extrafield on product list (as in company list)
NEW: General ledger : Add field date_creation and selected field
NEW: generate also document when invoice is build from recurring template
NEW: Generated files are now indexed in database
NEW: generate invoice PDF on disount application or payment
NEW: Get a list of payments terms
NEW: hrm details output on user
NEW: If max nb of generation is reached, date for next gen is striked
NEW: improvements of invoices, orders and proposals in the REST API
NEW: Include a color syntaxed HTML editor for emailing edition.
NEW: Introduce code syntax coloration with mode 'ace' for DolEditor.
NEW: Introduce experimental feature to search dolistore from application
NEW: jquery date selector become default date selector
NEW: langs
NEW: link project from other company conf
NEW: manageme extrafields with multientity
NEW: Mass PDF Merging is available on contracts
NEW: merge categories while merging thirdparties
NEW: Merge resource/add.php to resource/card.php
NEW: Module "Product variants" is moved as stable.
NEW: More picto for phone
NEW: Move accountancy features into a dedicated menu
NEW: Move contacts of a thirdparty on tab Contacts/Addresses
NEW: Move the upload input on top right in ECM module
NEW: new columns into extrafields table to get update create information
NEW: new param on load_board() function in ActionComm class to avoid duplicate code
NEW: On bulk email from a list, can uncheck "Join main document".
NEW: On reconciliation, show balance including all reconciliated fields
NEW: Option "one email per recipient" when using bulk actions emails.
NEW: Option STOCK_SUPPORTS_SERVICES become visible.
NEW: option to avoid countries to disable there blockedlog
NEW: option to fix top menu with eldy theme (hidden conf)
NEW: Popup for preview of image add a button "Original size"
NEW: post lines of an invoice using the REST API
NEW: preload comments in task
NEW: Provide a way to download a file from a public URL for files in ECM
NEW: Reduce size of HTML page by removing duplicate tooltips
NEW: Remove background on agenda view when event is a not busy event.
NEW: Retrieves available discounts and payments details from a specific invoice
NEW: Revenue stamp can be a percent
NEW: Search filters in lists are restored when using "back to list"
NEW: Send by email available in bulk for expense report
NEW: Set a proposal to draft
NEW: Show badge with nbr of shipment on shimpen tab of order
NEW: Show country and vat number into company tooltip
NEW: Show direct preview link on contract
NEW: Show expected worked hours on the timesheet form.
NEW: Show line "other filtered task" when using filter on timesheet.
NEW: Show list of tracked events into the module config page.
NEW: Show the supplier ref into supplier cards
NEW: Show user id of web process in system info - web server
NEW: Summary of last events on a card are sorted on decreasing date.
NEW: Support Italian addresses format. Fixes #7785
NEW: Support visibility on extrafields
NEW: Template invoices are visible on the customer tab
NEW: template invoices support substition key
NEW: The bank account is visible on payment of taxes
NEW: The comment when closing a proposal is added to commercial proposal
NEW: The gantt diagram is now sensitive to hours
NEW: The lot of a product uses the link and picto when shown into list.
NEW: The "Show detail by account" accepts 3 values: yes, no, if non zero
NEW: The unalterable log can be browse by any user with he permission
NEW: Tooltip for substitutions variables on tooltips on admin pages
NEW: unexistant function load_state_board() on several objects
NEW: Update availability
NEW: Update bank account when updating an invoice
NEW: Update bank account when updating an order
NEW: Use autocompletion on selection of chart of account
NEW: view company name if different of fullname in dol_banner
NEW: warning on module blocked log reset if country code is FR
For developers:
NEW: Add 2 new automatic classification in workflow module
NEW: Add API for contracts
NEW: Add API to activate/unactivate a contract
NEW: Add api validate and close on contracts
NEW: add doActions hook in admin ihm
NEW: add doActions hook in company admin
NEW: Added functionality to get order customer contact as contact_xx tags
NEW: Add hook addAdminLdapOptions and doAction in ldap admin page
NEW: Add method executeCLI and a phpunit
NEW: add '$moreatt' parameter in picto_from_langcode function
NEW: Add non intrusive js library to make syntaxic coloring of textarea
NEW: Add payment line to a specific invoice using the REST API
NEW: add possibility to disabled the LDAP trigger
NEW: add possibility to hide LDAP tab for non admin
NEW: Add possibility to propose last num releve in conciliation
NEW: add possibility to remove address field
NEW: Add REST API for supplier proposals
NEW: Add REST API to add payment line to a specific invoice
NEW: Add the attribute accept to the input form for file upload
NEW: add translation column for extrafields list
NEW: Add performances indexes on calendar events
NEW: A module can change order of element in the quick search combo
NEW: Can test signature of a version from API
NEW: complete_head_from_modules() in ldap_prepare_head()
NEW: Consolidates REST dictionary APIs into a single tree and a single file
NEW: Delete a line of invoice using the REST API
NEW: documents REST API return list of documents by element
NEW: Download a document using the REST API
NEW: Enhance framework so we can use html/icons into SELECT options.
NEW: External module can interact with the customer summary page
NEW: Generates the document before downloading using REST API
NEW: get and post lines of an invoice using the REST API
NEW: Get a payment list of a given invoice using the REST API
NEW: Get available assets of an invoice using the REST API
NEW: Get credit notes or deposits of a thirdparty
NEW: GET lines of an invoice in the REST API
NEW: get payment types using the REST API + consolidates REST dictionary APIs
NEW: Get the list of payments terms.
NEW: hook formObjectOptions in the form setting product selling price
NEW: hook to enrich homepage open elements dashboard
NEW: Insert a discount in a specific invoice using the REST API
NEW: Remove js library fileupload that was not used by core code.
NEW: Remove tooltip tipTip library replaced with standatd jquery tooltip
NEW: Set invoices as draft using the REST API
NEW: Sets an invoice as paid using the REST API
NEW: Tag the order as validated (opened) in the REST API
NEW: Update end of validity date of proposal using the API
NEW: Update in the order REST API
NEW: Upgrade jquery select2 to 4.0.4
WARNING:
If you enabled (for test) the experimental BlockedLog module before 7.0, you must purge the table llx_blockedlog because
way to save data for final version has changed.
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The methode "cloture" on contract were renamed into "closeAll".
* The method "is_erasable" of invoice return a value <= 0 if not erasable (value is meaning) instead of always 0.
* The substitution key for reference of objects is now __REF__ whatever is the object (it replaces __ORDERREF__,
__PROPALREF__, ...)
* The substition key __SIGNATURE__ was renamed into __USER_SIGNATURE__ to follow naming conventions.
* Substitution keys with syntax %XXX% were renamed into __XXX__ to match others.
* Removed old deprecated REST API (APIs found into '/root' section of the REST API explorer in Dolibarr v6).
* Some REST API to access setup features, like dictionaries (country, town, extrafields, ...) were moved into a
common API "/setup".
* The REST API /documents were renamed into /documents/download and /documents/upload.
* Page bank/index.php, bank/bankentries.php and comm/actions/listactions.php were renamed into
bank/list.php, bank/bankentries_list.php and comm/actions/list.php to follow page naming
conventions (so default filter/sort order features can also work for this pages).
* The trigger ORDER_SUPPLIER_STATUS_ONPROCESS was renamed into ORDER_SUPPLIER_STATUS_ORDERED.
* The trigger ORDER_SUPPLIER_STATUS_RECEIVED_ALL was renamed into ORDER_SUPPLIER_STATUS_RECEIVED_COMPLETELY.
* The parameter note into method cloture() is added at end of private note (previously in v6, it replaced).
* The parameter $user is now mandatory for method createFromOrder and createFromPropal.
* Removed js library 'fileupload' that was not used by core code.
* Jquery plugin tableDnd updated. You now need to use decodeURI on the return value of tableDnDSerialize()
and add 'td.' to the beginning of the dragHandle match string.
* IE8 and earlier and Firefox 12 and earlier (< 2012) are no more supported.
* The module ExpenseReport use numbering rules that you can setup (like other modules do). If you need to
keep the hard coded numbering rule of expenses report used in 6.0, just add constant
EXPENSEREPORT_USE_OLD_NUMBERING_RULE to 1.
* If you use the external module "multicompany", you must also upgrade the module. Multicompany module for
Dolibarr v7 is required because with Dolibarr v7, payment modes and payment conditions are management as data
that are dedicated to each company. If you keep your old version of multicompany module, mode and
condition of payments will appears empty in all companies that are not the first one. By upgrading the
multicompany module to a version that support Dolibarr v7, everything should work as expected.
***** ChangeLog for 6.0.7 compared to 6.0.6 *****
FIX: #8023
FIX: #8259 can't update contact birthday with REST API
FIX: #8478 !empty instead of count to avoid warning
FIX: #8488
FIX: actioncomm export: type filtering not working
FIX: addline on invoice supplier manage rank on its own if not provided
FIX: issue #8037
FIX: label in getnomurl projectlist
FIX: payment term doc-specific label was not used
FIX: payment term doc-specific label was not used (issue #8414)
FIX: project category is type 6 not 5 !!
FIX: some localtaxes errors
FIX: weird password autocompletion in Google Chrome (issue #8479)
***** ChangeLog for 6.0.6 compared to 6.0.5 *****
FIX: #7974 Contract - Invalid reference on the document
FIX: #8139
FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php
@@ -81,6 +578,7 @@ FIX: test for filter fk_status
FIX: too much users on holiday list
FIX: Wrong alias sql
***** ChangeLog for 6.0.3 compared to 6.0.2 *****
FIX: #7211 Update qty dispatched on qty change
FIX: #7458
@@ -180,7 +678,7 @@ FIX: View of timespent for another user
FIX: ODT generation
FIX: CVE-2017-9840, CVE-2017-14238, CVE-2017-14239, CVE-2017-14240, CVE-2017-14241,
CVE-2017-14242
***** ChangeLog for 6.0.0 compared to 5.0.* *****
NEW: Add experimental BlockeLog module (to log business events in a non reversible log file).
NEW: Add a payment module for Stripe.

View File

@@ -2,9 +2,9 @@
![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.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, ...).
Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda).
It's an Open Source software (wrote in PHP language) designed for small, medium or large companies, foundations and freelances.
It's an Open Source Software (written in PHP language) designed for small, medium or large companies, foundations and freelances.
You can freely use, study, modify or distribute it according to its Free Software licence.
@@ -29,18 +29,25 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
Releases can be downloaded from [official website](https://www.dolibarr.org/).
### Install from composer
If you do not already have Composer installed, you may do so by following the instructions at getcomposer.org. On Linux and Mac OS X, you'll run the following commands:
If you do not already have Composer installed, you may do so by following the instructions at [getcomposer.org](https://getcomposer.org/). On Linux and macOS, you may run the following commands:
```bash
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
```
On Windows, you'll download and run https://getcomposer.org/Composer-Setup.exe
On Windows, you can download and run https://getcomposer.org/Composer-Setup.exe
You can then create a new project
```bash
composer create-project dolibarr/dolibarr erp
```
### Simple setup
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in few clicks, you can use one of the packaged versions:
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions:
- DoliWamp for Windows
- DoliDeb for Debian or Ubuntu
@@ -48,11 +55,11 @@ If you have low technical skills and you're looking to install Dolibarr ERP/CRM
### Advanced setup
You can use a Web server and a supported database (MariaDb, MySql or Postgresql) to install the standard version.
You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
- Uncompress the downloaded archive
- Copy directory "dolibarr" and all its files inside your web server root, or copy directory anywhere and set up your web server to use "dolibarr/htdocs" as root for a new web server virtual host (second choice need to be server administrator)
- Create an empty file "htdocs/conf/conf.php" and set permissions for your web server user (write permissions will be removed once install is finished)
- Copy the "dolibarr" directory and all its files inside your web server root or anywhere you'd like and set up your web server to use "*dolibarr/htdocs*" as root for a new web server virtual host (second choice need to be server administrator)
- Create an empty `htdocs/conf/conf.php` file and set permissions for your web server user (*write* permissions will be removed once install is finished)
- From your browser, go to the dolibarr "install/" page
The URL will depends on choices made in the first step:
@@ -73,10 +80,10 @@ You can use a Web server and a supported database (MariaDb, MySql or Postgresql)
## UPGRADING
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
- At first next access, Dolibarr will redirect your to the "install/" page to make the upgrade process.
If a file install.lock exists to lock any run of upgrade process, the application will ask you to remove the file manually (you should find the install.lock file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "documents").
- At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process.
 If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
*Note: migration process can safely be done multiple times by calling the page /install/index.php*
*Note: migration process can be safely done multiple times by calling the `/install/index.php` page*
## WHAT'S NEW
@@ -172,7 +179,7 @@ Administrator, user, developer and translator's documentations are available alo
## CONTRIBUTING
See file [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)
See [CONTRIBUTING](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md) file
## CREDITS

View File

@@ -34,17 +34,4 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+$conffiletoshow = "/etc/dolibarr/conf.php";
// Load conf file if it is already defined
--- a/htdocs/support/inc.php
+++ b/htdocs/support/inc.php
@@ -69,8 +69,8 @@ $conffiletoshowshort = "conf.php";
$conffile = "../conf/conf.php";
$conffiletoshow = "htdocs/conf/conf.php";
// For debian/redhat like systems
-//$conffile = "/etc/dolibarr/conf.php";
-//$conffiletoshow = "/etc/dolibarr/conf.php";
+$conffile = "/etc/dolibarr/conf.php";
+$conffiletoshow = "/etc/dolibarr/conf.php";
// Load conf file if it is already defined

View File

@@ -10,12 +10,23 @@ export DH_OPTIONS=-v
%:
dh $@
# Replace standard debian package actions with a new one
########################################################
override_dh_auto_clean:
# Do nothing. Added to disable launchpad to use bugged dh_auto_clean search for ant
override_dh_auto_build:
# Do nothing. Added to disable launchpad to use bugged dh_auto_build search for ant
#override_dh_compress:
# dh_compress --no-act -X.png
# We disable this for png file because it modify content of original file so make
# the dolibarr signature not valid.
override_dh_strip_nondeterminism:
dh_strip_nondeterminism -X.png
override_dh_install:
dh_install
# Delete files

View File

@@ -0,0 +1,3 @@
Dockerfile
README.md
docker-compose.yml

View File

@@ -1,4 +1,7 @@
FROM php:5.6-apache
FROM php:7.0-apache
ENV HOST_USER_ID 33
ENV PHP_INI_DATE_TIMEZONE 'UTC'
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libldap2-dev \
&& rm -rf /var/lib/apt/lists/* \
@@ -9,11 +12,9 @@ RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libldap2-dev \
&& docker-php-ext-install mysqli \
&& apt-get purge -y libpng12-dev libjpeg-dev libldap2-dev
COPY htdocs/ /var/www/html/
RUN chown -hR www-data:www-data /var/www/html
VOLUME /var/www/html/conf
VOLUME /var/www/html/documents
COPY docker-run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-run.sh
EXPOSE 80
ENTRYPOINT ["docker-run.sh"]

25
build/docker/README.md Normal file
View File

@@ -0,0 +1,25 @@
# How to use it ?
The docker-compose.yml file is used to build and run Dolibarr in the current workspace.
Before build/run, define the variable HOST_USER_ID as following:
export HOST_USER_ID=$(id -u)
Go in repository build/docker :
cd build/docker
And then, you can run :
docker-compose up
This will run 3 container Docker : Dolibarr, MariaDB and PhpMyAdmin.
The URL to go to the Dolibarr is :
http://0.0.0.0
The URL to go to PhpMyAdmin is (login/password is root/root) :
http://0.0.0.0:8080

View File

@@ -0,0 +1,25 @@
mariadb:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dolibarr
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: mariadb
links:
- mariadb
ports:
- "8080:80"
web:
build: .
environment:
HOST_USER_ID: $HOST_USER_ID
volumes:
- ../../htdocs:/var/www/html
links:
- mariadb
ports:
- "80:80"

View File

@@ -0,0 +1,15 @@
#!/bin/bash
usermod -u $HOST_USER_ID www-data
groupmod -g $HOST_USER_ID www-data
chown -hR www-data:www-data /var/www
if [ ! -f /usr/local/etc/php/php.ini ]; then
cat <<EOF > /usr/local/etc/php/php.ini
date.timezone = $PHP_INI_DATE_TIMEZONE
display_errors = On
EOF
fi
exec apache2-foreground

View File

@@ -442,7 +442,7 @@ SORT_BY_SCOPE_NAME = NO
# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.
GENERATE_TODOLIST = YES
GENERATE_TODOLIST = NO
# The GENERATE_TESTLIST tag can be used to enable (YES) or
# disable (NO) the test list. This list is created by putting \test
@@ -639,7 +639,7 @@ EXCLUDE_SYMBOLS =
# directories that contain example code fragments that are included (see
# the \include command).
EXAMPLE_PATH = ../../dev/skeletons
EXAMPLE_PATH = ../../htdocs/modulebuilder/template
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp

View File

@@ -43,3 +43,5 @@ DoliWampWillStartApacheMysql=DoliWamp installer will now start or restart Apache
OldVersionFoundAndMoveInNew=An old database version has been found and moved to be used by new Dolibarr version
OldVersionFoundButFailedToMoveInNew=An old database version has been found but could not be moved to be used with new Dolibarr version
DLLMissing=The "Visual C++ Redistributable for Visual Studio 2012" component is missing. Please install the 32-bit version (vcredit_x86.exe) first from https://www.microsoft.com/en-us/download/details.aspx?id=30679 and restart DoliWamp installation/upgrade.
ContinueAnyway=Continue anyway (install process may fails without this prerequisite)

View File

@@ -32,7 +32,7 @@ AppPublisherURL=http://www.nltechno.com
AppSupportURL=http://www.dolibarr.org
AppUpdatesURL=http://www.dolibarr.org
AppComments=DoliWamp includes Dolibarr, Apache, PHP and Mysql softwares.
AppCopyright=Copyright (C) 2008-2016 Laurent Destailleur, NLTechno
AppCopyright=Copyright (C) 2008-2017 Laurent Destailleur (NLTechno), Fabian Rodriguez (Le Goût du Libre)
DefaultDirName=c:\dolibarr
DefaultGroupName=Dolibarr
;LicenseFile=COPYING
@@ -202,10 +202,30 @@ var value: String;
function InitializeSetup(): Boolean;
begin
Result := MsgBox(CustomMessage('YouWillInstallDoliWamp')+#13#13+CustomMessage('ThisAssistantInstallOrUpgrade')+#13#13+CustomMessage('IfYouHaveTechnicalKnowledge')+#13#13+CustomMessage('ButIfYouLook')+#13#13+CustomMessage('DoYouWantToStart'), mbConfirmation, MB_YESNO) = IDYES;
if Result then
begin
//----------------------------------------------
// Test if msvcr110 DLL has been installed
//----------------------------------------------
if not FileExists ('c:/windows/system32/msvcr110.dll') and not FileExists ('c:/windows/sysWOW64/msvcr110.dll') and not FileExists ('c:/winnt/system32/msvcr110.dll') and not FileExists ('c:/winnt/sysWOW64/msvcr110.dll') then
begin
// TODO - offer to install the component by opening the URL in the default browser, abort installation if user doesn't accept
Result := MsgBox(CustomMessage('DLLMissing')+#13#13+CustomMessage('ContinueAnyway'), mbConfirmation, MB_YESNO) = IDYES;
end;
// Pb seems similar with msvcp110.dll
//vcredist_x64.exe
end;
end;
procedure InitializeWizard();
begin
//version des applis, a modifier pour chaque version de WampServer 2
apacheVersion := '2.4.9';
phpVersion := '5.5.12' ;
@@ -217,6 +237,7 @@ begin
mysqlPort := '3306';
newPassword := 'changeme';
firstinstall := true;
@@ -344,19 +365,6 @@ begin
exedirold := pathWithSlashes+'/bin/mysql/mysql5.0.45';
exedirnew := pathWithSlashes+'/bin/mysql/mysql5.0.45';
//----------------------------------------------
// Test if msvcr110 DLL has been installed
//----------------------------------------------
if not FileExists ('c:/windows/system32/msvcr110.dll') and not FileExists ('c:/windows/sysWOW64/msvcr110.dll') and not FileExists ('c:/winnt/system32/msvcr110.dll') and not FileExists ('c:/winnt/sysWOW64/msvcr110.dll') then
begin
// TODO Copy file or ask to install package ?
//CustomMessage('YouWillInstallDoliWamp')+#13#13
MsgBox('The Visual C++ Redistributable package should be installed, it seems it is not. Please install the 32-bit version from http://www.microsoft.com/en-us/download/details.aspx?id=30679, then restart the 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

View File

@@ -535,7 +535,7 @@ a:hover {
<li><a href="?lang={$langues[$langue]['autreLangueLien1']}">{$langues[$langue]['autreLangue1']}</a>
- <a href="?lang={$langues[$langue]['autreLangueLien2']}">{$langues[$langue]['autreLangue2']}</a></li>
<br><br>
<li>Provided by <a href="http://www.nltechno.com" targer="_blank">NLTechno</a></li>
<li>Provided by <a href="https://www.nltechno.com" targer="_blank">NLTechno</a></li>
</ul>
</td></tr></table>
<hr>
@@ -580,7 +580,7 @@ a:hover {
<ul id="foot">
<li><a href="http://www.nltechno.com/pages/dolibarrwinbin.php">DoliWamp project</a> was built from modified sources of <a href="http://www.wampserver.com">WampServer project</a> from Anaska</li>
<li><a href="https://www.nltechno.com/pages/dolibarrwinbin.php">DoliWamp project</a> was built from modified sources of <a href="http://www.wampserver.com">WampServer project</a> from Anaska</li>
</ul>
</body>
</html>

View File

@@ -17,11 +17,13 @@
*/
/**
* \file build/generate_filecheck_xml.php
* \file build/generate_filelist_xml.php
* \ingroup dev
* \brief This script create a xml checksum file
*/
if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=dirname(__FILE__).'/';
@@ -45,7 +47,7 @@ $includeconstants=array();
if (empty($argv[1]))
{
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
print "Usage: ".$script_file." release=auto|x.y.z[-mybuild] [includecustom=1] [includeconstant=CC:MY_CONF_NAME:value]\n";
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
exit -1;
}
@@ -68,11 +70,20 @@ while ($i < $argc)
$i++;
}
// If release is auto, we take current version
$tmpver=explode('-', $release, 2);
if ($tmpver[0] == 'auto')
{
$release=DOL_VERSION;
if ($tmpver[1]) $release.='-'.$tmpver[1];
}
if (empty($includecustom))
{
if (DOL_VERSION != $release)
$tmpver=explode('-', $release, 2);
if (DOL_VERSION != $tmpver[0])
{
print 'Error: When parameter "includecustom" is not set, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$release.')'."\n";
print 'Error: When parameter "includecustom" is not set and there is no suffix in release parameter, version declared into filefunc.in.php ('.DOL_VERSION.') must be exact same value than "release" parameter ('.$tmpver[0].')'."\n";
print "Usage: ".$script_file." release=x.y.z[-...] [includecustom=1]\n";
exit -1;
}

View File

@@ -388,7 +388,7 @@ if ($nboftargetok) {
#-----------------------
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";
print 'Create xml check file with md5 checksum with command php '.$SOURCE.'/build/generate_filelist_xml.php release='.$MAJOR.'.'.$MINOR.'.'.$BUILD."\n";
$ret=`php $SOURCE/build/generate_filelist_xml.php release=$MAJOR.$MINOR.$BUILD`;
print $ret."\n";
# Copy to final dir
@@ -466,10 +466,12 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.deb`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.dsc`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.tar.gz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr_*.tar.xz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.deb`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.rpm`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar.gz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tar.xz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tgz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.xz`;
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.zip`;
@@ -558,7 +560,7 @@ if ($nboftargetok) {
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries
#$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball for official debian, not for the rest
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`;
@@ -767,8 +769,8 @@ if ($nboftargetok) {
$cmd="cp -pr '$BUILDROOT/$PROJECT' '$BUILDROOT/$FILENAMETGZ2'";
$ret=`$cmd`;
# Removed files we don't need
$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/htdocs/includes/ckeditor/_source`;
# Removed files we don't need (already removed before)
#$ret=`rm -fr $BUILDROOT/$FILENAMETGZ2/htdocs/includes/ckeditor/_source`;
print "Set permissions on files/dir\n";
$ret=`chmod -R 755 $BUILDROOT/$FILENAMETGZ2`;
@@ -849,6 +851,8 @@ if ($nboftargetok) {
unlink("$NEWDESTI/${FILENAMEDEB}.changes");
print "Remove target ${FILENAMEDEB}.debian.tar.gz...\n";
unlink("$NEWDESTI/${FILENAMEDEB}.debian.tar.gz");
print "Remove target ${FILENAMEDEB}.debian.tar.xz...\n";
unlink("$NEWDESTI/${FILENAMEDEB}.debian.tar.xz");
print "Remove target ${FILENAMEDEBNATIVE}.orig.tar.gz...\n";
unlink("$NEWDESTI/${FILENAMEDEBNATIVE}.orig.tar.gz");
@@ -915,8 +919,8 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mike42/escpos-php/LICENSE.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/mobiledetect/mobiledetectlib/LICENSE.txt`;
# Removed files we don't need
$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
# Removed files we don't need (already removed)
#$ret=`rm -fr $BUILDROOT/$PROJECT.tmp/htdocs/includes/ckeditor/ckeditor/_source`;
# Rename upstream changelog to match debian rules
$ret=`mv $BUILDROOT/$PROJECT.tmp/ChangeLog $BUILDROOT/$PROJECT.tmp/changelog`;
@@ -978,7 +982,7 @@ if ($nboftargetok) {
$ret=`chmod 755 $BUILDROOT/$PROJECT.tmp/debian/rules`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/dev/translation/autotranslator.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/actions_mymodule.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/api_myobject.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/api_mymodule.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/class/myobject.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/core/modules/modMyModule.class.php`;
$ret=`chmod -R 644 $BUILDROOT/$PROJECT.tmp/htdocs/modulebuilder/template/mymoduleindex.php`;
@@ -1024,7 +1028,7 @@ if ($nboftargetok) {
$ret=`mv $BUILDROOT/*_all.deb "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.dsc "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.orig.tar.gz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.debian.tar.gz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.debian.tar.xz "$NEWDESTI/"`;
$ret=`mv $BUILDROOT/*.changes "$NEWDESTI/"`;
next;
}
@@ -1168,7 +1172,7 @@ if ($nboftargetok) {
"$DESTI/package_debian-ubuntu/${FILENAMEDEB}_all.deb"=>'Dolibarr installer for Debian-Ubuntu (DoliDeb)',
"$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/${FILENAMEDEB}.debian.tar.xz"=>'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',
@@ -1181,8 +1185,7 @@ if ($nboftargetok) {
"$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/${FILENAMEDEB}.debian.tar.xz"=>'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',

View File

@@ -15,21 +15,7 @@ diff -up htdocs/filefunc.inc.php.patch htdocs/filefunc.inc.php
diff -up htdocs/install/inc.php.patch htdocs/install/inc.php
--- htdocs/install/inc.php.patch 2011-09-03 02:33:26.450952000 +0200
+++ htdocs/install/inc.php 2011-09-03 02:33:36.286952001 +0200
@@ -71,8 +71,8 @@
$conffile = "../conf/conf.php";
$conffiletoshow = "htdocs/conf/conf.php";
// For debian/redhat like systems
-//$conffile = "/etc/dolibarr/conf.php";
-//$conffiletoshow = "/etc/dolibarr/conf.php";
+$conffile = "/etc/dolibarr/conf.php";
+$conffiletoshow = "/etc/dolibarr/conf.php";
// Load conf file if it is already defined
diff -up htdocs/support/inc.php.patch htdocs/support/inc.php
--- htdocs/support/inc.php.patch 2011-09-03 02:34:39.606952000 +0200
+++ htdocs/support/inc.php 2011-09-03 02:33:59.814952000 +0200
@@ -69,8 +69,8 @@
@@ -74,8 +74,8 @@
$conffile = "../conf/conf.php";
$conffiletoshow = "htdocs/conf/conf.php";
// For debian/redhat like systems

View File

@@ -25,7 +25,7 @@ BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: Applications/Productivity
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysql, php-adodb, php-nusoap, dejavu-sans-fonts
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-adodb, php-nusoap, dejavu-sans-fonts
Requires: mysql-server, mysql
#BuildRequires: desktop-file-utils
@@ -213,7 +213,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch
%_datadir/dolibarr/htdocs/*.php

View File

@@ -46,7 +46,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
Group: Applications/Productivity
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysql, php-adodb, php-nusoap, dejavu-sans-fonts
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mysqli, php-adodb, php-nusoap, dejavu-sans-fonts, php-mbstring, php-xml
Requires: mysql-server, mysql
BuildRequires: desktop-file-utils
%else
@@ -63,9 +63,9 @@ Requires: mysql-community-server, mysql-community-server-client
BuildRequires: update-desktop-files fdupes
%else
Group: Applications/Productivity
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap
Requires: httpd, php >= 5.3.0, php-cli, php-gd, php-ldap, php-imap, php-mbstring, php-xml
Requires: mysql-server, mysql
Requires: php-mysql >= 4.1.0
Requires: php-mysqli >= 4.1.0
%endif
%endif
%endif
@@ -293,7 +293,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch
%_datadir/dolibarr/htdocs/*.php
@@ -441,8 +441,8 @@ if [ "x$os" = "xfedora-redhat" -a -s /sbin/restorecon ]; then
%else
echo Add SE Linux permissions for dolibarr
# semanage add records into /etc/selinux/targeted/contexts/files/file_contexts.local
semanage fcontext -a -t httpd_sys_script_rw_t "/etc/dolibarr(/.*?)"
semanage fcontext -a -t httpd_sys_script_rw_t "/var/lib/dolibarr(/.*?)"
semanage fcontext -a -t httpd_sys_rw_content_t "/etc/dolibarr(/.*)?"
semanage fcontext -a -t httpd_sys_rw_content_t "/var/lib/dolibarr(/.*)?"
restorecon -R -v /etc/dolibarr
restorecon -R -v /var/lib/dolibarr
%endif

View File

@@ -210,7 +210,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch
%_datadir/dolibarr/htdocs/*.php

View File

@@ -221,7 +221,7 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/user
%_datadir/dolibarr/htdocs/variants
%_datadir/dolibarr/htdocs/webservices
%_datadir/dolibarr/htdocs/websites
%_datadir/dolibarr/htdocs/website
%_datadir/dolibarr/htdocs/*.ico
%_datadir/dolibarr/htdocs/*.patch
%_datadir/dolibarr/htdocs/*.php

View File

@@ -15,8 +15,14 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
# Directory for web pages
<DirectoryMatch /usr/share/dolibarr>
Order deny,allow
Allow from all
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order deny,allow
Allow from all
</IfVersion>
DirectoryIndex index.php
Options +FollowSymLinks +Indexes
@@ -60,27 +66,51 @@ Alias /dolibarr /usr/share/dolibarr/htdocs
# Directory for public pages
<DirectoryMatch /usr/share/dolibarr/public>
AllowOverride All
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order deny,allow
Allow from all
</IfVersion>
AllowOverride All
</DirectoryMatch>
# Config files
<DirectoryMatch /etc/dolibarr>
AllowOverride All
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order deny,allow
Allow from all
</IfVersion>
AllowOverride All
</DirectoryMatch>
# Directory for data files
<DirectoryMatch /usr/share/dolibarr/documents>
AllowOverride All
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order deny,allow
Allow from all
</IfVersion>
AllowOverride All
</DirectoryMatch>
<DirectoryMatch /var/lib/dolibarr/documents>
AllowOverride All
Order deny,allow
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
</IfVersion>
AllowOverride All
</DirectoryMatch>

View File

@@ -13,7 +13,7 @@
"agenda"
],
"homepage": "https://www.dolibarr.org",
"license": "GPL-3.0+",
"license": "GPL-3.0-or-later",
"support": {
"issues": "https://github.com/Dolibarr/dolibarr/issues",
"forum": "https://www.dolibarr.org/forum",

View File

@@ -82,8 +82,14 @@ with
// LDR To open in same window
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
window.location.href=pRef
* Replace hard coded string with i18n["String"];
* Replace
vTmpDiv=this.newNode(vTmpCell, 'div', null, null, vTaskList[i].getResource());
with
var vTmpNode=this.newNode(vTmpCell, 'div', null, '');
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
vTmpNode.setAttribute('href',vTaskList[i].getLink());
JCROP:
------
@@ -110,11 +116,45 @@ to get
if ($className == 'Luracast\Restler\string') return;
if ($className == 'Luracast\Restler\mixed') return;
...
Change also file Luracast/Restler/explorer/index.html
+With swagger 2:
* Add line into Util.php to complete function
public static function getShortName($className)
{
// @CHANGE LDR
if (! is_string($className)) return;
//var_dump($className);
PARSEDOWN
---------
* Add support of css by adding in Parsedown.php:
// @CHANGE LDR
'class' => $Link['element']['attributes']['class']
...
// @CHANGE LDR
if (preg_match('/{([^}]+)}/', $remainder, $matches2))
{
$Element['attributes']['class'] = $matches2[1];
$remainder = preg_replace('/{'.preg_quote($matches2[1],'/').'}/', '', $remainder);
}
// @CHANGE LDR
//$markup .= $this->{$Element['handler']}($Element['text']);
$markup .= preg_replace('/>{[^}]+}/', '>', $this->{$Element['handler']}($Element['text']));
* Fix to avoid fatal error when mb_strlen not available:
// @CHANGE LDR Fix when mb_strlen is not available
@@ -122,7 +162,6 @@ PARSEDOWN
if (function_exists('mb_strlen')) $len = mb_strlen($line, 'utf-8');
else $len = strlen($line);
$shortage = 4 - $len % 4;
JEDITABLE.JS
@@ -131,4 +170,3 @@ JEDITABLE.JS
* <button type="submit" /> => <button class="button" type="submit" />
* <button type="cancel" /> => <button class="button" type="cancel" />

View File

@@ -60,14 +60,14 @@ $db->begin();
require_once(DOL_DOCUMENT_ROOT."/user/class/user.class.php");
// Create invoice object
// Create user object
$obj = new User($db);
//$obj->initAsSpecimen();
$obj->login = 'ABCDEF';
$obj->nom = 'ABCDEF';
// Create invoice
// Create user
$idobject=$obj->create($user);
if ($idobject > 0)
{

View File

@@ -67,7 +67,7 @@ $db->begin();
require_once(DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php");
// Create invoice object
// Create contract object
$obj = new Contrat($db);
$obj->socid=$argv[1];

View File

@@ -7,3 +7,7 @@
# ldapsearch -h hostname -x -b "ou=people,dc=teclib,dc=infra"
# ldapsearch -h hostname -x -z 0 -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
# ldapsearch -h hostname -x -b "o=somecompany.com" -D "cn=manager,o=somecompany.com" -w password "(objectclass=*)"
#
# Example to test a ldap search:
# ldapsearch -h hostname -x -z 5 -b 'OU=Collaborateurs,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -D 'CN=UserAdmin,OU=Informatique,OU=Utilisateurs,OU=MyCompany,DC=bocal,DC=lan' -w password

View File

@@ -21,7 +21,7 @@
/**
* \file dev/initdata/import-thirdparties.php
* \brief Script example to insert thirdparties from a csv file.
* \brief Script example to insert thirdparties from a csv file.
* To purge data, you can have a look at purge-data.php
*/
@@ -123,15 +123,15 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
if ($endlinenb && $i > $endlinenb) continue;
$nboflines++;
$object = new Societe($db);
$object->state = $fields[6];
$object->client = $fields[7];
$object->fournisseur = $fields[8];
$object->name = $fields[13]?trim($fields[13]):$fields[0];
$object->name_alias = $fields[0]!=$fields[13]?trim($fields[0]):'';
$object->address = trim($fields[14]);
$object->zip = trim($fields[15]);
$object->town = trim($fields[16]);
@@ -149,7 +149,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
$condpayment = trim($fields[36]);
if ($condpayment == 'A la commande') $condpayment = 'A réception de commande';
if ($condpayment == 'A reception facture') $condpayment = 'Réception de facture';
$object->cond_reglement_id = dol_getIdFromCode($db, $condpayment, 'c_payment_term', 'libelle_facture', 'rowid');
$object->cond_reglement_id = dol_getIdFromCode($db, $condpayment, 'c_payment_term', 'libelle_facture', 'rowid', 1);
if (empty($object->cond_reglement_id))
{
print " - Error cant find payment mode for ".$condpayment."\n";
@@ -166,7 +166,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
// Set price level
$object->price_level = 1;
if ($labeltype == 'Revendeur') $object->price_level = 2;
print "Process line nb ".$i.", name ".$object->name;
@@ -182,7 +182,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
print " - Error in create result code = ".$ret." - ".$object->errorsToString();
$errorrecord++;
}
else
else
{
print " - Creation OK with name ".$object->name." - id = ".$ret;
}
@@ -198,7 +198,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
if (! $errorrecord && $fields[3])
{
$salesrep=new User($db);
$tmp=explode(' ',$fields[3],2);
$salesrep->firstname = trim($tmp[0]);
$salesrep->lastname = trim($tmp[1]);
@@ -206,7 +206,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
else $salesrep->login=strtolower($salesrep->firstname);
$salesrep->login=preg_replace('/ /','',$salesrep->login);
$salesrep->fetch(0,$salesrep->login);
$result = $object->add_commercial($user, $salesrep->id);
if ($result < 0)
{
@@ -217,14 +217,14 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
{
print " - create link sale representative OK";
}
}
}
dol_syslog("Add invoice contacts");
// Insert an invoice contact if there is an invoice email != standard email
if (! $errorrecord && $fields[27] && $fields[26] != $fields[27])
{
$ret1=$ret2=0;
$contact = new Contact($db);
$contact->lastname = $object->name;
$contact->address=$object->address;
@@ -233,7 +233,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
$contact->country_id=$object->country_id;
$contact->email=$fields[27];
$contact->socid=$object->id;
$ret1=$contact->create($user);
if ($ret1 > 0)
{
@@ -244,18 +244,18 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString();
$errorrecord++;
}
else
else
{
print " - create contact OK";
}
}
dol_syslog("Add delivery contacts");
// Insert a delivery contact
if (! $errorrecord && $fields[47])
{
$ret1=$ret2=0;
$contact2 = new Contact($db);
$contact2->lastname = 'Service livraison - '.$fields[47];
$contact2->address = $fields[48];
@@ -264,10 +264,10 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
$contact2->country_id=dol_getIdFromCode($db, trim($fields[52]), 'c_country', 'code', 'rowid');
$contact2->note_public=$fields[54];
$contact2->socid=$object->id;
// Extrafields
$contact2->array_options['options_anazoneliv']=price2num($fields[53]);
$ret1=$contact2->create($user);
if ($ret1 > 0)
{
@@ -278,16 +278,16 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString();
$errorrecord++;
}
else
else
{
print " - create contact OK";
}
}
print "\n";
if ($errorrecord)
if ($errorrecord)
{
fwrite($fhandleerr, 'Error on record nb '.$i." - ".$object->errorsToString()."\n");
$error++; // $errorrecord will be reset

View File

@@ -78,15 +78,17 @@ $sqls=array(
'DELETE FROM '.MAIN_DB_PREFIX.'propaldet',
'DELETE FROM '.MAIN_DB_PREFIX.'propal',
),
'supplier_order'=>array(
'supplier_proposal'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposaldet',
'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposal',
),
'supplier_order'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet',
'DELETE FROM '.MAIN_DB_PREFIX.'commande_fournisseur',
),
'supplier_invoice'=>array(
'supplier_invoice'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det',
'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn',
'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposaldet',
'DELETE FROM '.MAIN_DB_PREFIX.'supplier_proposal',
),
'delivery'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'livraisondet',
@@ -114,8 +116,10 @@ $sqls=array(
'DELETE FROM '.MAIN_DB_PREFIX.'product_lang',
'DELETE FROM '.MAIN_DB_PREFIX.'product_price',
'DELETE FROM '.MAIN_DB_PREFIX.'product_fournisseur_price',
'DELETE FROM '.MAIN_DB_PREFIX.'product_stock',
'DELETE FROM '.MAIN_DB_PREFIX.'product',
'DELETE FROM '.MAIN_DB_PREFIX.'product_batch',
'DELETE FROM '.MAIN_DB_PREFIX.'product_stock',
'DELETE FROM '.MAIN_DB_PREFIX.'product_lot',
'DELETE FROM '.MAIN_DB_PREFIX.'product',
),
'project'=>array(
'DELETE FROM '.MAIN_DB_PREFIX.'projet_task_time',
@@ -128,12 +132,13 @@ $sqls=array(
),
'thirdparty'=>array(
'@contact',
'DELETE FROM '.MAIN_DB_PREFIX.'cabinetmed_cons',
'DELETE FROM '.MAIN_DB_PREFIX.'cabinetmed_cons',
'UPDATE '.MAIN_DB_PREFIX.'adherent SET fk_soc = NULL',
'DELETE FROM '.MAIN_DB_PREFIX.'categorie_fournisseur',
'DELETE FROM '.MAIN_DB_PREFIX.'categorie_societe',
'DELETE FROM '.MAIN_DB_PREFIX.'societe_remise_except',
'DELETE FROM '.MAIN_DB_PREFIX.'societe',
'DELETE FROM '.MAIN_DB_PREFIX.'societe_rib',
'DELETE FROM '.MAIN_DB_PREFIX.'societe',
)
);
@@ -152,27 +157,37 @@ $mode = $argv[1];
$option = $argv[2];
if (empty($mode) || ! in_array($mode,array('test','confirm'))) {
print "Usage: $script_file (test|confirm) (all|option)\n";
print "Usage: $script_file (test|confirm) (all|option) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option can be ".implode(',',array_keys($sqls))."\n";
exit(-1);
}
if (empty($option) || ! in_array($option, array_merge(array('all'),array_keys($sqls))) ) {
print "Usage: $script_file (test|confirm) (all|option)\n";
print "Usage: $script_file (test|confirm) (all|option) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
print "\n";
print "option can be ".implode(',',array_keys($sqls))."\n";
exit(-1);
}
// Replace database handler
if (! empty($argv[3]))
{
$db->close();
unset($db);
$db=getDoliDBInstance($argv[3], $argv[4], $argv[5], $argv[6], $argv[7], $argv[8]);
$user=new User($db);
}
//var_dump($user->db->database_name);
$ret=$user->fetch('','admin');
if (! $ret > 0)
{
print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
print 'An admin user with login "admin" must exists to use this script.'."\n";
exit;
}
$user->getrights();
//$user->getrights();
print "Purge all data for this database:\n";
print "Server = ".$db->database_host."\n";
@@ -190,14 +205,14 @@ if (! $confirmed)
/**
* Process sql requests of a family
*
*
* @param string $family Name of family key of array $sqls
* @return int -1 if KO, 1 if OK
*/
function processfamily($family)
{
global $db, $sqls;
$error=0;
foreach($sqls[$family] as $sql)
{
@@ -207,7 +222,7 @@ function processfamily($family)
processfamily($newfamily);
continue;
}
print "Run sql: ".$sql."\n";
$resql=$db->query($sql);
if (! $resql)
@@ -217,7 +232,7 @@ function processfamily($family)
$error++;
}
}
if ($error)
{
print $db->lasterror();
@@ -225,7 +240,7 @@ function processfamily($family)
break;
}
}
if ($error) return -1;
else return 1;
}
@@ -242,7 +257,7 @@ foreach($sqls as $family => $familysql)
$oldfamily = $family;
$result=processfamily($family);
if ($result < 0)
if ($result < 0)
{
$error++;
break;

View File

@@ -0,0 +1,2 @@
# File(s) into root medias directory are provide by Pixabay with Licence "CC0 Creative Commons"
# https://creativecommons.org/publicdomain/zero/1.0/

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

View File

@@ -171,6 +171,7 @@ then
cp -pr $mydir/../../htdocs/install/doctemplates/* "$documentdir/doctemplates/"
mkdir -p "$documentdir/ecm/Administrative documents"
mkdir -p "$documentdir/ecm/Images"
rm -f "$documentdir/doctemplates/"*/index.html
echo cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
cp -pr $mydir/../../doc/images/* "$documentdir/ecm/Images"
else

File diff suppressed because one or more lines are too long

View File

@@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*
*
* Get a distant dump file and load it into a mysql database
*/
@@ -92,7 +92,7 @@ if ($connection)
{
if (! @ssh2_auth_password($connection, $login, $password))
{
dol_syslog("Could not authenticate with username ".$login." . and password ".$password,LOG_ERR);
dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password),LOG_ERR);
exit(-5);
}
else

View File

@@ -0,0 +1,14 @@
Gestion escompte:
Sur une facture de 120 € TTC :
707xxx 100 € HT
44571x 20 € TVA
411xxx 120 € TTC
Le client règle rapidement et on lui accorde un escompte de 3% (120 € * 3% = 3.6 € TTC), on aura donc :
665000 3,00 € HT
44571x 0,60 € TVA
411xxx 3.60 € TVA
Et ça marche à linverse avec un fournisseur sauf que lon est en 775000 au lieu de 665000 pour escompte obtenus.

View File

@@ -0,0 +1 @@
http://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_CLS_DLD&StrNom=NACE_REV2&StrLanguageCode=FR&StrLayoutCode=#

View File

@@ -11,3 +11,25 @@ Banque Banque 17306 20170119 5121CRA CR AGRICOLE A01 20170119 ZDAV courtage s/
Banque Banque 17306 20170119 401ZDAV SANDRA DAVILA A01 20170119 ZDAV courtage s/ ventes 508,00 0,00 20170119
Banque Banque 17307 20170119 401ZDAV SANDRA DAVILA A01 20170119 ZDAV courtage s/ ventes 508,00 0,00 20170131
Banque Banque 17307 20170119 5121CRA CR AGRICOLE A01 20170119 ZDAV courtage s/ ventes 0,00 508,00 20170131
Other example
JournalCode JournalLib EcritureNum EcritureDate CompteNum CompteLib CompAuxNum CompAuxLib PieceRef PieceDate EcritureLib Debit Credit EcritureLet DateLet ValidDate Montantdevise Idevise
FAC Factures clients AB6/FAC/2017/0045 20171120 41110000 Clients - Ventes de biens ou de prestations de services ID 2892 2 Et 3 Dimensions - 20171120 / 1 0 0 0 20171120
FAC Factures clients AB6/FAC/2017/0052 20171120 70710000 Marchandises (ou groupe) A ID 2892 2 Et 3 Dimensions - 20171120 [AX] Activités Annexes 0 0 1 0 20171120
FAC Factures clients AB6/FAC/2017/0052 20171120 70710000 Marchandises (ou groupe) A ID 2892 2 Et 3 Dimensions - 20171120 [AX] Activités Annexes 0 0 1 0 20171120
FAC Factures clients AB6/FAC/2017/0052 20171120 41110000 Clients - Ventes de biens ou de prestations de services ID 2892 2 Et 3 Dimensions - 20171120 / 2 0 0 0 20171120
OUV Balance initiale Balance initiale BRED 20171101 51215000 BRED - 20171101 / 6201 0 0 0 20171101
OUV Balance initiale Balance initiale Crédit Coopératif Nation 20171101 51211000 Crédit Coopératif Nation - 20171101 / 1364 20 0 0 20171101
OUV Balance initiale Balance initiale TVA collectée (Taux Intermédiaire) 20171101 44571200 TVA collectée (Taux Intermédiaire) - 20171101 / 0 0 147 4 20171101
OUV Balance initiale Balance initiale TVA déductible intracommunautaire 20171101 44566200 TVA déductible intracommunautaire - 20171101 / 18 0 0 0 20171101
OUV Balance initiale Balance initiale Capital souscrit - non appelé 20171101 10110000 Capital souscrit - non appelé - 20171101 / 10 0 0 0 20171101
OUV Balance initiale Balance initiale Réserves statutaires ou contractuelles 20171101 10630000 Réserves statutaires ou contractuelles - 20171101 / 0 0 10 0 20171101
OUV Balance initiale Balance initiale Frais entrepreneurs 20171101 46750000 Frais entrepreneurs - 20171101 / 0 0 100 0 20171101
OUV Balance initiale Balance initiale Fournissseurs réglés par Coopaname 20171101 40100000 Fournissseurs réglés par Coopaname - 20171101 / 0 0 4123 20 20171101
OUV Balance initiale Balance initiale TVA sur autres biens et services 20171101 44566000 TVA sur autres biens et services - 20171101 / 507 70 0 0 20171101
OUV Balance initiale Balance initiale TVA en attente à 20% 20171101 44572200 TVA en attente à 20% - 20171101 / 200 0 0 0 20171101

View File

@@ -0,0 +1,921 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--Generated by SWIFTStandards Workstation (build:R6.1.0.2) on 2009 Jan 08 17:30:53-->
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03">
<xs:element name="Document" type="Document"/>
<xs:complexType name="AccountIdentification4Choice">
<xs:sequence>
<xs:choice>
<xs:element name="IBAN" type="IBAN2007Identifier"/>
<xs:element name="Othr" type="GenericAccountIdentification1"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AccountSchemeName1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0"/>
<xs:fractionDigits value="5"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
<xs:simpleContent>
<xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
<xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="ActiveOrHistoricCurrencyCode">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{3,3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AddressType2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="ADDR"/>
<xs:enumeration value="PBOX"/>
<xs:enumeration value="HOME"/>
<xs:enumeration value="BIZZ"/>
<xs:enumeration value="MLTO"/>
<xs:enumeration value="DLVY"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="AmountType3Choice">
<xs:sequence>
<xs:choice>
<xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element name="EqvtAmt" type="EquivalentAmount2"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="AnyBICIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Authorisation1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="Authorisation1Code"/>
<xs:element name="Prtry" type="Max128Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Authorisation1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="AUTH"/>
<xs:enumeration value="FDET"/>
<xs:enumeration value="FSUM"/>
<xs:enumeration value="ILEV"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BICIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BaseOneRate">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="10"/>
<xs:totalDigits value="11"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BatchBookingIndicator">
<xs:restriction base="xs:boolean"/>
</xs:simpleType>
<xs:complexType name="BranchAndFinancialInstitutionIdentification4">
<xs:sequence>
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification7"/>
<xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BranchData2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CashAccount16">
<xs:sequence>
<xs:element name="Id" type="AccountIdentification4Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CashAccountType2">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="CashAccountType4Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="CashAccountType4Code">
<xs:restriction base="xs:string">
<xs:enumeration value="CASH"/>
<xs:enumeration value="CHAR"/>
<xs:enumeration value="COMM"/>
<xs:enumeration value="TAXE"/>
<xs:enumeration value="CISH"/>
<xs:enumeration value="TRAS"/>
<xs:enumeration value="SACC"/>
<xs:enumeration value="CACC"/>
<xs:enumeration value="SVGS"/>
<xs:enumeration value="ONDP"/>
<xs:enumeration value="MGLD"/>
<xs:enumeration value="NREX"/>
<xs:enumeration value="MOMA"/>
<xs:enumeration value="LOAN"/>
<xs:enumeration value="SLRY"/>
<xs:enumeration value="ODFT"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CategoryPurpose1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="ChargeBearerType1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="DEBT"/>
<xs:enumeration value="CRED"/>
<xs:enumeration value="SHAR"/>
<xs:enumeration value="SLEV"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Cheque6">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="ChqTp" type="ChequeType2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChqNb" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChqFr" type="NameAndAddress10"/>
<xs:element maxOccurs="1" minOccurs="0" name="DlvryMtd" type="ChequeDeliveryMethod1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="DlvrTo" type="NameAndAddress10"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChqMtrtyDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
<xs:element maxOccurs="2" minOccurs="0" name="MemoFld" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RgnlClrZone" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrtLctn" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="ChequeDelivery1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="MLDB"/>
<xs:enumeration value="MLCD"/>
<xs:enumeration value="MLFA"/>
<xs:enumeration value="CRDB"/>
<xs:enumeration value="CRCD"/>
<xs:enumeration value="CRFA"/>
<xs:enumeration value="PUDB"/>
<xs:enumeration value="PUCD"/>
<xs:enumeration value="PUFA"/>
<xs:enumeration value="RGDB"/>
<xs:enumeration value="RGCD"/>
<xs:enumeration value="RGFA"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ChequeDeliveryMethod1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ChequeDelivery1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="ChequeType2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="CCHQ"/>
<xs:enumeration value="CCCH"/>
<xs:enumeration value="BCHQ"/>
<xs:enumeration value="DRFT"/>
<xs:enumeration value="ELDR"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ClearingSystemIdentification2Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ClearingSystemMemberIdentification2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
<xs:element name="MmbId" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ContactDetails2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="CountryCode">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2,2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CreditDebitCode">
<xs:restriction base="xs:string">
<xs:enumeration value="CRDT"/>
<xs:enumeration value="DBIT"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CreditTransferTransactionInformation10">
<xs:sequence>
<xs:element name="PmtId" type="PaymentIdentification1"/>
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
<xs:element name="Amt" type="AmountType3Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="XchgRateInf" type="ExchangeRateInformation1"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChqInstr" type="Cheque6"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt1Acct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt2Acct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="1" minOccurs="0" name="IntrmyAgt3Acct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAcct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification32"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="InstrForCdtrAgt" type="InstructionForCreditorAgent1"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstrForDbtrAgt" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
<xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
<xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation5"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CreditorReferenceInformation2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CreditorReferenceType1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="DocumentType3Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CreditorReferenceType2">
<xs:sequence>
<xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CustomerCreditTransferInitiationV03">
<xs:sequence>
<xs:element name="GrpHdr" type="GroupHeader32"/>
<xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstructionInformation3"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DateAndPlaceOfBirth">
<xs:sequence>
<xs:element name="BirthDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
<xs:element name="CityOfBirth" type="Max35Text"/>
<xs:element name="CtryOfBirth" type="CountryCode"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DatePeriodDetails">
<xs:sequence>
<xs:element name="FrDt" type="ISODate"/>
<xs:element name="ToDt" type="ISODate"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="DecimalNumber">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="17"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Document">
<xs:sequence>
<xs:element name="CstmrCdtTrfInitn" type="CustomerCreditTransferInitiationV03"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentAdjustment1">
<xs:sequence>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="DocumentType3Code">
<xs:restriction base="xs:string">
<xs:enumeration value="RADM"/>
<xs:enumeration value="RPIN"/>
<xs:enumeration value="FXDR"/>
<xs:enumeration value="DISP"/>
<xs:enumeration value="PUOR"/>
<xs:enumeration value="SCOR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DocumentType5Code">
<xs:restriction base="xs:string">
<xs:enumeration value="MSIN"/>
<xs:enumeration value="CNFA"/>
<xs:enumeration value="DNFA"/>
<xs:enumeration value="CINV"/>
<xs:enumeration value="CREN"/>
<xs:enumeration value="DEBN"/>
<xs:enumeration value="HIRI"/>
<xs:enumeration value="SBIN"/>
<xs:enumeration value="CMCN"/>
<xs:enumeration value="SOAC"/>
<xs:enumeration value="DISP"/>
<xs:enumeration value="BOLD"/>
<xs:enumeration value="VCHR"/>
<xs:enumeration value="AROI"/>
<xs:enumeration value="TSUT"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="EquivalentAmount2">
<xs:sequence>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element name="CcyOfTrf" type="ActiveOrHistoricCurrencyCode"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ExchangeRateInformation1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="XchgRate" type="BaseOneRate"/>
<xs:element maxOccurs="1" minOccurs="0" name="RateTp" type="ExchangeRateType1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrctId" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="ExchangeRateType1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="SPOT"/>
<xs:enumeration value="SALE"/>
<xs:enumeration value="AGRD"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalAccountIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalCategoryPurpose1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalClearingSystemIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalLocalInstrument1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalOrganisationIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalPersonIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalPurpose1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalServiceLevel1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="FinancialIdentificationSchemeName1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FinancialInstitutionIdentification7">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="BIC" type="BICIdentifier"/>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericAccountIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max34Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericFinancialIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericOrganisationIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericPersonIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GroupHeader32">
<xs:sequence>
<xs:element name="MsgId" type="Max35Text"/>
<xs:element name="CreDtTm" type="ISODateTime"/>
<xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
<xs:element name="NbOfTxs" type="Max15NumericText"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
<xs:element name="InitgPty" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification4"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="IBAN2007Identifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ISODate">
<xs:restriction base="xs:date"/>
</xs:simpleType>
<xs:simpleType name="ISODateTime">
<xs:restriction base="xs:dateTime"/>
</xs:simpleType>
<xs:simpleType name="Instruction3Code">
<xs:restriction base="xs:string">
<xs:enumeration value="CHQB"/>
<xs:enumeration value="HOLD"/>
<xs:enumeration value="PHOB"/>
<xs:enumeration value="TELB"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="InstructionForCreditorAgent1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Instruction3Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstrInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="LocalInstrument2Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Max10Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max128Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="128"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max140Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="140"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max15NumericText">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{1,15}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max16Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="16"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max2048Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="2048"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max34Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="34"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max35Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max4Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max70Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="70"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="NameAndAddress10">
<xs:sequence>
<xs:element name="Nm" type="Max140Text"/>
<xs:element name="Adr" type="PostalAddress6"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="NamePrefix1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="DOCT"/>
<xs:enumeration value="MIST"/>
<xs:enumeration value="MISS"/>
<xs:enumeration value="MADM"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Number">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="0"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="OrganisationIdentification4">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="BICOrBEI" type="AnyBICIdentifier"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrganisationIdentificationSchemeName1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Party6Choice">
<xs:sequence>
<xs:choice>
<xs:element name="OrgId" type="OrganisationIdentification4"/>
<xs:element name="PrvtId" type="PersonIdentification5"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PartyIdentification32">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party6Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PaymentIdentification1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
<xs:element name="EndToEndId" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PaymentInstructionInformation3">
<xs:sequence>
<xs:element name="PmtInfId" type="Max35Text"/>
<xs:element name="PmtMtd" type="PaymentMethod3Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
<xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation19"/>
<xs:element name="ReqdExctnDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="PoolgAdjstmntDt" type="ISODate"/>
<xs:element name="Dbtr" type="PartyIdentification32"/>
<xs:element name="DbtrAcct" type="CashAccount16"/>
<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="unbounded" minOccurs="1" name="CdtTrfTxInf" type="CreditTransferTransactionInformation10"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="PaymentMethod3Code">
<xs:restriction base="xs:string">
<xs:enumeration value="CHK"/>
<xs:enumeration value="TRF"/>
<xs:enumeration value="TRA"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PaymentTypeInformation19">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="PercentageRate">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="10"/>
<xs:totalDigits value="11"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PersonIdentification5">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PersonIdentificationSchemeName1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="PhoneNumber">
<xs:restriction base="xs:string">
<xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PostalAddress6">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
<xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Priority2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="HIGH"/>
<xs:enumeration value="NORM"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Purpose2Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalPurpose1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReferredDocumentInformation3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReferredDocumentType1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="DocumentType5Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReferredDocumentType2">
<xs:sequence>
<xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RegulatoryAuthority2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RegulatoryReporting3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="RegulatoryReportingType1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="CRED"/>
<xs:enumeration value="DEBT"/>
<xs:enumeration value="BOTH"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="RemittanceAmount1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="DscntApldAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceInformation5">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation7"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceLocation2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="RemittanceLocationMethod2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="FAXI"/>
<xs:enumeration value="EDIC"/>
<xs:enumeration value="URID"/>
<xs:enumeration value="EMAL"/>
<xs:enumeration value="POST"/>
<xs:enumeration value="SMSM"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ServiceLevel8Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalServiceLevel1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="StructuredRegulatoryReporting3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="StructuredRemittanceInformation7">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
<xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount1"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification32"/>
<xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxAmount1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxAuthorisation1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxInformation3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxParty1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxParty2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxPeriod1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxRecord1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxRecordDetails1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="TaxRecordPeriod1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="MM01"/>
<xs:enumeration value="MM02"/>
<xs:enumeration value="MM03"/>
<xs:enumeration value="MM04"/>
<xs:enumeration value="MM05"/>
<xs:enumeration value="MM06"/>
<xs:enumeration value="MM07"/>
<xs:enumeration value="MM08"/>
<xs:enumeration value="MM09"/>
<xs:enumeration value="MM10"/>
<xs:enumeration value="MM11"/>
<xs:enumeration value="MM12"/>
<xs:enumeration value="QTR1"/>
<xs:enumeration value="QTR2"/>
<xs:enumeration value="QTR3"/>
<xs:enumeration value="QTR4"/>
<xs:enumeration value="HLF1"/>
<xs:enumeration value="HLF2"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

View File

@@ -0,0 +1,879 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--Generated by SWIFTStandards Workstation (build:R6.1.0.2) on 2009 Jan 08 17:30:53-->
<xs:schema xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02">
<xs:element name="Document" type="Document"/>
<xs:complexType name="AccountIdentification4Choice">
<xs:sequence>
<xs:choice>
<xs:element name="IBAN" type="IBAN2007Identifier"/>
<xs:element name="Othr" type="GenericAccountIdentification1"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AccountSchemeName1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalAccountIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="ActiveOrHistoricCurrencyAndAmount_SimpleType">
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0"/>
<xs:fractionDigits value="5"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ActiveOrHistoricCurrencyAndAmount">
<xs:simpleContent>
<xs:extension base="ActiveOrHistoricCurrencyAndAmount_SimpleType">
<xs:attribute name="Ccy" type="ActiveOrHistoricCurrencyCode" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="ActiveOrHistoricCurrencyCode">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{3,3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="AddressType2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="ADDR"/>
<xs:enumeration value="PBOX"/>
<xs:enumeration value="HOME"/>
<xs:enumeration value="BIZZ"/>
<xs:enumeration value="MLTO"/>
<xs:enumeration value="DLVY"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="AmendmentInformationDetails6">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="OrgnlMndtId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrSchmeId" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="1" minOccurs="0" name="OrgnlCdtrAgtAcct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtr" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAcct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="1" minOccurs="0" name="OrgnlDbtrAgtAcct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="OrgnlFnlColltnDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="OrgnlFrqcy" type="Frequency1Code"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="AnyBICIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Authorisation1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="Authorisation1Code"/>
<xs:element name="Prtry" type="Max128Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Authorisation1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="AUTH"/>
<xs:enumeration value="FDET"/>
<xs:enumeration value="FSUM"/>
<xs:enumeration value="ILEV"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BICIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BatchBookingIndicator">
<xs:restriction base="xs:boolean"/>
</xs:simpleType>
<xs:complexType name="BranchAndFinancialInstitutionIdentification4">
<xs:sequence>
<xs:element name="FinInstnId" type="FinancialInstitutionIdentification7"/>
<xs:element maxOccurs="1" minOccurs="0" name="BrnchId" type="BranchData2"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BranchData2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CashAccount16">
<xs:sequence>
<xs:element name="Id" type="AccountIdentification4Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CashAccountType2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ccy" type="ActiveOrHistoricCurrencyCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max70Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CashAccountType2">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="CashAccountType4Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="CashAccountType4Code">
<xs:restriction base="xs:string">
<xs:enumeration value="CASH"/>
<xs:enumeration value="CHAR"/>
<xs:enumeration value="COMM"/>
<xs:enumeration value="TAXE"/>
<xs:enumeration value="CISH"/>
<xs:enumeration value="TRAS"/>
<xs:enumeration value="SACC"/>
<xs:enumeration value="CACC"/>
<xs:enumeration value="SVGS"/>
<xs:enumeration value="ONDP"/>
<xs:enumeration value="MGLD"/>
<xs:enumeration value="NREX"/>
<xs:enumeration value="MOMA"/>
<xs:enumeration value="LOAN"/>
<xs:enumeration value="SLRY"/>
<xs:enumeration value="ODFT"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CategoryPurpose1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalCategoryPurpose1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="ChargeBearerType1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="DEBT"/>
<xs:enumeration value="CRED"/>
<xs:enumeration value="SHAR"/>
<xs:enumeration value="SLEV"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ClearingSystemIdentification2Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalClearingSystemIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ClearingSystemMemberIdentification2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysId" type="ClearingSystemIdentification2Choice"/>
<xs:element name="MmbId" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ContactDetails2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="NmPrfx" type="NamePrefix1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PhneNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="MobNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="FaxNb" type="PhoneNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="EmailAdr" type="Max2048Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="CountryCode">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2,2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CreditDebitCode">
<xs:restriction base="xs:string">
<xs:enumeration value="CRDT"/>
<xs:enumeration value="DBIT"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="CreditorReferenceInformation2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="CreditorReferenceType2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ref" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CreditorReferenceType1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="DocumentType3Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CreditorReferenceType2">
<xs:sequence>
<xs:element name="CdOrPrtry" type="CreditorReferenceType1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="CustomerDirectDebitInitiationV02">
<xs:sequence>
<xs:element name="GrpHdr" type="GroupHeader39"/>
<xs:element maxOccurs="unbounded" minOccurs="1" name="PmtInf" type="PaymentInstructionInformation4"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DateAndPlaceOfBirth">
<xs:sequence>
<xs:element name="BirthDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="PrvcOfBirth" type="Max35Text"/>
<xs:element name="CityOfBirth" type="Max35Text"/>
<xs:element name="CtryOfBirth" type="CountryCode"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DatePeriodDetails">
<xs:sequence>
<xs:element name="FrDt" type="ISODate"/>
<xs:element name="ToDt" type="ISODate"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="DecimalNumber">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="17"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="DirectDebitTransaction6">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="MndtRltdInf" type="MandateRelatedInformation6"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrSchmeId" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="PreNtfctnId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PreNtfctnDt" type="ISODate"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DirectDebitTransactionInformation9">
<xs:sequence>
<xs:element name="PmtId" type="PaymentIdentification1"/>
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation20"/>
<xs:element name="InstdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="DrctDbtTx" type="DirectDebitTransaction6"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification32"/>
<xs:element name="DbtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrAgtAcct" type="CashAccount16"/>
<xs:element name="Dbtr" type="PartyIdentification32"/>
<xs:element name="DbtrAcct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtDbtr" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="InstrForCdtrAgt" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Purp" type="Purpose2Choice"/>
<xs:element maxOccurs="10" minOccurs="0" name="RgltryRptg" type="RegulatoryReporting3"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tax" type="TaxInformation3"/>
<xs:element maxOccurs="10" minOccurs="0" name="RltdRmtInf" type="RemittanceLocation2"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtInf" type="RemittanceInformation5"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Document">
<xs:sequence>
<xs:element name="CstmrDrctDbtInitn" type="CustomerDirectDebitInitiationV02"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentAdjustment1">
<xs:sequence>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtDbtInd" type="CreditDebitCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Rsn" type="Max4Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="DocumentType3Code">
<xs:restriction base="xs:string">
<xs:enumeration value="RADM"/>
<xs:enumeration value="RPIN"/>
<xs:enumeration value="FXDR"/>
<xs:enumeration value="DISP"/>
<xs:enumeration value="PUOR"/>
<xs:enumeration value="SCOR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DocumentType5Code">
<xs:restriction base="xs:string">
<xs:enumeration value="MSIN"/>
<xs:enumeration value="CNFA"/>
<xs:enumeration value="DNFA"/>
<xs:enumeration value="CINV"/>
<xs:enumeration value="CREN"/>
<xs:enumeration value="DEBN"/>
<xs:enumeration value="HIRI"/>
<xs:enumeration value="SBIN"/>
<xs:enumeration value="CMCN"/>
<xs:enumeration value="SOAC"/>
<xs:enumeration value="DISP"/>
<xs:enumeration value="BOLD"/>
<xs:enumeration value="VCHR"/>
<xs:enumeration value="AROI"/>
<xs:enumeration value="TSUT"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalAccountIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalCategoryPurpose1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalClearingSystemIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalFinancialInstitutionIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalLocalInstrument1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalOrganisationIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalPersonIdentification1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalPurpose1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ExternalServiceLevel1Code">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="FinancialIdentificationSchemeName1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalFinancialInstitutionIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FinancialInstitutionIdentification7">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="BIC" type="BICIdentifier"/>
<xs:element maxOccurs="1" minOccurs="0" name="ClrSysMmbId" type="ClearingSystemMemberIdentification2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
<xs:element maxOccurs="1" minOccurs="0" name="Othr" type="GenericFinancialIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Frequency1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="YEAR"/>
<xs:enumeration value="MNTH"/>
<xs:enumeration value="QURT"/>
<xs:enumeration value="MIAN"/>
<xs:enumeration value="WEEK"/>
<xs:enumeration value="DAIL"/>
<xs:enumeration value="ADHO"/>
<xs:enumeration value="INDA"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="GenericAccountIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max34Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="AccountSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericFinancialIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="FinancialIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericOrganisationIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="OrganisationIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GenericPersonIdentification1">
<xs:sequence>
<xs:element name="Id" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SchmeNm" type="PersonIdentificationSchemeName1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GroupHeader39">
<xs:sequence>
<xs:element name="MsgId" type="Max35Text"/>
<xs:element name="CreDtTm" type="ISODateTime"/>
<xs:element maxOccurs="2" minOccurs="0" name="Authstn" type="Authorisation1Choice"/>
<xs:element name="NbOfTxs" type="Max15NumericText"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
<xs:element name="InitgPty" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="FwdgAgt" type="BranchAndFinancialInstitutionIdentification4"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="IBAN2007Identifier">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ISODate">
<xs:restriction base="xs:date"/>
</xs:simpleType>
<xs:simpleType name="ISODateTime">
<xs:restriction base="xs:dateTime"/>
</xs:simpleType>
<xs:complexType name="LocalInstrument2Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalLocalInstrument1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MandateRelatedInformation6">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="MndtId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="DtOfSgntr" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="AmdmntInd" type="TrueFalseIndicator"/>
<xs:element maxOccurs="1" minOccurs="0" name="AmdmntInfDtls" type="AmendmentInformationDetails6"/>
<xs:element maxOccurs="1" minOccurs="0" name="ElctrncSgntr" type="Max1025Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrstColltnDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="FnlColltnDt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="Frqcy" type="Frequency1Code"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Max1025Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="1025"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max10Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max128Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="128"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max140Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="140"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max15NumericText">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{1,15}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max16Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="16"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max2048Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="2048"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max34Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="34"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max35Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="35"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max4Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Max70Text">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="70"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="NameAndAddress10">
<xs:sequence>
<xs:element name="Nm" type="Max140Text"/>
<xs:element name="Adr" type="PostalAddress6"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="NamePrefix1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="DOCT"/>
<xs:enumeration value="MIST"/>
<xs:enumeration value="MISS"/>
<xs:enumeration value="MADM"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Number">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="0"/>
<xs:totalDigits value="18"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="OrganisationIdentification4">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="BICOrBEI" type="AnyBICIdentifier"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericOrganisationIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="OrganisationIdentificationSchemeName1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalOrganisationIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Party6Choice">
<xs:sequence>
<xs:choice>
<xs:element name="OrgId" type="OrganisationIdentification4"/>
<xs:element name="PrvtId" type="PersonIdentification5"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PartyIdentification32">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstlAdr" type="PostalAddress6"/>
<xs:element maxOccurs="1" minOccurs="0" name="Id" type="Party6Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtryOfRes" type="CountryCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtctDtls" type="ContactDetails2"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PaymentIdentification1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="InstrId" type="Max35Text"/>
<xs:element name="EndToEndId" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PaymentInstructionInformation4">
<xs:sequence>
<xs:element name="PmtInfId" type="Max35Text"/>
<xs:element name="PmtMtd" type="PaymentMethod2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="BtchBookg" type="BatchBookingIndicator"/>
<xs:element maxOccurs="1" minOccurs="0" name="NbOfTxs" type="Max15NumericText"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrlSum" type="DecimalNumber"/>
<xs:element maxOccurs="1" minOccurs="0" name="PmtTpInf" type="PaymentTypeInformation20"/>
<xs:element name="ReqdColltnDt" type="ISODate"/>
<xs:element name="Cdtr" type="PartyIdentification32"/>
<xs:element name="CdtrAcct" type="CashAccount16"/>
<xs:element name="CdtrAgt" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrAgtAcct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="UltmtCdtr" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChrgBr" type="ChargeBearerType1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcct" type="CashAccount16"/>
<xs:element maxOccurs="1" minOccurs="0" name="ChrgsAcctAgt" type="BranchAndFinancialInstitutionIdentification4"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrSchmeId" type="PartyIdentification32"/>
<xs:element maxOccurs="unbounded" minOccurs="1" name="DrctDbtTxInf" type="DirectDebitTransactionInformation9"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="PaymentMethod2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="DD"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PaymentTypeInformation20">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="InstrPrty" type="Priority2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="SvcLvl" type="ServiceLevel8Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="LclInstrm" type="LocalInstrument2Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="SeqTp" type="SequenceType1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtgyPurp" type="CategoryPurpose1Choice"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="PercentageRate">
<xs:restriction base="xs:decimal">
<xs:fractionDigits value="10"/>
<xs:totalDigits value="11"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PersonIdentification5">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DtAndPlcOfBirth" type="DateAndPlaceOfBirth"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Othr" type="GenericPersonIdentification1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PersonIdentificationSchemeName1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalPersonIdentification1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="PhoneNumber">
<xs:restriction base="xs:string">
<xs:pattern value="\+[0-9]{1,3}-[0-9()+\-]{1,30}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="PostalAddress6">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="AdrTp" type="AddressType2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dept" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="SubDept" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="StrtNm" type="Max70Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="BldgNb" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="PstCd" type="Max16Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TwnNm" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtrySubDvsn" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
<xs:element maxOccurs="7" minOccurs="0" name="AdrLine" type="Max70Text"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="Priority2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="HIGH"/>
<xs:enumeration value="NORM"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Purpose2Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalPurpose1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReferredDocumentInformation3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="ReferredDocumentType2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nb" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RltdDt" type="ISODate"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReferredDocumentType1Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="DocumentType5Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ReferredDocumentType2">
<xs:sequence>
<xs:element name="CdOrPrtry" type="ReferredDocumentType1Choice"/>
<xs:element maxOccurs="1" minOccurs="0" name="Issr" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RegulatoryAuthority2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RegulatoryReporting3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DbtCdtRptgInd" type="RegulatoryReportingType1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="Authrty" type="RegulatoryAuthority2"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="StructuredRegulatoryReporting3"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="RegulatoryReportingType1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="CRED"/>
<xs:enumeration value="DEBT"/>
<xs:enumeration value="BOTH"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="RemittanceAmount1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="DuePyblAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="DscntApldAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtNoteAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="AdjstmntAmtAndRsn" type="DocumentAdjustment1"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtdAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceInformation5">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Ustrd" type="Max140Text"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Strd" type="StructuredRemittanceInformation7"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RemittanceLocation2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="RmtId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnMtd" type="RemittanceLocationMethod2Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnElctrncAdr" type="Max2048Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RmtLctnPstlAdr" type="NameAndAddress10"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="RemittanceLocationMethod2Code">
<xs:restriction base="xs:string">
<xs:enumeration value="FAXI"/>
<xs:enumeration value="EDIC"/>
<xs:enumeration value="URID"/>
<xs:enumeration value="EMAL"/>
<xs:enumeration value="POST"/>
<xs:enumeration value="SMSM"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="SequenceType1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="FRST"/>
<xs:enumeration value="RCUR"/>
<xs:enumeration value="FNAL"/>
<xs:enumeration value="OOFF"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="ServiceLevel8Choice">
<xs:sequence>
<xs:choice>
<xs:element name="Cd" type="ExternalServiceLevel1Code"/>
<xs:element name="Prtry" type="Max35Text"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:complexType name="StructuredRegulatoryReporting3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctry" type="CountryCode"/>
<xs:element maxOccurs="1" minOccurs="0" name="Cd" type="Max10Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Inf" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="StructuredRemittanceInformation7">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="RfrdDocInf" type="ReferredDocumentInformation3"/>
<xs:element maxOccurs="1" minOccurs="0" name="RfrdDocAmt" type="RemittanceAmount1"/>
<xs:element maxOccurs="1" minOccurs="0" name="CdtrRefInf" type="CreditorReferenceInformation2"/>
<xs:element maxOccurs="1" minOccurs="0" name="Invcr" type="PartyIdentification32"/>
<xs:element maxOccurs="1" minOccurs="0" name="Invcee" type="PartyIdentification32"/>
<xs:element maxOccurs="3" minOccurs="0" name="AddtlRmtInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxAmount1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Rate" type="PercentageRate"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Dtls" type="TaxRecordDetails1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxAuthorisation1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Titl" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Nm" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxInformation3">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Cdtr" type="TaxParty1"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dbtr" type="TaxParty2"/>
<xs:element maxOccurs="1" minOccurs="0" name="AdmstnZn" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RefNb" type="Max140Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Mtd" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxblBaseAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="TtlTaxAmt" type="ActiveOrHistoricCurrencyAndAmount"/>
<xs:element maxOccurs="1" minOccurs="0" name="Dt" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="SeqNb" type="Number"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Rcrd" type="TaxRecord1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxParty1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxParty2">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="TaxId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="RegnId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxTp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Authstn" type="TaxAuthorisation1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxPeriod1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Yr" type="ISODate"/>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="TaxRecordPeriod1Code"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrToDt" type="DatePeriodDetails"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxRecord1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Tp" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Ctgy" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CtgyDtls" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="DbtrSts" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="CertId" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="FrmsCd" type="Max35Text"/>
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
<xs:element maxOccurs="1" minOccurs="0" name="TaxAmt" type="TaxAmount1"/>
<xs:element maxOccurs="1" minOccurs="0" name="AddtlInf" type="Max140Text"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TaxRecordDetails1">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="0" name="Prd" type="TaxPeriod1"/>
<xs:element name="Amt" type="ActiveOrHistoricCurrencyAndAmount"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="TaxRecordPeriod1Code">
<xs:restriction base="xs:string">
<xs:enumeration value="MM01"/>
<xs:enumeration value="MM02"/>
<xs:enumeration value="MM03"/>
<xs:enumeration value="MM04"/>
<xs:enumeration value="MM05"/>
<xs:enumeration value="MM06"/>
<xs:enumeration value="MM07"/>
<xs:enumeration value="MM08"/>
<xs:enumeration value="MM09"/>
<xs:enumeration value="MM10"/>
<xs:enumeration value="MM11"/>
<xs:enumeration value="MM12"/>
<xs:enumeration value="QTR1"/>
<xs:enumeration value="QTR2"/>
<xs:enumeration value="QTR3"/>
<xs:enumeration value="QTR4"/>
<xs:enumeration value="HLF1"/>
<xs:enumeration value="HLF2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TrueFalseIndicator">
<xs:restriction base="xs:boolean"/>
</xs:simpleType>
</xs:schema>

133
dev/resources/sepa/test.xml Normal file
View File

@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CstmrDrctDbtInitn>
<GrpHdr>
<MsgId>PREL20171012/REF10</MsgId>
<CreDtTm>2017-10-12T00:08:30</CreDtTm>
<NbOfTxs>2</NbOfTxs>
<CtrlSum>734.4</CtrlSum>
<InitgPty>
<Nm>MyBigCompany</Nm>
<Id>
<PrvtId>
<Othr>
<Id>FR76AAAAA</Id>
</Othr>
</PrvtId>
</Id>
</InitgPty>
</GrpHdr>
<PmtInf>
<PmtInfId>PREL20171012/ID00010-T171001</PmtInfId>
<PmtMtd>DD</PmtMtd>
<NbOfTxs>2</NbOfTxs>
<CtrlSum>734.4</CtrlSum>
<PmtTpInf>
<SvcLvl>
<Cd>SEPA</Cd>
</SvcLvl>
<LclInstrm>
<Cd>CORE</Cd>
</LclInstrm>
<SeqTp>RCUR</SeqTp>
</PmtTpInf>
<ReqdColltnDt>2017-10-12</ReqdColltnDt>
<Cdtr>
<Nm>MyBigCompany</Nm>
<PstlAdr>
<Ctry>FR</Ctry>
<AdrLine>Address1</AdrLine>
<AdrLine>Address2</AdrLine>
</PstlAdr>
</Cdtr>
<CdtrAcct>
<Id>
<IBAN>FR76123456</IBAN>
</Id>
</CdtrAcct>
<CdtrAgt>
<FinInstnId>
<BIC>BICABCDEF</BIC>
</FinInstnId>
</CdtrAgt>
<ChrgBr>SLEV</ChrgBr>
<CdtrSchmeId>
<Id>
<PrvtId>
<Othr>
<Id>FR76AAAAA</Id>
<SchmeNm>
<Prtry>SEPA</Prtry>
</SchmeNm>
</Othr>
</PrvtId>
</Id>
</CdtrSchmeId>
<DrctDbtTxInf>
<PmtId>
<EndToEndId>AS-FA1710-0416-000679</EndToEndId>
</PmtId>
<InstdAmt Ccy="EUR">540</InstdAmt>
<DrctDbtTx>
<MndtRltdInf>
<MndtId>RUM-CU1610-0001-3-1476058417</MndtId>
<DtOfSgntr>2016-10-10</DtOfSgntr>
<AmdmntInd>false</AmdmntInd>
</MndtRltdInf>
</DrctDbtTx>
<DbtrAgt>
<FinInstnId>
<BIC>BICXYZ</BIC>
</FinInstnId>
</DbtrAgt>
<Dbtr>
<Nm>CUSTOMER A</Nm>
<PstlAdr>
<Ctry>FR</Ctry>
<AdrLine>Mr abc</AdrLine>
</PstlAdr>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>FR123456</IBAN>
</Id>
</DbtrAcct>
<RmtInf>
<Ustrd>FA1710-0416</Ustrd>
</RmtInf>
</DrctDbtTxInf>
<DrctDbtTxInf>
<PmtId>
<EndToEndId>AS-FA1710-0415-000683</EndToEndId>
</PmtId>
<InstdAmt Ccy="EUR">194.4</InstdAmt>
<DrctDbtTx>
<MndtRltdInf>
<MndtId>RUM-CU1709-0011-4-1506525346</MndtId>
<DtOfSgntr>2017-09-27</DtOfSgntr>
<AmdmntInd>false</AmdmntInd>
</MndtRltdInf>
</DrctDbtTx>
<DbtrAgt>
<FinInstnId>
<BIC>BICJKL</BIC>
</FinInstnId>
</DbtrAgt>
<Dbtr>
<Nm>CUSTOMER2</Nm>
<PstlAdr>
<Ctry>FR</Ctry>
</PstlAdr>
</Dbtr>
<DbtrAcct>
<Id>
<IBAN>FR76123456</IBAN>
</Id>
</DbtrAcct>
<RmtInf>
<Ustrd>FA1710-0415</Ustrd>
</RmtInf>
</DrctDbtTxInf>
</PmtInf>
</CstmrDrctDbtInitn>
</Document>

View File

@@ -0,0 +1,2 @@
To test a SEPA file:
http://www.mesfluxdepaiement.fr/testez-vos-fichiers-sepa

View File

@@ -0,0 +1,62 @@
<VirtualHost *:80>
#php_admin_value sendmail_path "/usr/sbin/sendmail -t -i"
#php_admin_value mail.force_extra_parameters "-f postmaster@mydomain.com"
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f postmaster@mydomain.com"
php_admin_value open_basedir /tmp/:/home/../htdocs
ServerName myvirtualalias
ServerAlias myvirtualalias
UseCanonicalName On
AddDefaultCharset UTF-8
DocumentRoot "/home/.../htdocs"
<Directory /home/.../htdocs/>
AllowOverride None
Options -Indexes -MultiViews +FollowSymLinks -ExecCGI
Require all granted
</Directory>
<Directory "/home/../htdocs/cache">
Deny from all
RemoveHandler .phtml .php .php3 .php4 .php5 .php6 .phps .cgi .exe .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .wml
AddType application/x-httpd-php-source .phtml .php .php3 .php4 .php5 .php6 .phps .cgi .exe .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .htm .html .wml
</Directory>
ErrorLog /var/log/apache2/myvirtualalias_error_log
TransferLog /var/log/apache2/myvirtualalias_access_log
# Compress returned resources of type php pages, text file export, css and javascript
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
AddType text/javascript .jgz
AddEncoding gzip .jgz
ExpiresActive On
ExpiresByType image/x-icon A2592000
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType text/css A2592000
ExpiresByType text/javascript A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType application/javascript A2592000
SSLEngine On
# A self-signed (snakeoil) certificate can be created by installing
# the ssl-cert package. See
# /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
# If both key and certificate are stored in the same file, only the
# SSLCertificateFile directive is needed.
SSLCertificateFile /etc/letsencrypt/live/www.mydomain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.mydomain.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/www.mydomain.com/chain.pem
#RewriteEngine on
#RewriteCond %{SERVER_PORT} ^80$
#RewriteRule ^(.*)$ https://%{SERVER_NAME}$1 [L,R]
</VirtualHost>

View File

@@ -126,12 +126,12 @@
<rule ref="Generic.Metrics.CyclomaticComplexity">
<properties>
<property name="complexity" value="120" />
<property name="absoluteComplexity" value="250" />
<property name="absoluteComplexity" value="300" />
</properties>
</rule>
<rule ref="Generic.Metrics.NestingLevel">
<properties>
<property name="nestingLevel" value="10" />
<property name="nestingLevel" value="12" />
<property name="absoluteNestingLevel" value="50" />
</properties>
</rule>

View File

@@ -46,13 +46,20 @@ then
then
aaupper="GR"
fi
if [ $bb = "EG" ]
then
aaupper="SA"
fi
bblower=`echo $dirshort | nawk -F"_" '{ print tolower($2) }'`
echo "***** Process language "$aa"_"$bb
if [ "$aa" != "$bblower" -a "$dirshort" != "en_US" ]
then
reflang="htdocs/langs/"$aa"_"$aaupper
if [ -d $reflang -a $aa"_"$bb != $aa"_"$aaupper ]
then
echo "***** Process language "$aa"_"$bb" - Search original into "$reflang
echo "***** Search original into "$reflang
echo $dirshort is an alternative language of $reflang
echo ./dev/translation/strip_language_file.php $aa"_"$aaupper $aa"_"$bb $2
./dev/translation/strip_language_file.php $aa"_"$aaupper $aa"_"$bb $2

View File

@@ -15,7 +15,7 @@ then
echo "This push local files to transifex for project $project."
echo "Note: If you push a language file (not source), file will be skipped if transifex file is newer."
echo " Using -f will overwrite translation but not memory."
echo "Usage: ./dev/translation/txpush.sh (source|xx_XX|all) [-r dolibarr.file] [-f] [--no-interactive]"
echo "Usage: ./dev/translation/txpush.sh (source|xx_XX|all) [-r ".$project.".file] [-f] [--no-interactive]"
exit
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@@ -37,7 +37,7 @@ $langs->load("salaries");
$mesg = '';
$action = GETPOST('action','aZ09');
$cancel = GETPOST('cancel');
$cancel = GETPOST('cancel','alpha');
$id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
@@ -53,12 +53,10 @@ if (! $user->rights->accounting->chartofaccount) accessforbidden();
// Load variable for pagination
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'sortorder');
$page = GETPOST("page", 'int');
if ($page == - 1) {
$page = 0;
}
$sortfield = GETPOST('sortfield','alpha');
$sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -69,8 +67,8 @@ $arrayfields=array(
'aa.account_number'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1),
'aa.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
'aa.account_parent'=>array('label'=>$langs->trans("Accountparent"), 'checked'=>0),
'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>0),
'aa.pcg_subtype'=>array('label'=>$langs->trans("Pcgsubtype"), 'checked'=>0),
'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>1, 'help'=>'PcgtypeDesc'),
'aa.pcg_subtype'=>array('label'=>$langs->trans("Pcgsubtype"), 'checked'=>1, 'help'=>'PcgtypeDesc'),
'aa.active'=>array('label'=>$langs->trans("Activated"), 'checked'=>1)
);
@@ -84,8 +82,8 @@ $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'accounting
* Actions
*/
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction')) { $massaction=''; }
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction','alpha')) { $massaction=''; }
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
@@ -94,9 +92,9 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
if (empty($reshook))
{
if (! empty($cancel)) $action = '';
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') ||GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
{
$search_account = "";
@@ -106,26 +104,44 @@ if (empty($reshook))
$search_pcgsubtype = "";
$search_array_options=array();
}
if (GETPOST('change_chart'))
if (GETPOST('change_chart','alpha'))
{
$chartofaccounts = GETPOST('chartofaccounts', 'int');
if (! empty($chartofaccounts)) {
if ($chartofaccounts > 0)
{
// Get language code for this $chartofaccounts
$sql ='SELECT code FROM '.MAIN_DB_PREFIX.'c_country as c, '.MAIN_DB_PREFIX.'accounting_system as a';
$sql.=' WHERE c.rowid = a.fk_country AND a.rowid = '.(int) $chartofaccounts;
$resql = $db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
$country_code = $obj->code;
}
else dol_print_error($db);
// Try to load sql file
if ($country_code)
{
$sqlfile = DOL_DOCUMENT_ROOT.'/install/mysql/data/llx_accounting_account_'.strtolower($country_code).'.sql';
$result = run_sql($sqlfile, 1, 0, 1);
}
if (! dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) {
$error ++;
$error++;
}
} else {
$error ++;
}
}
if ($action == 'disable') {
if ($accounting->fetch($id)) {
$result = $accounting->account_desactivate($id);
}
$action = 'update';
if ($result < 0) {
setEventMessages($accounting->error, $accounting->errors, 'errors');
@@ -160,10 +176,10 @@ $pcgver = $conf->global->CHARTOFACCOUNTS;
$sql = "SELECT aa.rowid, aa.fk_pcg_version, aa.pcg_type, aa.pcg_subtype, aa.account_number, aa.account_parent , aa.label, aa.active, ";
$sql .= " a2.rowid as rowid2, a2.label as label2, a2.account_number as account_number2";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version AND aa.entity = " . $conf->entity;
// Dirty hack wainting that foreign key account_parent is an integer to be compared correctly with rowid
if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS INTEGER)";
else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS UNSIGNED)";
if ($db->type == 'pgsql') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS INTEGER) AND a2.entity = " . $conf->entity;
else $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as a2 ON a2.rowid = CAST(aa.account_parent AS UNSIGNED) AND a2.entity = " . $conf->entity;
$sql .= " WHERE asy.rowid = " . $pcgver;
if (strlen(trim($search_account))) $sql .= natural_search("aa.account_number", $search_account);
@@ -179,7 +195,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$resql = $db->query($sql);
$nbtotalofrecords = $db->num_rows($resql);
}
}
$sql .= $db->plimit($limit + 1, $offset);
@@ -190,13 +206,14 @@ if ($resql)
{
$num = $db->num_rows($resql);
$params='';
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($search_account) $params.= '&search_account='.urlencode($search_account);
if ($search_label) $params.= '&search_label='.urlencode($search_label);
if ($search_accountparent) $params.= '&search_accountparent='.urlencode($search_accountparent);
if ($search_pcgtype) $params.= '&search_pcgtype='.urlencode($search_pcgtype);
if ($search_pcgsubtype) $params.= '&search_pcgsubtype='.urlencode($search_pcgsubtype);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($search_account) $param.= '&search_account='.urlencode($search_account);
if ($search_label) $param.= '&search_label='.urlencode($search_label);
if ($search_accountparent) $param.= '&search_accountparent='.urlencode($search_accountparent);
if ($search_pcgtype) $param.= '&search_pcgtype='.urlencode($search_pcgtype);
if ($search_pcgsubtype) $param.= '&search_pcgsubtype='.urlencode($search_pcgsubtype);
if ($optioncss != '') $param.='&optioncss='.$optioncss;
@@ -209,40 +226,45 @@ if ($resql)
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$htmlbuttonadd = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("Addanaccount") . '</a>';
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd);
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd, '', $limit);
// Box to select active chart of account
print $langs->trans("Selectchartofaccounts") . " : ";
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
$sql = "SELECT rowid, pcg_version, label, active";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
$sql .= " WHERE active = 1";
dol_syslog('accountancy/admin/account.php:: $sql=' . $sql);
$sql = "SELECT a.rowid, a.pcg_version, a.label, a.active, c.code as country_code";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system as a";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as c ON a.fk_country = c.rowid";
$sql .= " WHERE a.active = 1";
dol_syslog('accountancy/admin/account.php $sql='.$sql);
print $sql;
$resqlchart = $db->query($sql);
if ($resqlchart) {
$numbis = $db->num_rows($resqlchart);
$i = 0;
while ( $i < $numbis ) {
$row = $db->fetch_row($resqlchart);
print '<option value="' . $row[0] . '"';
print $pcgver == $row[0] ? ' selected' : '';
print '>' . $row[1] . ' - ' . $row[2] . '</option>';
$i ++;
while ($i < $numbis) {
$obj = $db->fetch_object($resqlchart);
print '<option value="' . $obj->rowid . '"';
print ($pcgver == $obj->rowid) ? ' selected' : '';
print '>' . $obj->pcg_version . ' - ' . $obj->label . ' - (' . $obj->country_code . ')</option>';
$i++;
}
}
else dol_print_error($db);
print "</select>";
print ajax_combobox("chartofaccounts");
print '<input type="submit" class="button" name="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
print '<br>';
print '<br>';
print '<br>';
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
@@ -259,13 +281,13 @@ if ($resql)
print $searchpicto;
print '</td>';
print '</tr>';
print '<tr class="liste_titre">';
if (! empty($arrayfields['aa.account_number']['checked'])) print_liste_field_titre($arrayfields['aa.account_number']['label'], $_SERVER["PHP_SELF"],"aa.account_number","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['aa.label']['checked'])) print_liste_field_titre($arrayfields['aa.label']['label'], $_SERVER["PHP_SELF"],"aa.label","",$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['aa.account_parent']['checked'])) print_liste_field_titre($arrayfields['aa.account_parent']['label'], $_SERVER["PHP_SELF"],"aa.account_parent", "", $param,'align="left"',$sortfield,$sortorder);
if (! empty($arrayfields['aa.pcg_type']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_type']['label'],$_SERVER["PHP_SELF"],'aa.pcg_type','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_subtype']['label'],$_SERVER["PHP_SELF"],'aa.pcg_subtype','',$param,'',$sortfield,$sortorder);
if (! empty($arrayfields['aa.pcg_type']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_type']['label'],$_SERVER["PHP_SELF"],'aa.pcg_type','',$param,'',$sortfield,$sortorder,'',$arrayfields['aa.pcg_type']['help']);
if (! empty($arrayfields['aa.pcg_subtype']['checked'])) print_liste_field_titre($arrayfields['aa.pcg_subtype']['label'],$_SERVER["PHP_SELF"],'aa.pcg_subtype','',$param,'',$sortfield,$sortorder,'',$arrayfields['aa.pcg_subtype']['help']);
if (! empty($arrayfields['aa.active']['checked'])) print_liste_field_titre($arrayfields['aa.active']['label'],$_SERVER["PHP_SELF"],'aa.active','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ');
print "</tr>\n";
@@ -274,14 +296,14 @@ if ($resql)
$accountparent = new AccountingAccount($db);
$i=0;
while ($i < min($num, $limit))
while ($i < min($num, $limit))
{
$obj = $db->fetch_object($resql);
$accountstatic->id = $obj->rowid;
$accountstatic->label = $obj->label;
$accountstatic->account_number = $obj->account_number;
print '<tr class="oddeven">';
// Account number
@@ -310,7 +332,7 @@ if ($resql)
$accountparent->id = $obj->rowid2;
$accountparent->label = $obj->label2;
$accountparent->account_number = $obj->account_number2;
print "<td>";
print $accountparent->getNomUrl(1);
print "</td>\n";
@@ -371,11 +393,11 @@ if ($resql)
}
print '</td>' . "\n";
if (! $i) $totalarray['nbfield']++;
print "</tr>\n";
$i++;
}
print "</table>";
print "</div>";
print '</form>';

File diff suppressed because it is too large Load Diff

View File

@@ -37,10 +37,11 @@ $langs->load("accountancy");
$mesg = '';
$action = GETPOST('action','aZ09');
$backtopage = GETPOST('backtopage');
$backtopage = GETPOST('backtopage','alpha');
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel');
$cancel = GETPOST('cancel','alpha');
// Security check
@@ -52,7 +53,7 @@ $object = new AccountingAccount($db);
* Action
*/
if (GETPOST('cancel'))
if (GETPOST('cancel','alpha'))
{
$urltogo=$backtopage?$backtopage:dol_buildpath('/accountancy/admin/account.php',1);
header("Location: ".$urltogo);
@@ -63,7 +64,7 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
{
if (! $cancel) {
$sql = 'SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS;
dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
$result = $db->query($sql);
$obj = $db->fetch_object($result);
@@ -172,16 +173,16 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
}
} else if ($action == 'delete' && $user->rights->accounting->chartofaccount) {
$result = $object->fetch($id);
if (! empty($object->id)) {
$result = $object->delete($user);
if ($result > 0) {
header("Location: account.php");
exit;
}
}
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
@@ -261,8 +262,10 @@ if ($action == 'create') {
print '</div>';
print '</form>';
} else if ($id) {
$result = $object->fetch($id);
}
else if ($id > 0 || $ref) {
$result = $object->fetch($id, $ref, 1);
if ($result > 0) {
dol_htmloutput_mesg($mesg);
@@ -270,7 +273,7 @@ if ($action == 'create') {
$head = accounting_prepare_head($object);
// Edit mode
if ($action == 'update')
if ($action == 'update')
{
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
@@ -327,19 +330,20 @@ if ($action == 'create') {
print '</form>';
} else {
// View mode
$linkback = '<a href="../admin/account.php">' . $langs->trans("BackToChartofaccounts") . '</a>';
$linkback = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php">' . $langs->trans("BackToList") . '</a>';
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), -1, 'billr');
dol_banner_tab($object, 'ref', $linkback, 1, 'account_number', 'ref');
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">';
// Account number
print '<tr><td class="titlefield">' . $langs->trans("AccountNumber") . '</td>';
print '<td>' . $object->account_number . '</td>';
print '<td align="right" width="25%">' . $linkback . '</td></tr>';
// Label
print '<tr><td>' . $langs->trans("Label") . '</td>';
print '<tr><td class="titlefield">' . $langs->trans("Label") . '</td>';
print '<td colspan="2">' . $object->label . '</td></tr>';
// Account parent
@@ -361,20 +365,10 @@ if ($action == 'create') {
print '<tr><td>' . $langs->trans("Pcgsubtype") . '</td>';
print '<td colspan="2">' . $object->pcg_subtype . '</td></tr>';
// Active
print '<tr><td>' . $langs->trans("Status") . '</td>';
print '<td colspan="2">';
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>';
print '</table>';
print '</div>';
dol_fiche_end();
/*
@@ -397,7 +391,7 @@ if ($action == 'create') {
print '</div>';
}
} else {
dol_print_error($db);
dol_print_error($db, $object->error, $object->errors);
}
}

View File

@@ -35,7 +35,7 @@ $langs->load("accountancy");
$mesg = '';
$id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel');
$cancel = GETPOST('cancel','alpha');
$action = GETPOST('action','aZ09');
$cat_id = GETPOST('account_category');
$selectcpt = GETPOST('cpt_bk', 'array');
@@ -86,9 +86,11 @@ if ($action == 'delete') {
$form = new Form($db);
$formaccounting = new FormAccounting($db);
llxheader('', $langs->trans('AccountAccounting'));
llxheader('', $langs->trans('AccountingCategory'));
print load_fiche_titre($langs->trans('AccountingCategory'));
$linkback = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/categories_list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
print load_fiche_titre($langs->trans('AccountingCategory'), $linkback);
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
@@ -98,7 +100,7 @@ dol_fiche_head();
print '<table class="border" width="100%">';
// Category
print '<tr><td>' . $langs->trans("AccountingCategory") . '</td>';
print '<tr><td class="titlefield">' . $langs->trans("AccountingCategory") . '</td>';
print '<td>';
$formaccounting->select_accounting_category($cat_id, 'account_category', 1, 0, 0, 1);
print '<input class="button" type="submit" value="' . $langs->trans("Select") . '">';
@@ -112,12 +114,24 @@ if (! empty($cat_id))
}
print '<tr><td>' . $langs->trans("AddAccountFromBookKeepingWithNoCategories") . '</td>';
print '<td>';
$arraykeyvalue=array();
foreach($accountingcategory->lines_cptbk as $key => $val)
{
$arraykeyvalue[length_accountg($val->numero_compte)] = length_accountg($val->numero_compte) . ' (' . $val->label_compte . ($val->doc_ref?' '.$val->doc_ref:'').')';
}
if (is_array($accountingcategory->lines_cptbk) && count($accountingcategory->lines_cptbk) > 0) {
print '<select class="flat minwidth200" size="' . count($obj) . '" name="cpt_bk[]" multiple>';
print $form->multiselectarray('cpt_bk', $arraykeyvalue, GETPOST('cpt_bk', 'array'), null, null, null, null, "90%");
print '<br>';
/*print '<select class="flat minwidth200" size="8" name="cpt_bk[]" multiple>';
foreach ( $accountingcategory->lines_cptbk as $cpt ) {
print '<option value="' . length_accountg($cpt->numero_compte) . '">' . length_accountg($cpt->numero_compte) . ' (' . $cpt->label_compte . ' ' . $cpt->doc_ref . ')</option>';
}
print '</select><br>';
print ajax_combobox('cpt_bk');
*/
print '<input class="button" type="submit" id="" class="action-delete" value="' . $langs->trans("Add") . '"> ';
}
print '</td></tr>';

View File

@@ -1,16 +1,6 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* 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-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>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@ltairis.fr>
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro@zendsi.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
@@ -41,18 +31,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
$langs->load("errors");
$langs->load("admin");
$langs->load("main");
$langs->load("companies");
$langs->load("resource");
$langs->load("holiday");
$langs->load("accountancy");
$langs->load("hrm");
$langs->loadLangs(array("errors","admin","companies","resource","holiday","accountancy","hrm"));
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
$confirm=GETPOST('confirm','alpha');
$id=GETPOST('id','int');
$id=32;
$rowid=GETPOST('rowid','alpha');
$code=GETPOST('code','alpha');
@@ -71,10 +54,10 @@ $listoffset=GETPOST('listoffset');
$listlimit=GETPOST('listlimit')>0?GETPOST('listlimit'):1000;
$active = 1;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$sortfield = GETPOST("sortfield",'aZ09comma');
$sortorder = GETPOST("sortorder",'aZ09comma');
$page = GETPOST("page",'int');
if ($page == -1 || $page == null) { $page = 0 ; }
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $listlimit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -100,7 +83,7 @@ $tablib[32]= "DictionaryAccountancyCategory";
// Requests to extract data
$tabsql=array();
$tabsql[32]= "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account, a.sens, a.category_type, a.formula, a.position as position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accounting_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid and c.active=1";
$tabsql[32]= "SELECT a.rowid as rowid, a.code as code, a.label, a.range_account, a.category_type, a.formula, a.position as position, a.fk_country as country_id, c.code as country_code, c.label as country, a.active FROM ".MAIN_DB_PREFIX."c_accounting_category as a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_country=c.rowid and c.active=1";
// Criteria to sort dictionaries
$tabsqlsort=array();
@@ -108,15 +91,15 @@ $tabsqlsort[32]="position ASC";
// Nom des champs en resultat de select pour affichage du dictionnaire
$tabfield=array();
$tabfield[32]= "code,label,range_account,sens,category_type,formula,position,country_id,country";
$tabfield[32]= "code,label,range_account,category_type,formula,position,country";
// Nom des champs d'edition pour modification d'un enregistrement
$tabfieldvalue=array();
$tabfieldvalue[32]= "code,label,range_account,sens,category_type,formula,position,country";
$tabfieldvalue[32]= "code,label,range_account,category_type,formula,position,country_id";
// Nom des champs dans la table pour insertion d'un enregistrement
$tabfieldinsert=array();
$tabfieldinsert[32]= "code,label,range_account,sens,category_type,formula,position,fk_country";
$tabfieldinsert[32]= "code,label,range_account,category_type,formula,position,fk_country";
// Nom du rowid si le champ n'est pas de type autoincrement
// Example: "" if id field is "rowid" and has autoincrement on
@@ -130,7 +113,7 @@ $tabcond[32]= ! empty($conf->accounting->enabled);
// List of help for fields
$tabhelp=array();
$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"));
$tabhelp[32] = array('code'=>$langs->trans("EnterAnyCode"), 'category_type'=>$langs->trans("SetToYesIfGroupIsComputationOfOtherGroups"), 'formula'=>$langs->trans("EnterCalculationRuleIfPreviousFieldIsYes"));
// List of check for fields (NOT USED YET)
$tabfieldcheck=array();
@@ -167,24 +150,17 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$ok=1;
foreach ($listfield as $f => $value)
{
if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType','DictionaryHolidayTypes','DictionaryRevenueStamp','DictionaryAccountancysystem','DictionaryAccountancyCategory'))) continue; // For some pages, country is not mandatory
if ($value == 'country' && in_array($tablib[$id],array('DictionaryCanton','DictionaryCompanyType','DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory
if ($value == 'formula' && empty($_POST['formula'])) continue;
if ((! isset($_POST[$value]) || $_POST[$value]=='')
&& (! in_array($listfield[$f], array('decalage','module','accountancy_code','accountancy_code_sell','accountancy_code_buy')) // Fields that are not mandatory
&& (! ($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10
)
)
if ($value == 'range_account' && empty($_POST['range_account'])) continue;
if ($value == 'country' || $value == 'country_id') continue;
if (! isset($_POST[$value]) || $_POST[$value]=='')
{
$ok=0;
$fieldnamekey=$listfield[$f];
// We take translate key of field
if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey='Label';
if ($fieldnamekey == 'libelle_facture') $fieldnamekey = 'LabelOnDocuments';
if ($fieldnamekey == 'module') $fieldnamekey='Module';
if ($fieldnamekey == 'code') $fieldnamekey = 'Code';
if ($fieldnamekey == 'note') $fieldnamekey = 'Note';
if ($fieldnamekey == 'taux') $fieldnamekey = 'Rate';
if ($fieldnamekey == 'type') $fieldnamekey = 'Type';
if ($fieldnamekey == 'position') $fieldnamekey = 'Position';
if ($fieldnamekey == 'category_type') $fieldnamekey = 'Calculated';
@@ -192,11 +168,6 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors');
}
}
// Other checks
if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm" && isset($_POST["type"]) && in_array($_POST["type"],array('system','systemauto'))) {
$ok=0;
setEventMessages($langs->transnoentities('ErrorReservedTypeSystemSystemAuto'), null, 'errors');
}
if (isset($_POST["code"]))
{
if ($_POST["code"]=='0')
@@ -204,23 +175,12 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$ok=0;
setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors');
}
/*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base
{
$ok = 0;
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
}*/
}
if (isset($_POST["country"]) && ($_POST["country"]=='0'))
if (! is_numeric(GETPOST('position','alpha')))
{
if (in_array($tablib[$id],array('DictionaryCompanyType','DictionaryHolidayTypes'))) // Field country is no mandatory for such dictionaries
{
$_POST["country"]='';
}
else
{
$ok=0;
setEventMessages($langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")), null, 'errors');
}
$langs->load("errors");
$ok=0;
setEventMessages($langs->transnoentities('ErrorFieldMustBeANumeric', $langs->transnoentities("Position")), null, 'errors');
}
// Clean some parameters
@@ -229,7 +189,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
// Si verif ok et action add, on ajoute la ligne
if ($ok && GETPOST('actionadd'))
if ($ok && GETPOST('actionadd','alpha'))
{
if ($tabrowid[$id])
{
@@ -250,26 +210,21 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
// Add new entry
$sql = "INSERT INTO ".$tabname[$id]." (";
// List of fields
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert))
$sql.= $tabrowid[$id].",";
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert)) $sql.= $tabrowid[$id].",";
$sql.= $tabfieldinsert[$id];
$sql.=",active)";
$sql.= " VALUES(";
// List of values
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert))
$sql.= $newid.",";
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert)) $sql.= $newid.",";
$i=0;
foreach ($listfieldinsert as $f => $value)
{
if ($value == 'price' || preg_match('/^amount/i',$value) || $value == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($value == 'entity') {
if ($value == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
if ($_POST[$listfieldvalue[$i]] == '' && ! $listfieldvalue[$i] == 'formula') $sql.="null"; // For vat, we want/accept code = ''
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
$i++;
}
@@ -310,15 +265,15 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i = 0;
foreach ($listfieldmodify as $field)
{
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
if ($field == 'fk_country' && $_POST['country'] > 0) {
$_POST[$listfieldvalue[$i]] = $_POST['country'];
}
else if ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
$sql.= $field."=";
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
if ($_POST[$listfieldvalue[$i]] == '' && ! $listfieldvalue[$i] == 'range_account') $sql.="null"; // For range_account, we want/accept code = ''
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
$i++;
}
@@ -345,7 +300,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
$sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'";
$sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol." = '".$db->escape($rowid)."'";
dol_syslog("delete", LOG_DEBUG);
$result = $db->query($sql);
@@ -369,10 +324,10 @@ if ($action == $acts[0])
else { $rowidcol="rowid"; }
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'";
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'";
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code = '".$db->escape($code)."'";
}
$result = $db->query($sql);
@@ -389,10 +344,10 @@ if ($action == $acts[1])
else { $rowidcol="rowid"; }
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'";
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'";
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code = '".$db->escape($code)."'";
}
$result = $db->query($sql);
@@ -409,10 +364,10 @@ if ($action == 'activate_favorite')
else { $rowidcol="rowid"; }
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$rowid."'";
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$code."'";
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code = '".$db->escape($code)."'";
}
$result = $db->query($sql);
@@ -429,10 +384,10 @@ if ($action == 'disable_favorite')
else { $rowidcol="rowid"; }
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$rowid."'";
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$code."'";
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code = '".$db->escape($code)."'";
}
$result = $db->query($sql);
@@ -450,19 +405,20 @@ if ($action == 'disable_favorite')
$form = new Form($db);
$formadmin=new FormAdmin($db);
llxHeader();
llxHeader('', $langs->trans('DictionaryAccountancyCategory'));
$titre=$langs->trans($tablib[$id]);
$linkback='';
$titlepicto='title_setup';
print load_fiche_titre($titre,$linkback,$titlepicto);
print load_fiche_titre($titre, $linkback, $titlepicto);
print $langs->trans("AccountingAccountGroupsDesc", $langs->transnoentitiesnoconv("ByPersonalizedAccountGroups")).'<br><br>';
// 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='.$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.'&code='.$code.'&id='.$id.($search_country_id>0?'&search_country_id='.$search_country_id:''), $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
}
//var_dump($elementList);
@@ -478,27 +434,12 @@ if ($id)
{
if (preg_match('/ WHERE /',$sql)) $sql.= " AND ";
else $sql.=" WHERE ";
$sql.= " c.rowid = ".$search_country_id;
$sql.= " (a.fk_country = ".$search_country_id." OR a.fk_country = 0)";
}
if ($sortfield)
{
// If sort order is "country", we use country_code instead
if ($sortfield == 'country') $sortfield='country_code';
$sql.= " ORDER BY ".$sortfield;
if ($sortorder)
{
$sql.=" ".strtoupper($sortorder);
}
$sql.=", ";
// Clear the required sort criteria for the tabsqlsort to be able to force it with selected value
$tabsqlsort[$id]=preg_replace('/([a-z]+\.)?'.$sortfield.' '.$sortorder.',/i','',$tabsqlsort[$id]);
$tabsqlsort[$id]=preg_replace('/([a-z]+\.)?'.$sortfield.',/i','',$tabsqlsort[$id]);
}
else {
$sql.=" ORDER BY ";
}
$sql.=$tabsqlsort[$id];
// If sort order is "country", we use country_code instead
if ($sortfield == 'country') $sortfield='country_code';
$sql.=$db->order($sortfield,$sortorder);
$sql.=$db->plimit($listlimit+1,$offset);
//print $sql;
@@ -508,6 +449,7 @@ if ($id)
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
// Form to add a new line
@@ -536,18 +478,15 @@ if ($id)
{
$valuetoshow=$langs->trans("Label");
}
if ($fieldlist[$field]=='libelle_facture') { $valuetoshow=$langs->trans("LabelOnDocuments")."*"; }
if ($fieldlist[$field]=='libelle_facture') { $valuetoshow=$langs->trans("LabelOnDocuments"); }
if ($fieldlist[$field]=='country') {
if (in_array('region_id',$fieldlist)) { print '<td>&nbsp;</td>'; continue; } // For region page, we do not show the country input
$valuetoshow=$langs->trans("Country");
}
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $valuetoshow=''; }
if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); }
if ($fieldlist[$field]=='accountancy_code_sell'){ $valuetoshow=$langs->trans("AccountancyCodeSell"); }
if ($fieldlist[$field]=='accountancy_code_buy'){ $valuetoshow=$langs->trans("AccountancyCodeBuy"); }
if ($fieldlist[$field]=='pcg_version' || $fieldlist[$field]=='fk_pcg_version') { $valuetoshow=$langs->trans("Pcg_version"); }
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Direction"); }
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Comment"); }
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
if ($valuetoshow != '')
@@ -599,6 +538,7 @@ if ($id)
print "</tr>";
$colspan=count($fieldlist)+3;
if ($id == 32) $colspan++;
print '<tr><td colspan="'.$colspan.'">&nbsp;</td></tr>'; // Keep &nbsp; to have a line with enough height
}
@@ -617,8 +557,7 @@ if ($id)
$paramwithsearch = $param;
if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder;
if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield;
if (GETPOST('from')) $paramwithsearch.= '&from='.GETPOST('from','alpha');
if (GETPOST('from','alpha')) $paramwithsearch.= '&from='.GETPOST('from','alpha');
// There is several pages
if ($num > $listlimit)
{
@@ -688,7 +627,6 @@ if ($id)
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
{
$valuetoshow=$langs->trans("Label");
if ($id != 25) $valuetoshow.="*";
}
if ($fieldlist[$field]=='country') { $valuetoshow=$langs->trans("Country"); }
if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
@@ -700,8 +638,7 @@ if ($id)
if ($fieldlist[$field]=='pcg_type') { $valuetoshow=$langs->trans("Pcg_type"); }
if ($fieldlist[$field]=='pcg_subtype') { $valuetoshow=$langs->trans("Pcg_subtype"); }
if ($fieldlist[$field]=='type_template') { $valuetoshow=$langs->trans("TypeOfTemplate"); }
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Range"); }
if ($fieldlist[$field]=='sens') { $valuetoshow=$langs->trans("Direction"); }
if ($fieldlist[$field]=='range_account') { $valuetoshow=$langs->trans("Comment"); }
if ($fieldlist[$field]=='category_type') { $valuetoshow=$langs->trans("Calculated"); }
// Affiche nom du champ
if ($showfield)
@@ -742,6 +679,7 @@ if ($id)
print '<div name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"></div>';
print '<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'">';
print '</td>';
print '<td></td>';
}
else
{
@@ -759,17 +697,9 @@ if ($id)
$showfield=1;
$align="left";
$valuetoshow=$obj->{$fieldlist[$field]};
if ($value == 'type_template')
if ($value == 'category_type')
{
$valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow;
}
if ($value == 'element')
{
$valuetoshow = isset($elementList[$valuetoshow])?$elementList[$valuetoshow]:$valuetoshow;
}
else if ($value == 'source')
{
$valuetoshow = isset($sourceList[$valuetoshow])?$sourceList[$valuetoshow]:$valuetoshow;
$valuetoshow = yn($valuetoshow);
}
else if ($valuetoshow=='all') {
$valuetoshow=$langs->trans('All');
@@ -785,12 +715,6 @@ if ($id)
$valuetoshow=($key != "Country".strtoupper($obj->country_code)?$obj->country_code." - ".$key:$obj->country);
}
}
else if ($fieldlist[$field]=='libelle_facture') {
$langs->load("bills");
$key=$langs->trans("PaymentCondition".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "PaymentCondition".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
$valuetoshow=nl2br($valuetoshow);
}
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_country') {
$key=$langs->trans("Country".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Country".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
@@ -804,83 +728,11 @@ if ($id)
$key=$langs->trans("Action".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Action".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if (! empty($obj->code_iso) && $fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_currencies') {
$key=$langs->trans("Currency".strtoupper($obj->code_iso));
$valuetoshow=($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_typent') {
$key=$langs->trans(strtoupper($obj->code));
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_prospectlevel') {
$key=$langs->trans(strtoupper($obj->code));
$valuetoshow=($key != strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_civility') {
$key=$langs->trans("Civility".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "Civility".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_type_contact') {
$langs->load('agenda');
$key=$langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_payment_term') {
$langs->load("bills");
$key=$langs->trans("PaymentConditionShort".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') {
$langs->load("bills");
$key=$langs->trans("PaymentType".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') {
$key=$langs->trans("DemandReasonType".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_method') {
$langs->load("orders");
$key=$langs->trans($obj->code);
$valuetoshow=($obj->code && $key != $obj->code)?$key:$obj->{$fieldlist[$field]};
}
else if ($fieldlist[$field]=='libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_shipment_mode') {
$langs->load("sendings");
$key=$langs->trans("SendingMethod".strtoupper($obj->code));
$valuetoshow=($obj->code && $key != "SendingMethod".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field] == 'libelle' && $tabname[$id]==MAIN_DB_PREFIX.'c_paper_format')
{
$key = $langs->trans('PaperFormat'.strtoupper($obj->code));
$valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees')
{
$langs->load('trips');
$key = $langs->trans(strtoupper($obj->code));
$valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') {
$showfield=0;
}
else if ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
$langs->load("products");
$valuetoshow=$langs->trans($obj->{$fieldlist[$field]});
}
else if ($fieldlist[$field]=='short_label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
$langs->load("products");
$valuetoshow = $langs->trans($obj->{$fieldlist[$field]});
}
else if (in_array($fieldlist[$field],array('recuperableonly')))
{
$align="center";
}
else if ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') {
$valuetoshow = length_accountg($valuetoshow);
}
$class='tddict';
if ($fieldlist[$field] == 'tracking') $class.=' tdoverflowauto';
// Show value for field
if ($showfield) print '<!-- '.$fieldlist[$field].' --><td align="'.$align.'" class="'.$class.'">'.$valuetoshow.'</td>';
}
@@ -891,14 +743,9 @@ if ($id)
if (isset($obj->code))
{
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
}
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable=0; }
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { $canbedisabled=0; $canbedisabled = 0; }
$canbemodified=$iserasable;
if ($obj->code == 'RECEP') $canbemodified=1;
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'');
if ($param) $url .= '&'.$param;
@@ -909,10 +756,7 @@ if ($id)
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
else
{
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
else print $langs->trans("AlwaysActive");
print $langs->trans("AlwaysActive");
}
print "</td>";
@@ -931,14 +775,16 @@ if ($id)
else print '<td>&nbsp;</td>';
// Link to setup the group
print '<td>';
print '<td class="center">';
if (empty($obj->formula))
{
print '<a href="'.DOL_URL_ROOT.'/accountancy/admin/categories.php?action=display&account_category='.$obj->rowid.'">'.$langs->trans("Setup").'</a>';
print '<a href="'.DOL_URL_ROOT.'/accountancy/admin/categories.php?action=display&save_lastsearch_values=1&account_category='.$obj->rowid.'">';
print $langs->trans("ListOfAccounts");
print '</a>';
}
print '</td>';
print "</tr>\n";
}
print "</tr>\n";
$i++;
}
}
@@ -948,6 +794,7 @@ if ($id)
}
print '</table>';
print '</div>';
print '</form>';
}
@@ -984,16 +831,17 @@ function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $contex
{
if ($fieldlist[$field] == 'country')
{
if (in_array('region_id',$fieldlist))
{
print '<td>';
//print join(',',$fieldlist);
print '</td>';
continue;
} // 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:$mysoc->country_code)), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone');
if ($context == 'add')
{
$fieldname='country_id';
print $form->select_country(GETPOST('country_id','int'), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone');
}
else
{
print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:$mysoc->country_code)), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone');
}
print '</td>';
}
elseif ($fieldlist[$field] == 'country_id')
@@ -1006,130 +854,14 @@ function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $contex
print '</td>';
}
}
elseif ($fieldlist[$field] == 'region')
{
print '<td>';
$formcompany->select_region($region_id,'region');
elseif ($fieldlist[$field] == 'category_type') {
print '<td>';
print $form->selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1);
print '</td>';
}
elseif ($fieldlist[$field] == 'region_id')
{
$region_id = (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:0);
print '<td>';
print '<input type="hidden" name="'.$fieldlist[$field].'" value="'.$region_id.'">';
print '</td>';
}
elseif ($fieldlist[$field] == 'lang')
{
print '<td>';
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT,'lang');
print '</td>';
}
// Le type de template
elseif ($fieldlist[$field] == 'type_template')
{
print '<td>';
print $form->selectarray('type_template', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
print '</td>';
}
// Le type de l'element (pour les type de contact)
elseif ($fieldlist[$field] == 'element')
{
print '<td>';
print $form->selectarray('element', $elementList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
print '</td>';
}
// La source de l'element (pour les type de contact)
elseif ($fieldlist[$field] == 'source')
{
print '<td>';
print $form->selectarray('source', $sourceList,(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
print '</td>';
}
elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm")
{
print '<td>';
print 'user<input type="hidden" name="type" value="user">';
print '</td>';
}
elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') {
if ($fieldlist[$field] == 'type_cdr') print '<td align="center">';
else print '<td>';
if ($fieldlist[$field] == 'type_cdr') {
print $form->selectarray($fieldlist[$field], array(0=>$langs->trans('None'), 1=>$langs->trans('AtEndOfMonth'), 2=>$langs->trans('CurrentNext')), (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
} else {
print $form->selectyesno($fieldlist[$field],(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''),1);
}
print '</td>';
}
elseif (in_array($fieldlist[$field],array('nbjour','decalage','taux','localtax1','localtax2'))) {
$align="left";
if (in_array($fieldlist[$field],array('taux','localtax1','localtax2'))) $align="center"; // Fields aligned on right
print '<td align="'.$align.'">';
print '<input type="text" class="flat" value="'.(isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : '').'" size="3" name="'.$fieldlist[$field].'">';
print '</td>';
}
elseif (in_array($fieldlist[$field], array('libelle_facture'))) {
print '<td><textarea cols="30" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'</textarea></td>';
}
elseif (in_array($fieldlist[$field], array('content')))
{
if ($tabname == MAIN_DB_PREFIX.'c_email_templates')
{
print '<td colspan="4"></td></tr><tr class="pair nohover"><td colspan="5">'; // To create an artificial CR for the current tr we are on
}
else print '<td>';
if ($context != 'hide')
{
//print '<textarea cols="3" rows="'.ROWS_2.'" class="flat" name="'.$fieldlist[$field].'">'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'</textarea>';
$okforextended=true;
if ($tabname == MAIN_DB_PREFIX.'c_email_templates' && empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended=false;
$doleditor = new DolEditor($fieldlist[$field], (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_5, '90%');
print $doleditor->Create(1);
}
else print '&nbsp;';
print '</td>';
}
elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i',$fieldlist[$field])) {
print '<td><input type="text" class="flat minwidth75" value="'.price((! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'')).'" name="'.$fieldlist[$field].'"></td>';
}
elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
print '<td><input type="text" class="flat minwidth100" value="'.(! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'"></td>';
}
elseif ($fieldlist[$field]=='unit') {
print '<td>';
$units = array(
'mm' => $langs->trans('SizeUnitmm'),
'cm' => $langs->trans('SizeUnitcm'),
'point' => $langs->trans('SizeUnitpoint'),
'inch' => $langs->trans('SizeUnitinch')
);
print $form->selectarray('unit', $units, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''), 0, 0, 0);
print '</td>';
}
// Le type de taxe locale
elseif ($fieldlist[$field] == 'localtax1_type' || $fieldlist[$field] == 'localtax2_type')
{
print '<td align="center">';
print $form->selectarray($fieldlist[$field], $localtax_typeList, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:''));
print '</td>';
}
elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy')
{
print '<td>';
if (! empty($conf->accounting->enabled))
{
$fieldname = $fieldlist[$field];
$accountancy_account = (! empty($obj->$fieldname) ? $obj->$fieldname : 0);
print $formaccounting->select_account($accountancy_account, $fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone');
}
else
{
$fieldname = $fieldlist[$field];
print '<input type="text" size="10" class="flat" value="'.(isset($obj->$fieldname)?$obj->$fieldname:'').'" name="'.$fieldlist[$field].'">';
}
print '</td>';
}
else
{
print '<td>';
@@ -1137,8 +869,7 @@ function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $contex
if ($fieldlist[$field]=='code') $class='maxwidth100';
if ($fieldlist[$field]=='position') $class='maxwidth50';
if ($fieldlist[$field]=='libelle') $class='quatrevingtpercent';
if ($fieldlist[$field]=='tracking') $class='quatrevingtpercent';
if ($fieldlist[$field]=='sortorder' || $fieldlist[$field]=='sens' || $fieldlist[$field]=='category_type') $size='size="2" ';
if ($fieldlist[$field]=='sortorder' || $fieldlist[$field]=='category_type') $size='size="2" ';
print '<input type="text" '.$size.'class="flat'.($class?' '.$class:'').'" value="'.(isset($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'').'" name="'.$fieldlist[$field].'">';
print '</td>';
}

View File

@@ -77,7 +77,7 @@ $list_account = array (
* Actions
*/
$accounting_mode = defined('ACCOUNTING_MODE') ? ACCOUNTING_MODE : 'RECETTES-DEPENSES';
$accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE;
if (GETPOST('change_chart'))

View File

@@ -1,10 +1,11 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.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
@@ -37,29 +38,45 @@ $langs->load("bills");
$langs->load("admin");
$langs->load("accountancy");
// Security check
if (empty($user->admin) && empty($user->rights->accounting->chartofaccount))
// Security access
if (empty($user->rights->accounting->chartofaccount))
{
accessforbidden();
accessforbidden();
}
$action = GETPOST('action', 'alpha');
// Parameters ACCOUNTING_EXPORT_*
$main_option = array (
'ACCOUNTING_EXPORT_PREFIX_SPEC'
'ACCOUNTING_EXPORT_PREFIX_SPEC',
);
$configuration = AccountancyExport::getTypeConfig();
$listparam = $configuration[param];
$listformat = $configuration[format];
$listcr = $configuration[cr];
$model_option = array (
'ACCOUNTING_EXPORT_SEPARATORCSV',
'ACCOUNTING_EXPORT_DATE'
/*
'ACCOUNTING_EXPORT_PIECE',
'ACCOUNTING_EXPORT_GLOBAL_ACCOUNT',
'ACCOUNTING_EXPORT_LABEL',
'ACCOUNTING_EXPORT_AMOUNT',
'ACCOUNTING_EXPORT_DEVISE'
*/
'1' => array(
'label' => 'ACCOUNTING_EXPORT_FORMAT',
'param' => $listformat,
),
'2' => array(
'label' => 'ACCOUNTING_EXPORT_SEPARATORCSV',
'param' => '',
),
'3' => array(
'label' => 'ACCOUNTING_EXPORT_ENDLINE',
'param' => $listcr,
),
'4' => array(
'label' => 'ACCOUNTING_EXPORT_DATE',
'param' => '',
),
);
/*
@@ -68,24 +85,15 @@ $model_option = array (
if ($action == 'update') {
$error = 0;
$format = GETPOST('format', 'alpha');
$modelcsv = GETPOST('modelcsv', 'int');
if (! empty($format)) {
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', $format, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
} else {
$error ++;
}
$modelcsv = GETPOST('ACCOUNTING_EXPORT_MODELCSV', 'int');
if (! empty($modelcsv)) {
if (! dolibarr_set_const($db, 'ACCOUNTING_EXPORT_MODELCSV', $modelcsv, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
if ($modelcsv==AccountancyExport::$EXPORT_TYPE_QUADRATUS || $modelcsv==AccountancyExport::$EXPORT_TYPE_CIEL) {
dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', 'txt', 'chaine', 0, '', $conf->entity);
}
//if ($modelcsv==AccountancyExport::$EXPORT_TYPE_QUADRATUS || $modelcsv==AccountancyExport::$EXPORT_TYPE_CIEL) {
// dolibarr_set_const($db, 'ACCOUNTING_EXPORT_FORMAT', 'txt', 'chaine', 0, '', $conf->entity);
//}
} else {
$error ++;
}
@@ -98,16 +106,22 @@ if ($action == 'update') {
}
}
foreach ( $model_option as $constname ) {
$constvalue = GETPOST($constname, 'alpha');
foreach ($listparam[$modelcsv] as $key => $value ) {
$constante = $key;
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
if (strpos($constante, 'ACCOUNTING')!==false) {
$constvalue = GETPOST($key, 'alpha');
if (! dolibarr_set_const($db, $constante, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
}
}
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
// reload
$configuration = AccountancyExport::getTypeConfig();
$listparam = $configuration[param];
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
@@ -121,19 +135,57 @@ llxHeader();
$form = new Form($db);
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
// $linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup');
$head = admin_accounting_prepare_head();
print "\n".'<script type="text/javascript" language="javascript">'."\n";
print 'jQuery(document).ready(function () {'."\n";
print ' function initfields()'."\n";
print ' {'."\n";
foreach ($listparam as $key => $param) {
print ' if (jQuery("#ACCOUNTING_EXPORT_MODELCSV").val()=="'.$key.'")'."\n";
print ' {'."\n";
print ' //console.log("'.$param[label].'");'."\n";
if (empty($param[ACCOUNTING_EXPORT_FORMAT])) {
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$conf->global->ACCOUNTING_EXPORT_FORMAT.'");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").prop("disabled", true);'."\n";
} else {
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").val("'.$param[ACCOUNTING_EXPORT_FORMAT].'");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_FORMAT").removeAttr("disabled");'."\n";
}
if (empty($param[ACCOUNTING_EXPORT_SEPARATORCSV])) {
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").prop("disabled", true);'."\n";
} else {
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").val("'.$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV.'");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_SEPARATORCSV").removeAttr("disabled");'."\n";
}
if (empty($param[ACCOUNTING_EXPORT_ENDLINE])) {
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").prop("disabled", true);'."\n";
} else {
print ' jQuery("#ACCOUNTING_EXPORT_ENDLINE").removeAttr("disabled");'."\n";
}
if (empty($param[ACCOUNTING_EXPORT_DATE])) {
print ' jQuery("#ACCOUNTING_EXPORT_DATE").val("");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_DATE").prop("disabled", true);'."\n";
} else {
print ' jQuery("#ACCOUNTING_EXPORT_DATE").val("'.$conf->global->ACCOUNTING_EXPORT_DATE.'");'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_DATE").removeAttr("disabled");'."\n";
}
print ' }'."\n";
}
print ' }'."\n";
print ' initfields();'."\n";
print ' jQuery("#ACCOUNTING_EXPORT_MODELCSV").change(function() {'."\n";
print ' initfields();'."\n";
print ' });'."\n";
print '})'."\n";
print '</script>'."\n";
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="update">';
dol_fiche_head($head, 'export', $langs->trans("Configuration"), -1, 'cron');
$var = true;
/*
* Main Options
*/
@@ -143,7 +195,6 @@ print '<tr class="liste_titre">';
print '<td colspan="3">' . $langs->trans('Options') . '</td>';
print "</tr>\n";
$var = ! $var;
$num = count($main_option);
if ($num) {
@@ -157,7 +208,7 @@ if ($num) {
// Value
print '<td>';
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$key . '">';
print '<input type="text" size="20" id="'.$key.'" name="' . $key . '" value="' . $conf->global->$key . '">';
print '</td></tr>';
}
}
@@ -175,7 +226,6 @@ print '<tr class="liste_titre">';
print '<td colspan="2">' . $langs->trans("Modelcsv") . '</td>';
print '</tr>';
$var = ! $var;
print '<tr class="oddeven">';
print '<td width="50%">' . $langs->trans("Selectmodelcsv") . '</td>';
@@ -186,7 +236,7 @@ if (! $conf->use_javascript_ajax) {
} else {
print '<td>';
$listmodelcsv = AccountancyExport::getType();
print $form->selectarray("modelcsv", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0);
print $form->selectarray("ACCOUNTING_EXPORT_MODELCSV", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0);
print '</td>';
}
@@ -206,47 +256,27 @@ if ($num2) {
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
print "</tr>\n";
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > AccountancyExport::$EXPORT_TYPE_NORMAL)
{
print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
}
print '<tr class="oddeven">';
print '<td width="50%">' . $langs->trans("Selectformat") . '</td>';
if (! $conf->use_javascript_ajax) {
print '<td class="nowrap">';
print $langs->trans("NotAvailableWhenAjaxDisabled");
print "</td>";
} else {
print '<td>';
$listformat = array (
'csv' => $langs->trans("csv"),
'txt' => $langs->trans("txt")
);
print $form->selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0);
print '</td>';
}
print "</td></tr>";
foreach ( $model_option as $key ) {
foreach ( $model_option as $key) {
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
print '<td width="50%">' . $label . '</td>';
// Param
$label = $key[label];
print '<td width="50%">' . $langs->trans($label) . '</td>';
// Value
print '<td>';
print '<input type="text" size="20" name="' . $key . '" value="' . $conf->global->$key . '">';
print '<td>';
if (is_array($key[param])) {
print $form->selectarray($label, $key[param], $conf->global->$label, 0);
} else {
print '<input type="text" size="20" id="'. $label .'" name="' . $key[label] . '" value="' . $conf->global->$label . '">';
}
print '</td></tr>';
}
print "</table>\n";
}
dol_fiche_end();
print '<div class="center"><input type="submit" class="button" value="' . dol_escape_htmltag($langs->trans('Modify')) . '" name="button"></div>';
print '</form>';

View File

@@ -47,16 +47,16 @@ if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->fiscalyear) // If we can read accounting records, we shoul be able to see fiscal year.
accessforbidden();
$error = 0;
// List of status
static $tmpstatut2label = array (
'0' => 'OpenFiscalYear',
'1' => 'CloseFiscalYear'
'1' => 'CloseFiscalYear'
);
$statut2label = array (
''
''
);
foreach ( $tmpstatut2label as $key => $val )
$statut2label[$key] = $langs->trans($val);
@@ -100,14 +100,23 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql.= $db->plimit($limit+1, $offset);
$result = $db->query($sql);
if ($result) {
$var = false;
if ($result)
{
$num = $db->num_rows($result);
$i = 0;
if (! empty($user->rights->accounting->fiscalyear))
{
$addbutton = '<a class="butAction" href="fiscalyear_card.php?action=create">' . $langs->trans("NewFiscalYear") . '</a>';
}
else
{
$addbutton = '<a class="butActionRefused" href="#">' . $langs->trans("NewFiscalYear") . '</a>';
}
$title = $langs->trans('AccountingPeriods');
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 1);
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $params, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $addbutton, '', $limit, 1);
// Load attribute_label
print '<table class="noborder" width="100%">';
@@ -132,8 +141,7 @@ if ($result) {
print '<td align="left">' . dol_print_date($db->jdate($obj->date_end), 'day') . '</td>';
print '<td align="right">' . $fiscalyearstatic->LibStatut($obj->statut, 5) . '</td>';
print '</tr>';
$var = ! $var;
$i ++;
$i++;
}
} else {
print '<tr class="oddeven"><td colspan="5" class="opacitymedium">' . $langs->trans("None") . '</td></tr>';
@@ -143,19 +151,6 @@ if ($result) {
dol_print_error($db);
}
dol_fiche_end();
// Buttons
print '<div class="tabsAction">';
if (! empty($user->rights->accounting->fiscalyear))
{
print '<a class="butAction" href="fiscalyear_card.php?action=create">' . $langs->trans("NewFiscalYear") . '</a>';
}
else
{
print '<a class="butActionRefused" href="#">' . $langs->trans("NewFiscalYear") . '</a>';
}
print '</div>';
llxFooter();
$db->close();

View File

@@ -20,6 +20,7 @@
* \ingroup Advanced accountancy
* \brief Page to show a fiscal year
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/fiscalyear.lib.php';

View File

@@ -6,6 +6,7 @@
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2017 Laurent Destailleur <eldy@destailleur.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
@@ -19,7 +20,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
@@ -27,9 +27,8 @@
* \ingroup Advanced accountancy
* \brief Setup page to configure accounting expert module
*/
require '../../main.inc.php';
// Class
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
@@ -37,10 +36,9 @@ $langs->load("compta");
$langs->load("bills");
$langs->load("admin");
$langs->load("accountancy");
$langs->load("salaries");
// Security check
if (empty($user->admin))
// Security access
if (empty($user->rights->accounting->chartofaccount))
{
accessforbidden();
}
@@ -61,44 +59,28 @@ $list = array (
* Actions
*/
$accounting_mode = defined('ACCOUNTING_MODE') ? ACCOUNTING_MODE : 'RECETTES-DEPENSES';
$accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE;
if ($action == 'update') {
$error = 0;
$accounting_modes = array (
'RECETTES-DEPENSES',
'CREANCES-DETTES'
);
if (! $error)
{
foreach ($list as $constname)
{
$constvalue = GETPOST($constname, 'alpha');
$accounting_mode = GETPOST('accounting_mode', 'alpha');
if (in_array($accounting_mode, $accounting_modes)) {
if (! dolibarr_set_const($db, 'ACCOUNTING_MODE', $accounting_mode, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
} else {
$error ++;
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error++;
}
}
if ($error) {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
if ($error) {
setEventMessages($langs->trans("Error"), null, 'errors');
}
foreach ($list as $constname)
{
$constvalue = GETPOST($constname, 'alpha');
if (! dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error ++;
}
}
if (! $error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@@ -160,20 +142,15 @@ llxHeader();
$form = new Form($db);
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php">' . $langs->trans("BackToModuleList") . '</a>';
//$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup');
$head = admin_accounting_prepare_head($accounting);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="update">';
dol_fiche_head($head, 'general', $langs->trans("Configuration"), -1, 'cron');
// Default mode for calculating turnover (parameter ACCOUNTING_MODE)
/*
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@@ -200,7 +177,7 @@ print "</table>\n";
print '<br>';
*/
// Others params
@@ -287,18 +264,11 @@ foreach ($list as $key)
print '</table>';
dol_fiche_end();
print '<div class="center"><input type="submit" class="button" value="' . $langs->trans('Modify') . '" name="button"></div>';
print '<br>';
print '<br>';
print '<div class="opacitymedium">'.$langs->trans("AccountancySetupDoneFromAccountancyMenu", $langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")).'</div>';
print '<br>';
print '</form>';

View File

@@ -30,13 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
$langs->load("admin");
$langs->load("compta");
$langs->load("accountancy");
$langs->loadLangs(array("admin","compta","accountancy"));
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';
$confirm=GETPOST('confirm','alpha');
$id=GETPOST('id','int');
$id=35;
$rowid=GETPOST('rowid','alpha');
$code=GETPOST('code','alpha');
@@ -58,7 +56,7 @@ $active = 1;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1 || $page == null) { $page = 0 ; }
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $listlimit * $page ;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -128,8 +126,8 @@ complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
$elementList = array();
// Must match ids defined into eldy.lib.php
$sourceList = array(
// Must match ids defined into eldy.lib.php
$sourceList = array(
'1' => $langs->trans('AccountingJournalType1'),
'2' => $langs->trans('AccountingJournalType2'),
'3' => $langs->trans('AccountingJournalType3'),
@@ -144,216 +142,226 @@ $elementList = array();
if (GETPOST('button_removefilter') || GETPOST('button_removefilter.x') || GETPOST('button_removefilter_x'))
{
$search_country_id = '';
$search_country_id = '';
}
// Actions add or modify an entry into a dictionary
if (GETPOST('actionadd') || GETPOST('actionmodify'))
{
$listfield=explode(',', str_replace(' ', '',$tabfield[$id]));
$listfieldinsert=explode(',',$tabfieldinsert[$id]);
$listfieldmodify=explode(',',$tabfieldinsert[$id]);
$listfieldvalue=explode(',',$tabfieldvalue[$id]);
$listfield=explode(',', str_replace(' ', '',$tabfield[$id]));
$listfieldinsert=explode(',',$tabfieldinsert[$id]);
$listfieldmodify=explode(',',$tabfieldinsert[$id]);
$listfieldvalue=explode(',',$tabfieldvalue[$id]);
// Check that all fields are filled
$ok=1;
foreach ($listfield as $f => $value)
{
// Check that all fields are filled
$ok=1;
foreach ($listfield as $f => $value)
{
if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey='Label';
if ($fieldnamekey == 'code') $fieldnamekey = 'Code';
if ($fieldnamekey == 'code') $fieldnamekey = 'Code';
if ($fieldnamekey == 'nature') $fieldnamekey = 'Nature';
}
// Other checks
if (isset($_POST["code"]))
{
if ($_POST["code"]=='0')
{
$ok=0;
setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors');
}
/*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base
}
// Other checks
if (isset($_POST["code"]))
{
if ($_POST["code"]=='0')
{
$ok=0;
setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors');
}
/*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base
{
$ok = 0;
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br>';
}*/
}
}
if (! GETPOST('label','alpha'))
{
setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors');
$ok=0;
}
// Clean some parameters
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"]=''; // If empty, we force to null
if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"]=''; // If empty, we force to null
if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"]=''; // If empty, we force to null
if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"]=''; // If empty, we force to null
// Si verif ok et action add, on ajoute la ligne
if ($ok && GETPOST('actionadd'))
{
if ($tabrowid[$id])
{
// Recupere id libre pour insertion
$newid=0;
$sql = "SELECT max(".$tabrowid[$id].") newid from ".$tabname[$id];
$result = $db->query($sql);
if ($result)
{
$obj = $db->fetch_object($result);
$newid=($obj->newid + 1);
// Si verif ok et action add, on ajoute la ligne
if ($ok && GETPOST('actionadd'))
{
if ($tabrowid[$id])
{
// Recupere id libre pour insertion
$newid=0;
$sql = "SELECT max(".$tabrowid[$id].") newid from ".$tabname[$id];
$result = $db->query($sql);
if ($result)
{
$obj = $db->fetch_object($result);
$newid=($obj->newid + 1);
} else {
dol_print_error($db);
}
}
} else {
dol_print_error($db);
}
}
// Add new entry
$sql = "INSERT INTO ".$tabname[$id]." (";
// List of fields
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert))
$sql.= $tabrowid[$id].",";
$sql.= $tabfieldinsert[$id];
$sql.=",active)";
$sql.= " VALUES(";
// Add new entry
$sql = "INSERT INTO ".$tabname[$id]." (";
// List of fields
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert))
$sql.= $tabrowid[$id].",";
$sql.= $tabfieldinsert[$id];
$sql.=",active,entity)";
$sql.= " VALUES(";
// List of values
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert))
$sql.= $newid.",";
$i=0;
foreach ($listfieldinsert as $f => $value)
{
if ($value == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
$i++;
}
$sql.=",1)";
// List of values
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldinsert))
$sql.= $newid.",";
$i=0;
foreach ($listfieldinsert as $f => $value)
{
if ($value == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
if ($_POST[$listfieldvalue[$i]] == '') $sql.="null"; // For vat, we want/accept code = ''
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
$i++;
}
$sql.=",1,".$conf->entity.")";
dol_syslog("actionadd", LOG_DEBUG);
$result = $db->query($sql);
if ($result) // Add is ok
{
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
}
else
{
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
}
else {
dol_print_error($db);
}
}
}
dol_syslog("actionadd", LOG_DEBUG);
$result = $db->query($sql);
if ($result) // Add is ok
{
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
$_POST=array('id'=>$id); // Clean $_POST array, we keep only
}
else
{
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
}
else {
dol_print_error($db);
}
}
}
// Si verif ok et action modify, on modifie la ligne
if ($ok && GETPOST('actionmodify'))
{
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
// Si verif ok et action modify, on modifie la ligne
if ($ok && GETPOST('actionmodify'))
{
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
// Modify entry
$sql = "UPDATE ".$tabname[$id]." SET ";
// Modifie valeur des champs
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldmodify))
{
$sql.= $tabrowid[$id]."=";
$sql.= "'".$db->escape($rowid)."', ";
}
$i = 0;
foreach ($listfieldmodify as $field)
{
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
$sql.= $field."=";
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
$i++;
}
$sql.= " WHERE ".$rowidcol." = '".$rowid."'";
// Modify entry
$sql = "UPDATE ".$tabname[$id]." SET ";
// Modifie valeur des champs
if ($tabrowid[$id] && ! in_array($tabrowid[$id],$listfieldmodify))
{
$sql.= $tabrowid[$id]."=";
$sql.= "'".$db->escape($rowid)."', ";
}
$i = 0;
foreach ($listfieldmodify as $field)
{
if ($field == 'price' || preg_match('/^amount/i',$field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]],'MU');
}
else if ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql.=",";
$sql.= $field."=";
if ($_POST[$listfieldvalue[$i]] == '' && ! ($listfieldvalue[$i] == 'code' && $id == 10)) $sql.="null"; // For vat, we want/accept code = ''
else $sql.="'".$db->escape($_POST[$listfieldvalue[$i]])."'";
$i++;
}
$sql.= " WHERE ".$rowidcol." = '".$rowid."'";
$sql.=" AND entity = ".$conf->entity;
dol_syslog("actionmodify", LOG_DEBUG);
//print $sql;
$resql = $db->query($sql);
if (! $resql)
{
setEventMessages($db->error(), null, 'errors');
}
}
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
dol_syslog("actionmodify", LOG_DEBUG);
//print $sql;
$resql = $db->query($sql);
if (! $resql)
{
setEventMessages($db->error(), null, 'errors');
}
}
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}
if (GETPOST('actioncancel'))
{
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
}
if ($action == 'confirm_delete' && $confirm == 'yes') // delete
{
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
$sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'";
$sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'";
$sql.=" AND entity = ".$conf->entity;
dol_syslog("delete", LOG_DEBUG);
$result = $db->query($sql);
if (! $result)
{
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
{
setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors');
}
else
{
dol_print_error($db);
}
}
dol_syslog("delete", LOG_DEBUG);
$result = $db->query($sql);
if (! $result)
{
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
{
setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors');
}
else
{
dol_print_error($db);
}
}
}
// activate
if ($action == $acts[0])
{
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'";
}
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'";
}
$sql.=" AND entity = ".$conf->entity;
$result = $db->query($sql);
if (!$result)
{
dol_print_error($db);
}
$result = $db->query($sql);
if (!$result)
{
dol_print_error($db);
}
}
// disable
if ($action == $acts[1])
{
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
if ($tabrowid[$id]) { $rowidcol=$tabrowid[$id]; }
else { $rowidcol="rowid"; }
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'";
}
if ($rowid) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'";
}
$sql.=" AND entity = ".$conf->entity;
$result = $db->query($sql);
if (!$result)
{
dol_print_error($db);
}
$result = $db->query($sql);
if (!$result)
{
dol_print_error($db);
}
}
/*
* View
*/
@@ -367,8 +375,8 @@ $titre=$langs->trans("DictionarySetup");
$linkback='';
if ($id)
{
$titre.=' - '.$langs->trans($tablib[$id]);
$titlepicto='title_accountancy';
$titre.=' - '.$langs->trans($tablib[$id]);
$titlepicto='title_accountancy';
}
print load_fiche_titre($titre,$linkback,$titlepicto);
@@ -377,7 +385,7 @@ print load_fiche_titre($titre,$linkback,$titlepicto);
// 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='.$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.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1);
}
//var_dump($elementList);
@@ -386,313 +394,293 @@ if ($action == 'delete')
*/
if ($id)
{
// Complete requete recherche valeurs avec critere de tri
$sql=$tabsql[$id];
// Complete requete recherche valeurs avec critere de tri
$sql=$tabsql[$id];
$sql.= " WHERE a.entity = ".$conf->entity;
if ($search_country_id > 0)
{
if (preg_match('/ WHERE /',$sql)) $sql.= " AND ";
else $sql.=" WHERE ";
$sql.= " c.rowid = ".$search_country_id;
}
// If sort order is "country", we use country_code instead
if ($sortfield == 'country') $sortfield='country_code';
$sql.=$db->order($sortfield,$sortorder);
$sql.=$db->plimit($listlimit+1,$offset);
if ($sortfield)
{
// If sort order is "country", we use country_code instead
if ($sortfield == 'country') $sortfield='country_code';
$sql.= " ORDER BY ".$sortfield;
if ($sortorder)
{
$sql.=" ".strtoupper($sortorder);
}
$sql.=", ";
// Clear the required sort criteria for the tabsqlsort to be able to force it with selected value
$tabsqlsort[$id]=preg_replace('/([a-z]+\.)?'.$sortfield.' '.$sortorder.',/i','',$tabsqlsort[$id]);
$tabsqlsort[$id]=preg_replace('/([a-z]+\.)?'.$sortfield.',/i','',$tabsqlsort[$id]);
}
else {
$sql.=" ORDER BY ";
}
$sql.=$tabsqlsort[$id];
$sql.=$db->plimit($listlimit+1,$offset);
//print $sql;
$fieldlist=explode(',',$tabfield[$id]);
$fieldlist=explode(',',$tabfield[$id]);
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$id.'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from','alpha')).'">';
print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
print '<table class="noborder" width="100%">';
// Form to add a new line
if ($tabname[$id])
{
$alabelisused=0;
$var=false;
// Form to add a new line
if ($tabname[$id])
{
$alabelisused=0;
$var=false;
$fieldlist=explode(',',$tabfield[$id]);
$fieldlist=explode(',',$tabfield[$id]);
// Line for title
print '<tr class="liste_titre">';
foreach ($fieldlist as $field => $value)
{
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
$align="left";
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
{
$valuetoshow=$langs->trans("Label");
}
if ($fieldlist[$field]=='nature') { $valuetoshow=$langs->trans("Nature"); }
// Line for title
print '<tr class="liste_titre">';
foreach ($fieldlist as $field => $value)
{
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$valuetoshow=ucfirst($fieldlist[$field]); // Par defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
$align="left";
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
{
$valuetoshow=$langs->trans("Label");
}
if ($fieldlist[$field]=='nature') { $valuetoshow=$langs->trans("Nature"); }
if ($valuetoshow != '')
{
print '<td align="'.$align.'">';
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
else print $valuetoshow;
print '</td>';
}
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
}
if ($valuetoshow != '')
{
print '<td align="'.$align.'">';
if (! empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i',$tabhelp[$id][$value])) print '<a href="'.$tabhelp[$id][$value].'" target="_blank">'.$valuetoshow.' '.img_help(1,$valuetoshow).'</a>';
else if (! empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow,$tabhelp[$id][$value]);
else print $valuetoshow;
print '</td>';
}
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
}
print '<td>';
print '<input type="hidden" name="id" value="'.$id.'">';
print '</td>';
print '<td style="min-width: 26px;"></td>';
print '<td style="min-width: 26px;"></td>';
print '<td style="min-width: 26px;"></td>';
print '</tr>';
print '<td>';
print '<input type="hidden" name="id" value="'.$id.'">';
print '</td>';
print '<td style="min-width: 26px;"></td>';
print '<td style="min-width: 26px;"></td>';
print '<td style="min-width: 26px;"></td>';
print '</tr>';
// Line to enter new values
print '<tr class="oddeven nodrag nodrap nohover">';
// Line to enter new values
print '<tr class="oddeven nodrag nodrap nohover">';
$obj = new stdClass();
// If data was already input, we define them in obj to populate input fields.
if (GETPOST('actionadd'))
{
foreach ($fieldlist as $key=>$val)
{
if (GETPOST($val) != '')
$obj->$val=GETPOST($val);
}
}
$obj = new stdClass();
// If data was already input, we define them in obj to populate input fields.
if (GETPOST('actionadd'))
{
foreach ($fieldlist as $key=>$val)
{
if (GETPOST($val) != '')
$obj->$val=GETPOST($val);
}
}
$tmpaction = 'create';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
$tmpaction = 'create';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
if (empty($reshook))
{
fieldListJournal($fieldlist,$obj,$tabname[$id],'add');
}
if (empty($reshook))
{
fieldList($fieldlist,$obj,$tabname[$id],'add');
}
print '<td colspan="4" align="right">';
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
print '</td>';
print "</tr>";
print '<td colspan="4" align="right">';
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
print '</td>';
print "</tr>";
print '<tr><td colspan="7">&nbsp;</td></tr>'; // Keep &nbsp; to have a line with enough height
}
print '<tr><td colspan="7">&nbsp;</td></tr>'; // Keep &nbsp; to have a line with enough height
}
// List of available record in database
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
$var=true;
// List of available record in database
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i = 0;
$var=true;
$param = '&id='.$id;
if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id;
$paramwithsearch = $param;
if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder;
if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield;
if (GETPOST('from')) $paramwithsearch.= '&from='.GETPOST('from','alpha');
$param = '&id='.$id;
if ($search_country_id > 0) $param.= '&search_country_id='.$search_country_id;
$paramwithsearch = $param;
if ($sortorder) $paramwithsearch.= '&sortorder='.$sortorder;
if ($sortfield) $paramwithsearch.= '&sortfield='.$sortfield;
if (GETPOST('from')) $paramwithsearch.= '&from='.GETPOST('from','alpha');
// There is several pages
if ($num > $listlimit)
{
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
print '</td></tr>';
}
// There is several pages
if ($num > $listlimit)
{
print '<tr class="none"><td align="right" colspan="'.(3+count($fieldlist)).'">';
print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), '<li class="pagination"><span>'.$langs->trans("Page").' '.($page+1).'</span></li>');
print '</td></tr>';
}
// Title of lines
print '<tr class="liste_titre liste_titre_add">';
foreach ($fieldlist as $field => $value)
{
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$showfield=1; // By defaut
$align="left";
$sortable=1;
$valuetoshow='';
/*
// Title line with search boxes
print '<tr class="liste_titre_filter liste_titre_add">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre" align="center">';
if ($filterfound)
{
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
}
print '</td>';
print '</tr>';
// Title of lines
print '<tr class="liste_titre">';
foreach ($fieldlist as $field => $value)
{
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
$showfield=1; // By defaut
$align="left";
$sortable=1;
$valuetoshow='';
/*
$tmparray=getLabelOfField($fieldlist[$field]);
$showfield=$tmp['showfield'];
$valuetoshow=$tmp['valuetoshow'];
$align=$tmp['align'];
$sortable=$tmp['sortable'];
*/
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Label"); }
if ($fieldlist[$field]=='nature') { $valuetoshow=$langs->trans("Nature"); }
$valuetoshow=ucfirst($fieldlist[$field]); // By defaut
$valuetoshow=$langs->trans($valuetoshow); // try to translate
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') { $valuetoshow=$langs->trans("Label"); }
if ($fieldlist[$field]=='nature') { $valuetoshow=$langs->trans("Nature"); }
// Affiche nom du champ
if ($showfield)
{
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
}
}
// Affiche nom du champ
if ($showfield)
{
print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder);
}
}
print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder);
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print '</tr>';
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print getTitleFieldOfList('');
print '</tr>';
// Title line with search boxes
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre" align="center">';
if ($filterfound)
{
$searchpicto=$form->showFilterAndCheckAddButtons(0);
print $searchpicto;
}
print '</td>';
print '</tr>';
if ($num)
{
// Lines with values
while ($i < $num)
{
$obj = $db->fetch_object($resql);
//print_r($obj);
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
{
$tmpaction='edit';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
if ($num)
{
// Lines with values
while ($i < $num)
{
$obj = $db->fetch_object($resql);
//print_r($obj);
print '<tr class="oddeven" id="rowid-'.$obj->rowid.'">';
if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code)))
{
$tmpaction='edit';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
// Show fields
if (empty($reshook)) fieldListJournal($fieldlist,$obj,$tabname[$id],'edit');
// Show fields
if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
print '<td align="center" colspan="4">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'">';
print '<div name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"></div>';
print '</td>';
}
else
{
$tmpaction = 'view';
$parameters=array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook=$hookmanager->executeHooks('viewDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
print '<td align="center" colspan="4">';
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'">';
print '<div name="'.(! empty($obj->rowid)?$obj->rowid:$obj->code).'"></div>';
print '</td>';
}
else
{
$tmpaction = 'view';
$parameters=array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
$reshook=$hookmanager->executeHooks('viewDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
$error=$hookmanager->error; $errors=$hookmanager->errors;
if (empty($reshook))
{
foreach ($fieldlist as $field => $value)
{
if (empty($reshook))
{
foreach ($fieldlist as $field => $value)
{
$showfield=1;
$align="left";
$valuetoshow=$obj->{$fieldlist[$field]};
if ($valuetoshow=='all') {
$valuetoshow=$langs->trans('All');
}
else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
$langs->load("accountancy");
$key=$langs->trans("AccountingJournalType".strtoupper($obj->nature));
$valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($obj->nature)?$key:$obj->{$fieldlist[$field]});
}
$showfield=1;
$align="left";
$valuetoshow=$obj->{$fieldlist[$field]};
if ($valuetoshow=='all') {
$valuetoshow=$langs->trans('All');
}
else if ($fieldlist[$field]=='nature' && $tabname[$id]==MAIN_DB_PREFIX.'accounting_journal') {
$langs->load("accountancy");
$key=$langs->trans("AccountingJournalType".strtoupper($obj->nature));
$valuetoshow=($obj->nature && $key != "AccountingJournalType".strtoupper($obj->nature)?$key:$obj->{$fieldlist[$field]});
}
$class='tddict';
$class='tddict';
// Show value for field
if ($showfield) print '<!-- '.$fieldlist[$field].' --><td align="'.$align.'" class="'.$class.'">'.$valuetoshow.'</td>';
}
}
}
}
// Can an entry be erased or disabled ?
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
if (isset($obj->code) && $id != 10)
{
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
}
// Can an entry be erased or disabled ?
$iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
if (isset($obj->code) && $id != 10)
{
if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
else if ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
}
$canbemodified=$iserasable;
$canbemodified=$iserasable;
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'');
if ($param) $url .= '&'.$param;
$url.='&';
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'');
if ($param) $url .= '&'.$param;
$url.='&';
// Active
print '<td align="center" class="nowrap">';
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
else
{
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
else print $langs->trans("AlwaysActive");
}
print "</td>";
// Active
print '<td align="center" class="nowrap">';
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
else
{
if (in_array($obj->code, array('AC_OTH','AC_OTH_AUTO'))) print $langs->trans("AlwaysActive");
else if (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
else if (isset($obj->type) && in_array($obj->type, array('system')) && ! empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption");
else print $langs->trans("AlwaysActive");
}
print "</td>";
// Modify link
if ($canbemodified) print '<td align="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>';
// Modify link
if ($canbemodified) print '<td align="center"><a class="reposition" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>';
// Delete link
if ($iserasable)
{
print '<td align="center">';
if ($user->admin) print '<a href="'.$url.'action=delete">'.img_delete().'</a>';
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
print '</td>';
}
else print '<td>&nbsp;</td>';
// Delete link
if ($iserasable)
{
print '<td align="center">';
if ($user->admin) print '<a href="'.$url.'action=delete">'.img_delete().'</a>';
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
print '</td>';
}
else print '<td>&nbsp;</td>';
print '<td></td>';
print '<td></td>';
print '</td>';
}
print '</td>';
}
print "</tr>\n";
$i++;
}
}
}
else {
dol_print_error($db);
}
print "</tr>\n";
$i++;
}
}
}
else {
dol_print_error($db);
}
print '</table>';
print '</table>';
print '</div>';
print '</form>';
print '</form>';
}
print '<br>';
@@ -711,7 +699,7 @@ $db->close();
* @param string $context 'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
* @return void
*/
function fieldList($fieldlist, $obj='', $tabname='', $context='')
function fieldListJournal($fieldlist, $obj='', $tabname='', $context='')
{
global $conf,$langs,$db;
global $form, $mysoc;

View File

@@ -90,8 +90,8 @@ $arrayfields=array();
* Actions
*/
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
@@ -136,17 +136,25 @@ if ($action == 'update') {
$accounting = new AccountingAccount($db);
//$msg .= '<div><span class="accountingprocessing">' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '</span></div>';
$arrayofdifferentselectedvalues = array();
$cpt = 0; $ok = 0; $ko = 0;
foreach ( $chk_prod as $productid ) {
foreach ( $chk_prod as $productid )
{
$accounting_account_id = GETPOST('codeventil_' . $productid);
$result = $accounting->fetch($accounting_account_id, null, 1);
if ($result < 0) {
$result = 0;
if ($accounting_account_id > 0)
{
$arrayofdifferentselectedvalues[$accounting_account_id]=$accounting_account_id;
$result = $accounting->fetch($accounting_account_id, null, 1);
}
if ($result <= 0) {
// setEventMessages(null, $accounting->errors, 'errors');
$msg .= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : id=' . $accounting_account_id . '<br/> <pre>' . $sql . '</pre></font></div>';
$ko++;
} else {
$db->begin();
$sql = " UPDATE " . MAIN_DB_PREFIX . "product";
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
@@ -158,23 +166,23 @@ if ($action == 'update') {
$sql .= " WHERE rowid = " . $productid;
dol_syslog("/accountancy/admin/productaccount.php sql=" . $sql, LOG_DEBUG);
if ($db->query($sql)) {
if ($db->query($sql))
{
$ok++;
//$msg .= '<div><font color="green">' . $langs->trans("Product") . ' ' . $productid . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accounting->account_number) . '</font></div>';
$db->commit();
} else {
$ko++;
//$msg .= '<div><font color="red">' . $langs->trans("ErrorDB") . ' : ' . $langs->trans("Product") . ' ' . $productid . ' ' . $langs->trans("NotVentilatedinAccount") . ' : ' . length_accountg($accounting->account_number) . '<br/> <pre>' . $sql . '</pre></font></div>';
$db->rollback();
}
}
$cpt ++;
$cpt++;
}
} else {
//$msg .= '<div><span class="accountingprocessing">' . $langs->trans("AnyLineVentilate") . '</span></div>';
}
if ($ko) setEventMessages($langs->trans("XLineFailedToBeBinded", $ko), null, 'errors');
if ($ok) setEventMessages($langs->trans("XLineSuccessfullyBinded", $ok), null, 'mesgs');
//$msg .= '<div><span class="accountingprocessing">' . $langs->trans("EndProcessing") . '</span></div>';
}
}
@@ -312,6 +320,7 @@ if ($result)
$texte=$langs->trans("ListOfProductsServices");
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
print '<div class="div-table-responsive">';
print '<table class="liste '.($moreforfilter?"listwithfilterbefore":"").'">';
print '<tr class="liste_titre_filter">';
@@ -448,6 +457,7 @@ if ($result)
$i ++;
}
print '</table>';
print '</div>';
// Example : Adding jquery code
print '<script type="text/javascript" language="javascript">

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
/* Copyright (C) 2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.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
@@ -53,11 +53,11 @@ if ($search_accountancy_code_end == - 1) {
$search_accountancy_code_end = '';
}
if (GETPOST("button_export_csv_x") || GETPOST("button_export_csv.x") || GETPOST("button_export_csv")) {
$action = 'export_csv';
}
if (GETPOST("exportcsv")) $action = 'export_csv';
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):$conf->liste_limit;
if (empty($page) || $page < 0) { $page = 0; }
$offset = $limit * $page;
@@ -67,9 +67,29 @@ $formaccounting = new FormAccounting($db);
$formother = new FormOther($db);
$form = new Form($db);
if (empty($search_date_start)) {
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
if (empty($search_date_start) && ! GETPOSTISSET('formfilteraction'))
{
$sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
$sql.= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."'";
$sql.= $db->plimit(1);
$res = $db->query($sql);
if ($res->num_rows > 0) {
$fiscalYear = $db->fetch_object($res);
$search_date_start = strtotime($fiscalYear->date_start);
$search_date_end = strtotime($fiscalYear->date_end);
} else {
$month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1);
$year_start = dol_print_date(dol_now(), '%Y');
$year_end = $year_start + 1;
$month_end = $month_start - 1;
if ($month_end < 1)
{
$month_end = 12;
$year_end--;
}
$search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start);
$search_date_end = dol_get_last_day($year_end, $month_end);
}
}
if ($sortorder == "")
$sortorder = "ASC";
@@ -106,6 +126,7 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$search_accountancy_code_end = '';
$search_date_start = '';
$search_date_end = '';
$filter = array();
}
@@ -116,9 +137,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
if ($action == 'export_csv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == AccountancyExport::$EXPORT_TYPE_CEGID) $sep = ";"; // For CEGID, we force separator.
$journal = 'bookkepping';
$journal = 'balance';
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
@@ -127,24 +147,27 @@ if ($action == 'export_csv') {
setEventMessages($object->error, $object->errors, 'errors');
}
foreach ($object->lines as $line) {
foreach ($object->lines as $line)
{
print length_accountg($line->numero_compte) . $sep;
print $line->debit . $sep;
print $line->credit . $sep;
print $line->debit . $sep;
print $line->credit - $line->debit . $sep;
print $object->get_compte_desc($line->numero_compte) . $sep;
print price($line->debit) . $sep;
print price($line->credit) . $sep;
print price($line->debit) . $sep;
print price($line->credit - $line->debit) . $sep;
print "\n";
}
}
else {
$title_page = $langs->trans("AccountBalance") . (($search_date_start || $search_date_end) ? ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end) : '');
$title_page = $langs->trans("AccountBalance");
llxHeader('', $title_page);
// List
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$nbtotalofrecords = $object->fetchAllBalance($sortorder, $sortfield, 0, 0, $filter);
if ($nbtotalofrecords < 0) {
setEventMessages($object->error, $object->errors, 'errors');
@@ -157,17 +180,24 @@ else {
}
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
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">';
print '<input type="hidden" name="action" value="list">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
$button = '<input type="submit" name="button_export_csv" class="butAction" value="' . $langs->trans("Export") . ' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
$button = '<input type="submit" name="exportcsv" class="butAction" value="' . $langs->trans("Export") . ' ('.$conf->global->ACCOUNTING_EXPORT_FORMAT.')" />';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $result, 'title_accountancy', 0, $button);
$moreforfilter = '';
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('DateStart') . ': ';
$moreforfilter .= $form->select_date($search_date_start, 'date_start', 0, 0, 1, '', 1, 0, 1);
$moreforfilter .= $form->select_date($search_date_start?$search_date_start:-1, 'date_start', 0, 0, 1, '', 1, 0, 1);
$moreforfilter .= $langs->trans('DateEnd') . ': ';
$moreforfilter .= $form->select_date($search_date_end, 'date_end', 0, 0, 1, '', 1, 0, 1);
$moreforfilter .= $form->select_date($search_date_end?$search_date_end:-1, 'date_end', 0, 0, 1, '', 1, 0, 1);
$moreforfilter .= '</div>';
if (! empty($moreforfilter)) {
@@ -201,7 +231,7 @@ else {
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Solde", $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $options, "", 'align="right"', $sortfield, $sortorder);
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
@@ -211,7 +241,8 @@ else {
$sous_total_credit = 0;
$displayed_account = "";
foreach ($object->lines as $line) {
foreach ($object->lines as $line)
{
$link = '';
$total_debit += $line->debit;
$total_credit += $line->credit;
@@ -271,4 +302,5 @@ else {
llxFooter();
}
$db->close();
$db->close();

View File

@@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
/* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@@ -33,27 +33,31 @@ require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
$langs->load("accountancy");
$langs->load("bills");
$langs->load("compta");
$action = GETPOST('action','aZ09');
$id = GETPOST('id', 'int'); // id of record
$mode = GETPOST('mode','aZ09'); // '' or 'tmp'
$piece_num = GETPOST("piece_num",'int'); // id of transaction (several lines share the same transaction id)
// Security check
$id = GETPOST('id', 'int');
if ($user->societe_id > 0) {
accessforbidden();
}
$action = GETPOST('action','aZ09');
$mode = GETPOST('mode','aZ09'); // '' or 'tmp'
$piece_num = GETPOST("piece_num");
$mesg = '';
$account_number = GETPOST('account_number');
$subledger_account = GETPOST('subledger_account');
$account_number = GETPOST('account_number','alphanohtml');
$subledger_account = GETPOST('subledger_account','alphanohtml');
if ($subledger_account == - 1) {
$subledger_account = null;
}
$label_compte = GETPOST('label_compte');
$label_operation= GETPOST('label_operation');
$debit = price2num(GETPOST('debit'));
$credit = price2num(GETPOST('credit'));
$label_compte = GETPOST('label_compte','alphanohtml');
$label_operation= GETPOST('label_operation','alphanohtml');
$debit = price2num(GETPOST('debit','alpha'));
$credit = price2num(GETPOST('credit','alpha'));
$save = GETPOST('save','alpha');
if (! empty($save)) $action = 'add';
@@ -72,16 +76,16 @@ if ($action == "confirm_update") {
$error = 0;
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) {
$error++;
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
$action='update';
$error++;
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
$action='update';
}
if (empty($account_number) || $account_number == '-1')
{
$error++;
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
$action='update';
}
if (empty($account_number) || $account_number == '-1')
{
$error++;
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
$action='update';
}
if (! $error)
{
@@ -89,7 +93,7 @@ if ($action == "confirm_update") {
$result = $book->fetch($id, null, $mode);
if ($result < 0) {
$error++;
$error++;
setEventMessages($book->error, $book->errors, 'errors');
} else {
$book->numero_compte = $account_number;
@@ -112,13 +116,13 @@ if ($action == "confirm_update") {
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$debit = 0;
$credit = 0;
$debit = 0;
$credit = 0;
$action = '';
}
@@ -132,14 +136,14 @@ else if ($action == "add") {
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0))
{
$error++;
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
$action='';
setEventMessages($langs->trans('ErrorDebitCredit'), null, 'errors');
$action='';
}
if (empty($account_number) || $account_number == '-1')
{
$error++;
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
$action='';
$error++;
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("AccountAccountingShort")), null, 'errors');
$action='';
}
if (! $error) {
@@ -151,13 +155,13 @@ else if ($action == "add") {
$book->label_operation= $label_operation;
$book->debit = $debit;
$book->credit = $credit;
$book->doc_date = GETPOST('doc_date');
$book->doc_type = GETPOST('doc_type');
$book->doc_date = GETPOST('doc_date','alpha');
$book->doc_type = GETPOST('doc_type','alpha');
$book->piece_num = $piece_num;
$book->doc_ref = GETPOST('doc_ref');
$book->code_journal = GETPOST('code_journal');
$book->fk_doc = GETPOST('fk_doc');
$book->fk_docdet = GETPOST('fk_docdet');
$book->doc_ref = GETPOST('doc_ref','alpha');
$book->code_journal = GETPOST('code_journal','alpha');
$book->fk_doc = GETPOST('fk_doc','alpha');
$book->fk_docdet = GETPOST('fk_docdet','alpha');
if (floatval($debit) != 0.0) {
$book->montant = $debit;
@@ -175,7 +179,7 @@ else if ($action == "add") {
} else {
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$debit = 0;
@@ -208,10 +212,10 @@ else if ($action == "confirm_create") {
$book = new BookKeeping($db);
if (! GETPOST('code_journal') || GETPOST('code_journal') == '-1') {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Journal")), null, 'errors');
$action='create';
$error++;
if (! GETPOST('code_journal','alpha') || GETPOST('code_journal','alpha') == '-1') {
setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Journal")), null, 'errors');
$action='create';
$error++;
}
if (! GETPOST('next_num_mvt'))
{
@@ -224,11 +228,11 @@ else if ($action == "confirm_create") {
$book->label_compte = '';
$book->debit = 0;
$book->credit = 0;
$book->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth'), GETPOST('doc_dateday'), GETPOST('doc_dateyear'));
$book->doc_type = GETPOST('doc_type');
$book->piece_num = GETPOST('next_num_mvt');
$book->doc_ref = GETPOST('doc_ref');
$book->code_journal = GETPOST('code_journal');
$book->doc_date = $date_start = dol_mktime(0, 0, 0, GETPOST('doc_datemonth','int'), GETPOST('doc_dateday','int'), GETPOST('doc_dateyear','int'));
$book->doc_type = GETPOST('doc_type','alpha');
$book->piece_num = GETPOST('next_num_mvt','alpha');
$book->doc_ref = GETPOST('doc_ref','alpha');
$book->code_journal = GETPOST('code_journal','alpha');
$book->fk_doc = 0;
$book->fk_docdet = 0;
$book->montant = 0;
@@ -237,10 +241,10 @@ else if ($action == "confirm_create") {
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
} else {
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$action = 'update';
$id=$book->id;
$piece_num = $book->piece_num;
@@ -254,37 +258,37 @@ if ($action == 'setdate') {
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$action = '';
}
}
if ($action == 'setjournal') {
$journaldoc = trim(GETPOST('code_journal'));
$result = $object->updateByMvt($piece_num,'code_journal',$journaldoc,$mode);
$journaldoc = trim(GETPOST('code_journal','alpha'));
$result = $object->updateByMvt($piece_num, 'code_journal', $journaldoc, $mode);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$action = '';
}
}
if ($action == 'setdocref') {
$refdoc = trim(GETPOST('doc_ref'));
$refdoc = trim(GETPOST('doc_ref','alpha'));
$result = $object->updateByMvt($piece_num,'doc_ref',$refdoc,$mode);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
} else {
if ($mode != '_tmp')
{
setEventMessages($langs->trans('Saved'), null, 'mesgs');
setEventMessages($langs->trans('Saved'), null, 'mesgs');
}
$action = '';
}
@@ -318,7 +322,8 @@ if ($action == 'delete') {
print $formconfirm;
}
if ($action == 'create') {
if ($action == 'create')
{
print load_fiche_titre($langs->trans("CreateMvts"));
$book = new BookKeeping($db);
@@ -337,13 +342,14 @@ if ($action == 'create') {
dol_fiche_head();
print '<table class="border" width="100%">';
print '<tr>';
/*print '<tr>';
print '<td class="titlefieldcreate fieldrequired">' . $langs->trans("NumPiece") . '</td>';
print '<td>' . $next_num_mvt . '</td>';
print '</tr>';
print '</tr>';*/
print '<tr>';
print '<td class="fieldrequired">' . $langs->trans("Docdate") . '</td>';
print '<td class="titlefieldcreate fieldrequired">' . $langs->trans("Docdate") . '</td>';
print '<td>';
print $html->select_date('', 'doc_date', '', '', '', "create_mvt", 1, 1);
print '</td>';
@@ -359,17 +365,21 @@ if ($action == 'create') {
print '<td><input type="text" class="minwidth200" name="doc_ref" value=""/></td>';
print '</tr>';
/*
print '<tr>';
print '<td>' . $langs->trans("Doctype") . '</td>';
print '<td><input type="text" class="minwidth200 name="doc_type" value=""/></td>';
print '</tr>';
*/
print '</table>';
dol_fiche_end();
print '<div align="center"><input type="submit" class="button" value="' . $langs->trans("Create") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="' . $langs->trans("Cancel") . '" class="button" onclick="history.go(-1)" />';
print '<div class="center">';
print '<input type="submit" class="button" value="' . $langs->trans("Create") . '">';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="button" value="' . $langs->trans("Cancel") . '" class="button" onclick="history.go(-1)" />';
print '</div>';
print '</form>';
@@ -380,9 +390,9 @@ if ($action == 'create') {
setEventMessages($book->error, $book->errors, 'errors');
}
if (! empty($book->piece_num)) {
$backlink = '<a href="list.php">' . $langs->trans('BackToList') . '</a>';
if (! empty($book->piece_num))
{
$backlink = '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?restore_lastsearch_values=1">' . $langs->trans('BackToList') . '</a>';
print load_fiche_titre($langs->trans("UpdateMvts"), $backlink);
@@ -395,23 +405,21 @@ if ($action == 'create') {
dol_fiche_head($head, 'transaction', '', -1);
//dol_banner_tab($book, '', $backlink);
print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">';
// account movement
// Account movement
print '<tr>';
print '<td class="titlefield">' . $langs->trans("NumMvts") . '</td>';
print '<td>' . $book->piece_num . '</td>';
print '</tr>';
// date
// Date
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Docdate');
@@ -429,11 +437,12 @@ if ($action == 'create') {
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
print $book->doc_date ? dol_print_date($book->doc_date, 'daytext') : '&nbsp;';
print $book->doc_date ? dol_print_date($book->doc_date, 'day') : '&nbsp;';
}
print '</td>';
print '</tr>';
//journal
// Journal
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Codejournal');
@@ -455,7 +464,8 @@ if ($action == 'create') {
}
print '</td>';
print '</tr>';
//docref
// Ref document
print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Docref');
@@ -469,11 +479,11 @@ if ($action == 'create') {
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="setdocref">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<input type="text" size="20" name="doc_ref" value="'.$book->doc_ref.'">';
print '<input type="text" size="20" name="doc_ref" value="'.dol_escape_htmltag($book->doc_ref).'">';
print '<input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
print '</form>';
} else {
print $book->doc_ref ;
print $book->doc_ref ;
}
print '</td>';
print '</tr>';
@@ -488,9 +498,20 @@ if ($action == 'create') {
print '<table class="border tableforfield" width="100%">';
// Doc type
if(! empty($book->doc_type))
{
print '<tr>';
print '<td class="titlefield">' . $langs->trans("Doctype") . '</td>';
print '<td>' . $book->doc_type . '</td>';
print '</tr>';
}
// Date document creation
print '<tr>';
print '<td>' . $langs->trans("Doctype") . '</td>';
print '<td>' . $book->doc_type . '</td>';
print '<td class="titlefield">' . $langs->trans("DateCreation") . '</td>';
print '<td>';
print $book->date_creation ? dol_print_date($book->date_creation, 'day') : '&nbsp;';
print '</td>';
print '</tr>';
// Validate
@@ -542,7 +563,6 @@ if ($action == 'create') {
print '<br>';
$result = $book->fetchAllPerMvt($piece_num, $mode);
if ($result < 0) {
setEventMessages($book->error, $book->errors, 'errors');
@@ -569,15 +589,15 @@ if ($action == 'create') {
print_liste_field_titre("AccountAccountingShort");
print_liste_field_titre("SubledgerAccount");
print_liste_field_titre("Labelcompte");
print_liste_field_titre("Label");
print_liste_field_titre("LabelAccount");
print_liste_field_titre("LabelOperation");
print_liste_field_titre("Debit", "", "", "", "", 'align="right"');
print_liste_field_titre("Credit", "", "", "", "", 'align="right"');
print_liste_field_titre("Action", "", "", "", "", 'width="60" align="center"');
print "</tr>\n";
foreach ( $book->linesmvt as $line ) {
foreach ($book->linesmvt as $line) {
print '<tr class="oddeven">';
$total_debit += $line->debit;
$total_credit += $line->credit;
@@ -587,19 +607,19 @@ if ($action == 'create') {
print $formaccounting->select_account($line->numero_compte, 'account_number', 1, array (), 1, 1, '');
print '</td>';
print '<td>';
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount($line->subledger_account, 'subledger_account', 1);
}
else
{
print '<input type="text" name="subledger_account" value="'.$line->subledger_account.'">';
}
// TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount($line->subledger_account, 'subledger_account', 1);
}
else
{
print '<input type="text" name="subledger_account" value="'.$line->subledger_account.'">';
}
print '</td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td><input type="text" size="15" name="label_operation" value="' . $line->label_operation. '"/></td>';
print '<td><input type="text" class="minwidth100" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td><input type="text" class="minwidth300" name="label_operation" value="' . $line->label_operation. '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . price($line->debit) . '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . price($line->credit) . '"/></td>';
print '<td>';
@@ -619,8 +639,8 @@ if ($action == 'create') {
print img_edit();
print '</a> &nbsp;';
$actiontodelete='detele';
if ($mode == '_tmp') $actiontodelete='confirm_delete';
$actiontodelete='delete';
if ($mode == '_tmp' || $action != 'delmouv') $actiontodelete='confirm_delete';
print '<a href="' . $_SERVER["PHP_SELF"] . '?action='.$actiontodelete.'&id=' . $line->id . '&piece_num=' . $line->piece_num . '&mode='.$mode.'">';
print img_delete();
@@ -631,7 +651,10 @@ if ($action == 'create') {
print "</tr>\n";
}
if (price2num($total_debit) != price2num($total_credit))
$total_debit = price2num($total_debit);
$total_credit = price2num($total_credit);
if ($total_debit != $total_credit)
{
setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_credit, $total_debit)), 'warnings');
}
@@ -644,17 +667,17 @@ if ($action == 'create') {
print '<td>';
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1);
}
else
{
print '<input type="text" name="subledger_account" value="">';
}
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1);
}
else
{
print '<input type="text" name="subledger_account" value="">';
}
print '</td>';
print '<td><input type="text" size="15" name="label_compte" value="' . $line->label_compte . '"/></td>';
print '<td><input type="text" size="15" name="label_operation" value="' . $line->label_operation. '"/></td>';
print '<td><input type="text" class="minwidth100" name="label_compte" value=""/></td>';
print '<td><input type="text" class="minwidth300" name="label_operation" value=""/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="debit" value="' . ($debit ? price($debit) : '') . '"/></td>';
print '<td align="right"><input type="text" size="6" class="right" name="credit" value="' . ($credit ? price($credit) : '') . '"/></td>';
print '<td><input type="submit" class="button" name="save" value="' . $langs->trans("Add") . '"></td>';
@@ -665,15 +688,15 @@ if ($action == 'create') {
if ($mode=='_tmp' && $action=='')
{
print '<br>';
print '<br>';
print '<div class="center">';
if ($total_debit == $total_credit)
{
print '<a class="button" href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '&action=valid">'.$langs->trans("ValidTransaction").'</a>';
print '<a class="button" href="' . $_SERVER["PHP_SELF"] . '?piece_num=' . $book->piece_num . '&action=valid">'.$langs->trans("ValidTransaction").'</a>';
}
else
{
print '<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans("MvtNotCorrectlyBalanced", $credit, $debit)).'" value="'.dol_escape_htmltag($langs->trans("ValidTransaction")).'">';
print '<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans("MvtNotCorrectlyBalanced", $credit, $debit)).'" value="'.dol_escape_htmltag($langs->trans("ValidTransaction")).'">';
}
print ' &nbsp; ';

View File

@@ -1,8 +1,8 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@@ -30,21 +30,23 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
// Langs
$langs->load("accountancy");
$page = GETPOST("page");
$sortorder = GETPOST("sortorder");
$sortfield = GETPOST("sortfield");
$action = GETPOST('action', 'alpha');
$search_mvt_num = GETPOST('search_mvt_num', 'int');
$search_doc_type = GETPOST("search_doc_type");
$search_doc_ref = GETPOST("search_doc_ref");
$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
$search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmonth', 'int'), GETPOST('date_creation_startday', 'int'), GETPOST('date_creation_startyear', 'int'));
$search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
$search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int'));
$search_date_modification_end = dol_mktime(0, 0, 0, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
//var_dump($search_date_start);exit;
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
$action = 'delbookkeepingyear';
}
@@ -53,7 +55,6 @@ if (GETPOST("button_export_file_x") || GETPOST("button_export_file.x") || GETPOS
}
$search_accountancy_code = GETPOST("search_accountancy_code");
$search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha');
if ($search_accountancy_code_start == - 1) {
$search_accountancy_code_start = '';
@@ -64,7 +65,6 @@ if ($search_accountancy_code_end == - 1) {
}
$search_accountancy_aux_code = GETPOST("search_accountancy_aux_code");
$search_accountancy_aux_code_start = GETPOST('search_accountancy_aux_code_start', 'alpha');
if ($search_accountancy_aux_code_start == - 1) {
$search_accountancy_aux_code_start = '';
@@ -75,6 +75,8 @@ if ($search_accountancy_aux_code_end == - 1) {
}
$search_mvt_label = GETPOST('search_mvt_label', 'alpha');
$search_direction = GETPOST('search_direction', 'alpha');
$search_debit = GETPOST('search_debit', 'alpha');
$search_credit = GETPOST('search_credit', 'alpha');
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
// Load variable for pagination
@@ -82,12 +84,12 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page','int');
if ($page < 0) { $page = 0; }
if (empty($page) || $page < 0) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($sortorder == "") $sortorder = "ASC";
if ($sortfield == "") $sortfield = "t.rowid";
if ($sortfield == "") $sortfield = "t.piece_num,t.rowid";
$object = new BookKeeping($db);
@@ -96,20 +98,59 @@ $formaccounting = new FormAccounting($db);
$formother = new FormOther($db);
$form = new Form($db);
if (! in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && GETPOST('page','int') == '' && ! GETPOST('noreset','int'))
{
if (empty($search_date_start) && empty($search_date_end) && ! GETPOSTISSET('restore_lastsearch_values'))
{
$query = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
$query.= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."' limit 1";
$res = $db->query($query);
if ($action != 'export_file' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && empty($page)) {
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
if ($res->num_rows > 0) {
$fiscalYear = $db->fetch_object($res);
$search_date_start = strtotime($fiscalYear->date_start);
$search_date_end = strtotime($fiscalYear->date_end);
} else {
$month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1);
$year_start = dol_print_date(dol_now(), '%Y');
if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year
$year_end = $year_start + 1;
$month_end = $month_start - 1;
if ($month_end < 1)
{
$month_end = 12;
$year_end--;
}
$search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start);
$search_date_end = dol_get_last_day($year_end, $month_end);
}
}
}
$arrayfields=array(
't.piece_num'=>array('label'=>$langs->trans("TransactionNumShort"), 'checked'=>1),
't.doc_date'=>array('label'=>$langs->trans("Docdate"), 'checked'=>1),
't.doc_ref'=>array('label'=>$langs->trans("Piece"), 'checked'=>1),
't.numero_compte'=>array('label'=>$langs->trans("AccountAccountingShort"), 'checked'=>1),
't.subledger_account'=>array('label'=>$langs->trans("SubledgerAccount"), 'checked'=>1),
't.label_operation'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
't.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1),
't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1),
't.code_journal'=>array('label'=>$langs->trans("Codejournal"), 'checked'=>1),
't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0),
't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0),
);
/*
* Action
* Actions
*/
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
{
@@ -128,73 +169,107 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$search_ledger_code = '';
$search_date_start = '';
$search_date_end = '';
$search_date_creation_start = '';
$search_date_creation_end = '';
$search_date_modification_start = '';
$search_date_modification_end = '';
$search_debit = '';
$search_credit = '';
}
// Must be after the remove filter action, before the export.
$param = '';
$filter = array ();
if (! empty($search_date_start)) {
$filter['t.doc_date>='] = $search_date_start;
$tmp=dol_getdate($search_date_start);
$param .= '&date_startmonth=' . $tmp['mon'] . '&date_startday=' . $tmp['mday'] . '&date_startyear=' . $tmp['year'];
$filter['t.doc_date>='] = $search_date_start;
$tmp=dol_getdate($search_date_start);
$param .= '&search_date_startmonth=' . $tmp['mon'] . '&search_date_startday=' . $tmp['mday'] . '&search_date_startyear=' . $tmp['year'];
}
if (! empty($search_date_end)) {
$filter['t.doc_date<='] = $search_date_end;
$tmp=dol_getdate($search_date_end);
$param .= '&date_endmonth=' . $tmp['mon'] . '&date_endday=' . $tmp['mday'] . '&date_endyear=' . $tmp['year'];
$filter['t.doc_date<='] = $search_date_end;
$tmp=dol_getdate($search_date_end);
$param .= '&search_date_endmonth=' . $tmp['mon'] . '&search_date_endday=' . $tmp['mday'] . '&search_date_endyear=' . $tmp['year'];
}
if (! empty($search_doc_date)) {
$filter['t.doc_date'] = $search_doc_date;
$tmp=dol_getdate($search_doc_date);
$param .= '&doc_datemonth=' . $tmp['mon'] . '&doc_dateday=' . $tmp['mday'] . '&doc_dateyear=' . $tmp['year'];
$filter['t.doc_date'] = $search_doc_date;
$tmp=dol_getdate($search_doc_date);
$param .= '&doc_datemonth=' . $tmp['mon'] . '&doc_dateday=' . $tmp['mday'] . '&doc_dateyear=' . $tmp['year'];
}
if (! empty($search_doc_type)) {
$filter['t.doc_type'] = $search_doc_type;
$param .= '&search_doc_type=' . $search_doc_type;
$filter['t.doc_type'] = $search_doc_type;
$param .= '&search_doc_type=' . urlencode($search_doc_type);
}
if (! empty($search_doc_ref)) {
$filter['t.doc_ref'] = $search_doc_ref;
$param .= '&search_doc_ref=' . $search_doc_ref;
$filter['t.doc_ref'] = $search_doc_ref;
$param .= '&search_doc_ref=' . urlencode($search_doc_ref);
}
if (! empty($search_accountancy_code)) {
$filter['t.numero_compte'] = $search_accountancy_code;
$param .= '&search_accountancy_code=' . $search_accountancy_code;
$filter['t.numero_compte'] = $search_accountancy_code;
$param .= '&search_accountancy_code=' . urlencode($search_accountancy_code);
}
if (! empty($search_accountancy_code_start)) {
$filter['t.numero_compte>='] = $search_accountancy_code_start;
$param .= '&search_accountancy_code_start=' . $search_accountancy_code_start;
$filter['t.numero_compte>='] = $search_accountancy_code_start;
$param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start);
}
if (! empty($search_accountancy_code_end)) {
$filter['t.numero_compte<='] = $search_accountancy_code_end;
$param .= '&search_accountancy_code_end=' . $search_accountancy_code_end;
$filter['t.numero_compte<='] = $search_accountancy_code_end;
$param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end);
}
if (! empty($search_accountancy_aux_code)) {
$filter['t.subledger_account'] = $search_accountancy_aux_code;
$param .= '&search_accountancy_aux_code=' . $search_accountancy_aux_code;
$filter['t.subledger_account'] = $search_accountancy_aux_code;
$param .= '&search_accountancy_aux_code=' . urlencode($search_accountancy_aux_code);
}
if (! empty($search_accountancy_aux_code_start)) {
$filter['t.subledger_account>='] = $search_accountancy_aux_code_start;
$param .= '&search_accountancy_aux_code_start=' . $search_accountancy_aux_code_start;
$filter['t.subledger_account>='] = $search_accountancy_aux_code_start;
$param .= '&search_accountancy_aux_code_start=' . urlencode($search_accountancy_aux_code_start);
}
if (! empty($search_accountancy_aux_code_end)) {
$filter['t.subledger_account<='] = $search_accountancy_aux_code_end;
$param .= '&search_accountancy_aux_code_end=' . $search_accountancy_aux_code_end;
$filter['t.subledger_account<='] = $search_accountancy_aux_code_end;
$param .= '&search_accountancy_aux_code_end=' . urlencode($search_accountancy_aux_code_end);
}
if (! empty($search_mvt_label)) {
$filter['t.label_operation'] = $search_mvt_label;
$param .= '&search_mvt_label=' . $search_mvt_label;
$filter['t.label_operation'] = $search_mvt_label;
$param .= '&search_mvt_label=' . urlencode($search_mvt_label);
}
if (! empty($search_direction)) {
$filter['t.sens'] = $search_direction;
$param .= '&search_direction=' . $search_direction;
$filter['t.sens'] = $search_direction;
$param .= '&search_direction=' . urlencode($search_direction);
}
if (! empty($search_ledger_code)) {
$filter['t.code_journal'] = $search_ledger_code;
$param .= '&search_ledger_code=' . $search_ledger_code;
$filter['t.code_journal'] = $search_ledger_code;
$param .= '&search_ledger_code=' . urlencode($search_ledger_code);
}
if (! empty($search_mvt_num)) {
$filter['t.piece_num'] = $search_mvt_num;
$param .= '&search_mvt_num=' . $search_mvt_num;
$filter['t.piece_num'] = $search_mvt_num;
$param .= '&search_mvt_num=' . urlencode($search_mvt_num);
}
if (! empty($search_date_creation_start)) {
$filter['t.date_creation>='] = $search_date_creation_start;
$tmp=dol_getdate($search_date_creation_start);
$param .= '&date_creation_startmonth=' . $tmp['mon'] . '&date_creation_startday=' . $tmp['mday'] . '&date_creation_startyear=' . $tmp['year'];
}
if (! empty($search_date_creation_end)) {
$filter['t.date_creation<='] = $search_date_creation_end;
$tmp=dol_getdate($search_date_creation_end);
$param .= '&date_creation_endmonth=' . $tmp['mon'] . '&date_creation_endday=' . $tmp['mday'] . '&date_creation_endyear=' . $tmp['year'];
}
if (! empty($search_date_modification_start)) {
$filter['t.tms>='] = $search_date_modification_start;
$tmp=dol_getdate($search_date_modification_start);
$param .= '&date_modification_startmonth=' . $tmp['mon'] . '&date_modification_startday=' . $tmp['mday'] . '&date_modification_startyear=' . $tmp['year'];
}
if (! empty($search_date_modification_end)) {
$filter['t.tms<='] = $search_date_modification_end;
$tmp=dol_getdate($search_date_modification_end);
$param .= '&date_modification_endmonth=' . $tmp['mon'] . '&date_modification_endday=' . $tmp['mday'] . '&date_modification_endyear=' . $tmp['year'];
}
if (! empty($search_debit)) {
$filter['t.debit'] = $search_debit;
$param .= '&search_debit=' . urlencode($search_debit);
}
if (! empty($search_credit)) {
$filter['t.credit'] = $search_credit;
$param .= '&search_credit=' . urlencode($search_credit);
}
if ($action == 'delbookkeeping') {
@@ -229,16 +304,16 @@ if ($action == 'delbookkeepingyearconfirm') {
}
else
{
setEventMessages("RecordDeleted", null, 'mesgs');
setEventMessages("RecordDeleted", null, 'mesgs');
}
Header("Location: list.php");
exit;
}
else
{
setEventMessages("NoRecordDeleted", null, 'warnings');
Header("Location: list.php");
exit;
setEventMessages("NoRecordDeleted", null, 'warnings');
Header("Location: list.php");
exit;
}
}
if ($action == 'delmouvconfirm') {
@@ -248,13 +323,14 @@ if ($action == 'delmouvconfirm') {
if (! empty($mvt_num)) {
$result = $object->deleteMvtNum($mvt_num);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
setEventMessages($object->error, $object->errors, 'errors');
}
else
{
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs');
}
Header("Location: list.php");
Header("Location: list.php?noreset=1".($param?'&'.$param:''));
exit;
}
}
@@ -262,21 +338,21 @@ if ($action == 'delmouvconfirm') {
// Export into a file with format defined into setup
if ($action == 'export_file') {
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter);
if ($result < 0)
{
setEventMessages($object->error, $object->errors, 'errors');
}
else
{
$accountancyexport = new AccountancyExport($db);
$accountancyexport->export($object->lines);
if (!empty($accountancyexport->errors)) {
setEventMessages('', $accountancyexport->errors, 'errors');
}
exit;
}
if ($result < 0)
{
setEventMessages($object->error, $object->errors, 'errors');
}
else
{
$accountancyexport = new AccountancyExport($db);
$accountancyexport->export($object->lines);
if (!empty($accountancyexport->errors)) {
setEventMessages('', $accountancyexport->errors, 'errors');
}
exit;
}
}
@@ -306,7 +382,7 @@ if ($result < 0) {
$num=count($object->lines);
if ($action == 'delmouv') {
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvtPartial'), 'delmouvconfirm', '', 0, 1);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?mvt_num='.GETPOST('mvt_num').$param, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvtPartial'), 'delmouvconfirm', '', 0, 1);
print $formconfirm;
}
if ($action == 'delbookkeepingyear') {
@@ -330,7 +406,7 @@ if ($action == 'delbookkeepingyear') {
);
$form_question['deljournal'] = array (
'name' => 'deljournal',
'type' => 'other', // We don't use select here, the journal_array is already a select html component
'type' => 'other', // We don't use select here, the journal_array is already a select html component
'label' => $langs->trans('DelJournal'),
'value' => $journal_array,
'default' => $deljournal
@@ -340,7 +416,7 @@ if ($action == 'delbookkeepingyear') {
print $formconfirm;
}
//$param=''; param started before
//$param=''; param started before
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
@@ -357,150 +433,315 @@ $listofformat=AccountancyExport::getType();
$button = '<a class="butAction" name="button_export_file" href="'.$_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:'').'">';
if (count($filter)) $button.= $langs->trans("ExportFilteredList");
else $button.= $langs->trans("ExportList");
$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')';
//$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')';
$button.= '</a>';
$groupby = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php"">' . $langs->trans("GroupByAccountAccounting") . '</a>';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby, '', $limit);
$groupby = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param.'">' . $langs->trans("GroupByAccountAccounting") . '</a>';
$addbutton = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a>';
print '<div class="tabsAction tabsActionNoBottom">' . "\n";
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
print '<div class="inline-block divButAction"><a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a></div>';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby.$addbutton, '', $limit);
print '</div>';
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
print '<table class="noborder" width="100%">';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste" width="100%">';
// Filters lines
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" name="search_mvt_num" size="6" value="' . dol_escape_htmltag($search_mvt_num) . '"></td>';
print '<td class="liste_titre center">';
print '<div class="nowrap">';
print $langs->trans('From') . ' ';
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to') . ' ';
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
print '</div>';
print '</td>';
print '<td class="liste_titre"><input type="text" name="search_doc_ref" size="8" value="' . dol_escape_htmltag($search_doc_ref) . '"></td>';
print '<td class="liste_titre">';
print '<div class="nowrap">';
print $langs->trans('From').' ';
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, 'maxwidth200');
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to').' ';
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, 'maxwidth200');
print '</div>';
print '</td>';
print '<td class="liste_titre">';
print '<div class="nowrap">';
print $langs->trans('From').' ';
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
// Movement number
if (! empty($arrayfields['t.piece_num']['checked']))
{
print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
print '<td class="liste_titre"><input type="text" name="search_mvt_num" size="6" value="' . dol_escape_htmltag($search_mvt_num) . '"></td>';
}
else
// Date document
if (! empty($arrayfields['t.doc_date']['checked']))
{
print '<input type="text" name="search_accountancy_aux_code_start" value="'.$search_accountancy_aux_code_start.'">';
print '<td class="liste_titre center">';
print '<div class="nowrap">';
print $langs->trans('From') . ' ';
print $form->select_date($search_date_start?$search_date_start:-1, 'search_date_start', 0, 0, 1);
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to') . ' ';
print $form->select_date($search_date_end?$search_date_end:-1, 'search_date_end', 0, 0, 1);
print '</div>';
print '</td>';
}
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to').' ';
// TODO For the moment we keep a fre input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
// Ref document
if (! empty($arrayfields['t.doc_ref']['checked']))
{
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
print '<td class="liste_titre"><input type="text" name="search_doc_ref" size="8" value="' . dol_escape_htmltag($search_doc_ref) . '"></td>';
}
else
// Accountancy account
if (! empty($arrayfields['t.numero_compte']['checked']))
{
print '<input type="text" name="search_accountancy_aux_code_end" value="'.$search_accountancy_aux_code_end.'">';
print '<td class="liste_titre">';
print '<div class="nowrap">';
print $langs->trans('From').' ';
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, 'maxwidth200');
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to').' ';
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, 'maxwidth200');
print '</div>';
print '</td>';
}
print '</div>';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/>';
print '</td>';
print '<td class="liste_titre center">&nbsp;</td>';
print '<td class="liste_titre center">&nbsp;</td>';
print '<td class="liste_titre center"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
// Subledger account
if (! empty($arrayfields['t.subledger_account']['checked']))
{
print '<td class="liste_titre">';
print '<div class="nowrap">';
print $langs->trans('From').' ';
// TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
}
else
{
print '<input type="text" name="search_accountancy_aux_code_start" value="'.$search_accountancy_aux_code_start.'">';
}
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to').' ';
// TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not
// use setup of keypress to select thirdparty and this hang browser on large database.
if (! empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
}
else
{
print '<input type="text" name="search_accountancy_aux_code_end" value="'.$search_accountancy_aux_code_end.'">';
}
print '</div>';
print '</td>';
}
// Label operation
if (! empty($arrayfields['t.label_operation']['checked']))
{
print '<td class="liste_titre">';
print '<input type="text" size="7" class="flat" name="search_mvt_label" value="' . $search_mvt_label . '"/>';
print '</td>';
}
// Debit
if (! empty($arrayfields['t.debit']['checked']))
{
print '<td class="liste_titre" align="right">';
print '<input type="text" class="flat" name="search_debit" size="4" value="'.dol_escape_htmltag($search_debit).'">';
print '</td>';
}
// Credit
if (! empty($arrayfields['t.credit']['checked']))
{
print '<td class="liste_titre" align="right">';
print '<input type="text" class="flat" name="search_credit" size="4" value="'.dol_escape_htmltag($search_credit).'">';
print '</td>';
}
// Code journal
if (! empty($arrayfields['t.code_journal']['checked']))
{
print '<td class="liste_titre center"><input type="text" name="search_ledger_code" size="3" value="' . $search_ledger_code . '"></td>';
}
// Date creation
if (! empty($arrayfields['t.date_creation']['checked']))
{
print '<td class="liste_titre center">';
print '<div class="nowrap">';
print $langs->trans('From') . ' ';
print $form->select_date($search_date_creation_start, 'date_creation_start', 0, 0, 1);
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to') . ' ';
print $form->select_date($search_date_creation_end, 'date_creation_end', 0, 0, 1);
print '</div>';
print '</td>';
}
// Date modification
if (! empty($arrayfields['t.tms']['checked']))
{
print '<td class="liste_titre center">';
print '<div class="nowrap">';
print $langs->trans('From') . ' ';
print $form->select_date($search_date_modification_start, 'date_modification_start', 0, 0, 1);
print '</div>';
print '<div class="nowrap">';
print $langs->trans('to') . ' ';
print $form->select_date($search_date_modification_end, 'date_modification_end', 0, 0, 1);
print '</div>';
print '</td>';
}
// Action column
print '<td class="liste_titre center">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
print "</tr>\n";
print '<tr class="liste_titre">';
print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Docref", $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("SubledgerAccount", $_SERVER['PHP_SELF'], "t.subledger_account", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
$checkpicto='';
if ($massactionbutton) $checkpicto=$form->showCheckAddButtons('checkforselect', 1);
print_liste_field_titre($checkpicto, $_SERVER["PHP_SELF"], "", $param, "", 'width="60" align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['t.piece_num']['checked'])) print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['t.doc_date']['checked'])) print_liste_field_titre($arrayfields['t.doc_date']['label'], $_SERVER['PHP_SELF'], "t.doc_date", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['t.doc_ref']['checked'])) print_liste_field_titre($arrayfields['t.doc_ref']['label'], $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['t.numero_compte']['checked'])) print_liste_field_titre($arrayfields['t.numero_compte']['label'], $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['t.subledger_account']['checked'])) print_liste_field_titre($arrayfields['t.subledger_account']['label'], $_SERVER['PHP_SELF'], "t.subledger_account", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['t.label_operation']['checked'])) print_liste_field_titre($arrayfields['t.label_operation']['label'], $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
if (! empty($arrayfields['t.debit']['checked'])) print_liste_field_titre($arrayfields['t.debit']['label'], $_SERVER['PHP_SELF'], "t.debit", "", $param, 'align="right"', $sortfield, $sortorder);
if (! empty($arrayfields['t.credit']['checked'])) print_liste_field_titre($arrayfields['t.credit']['label'], $_SERVER['PHP_SELF'], "t.credit", "", $param, 'align="right"', $sortfield, $sortorder);
if (! empty($arrayfields['t.code_journal']['checked'])) print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['t.date_creation']['checked'])) print_liste_field_titre($arrayfields['t.date_creation']['label'], $_SERVER['PHP_SELF'], "t.date_creation", "", $param, 'align="center"', $sortfield, $sortorder);
if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER['PHP_SELF'], "t.tms", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="center"',$sortfield,$sortorder,'maxwidthsearch ');
print "</tr>\n";
$total_debit = 0;
$total_credit = 0;
$i=0;
while ($i < min($num, $limit))
if ($num > 0)
{
$line = $object->lines[$i];
$i=0;
$totalarray=array();
while ($i < min($num, $limit))
{
$line = $object->lines[$i];
$total_debit += $line->debit;
$total_credit += $line->credit;
$total_debit += $line->debit;
$total_credit += $line->credit;
print '<tr class="oddeven">';
print '<tr class="oddeven">';
print '<td><a href="./card.php?piece_num=' . $line->piece_num . '">' . $line->piece_num . '</a></td>';
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
print '<td class="nowrap">' . $line->doc_ref . '</td>';
print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . length_accounta($line->subledger_account) . '</td>';
print '<td>' . $line->label_operation . '</td>';
print '<td align="right">' . ($line->debit ? price($line->debit) : ''). '</td>';
print '<td align="right">' . ($line->credit ? price($line->credit) : '') . '</td>';
// Piece number
if (! empty($arrayfields['t.piece_num']['checked']))
{
print '<td>';
$object->id = $line->id;
$object->piece_num = $line->piece_num;
print $object->getNomUrl(1,'',0,'',1);
//print '<a href="./card.php?piece_num=' . $line->piece_num . '&save_lastsearch_values=1">' . $line->piece_num . '</a>';
print '</td>';
if (! $i) $totalarray['nbfield']++;
}
$accountingjournal = new AccountingJournal($db);
$result = $accountingjournal->fetch('',$line->code_journal);
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $line->code_journal);
print '<td align="center">' . $journaltoshow . '</td>';
// Document date
if (! empty($arrayfields['t.doc_date']['checked']))
{
print '<td align="center">' . dol_print_date($line->doc_date, 'day') . '</td>';
if (! $i) $totalarray['nbfield']++;
}
print '<td align="center">';
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a>&nbsp;';
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . '">' . img_delete() . '</a>';
print '</td>';
print "</tr>\n";
// Document ref
if (! empty($arrayfields['t.doc_ref']['checked']))
{
print '<td class="nowrap">' . $line->doc_ref . '</td>';
if (! $i) $totalarray['nbfield']++;
}
$i++;
// Account number
if (! empty($arrayfields['t.numero_compte']['checked']))
{
print '<td>' . length_accountg($line->numero_compte) . '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Subledger account
if (! empty($arrayfields['t.subledger_account']['checked']))
{
print '<td>' . length_accounta($line->subledger_account) . '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Label operation
if (! empty($arrayfields['t.label_operation']['checked']))
{
print '<td>' . $line->label_operation . '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Amount debit
if (! empty($arrayfields['t.debit']['checked']))
{
print '<td align="right">' . ($line->debit ? price($line->debit) : ''). '</td>';
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totaldebitfield']=$totalarray['nbfield'];
$totalarray['totaldebit'] += $line->debit;
}
// Amount credit
if (! empty($arrayfields['t.credit']['checked']))
{
print '<td align="right">' . ($line->credit ? price($line->credit) : '') . '</td>';
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalcreditfield']=$totalarray['nbfield'];
$totalarray['totalcredit'] += $line->credit;
}
// Journal code
if (! empty($arrayfields['t.code_journal']['checked']))
{
$accountingjournal = new AccountingJournal($db);
$result = $accountingjournal->fetch('',$line->code_journal);
$journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $line->code_journal);
print '<td align="center">' . $journaltoshow . '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Creation operation date
if (! empty($arrayfields['t.date_creation']['checked']))
{
print '<td align="center">' . dol_print_date($line->date_creation, 'dayhour') . '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Modification operation date
if (! empty($arrayfields['t.tms']['checked']))
{
print '<td align="center">' . dol_print_date($line->date_modification, 'dayhour') . '</td>';
if (! $i) $totalarray['nbfield']++;
}
// Action column
print '<td align="center">';
print '<a href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_edit() . '</a>&nbsp;';
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $param . '&page=' . $page . ($sortfield ? '&sortfield='.$sortfield : '') . ($sortorder ? '&sortorder='.$sortorder : '') . '">' . img_delete() . '</a>';
print '</td>';
if (! $i) $totalarray['nbfield']++;
print "</tr>\n";
$i++;
}
// Show total line
if (isset($totalarray['totaldebitfield']) || isset($totalarray['totalcreditfield']))
{
$i=0;
print '<tr class="liste_total">';
while ($i < $totalarray['nbfield'])
{
$i++;
if ($i == 1)
{
if ($num < $limit && empty($offset)) print '<td align="left">'.$langs->trans("Total").'</td>';
else print '<td align="left">'.$langs->trans("Totalforthispage").'</td>';
}
elseif ($totalarray['totaldebitfield'] == $i) print '<td align="right">'.price($totalarray['totaldebit']).'</td>';
elseif ($totalarray['totalcreditfield'] == $i) print '<td align="right">'.price($totalarray['totalcredit']).'</td>';
else print '<td></td>';
}
print '</tr>';
}
}
print '<tr class="liste_total">';
if ($num < $limit) print '<td align="left" colspan="6">'.$langs->trans("Total").'</td>';
else print '<td align="left" colspan="6">'.$langs->trans("Totalforthispage").'</td>';
print '</td>';
print '<td align="right">';
print price($total_debit);
print '</td>';
print '<td align="right">';
print price($total_credit);
print '</td>';
print '<td colspan="2"></td>';
print '</tr>';
print "</table>";
print '</div>';
// TODO Replace this with mass delete action
print '<div class="tabsAction tabsActionNoBottom">' . "\n";
print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear'.($param?'&'.$param:'').'">' . $langs->trans("DelBookKeeping") . '</a>';
print '</div>';
print '</form>';

View File

@@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
// Langs
$langs->load("accountancy");
@@ -46,13 +47,11 @@ $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST(
$search_accountancy_code = GETPOST("search_accountancy_code");
$search_accountancy_code_start = GETPOST('search_accountancy_code_start', 'alpha');
if ($search_accountancy_code_start == - 1) {
$search_accountancy_code_start = '';
}
$search_label_account = GETPOST('search_label_account', 'alpha');
$search_mvt_label = GETPOST('search_mvt_label', 'alpha');
$search_direction = GETPOST('search_direction', 'alpha');
$search_ledger_code = GETPOST('search_ledger_code', 'alpha');
@@ -62,15 +61,38 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page','int');
if ($page < 0) { $page = 0; }
if (empty($page) || $page < 0) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($sortorder == "") $sortorder = "ASC";
if ($sortfield == "") $sortfield = "t.rowid";
if (empty($search_date_start)) $search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
if (empty($search_date_end)) $search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
if (empty($search_date_start) && empty($search_date_end)) {
$sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
$sql.= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."'";
$sql.= $db->plimit(1);
$res = $db->query($sql);
if ($res->num_rows > 0) {
$fiscalYear = $db->fetch_object($res);
$search_date_start = strtotime($fiscalYear->date_start);
$search_date_end = strtotime($fiscalYear->date_end);
} else {
$month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1);
$year_start = dol_print_date(dol_now(), '%Y');
if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year
$year_end = $year_start + 1;
$month_end = $month_start - 1;
if ($month_end < 1)
{
$month_end = 12;
$year_end--;
}
$search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start);
$search_date_end = dol_get_last_day($year_end, $month_end);
}
}
$object = new BookKeeping($db);
@@ -80,39 +102,38 @@ $filter = array ();
if (! empty($search_date_start)) {
$filter['t.doc_date>='] = $search_date_start;
$options .= '&amp;date_startmonth=' . GETPOST('date_startmonth', 'int') . '&amp;date_startday=' . GETPOST('date_startday', 'int') . '&amp;date_startyear=' . GETPOST('date_startyear', 'int');
$options .= '&date_startmonth=' . GETPOST('date_startmonth', 'int') . '&date_startday=' . GETPOST('date_startday', 'int') . '&date_startyear=' . GETPOST('date_startyear', 'int');
}
if (! empty($search_date_end)) {
$filter['t.doc_date<='] = $search_date_end;
$options .= '&amp;date_endmonth=' . GETPOST('date_endmonth', 'int') . '&amp;date_endday=' . GETPOST('date_endday', 'int') . '&amp;date_endyear=' . GETPOST('date_endyear', 'int');
$options .= '&date_endmonth=' . GETPOST('date_endmonth', 'int') . '&date_endday=' . GETPOST('date_endday', 'int') . '&date_endyear=' . GETPOST('date_endyear', 'int');
}
if (! empty($search_doc_date)) {
$filter['t.doc_date'] = $search_doc_date;
$options .= '&amp;doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&amp;doc_dateday=' . GETPOST('doc_dateday', 'int') . '&amp;doc_dateyear=' . GETPOST('doc_dateyear', 'int');
$options .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int');
}
if (! GETPOST('button_removefilter_x','alpha') && ! GETPOST('button_removefilter.x','alpha') && ! GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
{
if (! empty($search_accountancy_code_start)) {
$filter['t.numero_compte'] = $search_accountancy_code_start;
$options .= '&amp;search_accountancy_code_start=' . $search_accountancy_code_start;
$options .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start);
}
if (! empty($search_label_account)) {
$filter['t.label_operation'] = $search_label_account;
$options .= '&amp;search_label_account=' . $search_label_account;
$options .= '&search_label_account=' . urlencode($search_label_account);
}
if (! empty($search_mvt_label)) {
$filter['t.label_operation'] = $search_mvt_label;
$options .= '&amp;search_mvt_label=' . $search_mvt_label;
$options .= '&search_mvt_label=' . urlencode($search_mvt_label);
}
if (! empty($search_direction)) {
$filter['t.sens'] = $search_direction;
$options .= '&amp;search_direction=' . $search_direction;
$options .= '&search_direction=' . urlencode($search_direction);
}
if (! empty($search_ledger_code)) {
$filter['t.code_journal'] = $search_ledger_code;
$options .= '&amp;search_ledger_code=' . $search_ledger_code;
$options .= '&search_ledger_code=' . urlencode($search_ledger_code);
}
}
@@ -159,6 +180,7 @@ $title_page = $langs->trans("Bookkeeping") . ' ' . strtolower($langs->trans("By"
llxHeader('', $title_page);
// List
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
@@ -169,6 +191,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
}
$result = $object->fetchAllByAccount($sortorder, $sortfield, $limit, $offset, $filter);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
@@ -177,7 +200,7 @@ $num=count($object->lines);
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') {
@@ -203,13 +226,17 @@ if ($action == 'delbookkeepingyear') {
}
$param=$options;
print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
$viewflat = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php">' . $langs->trans("ViewFlatList") . '</a>';
$viewflat = ' <a class="nohover" href="'.DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param.'">' . $langs->trans("ViewFlatList") . '</a>';
$addbutton = '<a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a>';
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'title_accountancy',0,$viewflat,'',$limit);
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $viewflat.$addbutton, '', $limit);
// Reverse sort order
if ( preg_match('/^asc/i', $sortorder) )
@@ -217,10 +244,6 @@ if ( preg_match('/^asc/i', $sortorder) )
else
$sortorder = "desc";
print '<div class="tabsAction tabsActionNoBottom">' . "\n";
print '<div class="inline-block divButAction"><a class="butAction" href="./card.php?action=create">' . $langs->trans("NewAccountingMvt") . '</a></div>';
print '</div>';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
@@ -315,7 +338,7 @@ while ($i < min($num, $limit))
// Affiche un lien vers la facture client/fournisseur
$doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref);
print strlen(length_accounta($line->subledger_account)) == 0 ? '<td>' . $line->label_operation . '</td>' : '<td>' . $line->label_operation . '<br /><span style="font-size:0.8em">(' . length_accounta($line->subledger_account) . ')</span></td>';
print strlen(length_accounta($line->subledger_account)) == 0 ? '<td>' . $line->label_operation . '</td>' : '<td>' . $line->label_operation . '<br><span style="font-size:0.8em">(' . length_accounta($line->subledger_account) . ')</span></td>';
print '<td align="right">' . ($line->debit ? price($line->debit) :''). '</td>';

View File

@@ -1,295 +0,0 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* \file htdocs/accountancy/bookkeeping/listbyyear.php
* \ingroup Advanced accountancy
* \brief Book keeping by year
*/
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
// Langs
$langs->load("accountancy");
$page = GETPOST("page");
$sortorder = GETPOST("sortorder");
$sortfield = GETPOST("sortfield");
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):$conf->liste_limit;
$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int'));
$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
$search_doc_type = GETPOST('search_doc_type', 'alpha');
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
$search_doc_ref = GETPOST('search_doc_ref', 'alpha');
$search_numero_compte = GETPOST('search_numero_compte', 'alpha');
$search_numero_compte_start = GETPOST('search_numero_compte_start', 'alpha');
if ($search_numero_compte_start == - 1) {
$search_numero_compte_start = '';
}
$search_numero_compte_end = GETPOST('search_numero_compte_end', 'alpha');
if ($search_numero_compte_end == - 1) {
$search_numero_compte_end = '';
}
$search_subledger_account = GETPOST('search_subledger_account', 'alpha');
$search_subledger_account_start = GETPOST('search_subledger_account_start', 'alpha');
if ($search_subledger_account_start == - 1) {
$search_subledger_account_start = '';
}
$search_subledger_account_end = GETPOST('search_subledger_account_end', 'alpha');
if ($search_subledger_account_end == - 1) {
$search_subledger_account_end = '';
}
$search_label_operation = GETPOST('search_label_operation', 'alpha');
$search_sens = GETPOST('search_sens', 'alpha');
$search_code_journal = GETPOST('search_code_journal', 'alpha');
$object = new BookKeeping($db);
$form = new Form($db);
$formaccounting = new FormAccounting($db);
// Filter
if (empty($search_date_start)) {
$search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y'));
$search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y'));
}
if ($sortorder == "")
$sortorder = "ASC";
if ($sortfield == "")
$sortfield = "t.rowid";
$offset = $limit * $page;
/*
* Actions
*/
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All tests are required to be compatible with all browsers
{
$search_doc_type = "";
$search_doc_date = "";
$search_doc_ref = "";
$search_numero_compte = "";
$search_subledger_account = "";
$search_label_operation = "";
$search_sens = "";
$search_code_journal = "";
}
$options = '';
$filter = array ();
if (! empty($search_date_start)) {
$filter['t.doc_date>='] = $search_date_start;
$options .= '&amp;date_startmonth=' . GETPOST('date_startmonth', 'int') . '&amp;date_startday=' . GETPOST('date_startday', 'int') . '&amp;date_startyear=' . GETPOST('date_startyear', 'int');
}
if (! empty($search_date_end)) {
$filter['t.doc_date<='] = $search_date_end;
$options .= '&amp;date_endmonth=' . GETPOST('date_endmonth', 'int') . '&amp;date_endday=' . GETPOST('date_endday', 'int') . '&amp;date_endyear=' . GETPOST('date_endyear', 'int');
}
if (! empty($search_doc_type)) {
$filter['t.doc_type'] = $search_doc_type;
$options .= '&amp;search_doc_type=' . $search_doc_type;
}
if (! empty($search_doc_date)) {
$filter['t.doc_date'] = $search_doc_date;
$options .= '&amp;doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&amp;doc_dateday=' . GETPOST('doc_dateday', 'int') . '&amp;doc_dateyear=' . GETPOST('doc_dateyear', 'int');
}
if (! empty($search_doc_ref)) {
$filter['t.doc_ref'] = $search_doc_ref;
$options .= '&amp;search_doc_ref=' . $search_doc_ref;
}
if (! empty($search_numero_compte)) {
$filter['t.numero_compte'] = $search_numero_compte;
$options .= '&amp;search_numero_compte=' . $search_numero_compte;
}
if (! empty($search_numero_compte_start)) {
$filter['t.numero_compte>='] = $search_numero_compte_start;
$options .= '&amp;search_numero_compte_start=' . $search_numero_compte_start;
}
if (! empty($search_numero_compte_end)) {
$filter['t.numero_compte<='] = $search_numero_compte_end;
$options .= '&amp;search_numero_compte_end=' . $search_numero_compte_end;
}
if (! empty($search_subledger_account)) {
$filter['t.subledger_account'] = $search_subledger_account;
$options .= '&amp;search_subledger_account=' . $search_subledger_account;
}
if (! empty($search_subledger_account_start)) {
$filter['t.subledger_account>='] = $search_subledger_account_start;
$options .= '&amp;search_subledger_account_start=' . $search_subledger_account_start;
}
if (! empty($search_subledger_account_end)) {
$filter['t.subledger_account<='] = $search_subledger_account_end;
$options .= '&amp;search_subledger_account_end=' . $search_subledger_account_end;
}
if (! empty($search_label_operation)) {
$filter['t.label_operation'] = $search_label_operation;
$options .= '&amp;search_label_operation=' . $search_label_operation;
}
if (! empty($search_sens)) {
$filter['t.sens'] = $search_sens;
$options .= '&amp;search_sens=' . $search_sens;
}
if (! empty($search_code_journal)) {
$filter['t.code_journal'] = $search_code_journal;
$options .= '&amp;search_code_journal=' . $search_code_journal;
}
/*
* Actions
*/
llxHeader('', $langs->trans("Bookkeeping"));
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0);
if ($nbtotalofrecords < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
$result = $object->fetchAll($sortorder, $sortfield, $limit, $offset, $filter);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
print_barre_liste($langs->trans("Bookkeeping") . ' ' . dol_print_date($search_date_start) . '-' . dol_print_date($search_date_end), $page, $_SERVER['PHP_SELF'], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy');
print '<form method="GET" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">';
print '<div class="liste_titre">';
print $langs->trans('DateStart') . ': ';
print $form->select_date($search_date_start, 'date_start');
print $langs->trans('DateEnd') . ': ';
print $form->select_date($search_date_end, 'date_end');
print '</div>';
print '<div class="liste_titre">';
print $langs->trans('From') . ' ' . $langs->trans('AccountAccounting') . ': ';
print $formaccounting->select_account($search_numero_compte_start, 'search_numero_compte_start', 1, array (), 1, 1, '');
print $langs->trans('To') . ' ' . $langs->trans('AccountAccounting') . ': ';
print $formaccounting->select_account($search_numero_compte_end, 'search_numero_compte_end', 1, array (), 1, 1, '');
print '</div>';
print '<div class="liste_titre">';
print $langs->trans('From') . ' ' . $langs->trans('ThirdPartyAccount') . ': ';
print $formaccounting->select_auxaccount($search_subledger_account_start, 'search_subledger_account_start', 1);
print $langs->trans('To') . ' ' . $langs->trans('ThirdPartyAccount') . ': ';
print $formaccounting->select_auxaccount($search_subledger_account_end, 'search_subledger_account_end', 1);
print '</div>';
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print_liste_field_titre("NumPiece", $_SERVER['PHP_SELF'], "t.piece_num", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Doctype", $_SERVER['PHP_SELF'], "t.doc_type", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER['PHP_SELF'], "t.doc_date", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Docref", $_SERVER['PHP_SELF'], "t.doc_ref", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("ThirdPartyAccount", $_SERVER['PHP_SELF'], "t.subledger_account", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $options, "", $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Amount", $_SERVER['PHP_SELF'], "t.montant", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Sens", $_SERVER['PHP_SELF'], "t.sens", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td class="liste_titre">';
print '<input type="text" size=4 class="flat" name="search_piece_num" value="' . $search_piece_num . '"/>';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" size=7 class="flat" name="search_doc_type" value="' . $search_doc_type . '"/>';
print '</td>';
print '<td class="liste_titre">';
print $form->select_date($search_doc_date, 'doc_date', 0, 0, 1);
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" size=6 class="flat" name="search_doc_ref" value="' . $search_doc_ref . '"/>';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" size=6 class="flat" name="search_numero_compte" value="' . $search_numero_compte . '"/>';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" size=6 class="flat" name="search_subledger_account" value="' . $search_subledger_account . '"/>';
print '</td>';
print '<td class="liste_titre">';
print '<input type="text" size=6 class="flat" name="search_label_operation" value="' . $search_label_operation . '"/>';
print '</td>';
print '<td class="liste_titre">';
print '</td>';
print '<td class="liste_titre">';
print '</td>';
print '<td class="liste_titre">';
print '</td>';
print '<td class="liste_titre" align="center">';
print '<input type="text" size=2 class="flat" name="search_sens" value="' . $search_sens . '"/>';
print '</td>';
print '<td class="liste_titre" align="center">';
print '<input type="text" size=3 class="flat" name="search_code_journal" value="' . $search_code_journal . '"/>';
print '</td>';
print '<td align="right" colspan="2" class="liste_titre">';
print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" name="button_search" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">';
print '&nbsp;';
print '<input type="image" class="liste_titre" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" name="button_removefilter" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">';
print '</td>';
print "</tr>\n";
foreach ( $object->lines as $line ) {
print '<tr class="oddeven">';
print '<td>' . $line->piece_num . '</td>' . "\n";
print '<td>' . $line->doc_type . '</td>' . "\n";
print '<td align="center">' . dol_print_date($line->doc_date) . '</td>';
print '<td>' . $line->doc_ref . '</td>';
print '<td>' . length_accountg($line->numero_compte) . '</td>';
print '<td>' . length_accounta($line->subledger_account) . '</td>';
print '<td>' . $line->label_operation . '</td>';
print '<td align="right">' . price($line->debit) . '</td>';
print '<td align="right">' . price($line->credit) . '</td>';
print '<td align="right">' . price($line->montant) . '</td>';
print '<td align="center">' . $line->sens . '</td>';
print '<td align="right">' . $line->code_journal . '</td>';
print '<td align="center"><a href="./card.php?action=update&amp;piece_num=' . $line->piece_num . '">' . img_edit() . '</a></td>';
print "</tr>\n";
}
print "</table>";
print '</form>';
llxFooter();
$db->close();

View File

@@ -21,11 +21,10 @@
*/
/**
* \file accounting/bookkeeping/thirdparty_lettrage.php
* \ingroup Accounting Expert
* \brief Onglet de gestion de parametrages des ventilations
* \file accounting/bookkeeping/thirdparty_lettrage.php
* \ingroup Advanced accountancy
* \brief Onglet de gestion de parametrages des ventilations
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
@@ -34,296 +33,286 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
$action=GETPOST('action','aZ09');
$massaction=GETPOST('massaction','alpha');
$show_files=GETPOST('show_files','int');
$confirm=GETPOST('confirm','alpha');
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$show_files = GETPOST('show_files', 'int');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOST("page", 'int');
if (empty($page) || $page == - 1) {
$page = 0;
} // If $page is not defined, or '' or -1
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($sortorder == "") $sortorder = "ASC";
if ($sortfield == "") $sortfield = "bk.rowid";
if ($sortorder == "")
$sortorder = "DESC";
if ($sortfield == "")
$sortfield = "bk.doc_date";
$search_year = GETPOST ( "search_year" );
$search_year = GETPOST("search_year", 'int');
$search_doc_type = GETPOST("search_doc_type", 'alpha');
$search_doc_ref = GETPOST("search_doc_ref", 'alpha');
$lettering = GETPOST('lettering');
if (! empty($lettering)) {
$action = $lettering;
}
$toselect = GETPOST('toselect', 'array');
// Did we click on purge search criteria ?
// All tests are required to be compatible with all browsers
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
$search_year = '';
$search_doc_type = '';
$search_doc_ref = '';
}
// Security check
$socid = GETPOST("socid",'int');
$socid = GETPOST("socid", 'int');
// if ($user->societe_id) $socid=$user->societe_id;
$object = new Societe($db);
$object->id = $socid;
$object->fetch($socid);
$result = $object->fetch($socid);
if ($result < 0) {
setEventMessage($object->error, 'errors');
}
$form = new Form($db);
$BookKeeping = new lettering($db);
$formaccounting = new FormAccounting($db);
/*
* Action
*/
if ($action == 'lettering') {
$result = $BookKeeping->updatelettrage($_POST['ids']);
// var_dump($result);
if( $result < 0 ){
setEventMessages('', $BookKeeping->errors, 'errors' );
$error++;
$result = $BookKeeping->updateLettrage($toselect);
if ($result < 0) {
setEventMessages('', $BookKeeping->errors, 'errors');
$error ++;
}
}
if ($action == 'autolettrage') {
$result = $BookKeeping->LettrageTiers($socid);
if( $result < 0 ){
setEventMessages('', $BookKeeping->errors, 'errors' );
$error++;
}
$result = $BookKeeping->lettrageTiers($socid);
if ($result < 0) {
setEventMessages('', $BookKeeping->errors, 'errors');
$error ++;
}
}
llxHeader('', 'Compta - Grand Livre');
llxHeader ( '', 'Compta - Grand Livre' );
/*
* Affichage onglets
*/
$head = societe_prepare_head($object);
dol_htmloutput_mesg(is_numeric($error) ? '' : $error, $errors, 'error');
/*
* Affichage onglets
*/
$head = societe_prepare_head($object);
dol_fiche_head($head, 'accounting', $langs->trans("ThirdParty"), 0, 'company');
dol_htmloutput_mesg(is_numeric($error)?'':$error, $errors, 'error');
print '<table width="100%" class="border">';
print '<tr><td width="30%">' . $langs->trans("ThirdPartyName") . '</td><td width="70%" colspan="3">';
$object->next_prev_filter = "te.fournisseur = 1";
print $form->showrefnav($object, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom', '', '');
print '</td></tr>';
dol_fiche_head($head, 'TabAccounting', $langs->trans("ThirdParty"),0,'company');
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $object->prefix_comm . '</td></tr>';
}
print '<tr>';
print '<td class="nowrap">' . $langs->trans("CustomerCode") . '</td><td colspan="3">';
print $object->code_client;
if ($object->check_codeclient() != 0)
print ' <font class="error">(' . $langs->trans("WrongCustomerCode") . ')</font>';
print '</td>';
print '</tr>';
$langs->load('compta');
print '<tr>';
print '<td>';
print $form->editfieldkey("CustomerAccountancyCode", 'customeraccountancycode', $object->code_compta, $object, $user->rights->societe->creer);
print '</td><td colspan="3">';
print $form->editfieldval("CustomerAccountancyCode", 'customeraccountancycode', $object->code_compta, $object, $user->rights->societe->creer);
print '</td>';
print '</tr>';
// Address
print '<tr><td valign="top">' . $langs->trans("Address") . '</td><td colspan="3">';
dol_print_address($object->address, 'gmap', 'thirdparty', $object->id);
print '</td></tr>';
print '<table width="100%" class="border">';
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
$object->next_prev_filter="te.fournisseur = 1";
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
print '</td></tr>';
// Zip / Town
print '<tr><td class="nowrap">' . $langs->trans("Zip") . ' / ' . $langs->trans("Town") . '</td><td colspan="3">' . $object->zip . (($object->zip && $object->town) ? ' / ' : '') . $object->town . '</td>';
print '</tr>';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
}
// Country
print '<tr><td>' . $langs->trans("Country") . '</td><td colspan="3">';
// $img=picto_from_langcode($object->country_code);
$img = '';
if ($object->isInEEC())
print $form->textwithpicto(($img ? $img . ' ' : '') . $object->country, $langs->trans("CountryIsInEEC"), 1, 0);
else
print ($img ? $img . ' ' : '') . $object->country;
print '</td></tr>';
print '</table>';
print '<tr>';
print '<td class="nowrap">'.$langs->trans("CustomerCode"). '</td><td colspan="3">';
print $object->code_client;
if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
print '</td>';
print '</tr>';
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, ";
$sql .= " bk.subledger_account, bk.numero_compte , bk.label_compte, bk.debit, ";
$sql .= " bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering_code ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE (bk.subledger_account = '" . $object->code_compta . "' AND bk.numero_compte = '" . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . "' )";
$langs->load('compta');
print '<tr>';
print '<td>';
print $form->editfieldkey("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
print '</td><td colspan="3">';
print $form->editfieldval("CustomerAccountancyCode",'customeraccountancycode',$object->code_compta,$object,$user->rights->societe->creer);
print '</td>';
print '</tr>';
if (dol_strlen($search_year)) {
$date_start = dol_mktime(0, 0, 0, 1, 1, $search_year);
$date_end = dol_mktime(23, 59, 59, 12, 31, $search_year);
$sql .= " AND ( bk.doc_date BETWEEN '" . $db->idate($date_start) . "' AND '" . $db->idate($date_end) . "' )";
}
$sql .= $db->order($sortfield, $sortorder);
// Address
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">';
dol_print_address($object->address,'gmap','thirdparty',$object->id);
print '</td></tr>';
$debit = 0;
$credit = 0;
$solde = 0;
// Count total nb of records and calc total sum
$nbtotalofrecords = '';
$resql = $db->query($sql);
if (! $resql) {
dol_print_error($db);
exit();
}
$nbtotalofrecords = $db->num_rows($resql);
// Zip / Town
print '<tr><td class="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td>';
while ( $obj = $db->fetch_object($resql) ) {
$debit += $obj->debit;
$credit += $obj->credit;
$solde += ($obj->credit - $obj->debit);
}
$sql .= $db->plimit($limit + 1, $offset);
dol_syslog("/accountancy/bookkeeping/thirdparty_lettrage.php", LOG_DEBUG);
$resql = $db->query($sql);
if (! $resql) {
dol_print_error($db);
exit();
}
$num = $db->num_rows($resql);
dol_syslog("/accountancy/bookkeeping/thirdparty_lettrage.php", LOG_DEBUG);
if ($resql) {
$i = 0;
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="socid" value="' . $object->id . '">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print_liste_field_titre("Doctype", $_SERVER["PHP_SELF"], "bk.doc_type", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Docdate", $_SERVER["PHP_SELF"], "bk.doc_date", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Docref", $_SERVER["PHP_SELF"], "bk.doc_ref", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Labelcompte", $_SERVER["PHP_SELF"], "bk.label_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "bk.debit", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "bk.credit", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "bk.montant", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Sens", $_SERVER["PHP_SELF"], "bk.sens", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("Solde", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder);
print '<td></td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td><input type="text" name="search_doc_type" value="' . $search_doc_type . '"></td>';
print '<td><input type="text" name="search_year" value="' . $search_year . '"></td>';
print '<td><input type="text" name="search_doc_refe" value="' . $search_doc_ref . '"></td>';
print '<td colspan="7">&nbsp;</td>';
print '<td align="right">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
//$img=picto_from_langcode($object->country_code);
$img='';
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
else print ($img?$img.' ':'').$object->country;
print '</td></tr>';
$var = false;
$solde = 0;
$tmp = '';
while ( $obj = $db->fetch_object($resql) ) {
print '</table>';
if ($tmp != $obj->lettering_code || empty($tmp))
$tmp = $obj->lettering_code;
if ($tmp != $obj->lettering_code || empty($obj->lettering_code))
$var = ! $var;
$solde += ($obj->credit - $obj->debit);
print "<tr $bc[$var]>";
if (empty($obj->lettering_code)) {
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
print img_edit();
print '</a>&nbsp;' . $obj->doc_type . '</td>' . "\n";
} else
print '<td>' . $obj->doc_type . '</td>' . "\n";
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering_code ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE (bk.code_tiers = '" . $object->code_compta . "' AND bk.numero_compte = '" .$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER. "' )" ;
print '<td>' . dol_print_date($db->jdate($obj->doc_date), 'day') . '</td>';
print '<td>' . $obj->doc_ref . '</td>';
print '<td>' . $obj->label_compte . '</td>';
print '<td>' . price($obj->debit) . '</td>';
print '<td>' . price($obj->credit) . '</td>';
print '<td>' . price($obj->montant) . '</td>';
print '<td>' . $obj->sens . '</td>';
print '<td>' . $obj->code_journal . '</td>';
print '<td>' . round($solde, 2) . '</td>';
if (empty($obj->lettering_code)) {
print '<td class="nowrap" align="center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
} else
print '<td>' . $obj->lettering_code . '</td>';
if (dol_strlen ( $search_year )) {
$sql .= " AND ( bk.doc_date BETWEEN '" . $search_year . "-0-0' AND '" . ($search_year+1). "-0-0' )";
}
$sql .= " ORDER BY bk.lettering_code ASC, bk.doc_date ASC" ;//. $db->plimit ( $conf->liste_limit + 1, $offset );
// echo $sql;
// dol_syslog ( "bookkeping:liste:create sql=" . $sql, LOG_DEBUG );
$resql = $db->query ( $sql );
if ($resql) {
$num = $db->num_rows ( $resql );
$i = 0;
print '<form name="add" action="?socid='.$object->id.'" method="POST">';
print '<input type="hidden" name="action" value="lettering">';
print '<input type="hidden" name="socid" value="'.$object->id.'">';
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print '<td></td>';
print_liste_field_titre("Doctype", "liste.php", "bk.doc_type" );
print_liste_field_titre("Docdate", "liste.php", "bk.doc_date" );
print_liste_field_titre("Docref", "liste.php", "bk.doc_ref" );
// print_liste_field_titre("Numerocompte", "liste.php", "bk.numero_compte" );
// print_liste_field_titre("Code_tiers", "liste.php", "bk.code_tiers" );
print_liste_field_titre("Labelcompte", "liste.php", "bk_label_compte" );
print_liste_field_titre("Debit", "liste.php", "bk.debit" );
print_liste_field_titre("Credit", "liste.php", "bk.credit" );
// print_liste_field_titre("Amount", "liste.php", "bk.montant" );
// print_liste_field_titre("Sens", "liste.php", "bk.sens" );
print_liste_field_titre("Codejournal", "liste.php", "bk.code_journal" );
print '<td></td>';
print '<td></td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print '<form action="" method="GET">';
print '<input type="hidden" name="socid" value="' . $_GET ["socid"] . '">';
print '<td><input type="text" name="search_doc_type" value="' . $_GET ["search_doc_type"] . '"></td>';
print '<td><input type="text" name="search_year" value="' . $_GET ["search_year"] . '"></td>';
print '<td><input type="text" name="search_doc_refe" value="' . $_GET ["search_doc_ref"] . '"></td>';
// print '<td><input type="text" name="search_compte" value="' . $_GET ["search_compte"] . '"></td>';
// print '<td><input type="text" name="search_tiers" value="' . $_GET ["search_tiers"] . '"></td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
// print '<td>&nbsp;</td>';
// print '<td>&nbsp;</td>';
print '<td align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" value="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '" title="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '">';
print '</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '</form>';
print '</tr>';
$var = false;
$debit = 0;
$credit = 0;
$solde = 0;
$tmp = '';
while ( $i < $num ) {
$obj = $db->fetch_object ( $resql );
if($tmp !=$obj->lettering_code || empty($tmp) )
$tmp =$obj->lettering_code;
if($tmp !=$obj->lettering_code || empty($obj->lettering_code))
$var = ! $var;
$debit+= $obj->debit;
$credit+= $obj->credit;
$solde+=($obj->credit-$obj->debit);
print "<tr $bc[$var]>";
print '<td>' . $obj->rowid . '</td>';
if(empty($obj->lettering_code)){
print '<td><a href="'.dol_buildpath('/accountancy/bookkeeping/card.php', 1).'?piece_num=' . $obj->piece_num . '">';
print img_edit ();
print '</a>&nbsp;' . $obj->doc_type . '</td>' . "\n";
}
else
print '<td>'.$obj->doc_type . '</td>' . "\n";
print '<td>' . dol_print_date ( $db->jdate ( $obj->doc_date ), 'day' ) . '</td>';
print '<td>' . $obj->doc_ref . '</td>';
// print '<td>' . $obj->numero_compte . '</td>';
// print '<td>' . $obj->code_tiers . '</td>';
print '<td>' . $obj->label_compte . '</td>';
print '<td>' . $obj->debit . '</td>';
print '<td>' . $obj->credit . '</td>';
// print '<td>' . $obj->montant . '</td>';
// print '<td>' . $obj->sens . '</td>';
print '<td>' . $obj->code_journal . '</td>';
print '<td>' . round($solde, 2) . '</td>';
if(empty($obj->lettering_code)){
print '<td><input type="checkbox" name="ids[]" value="' . $obj->rowid . '" /></td>';
}
else
print '<td>' . $obj->lettering_code . '</td>';
print "</tr>\n";
$i ++;
}
print '<tr class="oddeven">';
print '<td colspan="4">Mouvement totaux</td>' . "\n";
print '<td></td>';
// print '<td></td>';
// print '<td></td>';
print '<td><strong>' . $debit . '</strong></td>';
print '<td><strong>' . $credit . '</strong></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td>&nbsp;</td>';
print "</tr>\n";
print "<tr $bc[$var]>";
print '<td colspan="5">Solde Comptable</td>' . "\n";
// print '<td></td>';
// print '<td></td>';
print '<td></td>';
print '<td><strong>' . ($credit-$debit) . '</strong></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td>&nbsp;</td>';
print "</tr>\n";
print "</table>";
print '<input class="butAction" type="submit" value="lettering">';
print '<a class="butAction" href="?socid='.$object->id.'&action=autolettrage">auto lettering</a>';
print "</form>";
$db->free($resql);
} else {
dol_print_error($db);
}
print '<tr class="oddeven">';
print '<td colspan="4">Mouvement totaux</td>' . "\n";
print '<td><strong>' . price($debit) . '</strong></td>';
print '<td><strong>' . price($credit) . '</strong></td>';
print '<td colspan="5"></td>';
print "</tr>\n";
print "<tr $bc[$var]>";
print '<td colspan="9">Solde Comptable</td>' . "\n";
print '<td><strong>' . price($credit - $debit) . '</strong></td>';
print '<td colspan="5"></td>';
print "</tr>\n";
print "</table>";
print '<input class="butAction" type="submit" value="lettering" name="lettering" id="lettering">';
print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '&action=autolettrage">' . $langs->trans('AccountancyAutoLettering') . '</a>';
print "</form>";
$db->free($resql);
} else {
dol_print_error($db);
}
// End of page
llxFooter();

View File

@@ -21,9 +21,9 @@
*/
/**
* \file accounting/bookkeeping/thirdparty_lettrage.php
* \ingroup Accounting Expert
* \brief Onglet de gestion de parametrages des ventilations
* \file accounting/bookkeeping/thirdparty_lettrage.php
* \ingroup Advanced accountancy
* \brief Tab to setup lettering
*/
// Dolibarr environment
@@ -35,300 +35,304 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php';
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
$action=GETPOST('action','aZ09');
$massaction=GETPOST('massaction','alpha');
$show_files=GETPOST('show_files','int');
$confirm=GETPOST('confirm','alpha');
$action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha');
$show_files = GETPOST('show_files', 'int');
$confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array');
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOST("page", 'int');
if (empty($page) || $page == - 1) {
$page = 0;
} // If $page is not defined, or '' or -1
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($sortorder == "") $sortorder = "ASC";
if ($sortfield == "") $sortfield = "bk.rowid";
if ($sortorder == "")
$sortorder = "DESC";
if ($sortfield == "")
$sortfield = "bk.doc_date";
$search_year = GETPOST ( "search_year" );
$search_year = GETPOST("search_year",'int');
$search_doc_type = GETPOST("search_doc_type",'alpha');
$search_doc_ref = GETPOST("search_doc_ref",'alpha');
$lettering = GETPOST('lettering');
if (!empty($lettering)) {
$action=$lettering;
}
$toselect = GETPOST('toselect','array');
// Did we click on purge search criteria ?
// All tests are required to be compatible with all browsers
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha'))
{
$search_year='';
$search_doc_type='';
$search_doc_ref='';
}
// Security check
$socid = GETPOST("socid",'int');
$socid = GETPOST("socid", 'int');
// if ($user->societe_id) $socid=$user->societe_id;
$object = new Societe($db);
$object->id = $socid;
$object->fetch($socid);
$result = $object->fetch($socid);
if ($result<0) {
setEventMessage($object->error,'errors');
}
$form = new Form($db);
$BookKeeping = new lettering($db);
$formaccounting = new FormAccounting($db);
/*
* Action
*/
if ($action == 'lettering') {
$result = $BookKeeping->updatelettrage($_POST['ids']);
// var_dump($result);
if( $result < 0 ){
setEventMessages('', $BookKeeping->errors, 'errors' );
$error++;
$result = $BookKeeping->updateLettrage($toselect);
// var_dump($result);
if ($result < 0) {
setEventMessages('', $BookKeeping->errors, 'errors');
$error ++;
}
}
if ($action == 'autolettrage') {
$result = $BookKeeping->LettrageTiers($socid);
if( $result < 0 ){
setEventMessages('', $BookKeeping->errors, 'errors' );
$error++;
}
$result = $BookKeeping->lettrageTiers($socid);
if ($result < 0) {
setEventMessages('', $BookKeeping->errors, 'errors');
$error ++;
}
}
$title = 'AccountancyLettrage';
llxHeader ( '', 'Compta - Grand Livre' );
llxHeader('', $title);
/*
* Affichage onglets
*/
$head = societe_prepare_head($object);
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if (!empty($search_year)) $param.='&search_year='.$search_year;
if (!empty($socid)) $param.='&socid='.$socid;
if (!empty($search_doc_type)) $param.='&search_doc_type='.$search_doc_type;
if (!empty($search_doc_ref)) $param.='&search_doc_ref='.$search_doc_ref;
dol_htmloutput_mesg(is_numeric($error)?'':$error, $errors, 'error');
dol_fiche_head($head, 'TabAccounting', $langs->trans("ThirdParty"),0,'company');
print '<table width="100%" class="border">';
print '<tr><td width="30%">'.$langs->trans("ThirdPartyName").'</td><td width="70%" colspan="3">';
$object->next_prev_filter="te.fournisseur = 1";
print $form->showrefnav($object,'socid','',($user->societe_id?0:1),'rowid','nom','','');
print '</td></tr>';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
}
print '<tr>';
print '<td class="nowrap">'.$langs->trans("SupplierCode"). '</td><td colspan="3">';
print $object->code_fournisseur;
if ($object->check_codefournisseur() <> 0) print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>';
print '</td>';
print '</tr>';
$langs->load('compta');
print '<tr>';
print '<td>';
print $form->editfieldkey("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer);
print '</td><td colspan="3">';
print $form->editfieldval("SupplierAccountancyCode",'supplieraccountancycode',$object->code_compta_fournisseur,$object,$user->rights->societe->creer);
print '</td>';
print '</tr>';
// Address
print '<tr><td valign="top">'.$langs->trans("Address").'</td><td colspan="3">';
dol_print_address($object->address,'gmap','thirdparty',$object->id);
print '</td></tr>';
// Zip / Town
print '<tr><td class="nowrap">'.$langs->trans("Zip").' / '.$langs->trans("Town").'</td><td colspan="3">'.$object->zip.(($object->zip && $object->town)?' / ':'').$object->town.'</td>';
print '</tr>';
// Country
print '<tr><td>'.$langs->trans("Country").'</td><td colspan="3">';
//$img=picto_from_langcode($object->country_code);
$img='';
if ($object->isInEEC()) print $form->textwithpicto(($img?$img.' ':'').$object->country,$langs->trans("CountryIsInEEC"),1,0);
else print ($img?$img.' ':'').$object->country;
print '</td></tr>';
print '</table>';
// print_r($soc);
// exit;
// [code_compta] => 411DOUA
// [code_compta_fournisseur] => 401SUPPCODE
/*
* Mode Liste
*
*
*
* Affichage onglets
*/
$head = societe_prepare_head($object);
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE (bk.code_tiers = '" . $object->code_compta_fournisseur . "' AND bk.numero_compte = '" .$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER. "' )" ;
dol_htmloutput_mesg(is_numeric($error) ? '' : $error, $errors, 'error');
dol_fiche_head($head, 'accounting_supplier', $langs->trans("ThirdParty"), 0, 'company');
print '<table width="100%" class="border">';
print '<tr><td width="30%">' . $langs->trans("ThirdPartyName") . '</td><td width="70%" colspan="3">';
$object->next_prev_filter = "te.fournisseur = 1";
print $form->showrefnav($object, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom', '', '');
print '</td></tr>';
if (dol_strlen ( $search_year )) {
$sql .= " AND ( bk.doc_date BETWEEN '" . $search_year . "-0-0' AND '" . ($search_year+1). "-0-0' )";
}
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
{
print '<tr><td>' . $langs->trans('Prefix') . '</td><td colspan="3">' . $object->prefix_comm . '</td></tr>';
}
print '<tr>';
print '<td class="nowrap">' . $langs->trans("SupplierCode") . '</td><td colspan="3">';
print $object->code_fournisseur;
if ($object->check_codefournisseur() != 0)
print ' <font class="error">(' . $langs->trans("WrongSupplierCode") . ')</font>';
print '</td>';
print '</tr>';
$sql .= " ORDER BY bk.lettering ASC, bk.doc_date ASC" ;//. $db->plimit ( $conf->liste_limit + 1, $offset );
$langs->load('compta');
print '<tr>';
print '<td>';
print $form->editfieldkey("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->rights->societe->creer);
print '</td><td colspan="3">';
print $form->editfieldval("SupplierAccountancyCode", 'supplieraccountancycode', $object->code_compta_fournisseur, $object, $user->rights->societe->creer);
print '</td>';
print '</tr>';
// echo $sql;
// dol_syslog ( "bookkeping:liste:create sql=" . $sql, LOG_DEBUG );
$resql = $db->query ( $sql );
if ($resql) {
$num = $db->num_rows ( $resql );
$i = 0;
// Address
print '<tr><td valign="top">' . $langs->trans("Address") . '</td><td colspan="3">';
dol_print_address($object->address, 'gmap', 'thirdparty', $object->id);
print '</td></tr>';
// Zip / Town
print '<tr><td class="nowrap">' . $langs->trans("Zip") . ' / ' . $langs->trans("Town") . '</td><td colspan="3">' . $object->zip . (($object->zip && $object->town) ? ' / ' : '') . $object->town . '</td>';
print '</tr>';
print '<form name="add" action="?socid='.$object->id.'" method="POST">';
print '<input type="hidden" name="action" value="lettering">';
print '<input type="hidden" name="socid" value="'.$object->id.'">';
// Country
print '<tr><td>' . $langs->trans("Country") . '</td><td colspan="3">';
// $img=picto_from_langcode($object->country_code);
$img = '';
if ($object->isInEEC())
print $form->textwithpicto(($img ? $img . ' ' : '') . $object->country, $langs->trans("CountryIsInEEC"), 1, 0);
else
print ($img ? $img . ' ' : '') . $object->country;
print '</td></tr>';
print '</table>';
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, ";
$sql .= " bk.subledger_account, bk.numero_compte , bk.label_compte, bk.debit, ";
$sql .= " bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering_code ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE (bk.subledger_account = '" . $object->code_compta_fournisseur . "' AND bk.numero_compte = '" . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . "' )";
if (dol_strlen($search_year)) {
$date_start = dol_mktime(0, 0, 0, 1, 1, $search_year);
$date_end = dol_mktime(23, 59, 59, 12, 31, $search_year);
$sql .= " AND ( bk.doc_date BETWEEN '".$db->idate($date_start)."' AND '".$db->idate($date_end)."' )";
}
$sql.= $db->order($sortfield,$sortorder);
$debit = 0;
$credit = 0;
$solde = 0;
// Count total nb of records and calc total sum
$nbtotalofrecords = '';
$resql = $db->query($sql);
if (! $resql)
{
dol_print_error($db);
exit;
}
$nbtotalofrecords = $db->num_rows($resql);
while ($obj = $db->fetch_object($resql)) {
$debit += $obj->debit;
$credit += $obj->credit;
$solde += ($obj->credit - $obj->debit);
}
$sql.= $db->plimit($limit+1, $offset);
dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG );
$resql = $db->query($sql);
if (! $resql)
{
dol_print_error($db);
exit;
}
$num = $db->num_rows($resql);
dol_syslog ( "/accountancy/bookkeeping/thirdparty_lettrage_supplier.php", LOG_DEBUG );
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="socid" value="' . $object->id . '">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit);
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print_liste_field_titre("Doctype", $_SERVER["PHP_SELF"], "bk.doc_type","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Docdate", $_SERVER["PHP_SELF"], "bk.doc_date","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Docref", $_SERVER["PHP_SELF"], "bk.doc_ref","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Labelcompte", $_SERVER["PHP_SELF"], "bk.label_compte","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "bk.debit","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "bk.credit","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "bk.montant","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Sens", $_SERVER["PHP_SELF"], "bk.sens","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal","",$param,"",$sortfield,$sortorder);
print_liste_field_titre("Solde", $_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder);
print '<td></td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print '<td><input type="text" name="search_doc_type" value="' . $search_doc_type . '"></td>';
print '<td><input type="text" name="search_year" value="' . $search_year . '"></td>';
print '<td><input type="text" name="search_doc_refe" value="' . $search_doc_ref . '"></td>';
print '<td colspan="7">&nbsp;</td>';
print '<td align="right">';
$searchpicto=$form->showFilterButtons();
print $searchpicto;
print '</td>';
print '</tr>';
$var = false;
$solde = 0;
$tmp = '';
while ($obj = $db->fetch_object($resql)) {
if ($tmp != $obj->lettering_code || empty($tmp))
$tmp = $obj->lettering_code;
if ($tmp != $obj->lettering_code || empty($obj->lettering_code))
$var = ! $var;
$solde += ($obj->credit - $obj->debit);
print "<tr $bc[$var]>";
if (empty($obj->lettering_code)) {
print '<td><a href="' . dol_buildpath('/accountancy/bookkeeping/card.php', 1) . '?piece_num=' . $obj->piece_num . '">';
print img_edit();
print '</a>&nbsp;' . $obj->doc_type . '</td>' . "\n";
} else
print '<td>' . $obj->doc_type . '</td>' . "\n";
print '<td>' . dol_print_date($db->jdate($obj->doc_date), 'day') . '</td>';
print '<td>' . $obj->doc_ref . '</td>';
print '<td>' . $obj->label_compte . '</td>';
print '<td>' . price($obj->debit) . '</td>';
print '<td>' . price($obj->credit) . '</td>';
print '<td>' . price($obj->montant) . '</td>';
print '<td>' . $obj->sens . '</td>';
print '<td>' . $obj->code_journal . '</td>';
print '<td>' . round($solde, 2) . '</td>';
if (empty($obj->lettering_code)) {
print '<td class="nowrap" align="center"><input type="checkbox" class="flat checkforselect" name="toselect[]" id="toselect[]" value="' . $obj->rowid . '" /></td>';
} else
print '<td>' . $obj->lettering_code . '</td>';
print "<table class=\"noborder\" width=\"100%\">";
print '<tr class="liste_titre">';
print '<td></td>';
print_liste_field_titre("Doctype", "liste.php", "bk.doc_type" );
print_liste_field_titre("Docdate", "liste.php", "bk.doc_date" );
print_liste_field_titre("Docref", "liste.php", "bk.doc_ref" );
// print_liste_field_titre("Numerocompte", "liste.php", "bk.numero_compte" );
// print_liste_field_titre("Code_tiers", "liste.php", "bk.code_tiers" );
print_liste_field_titre("Labelcompte", "liste.php", "bk_label_compte" );
print_liste_field_titre("Debit", "liste.php", "bk.debit" );
print_liste_field_titre("Credit", "liste.php", "bk.credit" );
print_liste_field_titre("Amount", "liste.php", "bk.montant" );
print_liste_field_titre("Sens", "liste.php", "bk.sens" );
print_liste_field_titre("Codejournal", "liste.php", "bk.code_journal" );
print '<td></td>';
print '<td></td>';
print "</tr>\n";
print '<tr class="liste_titre">';
print '<form action="" method="GET">';
print '<input type="hidden" name="socid" value="' . $_GET ["socid"] . '">';
print '<td><input type="text" name="search_doc_type" value="' . $_GET ["search_doc_type"] . '"></td>';
print '<td><input type="text" name="search_year" value="' . $_GET ["search_year"] . '"></td>';
print '<td><input type="text" name="search_doc_refe" value="' . $_GET ["search_doc_ref"] . '"></td>';
// print '<td><input type="text" name="search_compte" value="' . $_GET ["search_compte"] . '"></td>';
// print '<td><input type="text" name="search_tiers" value="' . $_GET ["search_tiers"] . '"></td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" value="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '" title="' . dol_escape_htmltag ( $langs->trans ( "Search" ) ) . '">';
print '</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>';
print '</form>';
print '</tr>';
$var = false;
$debit = 0;
$credit = 0;
$solde = 0;
$tmp = '';
while ( $i < $num ) {
$obj = $db->fetch_object ( $resql );
if($tmp !=$obj->lettering || empty($tmp) )
$tmp =$obj->lettering;
if($tmp !=$obj->lettering || empty($obj->lettering))
$var = ! $var;
$debit+= $obj->debit;
$credit+= $obj->credit;
$solde+=($obj->credit-$obj->debit);
print "<tr $bc[$var]>";
print '<td>' . $obj->rowid . '</td>';
if(empty($obj->lettering)){
print '<td><a href="'.dol_buildpath('/accountancy/bookkeeping/card.php', 1).'?piece_num=' . $obj->piece_num . '">';
print img_edit ();
print '</a>&nbsp;' . $obj->doc_type . '</td>' . "\n";
}
else
print '<td>'.$obj->doc_type . '</td>' . "\n";
print '<td>' . dol_print_date ( $db->jdate ( $obj->doc_date ), 'day' ) . '</td>';
print '<td>' . $obj->doc_ref . '</td>';
// print '<td>' . $obj->numero_compte . '</td>';
// print '<td>' . $obj->code_tiers . '</td>';
print '<td>' . $obj->label_compte . '</td>';
print '<td>' . $obj->debit . '</td>';
print '<td>' . $obj->credit . '</td>';
print '<td>' . $obj->montant . '</td>';
print '<td>' . $obj->sens . '</td>';
print '<td>' . $obj->code_journal . '</td>';
print '<td>' . round($solde, 2) . '</td>';
if(empty($obj->lettering)){
print '<td><input type="checkbox" name="ids[]" value="' . $obj->rowid . '" /></td>';
}
else
print '<td>' . $obj->lettering . '</td>';
print "</tr>\n";
$i ++;
}
print '<tr class="oddeven">';
print '<td colspan="4">Mouvement totaux</td>' . "\n";
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td><strong>' . $debit . '</strong></td>';
print '<td><strong>' . $credit . '</strong></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td>&nbsp;</td>';
print "</tr>\n";
print "<tr $bc[$var]>";
print '<td colspan="5">Solde Comptable</td>' . "\n";
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td><strong>' . ($credit-$debit) . '</strong></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td>&nbsp;</td>';
print "</tr>\n";
print "</table>";
print '<input class="butAction" type="submit" value="lettering">';
print '<a class="butAction" href="?socid='.$object->id.'&action=autolettrage">auto lettering</a>';
print "</form>";
$db->free ( $resql );
} else {
dol_print_error ( $db );
}
print '<tr class="oddeven">';
print '<td colspan="4">Mouvement totaux</td>' . "\n";
print '<td><strong>' . price($debit) . '</strong></td>';
print '<td><strong>' . price($credit) . '</strong></td>';
print '<td colspan="5"></td>';
print "</tr>\n";
print "<tr $bc[$var]>";
print '<td colspan="9">Solde Comptable</td>' . "\n";
print '<td><strong>' . price($credit - $debit) . '</strong></td>';
print '<td colspan="5"></td>';
print "</tr>\n";
print "</table>";
print '<input class="butAction" type="submit" value="lettering" name="lettering" id="lettering">';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '&action=autolettrage">'.$langs->trans('AccountancyAutoLettering').'</a>';
print "</form>";
$db->free($resql);
} else {
dol_print_error($db);
}
// End of page
llxFooter();

View File

@@ -276,31 +276,25 @@ class AccountancyCategory
*
* @return array Result in table
*/
public function getCatsCpts() {
public function getCatsCpts()
{
global $mysoc;
$sql = "";
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
if (empty($mysoc->country_id)) {
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
exit();
}
if (! empty($mysoc->country_id)) {
$sql = "SELECT t.rowid, t.account_number, t.label as name_cpt, cat.code, cat.position, cat.label as name_cat, cat.sens ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t, " . MAIN_DB_PREFIX . "c_accounting_category as cat";
$sql .= " WHERE t.fk_accounting_category IN ( SELECT c.rowid ";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
$sql .= " WHERE c.active = 1";
$sql .= " AND c.fk_country = " . $mysoc->country_id . ")";
$sql .= " AND cat.rowid = t.fk_accounting_category";
$sql .= " ORDER BY cat.position ASC";
} else {
$sql = "SELECT c.rowid, c.code, c.label, c.category_type ";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c, " . MAIN_DB_PREFIX . "c_country as co";
$sql .= " WHERE c.active = 1 AND c.fk_country = co.rowid";
$sql .= " AND co.code = '" . $mysoc->country_code . "'";
$sql .= " ORDER BY c.position ASC";
}
$sql = "SELECT t.rowid, t.account_number, t.label as account_label, cat.code, cat.position, cat.label as name_cat, cat.sens ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t, " . MAIN_DB_PREFIX . "c_accounting_category as cat";
$sql .= " WHERE t.fk_accounting_category IN ( SELECT c.rowid ";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
$sql .= " WHERE c.active = 1";
$sql .= " AND (c.fk_country = ".$mysoc->country_id." OR c.fk_country = 0)";
$sql .= " AND cat.rowid = t.fk_accounting_category";
$sql .= " ORDER BY cat.position ASC";
$resql = $this->db->query($sql);
if ($resql) {
@@ -316,7 +310,7 @@ class AccountancyCategory
'code' => $obj->code,
'position' => $obj->position,
'account_number' => $obj->account_number,
'name_cpt' => $obj->name_cpt,
'account_label' => $obj->account_label,
'sens' => $obj->sens
);
$i ++;
@@ -334,22 +328,28 @@ class AccountancyCategory
/**
* Function to show result of an accounting account from the ledger with a direction and a period
*
* @param int $cpt Id accounting account
* @param string $month Specifig month - Can be empty
* @param string $year Specific year
* @param int $sens Sens of the account 0: credit - debit 1: debit - credit
*
* @return integer Result in table
* @param int $cpt Id accounting account
* @param string $month Specifig month - Can be empty
* @param string $date_start Date start
* @param string $date_end Date end
* @param int $sens Sens of the account: 0: credit - debit, 1: debit - credit
* @param string $thirdparty_code Thirdparty code
* @return integer Result in table
*/
public function getResult($cpt, $month, $year, $sens) {
public function getResult($cpt, $month, $date_start, $date_end, $sens, $thirdparty_code='nofilter')
{
$sql = "SELECT SUM(t.debit) as debit, SUM(t.credit) as credit";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
$sql .= " WHERE t.numero_compte = '" . $cpt."'";
$sql .= " AND YEAR(t.doc_date) = " . $year;
if (! empty($date_start) && ! empty($date_end))
$sql.= " AND t.doc_date >= '".$this->db->idate($date_start)."' AND t.doc_date <= '".$this->db->idate($date_end)."'";
if (! empty($month)) {
$sql .= " AND MONTH(t.doc_date) = " . $month;
}
if ($thirdparty_code != 'nofilter')
{
$sql .= " AND thirdparty_code = '".$this->db->escape($thirdparty_code)."'";
}
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
@@ -375,84 +375,27 @@ class AccountancyCategory
}
/**
* Function to call category from a specific country
* Return list of personalized groups that are active
*
* @return array Result in table
* @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups
* @return array Array of groups
*/
public function getCatsCal() {
public function getCats($categorytype=-1)
{
global $db, $langs, $user, $mysoc;
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
if (empty($mysoc->country_id)) {
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
exit();
}
if (! empty($mysoc->country_id)) {
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
$sql .= " WHERE c.active = 1 AND c.category_type = 1 ";
$sql .= " AND c.fk_country = " . $mysoc->country_id;
$sql .= " ORDER BY c.position ASC";
} else {
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c, " . MAIN_DB_PREFIX . "c_country as co";
$sql .= " WHERE c.active = 1 AND c.category_type = 1 AND c.fk_country = co.rowid";
$sql .= " AND co.code = '" . $mysoc->country_code . "'";
$sql .= " ORDER BY c.position ASC";
}
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
$sql .= " WHERE c.active = 1 ";
if ($categorytype >= 0) $sql.=" AND c.category_type = 1";
$sql .= " AND (c.fk_country = ".$mysoc->country_id." OR c.fk_country = 0)";
$sql .= " ORDER BY c.position ASC";
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$i = 0;
$obj = '';
$num = $this->db->num_rows($resql);
$data = array ();
if ($num) {
while ( $i < $num ) {
$obj = $this->db->fetch_object($resql);
$position = $obj->position;
$data[$position] = array (
'code' => $obj->code,
'label' => $obj->label,
'formula' => $obj->formula
);
$i ++;
}
}
return $data;
} else {
$this->error = "Error " . $this->db->lasterror();
$this->errors[] = $this->error;
dol_syslog(__METHOD__ . " " . implode(',', $this->errors), LOG_ERR);
return - 1;
}
}
public function getCats() {
global $db, $langs, $user, $mysoc;
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
exit();
}
if (! empty($mysoc->country_id)) {
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c";
$sql .= " WHERE c.active = 1 ";
$sql .= " AND c.fk_country = " . $mysoc->country_id;
$sql .= " ORDER BY c.position ASC";
} else {
$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type";
$sql .= " FROM " . MAIN_DB_PREFIX . "c_accounting_category as c, " . MAIN_DB_PREFIX . "c_country as co";
$sql .= " WHERE c.active = 1 AND c.fk_country = co.rowid";
$sql .= " AND co.code = '" . $mysoc->country_code . "'";
$sql .= " ORDER BY c.position ASC";
}
dol_syslog(__METHOD__ . " sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$i = 0;
@@ -466,12 +409,12 @@ class AccountancyCategory
$data[] = array (
'rowid' => $obj->rowid,
'code' => $obj->code,
'position' => $obj->position,
'label' => $obj->label,
'formula' => $obj->formula,
'position' => $obj->position,
'category_type' => $obj->category_type
);
$i ++;
$i++;
}
}
return $data;
@@ -487,13 +430,19 @@ class AccountancyCategory
// calcule
/* I try to replace this with dol_eval()
const PATTERN = '/(?:\-?\d+(?:\.?\d+)?[\+\-\*\/])+\-?\d+(?:\.?\d+)?/';
const PARENTHESIS_DEPTH = 10;
public function calculate($input){
public function calculate($input)
{
global $langs;
if(strpos($input, '+') != null || strpos($input, '-') != null || strpos($input, '/') != null || strpos($input, '*') != null){
// Remove white spaces and invalid math chars
$input = str_replace($langs->trans("ThousandSeparator"), '', $input);
$input = str_replace(',', '.', $input);
$input = preg_replace('[^0-9\.\+\-\*\/\(\)]', '', $input);
@@ -535,28 +484,41 @@ class AccountancyCategory
return 0;
}
*/
/**
* get cpts of category
* Get all accounting account of a group.
* You must choose between first parameter (personalized group) or the second (free criteria filter)
*
* @param int $cat_id Id accounting account category
*
* @return array Result in table
* @param int $cat_id Id if personalized accounting group/category
* @param string $predefinedgroupwhere Sql criteria filter to select accounting accounts
* @return array Array of accounting accounts
*/
public function getCptsCat($cat_id) {
public function getCptsCat($cat_id, $predefinedgroupwhere='')
{
global $mysoc;
$sql = "";
$sql = '';
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
exit();
}
$sql = "SELECT t.rowid, t.account_number, t.label as name_cpt";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
$sql .= " WHERE t.fk_accounting_category = ".$cat_id;
$sql .= " ORDER BY t.account_number ";
if (! empty($cat_id))
{
$sql = "SELECT t.rowid, t.account_number, t.label as account_label";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
$sql .= " WHERE t.fk_accounting_category = ".$cat_id;
$sql .= " ORDER BY t.account_number";
}
else
{
$sql = "SELECT t.rowid, t.account_number, t.label as account_label";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t";
$sql .= " WHERE ".$predefinedgroupwhere;
$sql .= " ORDER BY t.account_number";
}
//echo $sql;
$resql = $this->db->query($sql);
@@ -564,14 +526,15 @@ class AccountancyCategory
$i = 0;
$obj = '';
$num = $this->db->num_rows($resql);
$data = array ();
$data = array();
if ($num) {
while ( $obj = $this->db->fetch_object($resql) ) {
while ($obj = $this->db->fetch_object($resql))
{
$name_cat = $obj->name_cat;
$data[] = array (
'id' => $obj->rowid,
'account_number' => $obj->account_number,
'name_cpt' => $obj->name_cpt,
'account_label' => $obj->account_label,
);
$i ++;
}

View File

@@ -6,6 +6,10 @@
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
* Copyright (C) 2016-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
* 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
@@ -40,7 +44,7 @@ class AccountancyExport
/**
* @var Type of export. Defined by $conf->global->ACCOUNTING_EXPORT_MODELCSV
*/
public static $EXPORT_TYPE_NORMAL = 1; // Classic CSV
public static $EXPORT_TYPE_NORMAL = 1; // Classic CSV
public static $EXPORT_TYPE_CEGID = 2;
public static $EXPORT_TYPE_COALA = 3;
public static $EXPORT_TYPE_BOB50 = 4;
@@ -49,6 +53,7 @@ class AccountancyExport
public static $EXPORT_TYPE_EBP = 7;
public static $EXPORT_TYPE_COGILOG = 8;
public static $EXPORT_TYPE_AGIRIS = 9;
public static $EXPORT_TYPE_CONFIGURABLE = 10;
/**
*
@@ -78,11 +83,11 @@ class AccountancyExport
$this->db = &$db;
$this->separator = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$this->end_line = "\n";
$this->end_line = empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?"\n":($conf->global->ACCOUNTING_EXPORT_ENDLINE==1?"\n":"\r\n");
}
/**
* Array wit all export type available (key + label)
* Array with all export type available (key + label)
*
* @return array of type
*/
@@ -98,7 +103,70 @@ class AccountancyExport
self::$EXPORT_TYPE_QUADRATUS => $langs->trans('Modelcsv_quadratus'),
self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'),
self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'),
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris')
self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'),
self::$EXPORT_TYPE_CONFIGURABLE => $langs->trans('Modelcsv_configurable'),
);
}
/**
* Array with all export type available (key + label) and parameters for config
*
* @return array of type
*/
public static function getTypeConfig() {
global $conf, $langs;
return array (
'param' => array(
self::$EXPORT_TYPE_NORMAL => array(
'label' => $langs->trans('Modelcsv_normal'),
'ACCOUNTING_EXPORT_FORMAT' => empty($conf->global->ACCOUNTING_EXPORT_FORMAT)?'txt':$conf->global->ACCOUNTING_EXPORT_FORMAT,
'ACCOUNTING_EXPORT_SEPARATORCSV' => empty($conf->global->ACCOUNTING_EXPORT_SEPARATORCSV)?',':$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV,
'ACCOUNTING_EXPORT_ENDLINE' => empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?1:$conf->global->ACCOUNTING_EXPORT_ENDLINE,
'ACCOUNTING_EXPORT_DATE' => empty($conf->global->ACCOUNTING_EXPORT_DATE)?'%d%m%Y':$conf->global->ACCOUNTING_EXPORT_DATE,
),
self::$EXPORT_TYPE_CEGID => array(
'label' => $langs->trans('Modelcsv_CEGID'),
),
self::$EXPORT_TYPE_COALA => array(
'label' => $langs->trans('Modelcsv_COALA'),
),
self::$EXPORT_TYPE_BOB50 => array(
'label' => $langs->trans('Modelcsv_bob50'),
),
self::$EXPORT_TYPE_CIEL => array(
'label' => $langs->trans('Modelcsv_ciel'),
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
),
self::$EXPORT_TYPE_QUADRATUS => array(
'label' => $langs->trans('Modelcsv_quadratus'),
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
),
self::$EXPORT_TYPE_EBP => array(
'label' => $langs->trans('Modelcsv_ebp'),
),
self::$EXPORT_TYPE_COGILOG => array(
'label' => $langs->trans('Modelcsv_cogilog'),
),
self::$EXPORT_TYPE_AGIRIS => array(
'label' => $langs->trans('Modelcsv_agiris'),
),
self::$EXPORT_TYPE_CONFIGURABLE => array(
'label' => $langs->trans('Modelcsv_configurable'),
'ACCOUNTING_EXPORT_FORMAT' => empty($conf->global->ACCOUNTING_EXPORT_FORMAT)?'txt':$conf->global->ACCOUNTING_EXPORT_FORMAT,
'ACCOUNTING_EXPORT_SEPARATORCSV' => empty($conf->global->ACCOUNTING_EXPORT_SEPARATORCSV)?',':$conf->global->ACCOUNTING_EXPORT_SEPARATORCSV,
'ACCOUNTING_EXPORT_ENDLINE' => empty($conf->global->ACCOUNTING_EXPORT_ENDLINE)?1:$conf->global->ACCOUNTING_EXPORT_ENDLINE,
'ACCOUNTING_EXPORT_DATE' => empty($conf->global->ACCOUNTING_EXPORT_DATE)?'%d%m%Y':$conf->global->ACCOUNTING_EXPORT_DATE,
),
),
'cr'=> array (
'1' => $langs->trans("Unix"),
'2' => $langs->trans("Windows")
),
'format' => array (
'csv' => $langs->trans("csv"),
'txt' => $langs->trans("txt")
),
);
}
@@ -151,6 +219,9 @@ class AccountancyExport
case self::$EXPORT_TYPE_AGIRIS :
$this->exportAgiris($TData);
break;
case self::$EXPORT_TYPE_CONFIGURABLE :
$this->exportConfigurable($TData);
break;
default:
$this->errors[] = $langs->trans('accountancy_error_modelnotfound');
break;
@@ -192,6 +263,7 @@ class AccountancyExport
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d%m%Y');
$separator = ";";
$end_line = "\n";
print $date . $separator;
print $line->code_journal . $separator;
@@ -201,7 +273,7 @@ class AccountancyExport
print price($line->montant) . $separator;
print $line->label_operation . $separator;
print $line->doc_ref;
print $this->end_line;
print $end_line;
}
}
@@ -215,24 +287,26 @@ class AccountancyExport
public function exportCogilog($objectLines) {
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d%m%Y');
$separator = ";";
$end_line = "\n";
print $line->code_journal . $this->separator;
print $date . $this->separator;
print $line->piece_num . $this->separator;
print length_accountg($line->numero_compte) . $this->separator;
print '' . $this->separator;
print $line->label_operation . $this->separator;
print $date . $this->separator;
print $line->code_journal . $separator;
print $date . $separator;
print $line->piece_num . $separator;
print length_accountg($line->numero_compte) . $separator;
print '' . $separator;
print $line->label_operation . $separator;
print $date . $separator;
if ($line->sens=='D') {
print price($line->montant) . $this->separator;
print '' . $this->separator;
print price($line->montant) . $separator;
print '' . $separator;
}elseif ($line->sens=='C') {
print '' . $this->separator;
print price($line->montant) . $this->separator;
print '' . $separator;
print price($line->montant) . $separator;
}
print $line->doc_ref . $this->separator;
print $line->label_operation . $this->separator;
print $this->end_line;
print $line->doc_ref . $separator;
print $line->label_operation . $separator;
print $end_line;
}
}
@@ -245,18 +319,21 @@ class AccountancyExport
*/
public function exportCoala($objectLines) {
// Coala export
$separator = ";";
$end_line = "\n";
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
print $date . $this->separator;
print $line->code_journal . $this->separator;
print length_accountg($line->numero_compte) . $this->separator;
print $line->piece_num . $this->separator;
print $line->doc_ref . $this->separator;
print price($line->debit) . $this->separator;
print price($line->credit) . $this->separator;
print 'E' . $this->separator;
print length_accountg($line->subledger_account) . $this->separator;
print $this->end_line;
print $date . $separator;
print $line->code_journal . $separator;
print length_accountg($line->numero_compte) . $separator;
print $line->piece_num . $separator;
print $line->doc_ref . $separator;
print price($line->debit) . $separator;
print price($line->credit) . $separator;
print 'E' . $separator;
print length_accountg($line->subledger_account) . $separator;
print $end_line;
}
}
@@ -270,28 +347,31 @@ class AccountancyExport
public function exportBob50($objectLines) {
// Bob50
$separator = ";";
$end_line = "\n";
foreach ( $objectLines as $line ) {
print $line->piece_num . $this->separator;
print $line->piece_num . $separator;
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
print $date . $this->separator;
print $date . $separator;
if (empty($line->subledger_account)) {
print 'G' . $this->separator;
print length_accounta($line->numero_compte) . $this->separator;
print 'G' . $separator;
print length_accounta($line->numero_compte) . $separator;
} else {
if (substr($line->numero_compte, 0, 3) == '411') {
print 'C' . $this->separator;
print 'C' . $separator;
}
if (substr($line->numero_compte, 0, 3) == '401') {
print 'F' . $this->separator;
print 'F' . $separator;
}
print length_accountg($line->subledger_account) . $this->separator;
print length_accountg($line->subledger_account) . $separator;
}
print price($line->debit) . $this->separator;
print price($line->credit) . $this->separator;
print dol_trunc($line->label_operation, 32) . $this->separator;
print $this->end_line;
print price($line->debit) . $separator;
print price($line->credit) . $separator;
print dol_trunc($line->label_operation, 32) . $separator;
print $end_line;
}
}
@@ -305,7 +385,7 @@ class AccountancyExport
public function exportCiel(&$TData) {
global $conf;
$this->end_line ="\r\n";
$end_line ="\r\n";
$i = 1;
$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
@@ -321,14 +401,14 @@ class AccountancyExport
$Tab['date_ope'] = dol_print_date($data->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
$Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 12), 12);
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 11), 11);
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . $data->label_operation, 25), 25);
$Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref) . dol_string_unaccent($data->label_operation), 25), 25);
$Tab['montant'] = str_pad(abs($data->montant), 13, ' ', STR_PAD_LEFT);
$Tab['type_montant'] = str_pad($data->sens, 1);
$Tab['vide'] = str_repeat(' ', 18);
$Tab['intitule_compte'] = str_pad(self::trunc($data->label_operation, 34), 34);
$Tab['intitule_compte'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 34), 34);
$Tab['end'] = 'O2003';
$Tab['end_line'] = $this->end_line;
$Tab['end_line'] = $end_line;
print implode($Tab);
$i ++;
@@ -345,9 +425,11 @@ class AccountancyExport
public function exportQuadratus(&$TData) {
global $conf;
$this->end_line ="\r\n";
$end_line ="\r\n";
$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
//We should use dol_now function not time however this is wrong date to transfert in accounting
//$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
//$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy
foreach ( $TData as $data ) {
$code_compta = $data->numero_compte;
if (! empty($data->subledger_account))
@@ -358,29 +440,58 @@ class AccountancyExport
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 8), 8);
$Tab['code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2);
$Tab['folio'] = '000';
$Tab['date_ecriture'] = $date_ecriture;
//We use invoice date $data->doc_date not $date_ecriture which is the transfert date
//maybe we should set an option for customer who prefer to keep in accounting software the tranfert date instead of invoice date ?
//$Tab['date_ecriture'] = $date_ecriture;
$Tab['date_ecriture'] = dol_print_date($data->doc_date, '%d%m%y');
$Tab['filler'] = ' ';
$Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_operation, 20), 20);
$Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref) . ' ' . dol_string_unaccent($data->label_operation), 20), 20);
$Tab['sens'] = $data->sens; // C or D
$Tab['signe_montant'] = '+';
$Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount
//elarifr le montant doit etre en centimes sans point decimal !
$Tab['montant'] = str_pad(abs($data->montant*100), 12, '0', STR_PAD_LEFT); // TODO manage negative amount
// $Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount
$Tab['contrepartie'] = str_repeat(' ', 8);
// elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting
if (! empty($data->date_echeance))
$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
//$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y' ); // elarifr: format must be ddmmyy
else
$Tab['date_echeance'] = '000000';
$Tab['lettrage'] = str_repeat(' ', 5);
//elarifr please keep quadra named field lettrage(2) + codestat(3) instead of fake lettrage(5)
//$Tab['lettrage'] = str_repeat(' ', 5);
$Tab['lettrage'] = str_repeat(' ', 2);
$Tab['codestat'] = str_repeat(' ', 3);
$Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 5), 5);
$Tab['filler2'] = str_repeat(' ', 20);
//elarifr keep correct quadra named field instead of anon filler
//$Tab['filler2'] = str_repeat(' ', 20);
$Tab['affaire'] = str_repeat(' ', 10);
$Tab['quantity1'] = str_repeat(' ', 10);
$Tab['num_piece2'] = str_pad(self::trunc($data->piece_num, 8), 8);
$Tab['devis'] = str_pad($conf->currency, 3);
$Tab['code_journal2'] = str_pad(self::trunc($data->code_journal, 3), 3);
$Tab['filler3'] = str_repeat(' ', 3);
$Tab['libelle_ecriture2'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_operation, 32), 32);
$Tab['num_piece3'] = str_pad(self::trunc($data->piece_num, 10), 10);
//elarifr keep correct quadra named field instead of anon filler libelle_ecriture2 is 30 char not 32 !!!!
//as we use utf8, we must remove accent to have only one ascii char instead of utf8 2 chars for specials that report wrong line size that will exceed import format spec
//todo we should filter more than only accent to avoid wrong line size
//TODO: remove invoice number doc_ref in libelle,
//TODO: we should offer an option for customer to build the libelle using invoice number / name / date in accounting software
//$Tab['libelle_ecriture2'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref) . ' ' . dol_string_unaccent($data->label_operation), 30), 30);
$Tab['libelle_ecriture2'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 30), 30);
$Tab['codetva'] = str_repeat(' ', 2);
//elarifr we need to keep the 10 lastest number of invoice doc_ref not the beginning part that is the unusefull almost same part
//$Tab['num_piece3'] = str_pad(self::trunc($data->piece_num, 10), 10);
$Tab['num_piece3'] = substr(self::trunc($data->doc_ref, 20), -10);
$Tab['filler4'] = str_repeat(' ', 73);
$Tab['end_line'] = $this->end_line;
$Tab['end_line'] = $end_line;
print implode($Tab);
}
@@ -396,24 +507,25 @@ class AccountancyExport
*/
public function exportEbp($objectLines) {
$this->separator = ',';
$separator = ',';
$end_line = "\n";
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d%m%Y');
print $line->id . $this->separator;
print $date . $this->separator;
print $line->code_journal . $this->separator;
print length_accountg($line->numero_compte) . $this->separator;
print substr(length_accountg($line->numero_compte),0,2) . $this->separator;
print '"'.dol_trunc($line->label_operation,40,'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;
print $line->id . $separator;
print $date . $separator;
print $line->code_journal . $separator;
print length_accountg($line->numero_compte) . $separator;
print substr(length_accountg($line->numero_compte),0,2) . $separator;
print '"'.dol_trunc($line->label_operation,40,'right','UTF-8',1).'"' . $separator;
print '"'.dol_trunc($line->piece_num,15,'right','UTF-8',1).'"'.$separator;
print price2num($line->montant).$separator;
print $line->sens.$separator;
print $date . $separator;
print 'EUR';
print $this->end_line;
print $end_line;
}
}
@@ -427,30 +539,61 @@ class AccountancyExport
*/
public function exportAgiris($objectLines) {
$this->separator = ';';
$separator = ';';
$end_line = "\n";
foreach ( $objectLines as $line ) {
$date = dol_print_date($line->doc_date, '%d%m%Y');
print $line->piece_num . $this->separator;
print $line->label_operation . $this->separator;
print $date . $this->separator;
print $line->label_operation . $this->separator;
print $line->piece_num . $separator;
print $line->label_operation . $separator;
print $date . $separator;
print $line->label_operation . $separator;
if (empty($line->subledger_account)) {
print length_accountg($line->numero_compte) . $this->separator;
print length_accountg($line->numero_compte) . $separator;
} else {
print length_accounta($line->subledger_account) . $this->separator;
print length_accounta($line->subledger_account) . $separator;
}
print $line->doc_ref . $this->separator;
print price($line->debit) . $this->separator;
print price($line->credit) . $this->separator;
print price($line->montant).$this->separator;
print $line->sens.$this->separator;
print $line->doc_ref . $separator;
print price($line->debit) . $separator;
print price($line->credit) . $separator;
print price($line->montant) . $separator;
print $line->sens . $separator;
print $line->code_journal;
print $this->end_line;
print $end_line;
}
}
/**
* Export format : Configurable
*
* @param array $objectLines data
*
* @return void
*/
public function exportConfigurable($objectLines) {
global $conf;
foreach ($objectLines as $line) {
$tab = array();
// export configurable
$date = dol_print_date($line->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
$tab[] = $line->piece_num;
$tab[] = $date;
$tab[] = $line->doc_ref;
$tab[] = $line->label_operation;
$tab[] = length_accountg($line->numero_compte);
$tab[] = length_accounta($line->subledger_account);
$tab[] = price($line->debit);
$tab[] = price($line->credit);
$tab[] = price($line->montant);
$tab[] = $line->code_journal;
$separator = $this->separator;
print implode($separator, $tab) . $this->end_line;
}
}

View File

@@ -107,7 +107,7 @@ class AccountancySystem
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_system";
$sql .= " (date_creation, fk_user_author, numero, label)";
$sql .= " VALUES ('" . $this->db->idate($now) . "'," . $user->id . ",'" . $this->numero . "','" . $this->label . "')";
$sql .= " VALUES ('" . $this->db->idate($now) . "'," . $user->id . ",'" . $this->db->escape($this->numero) . "','" . $this->db->escape($this->label) . "')";
dol_syslog(get_class($this) . "::create sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);

View File

@@ -1,9 +1,9 @@
<?php
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.com>
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Ari Elbaz (elarifr) <github@accedinfo.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
@@ -20,9 +20,9 @@
*/
/**
* \file htdocs/accountancy/class/accountingaccount.class.php
* \ingroup Advanced accountancy
* \brief File of class to manage accounting accounts
* \file htdocs/accountancy/class/accountingaccount.class.php
* \ingroup Advanced accountancy
* \brief File of class to manage accounting accounts
*/
/**
@@ -30,6 +30,21 @@
*/
class AccountingAccount extends CommonObject
{
public $element='accounting_account';
public $table_element='accounting_account';
public $picto = 'billr';
/**
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
* @var int
*/
public $ismultientitymanaged = 1;
/**
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
* @var integer
*/
public $restrictiononfksoc = 1;
var $db;
var $error;
var $errors;
@@ -47,27 +62,32 @@ class AccountingAccount extends CommonObject
var $fk_user_modif;
var $active; // duplicate with status
var $status;
/**
* Constructor
*
* @param DoliDB $db Database handle
*/
function __construct($db) {
global $conf;
$this->db = $db;
$this->next_prev_filter='fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS . ')'; // Used to add a filter in Form::showrefnav method
}
/**
* Load record in memory
*
* @param int $rowid Id
* @param string $account_number Account number
* @param int $limittocurrentchart 1=Do not load record if it is into another accounting system
* @return int <0 if KO, Id of record if OK and found
* @return int <0 if KO, 0 if not found, Id of record if OK and found
*/
function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0) {
function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0)
{
global $conf;
if ($rowid || $account_number) {
$sql = "SELECT a.rowid as rowid, a.datec, a.tms, a.fk_pcg_version, a.pcg_type, a.pcg_subtype, a.account_number, a.account_parent, a.label, a.fk_accounting_category, a.fk_user_author, a.fk_user_modif, a.active";
$sql .= ", ca.label as category_label";
@@ -77,20 +97,21 @@ class AccountingAccount extends CommonObject
if ($rowid) {
$sql .= " a.rowid = '" . $rowid . "'";
} elseif ($account_number) {
$sql .= " a.account_number = '" . $account_number . "'";
$sql .= " a.account_number = '" . $this->db->escape($account_number) . "'";
}
if (! empty($limittocurrentchart)) {
$sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
$sql .= ' AND a.fk_pcg_version IN (SELECT pcg_version FROM ' . MAIN_DB_PREFIX . 'accounting_system WHERE rowid=' . $this->db->escape($conf->global->CHARTOFACCOUNTS) . ')';
}
dol_syslog(get_class($this) . "::fetch sql=" . $sql, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) {
$obj = $this->db->fetch_object($result);
if ($obj) {
$this->id = $obj->rowid;
$this->rowid = $obj->rowid;
$this->ref = $obj->account_number;
$this->datec = $obj->datec;
$this->tms = $obj->tms;
$this->fk_pcg_version = $obj->fk_pcg_version;
@@ -105,7 +126,7 @@ class AccountingAccount extends CommonObject
$this->fk_user_modif = $obj->fk_user_modif;
$this->active = $obj->active;
$this->status = $obj->active;
return $this->id;
} else {
return 0;
@@ -115,9 +136,9 @@ class AccountingAccount extends CommonObject
$this->errors[] = "Error " . $this->db->lasterror();
}
}
return - 1;
return -1;
}
/**
* Insert new accounting account in chart of accounts
*
@@ -129,7 +150,7 @@ class AccountingAccount extends CommonObject
global $conf;
$error = 0;
$now = dol_now();
// Clean parameters
if (isset($this->fk_pcg_version))
$this->fk_pcg_version = trim($this->fk_pcg_version);
@@ -149,18 +170,18 @@ class AccountingAccount extends CommonObject
$this->fk_user_author = trim($this->fk_user_author);
if (isset($this->active))
$this->active = trim($this->active);
if (empty($this->pcg_type) || $this->pcg_type == '-1')
{
$this->pcg_type = 'XXXXXX';
$this->pcg_type = 'XXXXXX';
}
if (empty($this->pcg_subtype) || $this->pcg_subtype == '-1')
{
$this->pcg_subtype = 'XXXXXX';
$this->pcg_subtype = 'XXXXXX';
}
// Check parameters
// Put here code to add control on parameters values
// Insert request
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_account(";
$sql .= "datec";
@@ -179,31 +200,31 @@ class AccountingAccount extends CommonObject
$sql .= ", " . $conf->entity;
$sql .= ", " . (empty($this->fk_pcg_version) ? 'NULL' : "'" . $this->db->escape($this->fk_pcg_version) . "'");
$sql .= ", " . (empty($this->pcg_type) ? 'NULL' : "'" . $this->db->escape($this->pcg_type) . "'");
$sql .= ", " . (empty($this->pcg_subtype) ? 'NULL' : "'" . $this->pcg_subtype . "'");
$sql .= ", " . (empty($this->account_number) ? 'NULL' : "'" . $this->account_number . "'");
$sql .= ", " . (empty($this->account_parent) ? 'NULL' : "'" . $this->db->escape($this->account_parent) . "'");
$sql .= ", " . (empty($this->pcg_subtype) ? 'NULL' : "'" . $this->db->escape($this->pcg_subtype) . "'");
$sql .= ", " . (empty($this->account_number) ? 'NULL' : "'" . $this->db->escape($this->account_number) . "'");
$sql .= ", " . (empty($this->account_parent) ? '0' : "'" . $this->db->escape($this->account_parent) . "'");
$sql .= ", " . (empty($this->label) ? 'NULL' : "'" . $this->db->escape($this->label) . "'");
$sql .= ", " . (empty($this->account_category) ? 'NULL' : "'" . $this->db->escape($this->account_category) . "'");
$sql .= ", " . (empty($this->account_category) ? 0 : $this->db->escape($this->account_category));
$sql .= ", " . $user->id;
$sql .= ", " . (! isset($this->active) ? 'NULL' : $this->db->escape($this->active));
$sql .= ")";
$this->db->begin();
dol_syslog(get_class($this) . "::create sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;
$this->errors[] = "Error " . $this->db->lasterror();
}
if (! $error) {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . "accounting_account");
// if (! $notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
// // Call triggers
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
// $interface=new Interfaces($this->db);
@@ -212,7 +233,7 @@ class AccountingAccount extends CommonObject
// // End call triggers
// }
}
// Commit or rollback
if ($error) {
foreach ( $this->errors as $errmsg ) {
@@ -226,27 +247,27 @@ class AccountingAccount extends CommonObject
return $this->id;
}
}
/**
* Update record
*
* @param User $user Use making update
* @return int <0 if KO, >0 if OK
*/
function update($user)
function update($user)
{
// Check parameters
if (empty($this->pcg_type) || $this->pcg_type == '-1')
{
$this->pcg_type = 'XXXXXX';
}
if (empty($this->pcg_subtype) || $this->pcg_subtype == '-1')
{
$this->pcg_subtype = 'XXXXXX';
}
$this->db->begin();
// Check parameters
if (empty($this->pcg_type) || $this->pcg_type == '-1')
{
$this->pcg_type = 'XXXXXX';
}
if (empty($this->pcg_subtype) || $this->pcg_subtype == '-1')
{
$this->pcg_subtype = 'XXXXXX';
}
$this->db->begin();
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
$sql .= " SET fk_pcg_version = " . ($this->fk_pcg_version ? "'" . $this->db->escape($this->fk_pcg_version) . "'" : "null");
$sql .= " , pcg_type = " . ($this->pcg_type ? "'" . $this->db->escape($this->pcg_type) . "'" : "null");
@@ -254,11 +275,11 @@ class AccountingAccount extends CommonObject
$sql .= " , account_number = '" . $this->db->escape($this->account_number) . "'";
$sql .= " , account_parent = '" . $this->db->escape($this->account_parent) . "'";
$sql .= " , label = " . ($this->label ? "'" . $this->db->escape($this->label) . "'" : "null");
$sql .= " , fk_accounting_category = '" . $this->db->escape($this->account_category) . "'";
$sql .= " , fk_accounting_category = " . (empty($this->account_category) ? 0 : $this->db->escape($this->account_category));
$sql .= " , fk_user_modif = " . $user->id;
$sql .= " , active = " . $this->active;
$sql .= " WHERE rowid = " . $this->id;
dol_syslog(get_class($this) . "::update sql=" . $sql, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) {
@@ -270,7 +291,7 @@ class AccountingAccount extends CommonObject
return - 1;
}
}
/**
* Check usage of accounting code
*
@@ -278,16 +299,16 @@ class AccountingAccount extends CommonObject
*/
function checkUsage() {
global $langs;
$sql = "(SELECT fk_code_ventilation FROM " . MAIN_DB_PREFIX . "facturedet";
$sql .= " WHERE fk_code_ventilation=" . $this->id . ")";
$sql .= "UNION";
$sql .= "(SELECT fk_code_ventilation FROM " . MAIN_DB_PREFIX . "facture_fourn_det";
$sql .= " WHERE fk_code_ventilation=" . $this->id . ")";
dol_syslog(get_class($this) . "::checkUsage sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
$num = $this->db->num_rows($resql);
if ($num > 0) {
@@ -301,7 +322,7 @@ class AccountingAccount extends CommonObject
return - 1;
}
}
/**
* Delete object in database
*
@@ -311,18 +332,18 @@ class AccountingAccount extends CommonObject
*/
function delete($user, $notrigger = 0) {
$error = 0;
$result = $this->checkUsage();
if ($result > 0) {
$this->db->begin();
// if (! $error) {
// if (! $notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
// // Call triggers
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
// $interface=new Interfaces($this->db);
@@ -331,11 +352,11 @@ class AccountingAccount extends CommonObject
// // End call triggers
// }
// }
if (! $error) {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "accounting_account";
$sql .= " WHERE rowid=" . $this->id;
dol_syslog(get_class($this) . "::delete sql=" . $sql);
$resql = $this->db->query($sql);
if (! $resql) {
@@ -343,7 +364,7 @@ class AccountingAccount extends CommonObject
$this->errors[] = "Error " . $this->db->lasterror();
}
}
// Commit or rollback
if ($error) {
foreach ( $this->errors as $errmsg ) {
@@ -360,7 +381,7 @@ class AccountingAccount extends CommonObject
return - 1;
}
}
/**
* Return clicable name (with picto eventually)
*
@@ -375,7 +396,7 @@ class AccountingAccount extends CommonObject
{
global $langs, $conf, $user;
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
$result = '';
@@ -395,24 +416,24 @@ class AccountingAccount extends CommonObject
$linkclose='';
if (empty($notooltip))
{
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$label=$langs->trans("ShowAccoutingAccount");
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.=' class="classfortooltip"';
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$label=$langs->trans("ShowAccoutingAccount");
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose.= ' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.=' class="classfortooltip"';
}
$linkstart='<a href="'.$url.'"';
$linkstart.=$linkclose.'>';
$linkstart='<a href="'.$url.'"';
$linkstart.=$linkclose.'>';
$linkend='</a>';
if ($nourl)
{
$linkstart = '';
$linkclose = '';
$linkend = '';
$linkend = '';
}
$label_link = length_accountg($this->account_number);
@@ -423,7 +444,7 @@ class AccountingAccount extends CommonObject
if ($withpicto != 2) $result.=$linkstart . $label_link . $linkend;
return $result;
}
/**
* Information on record
*
@@ -434,10 +455,10 @@ class AccountingAccount extends CommonObject
$sql = 'SELECT a.rowid, a.datec, a.fk_user_author, a.fk_user_modif, a.tms';
$sql .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as a';
$sql .= ' WHERE a.rowid = ' . $id;
dol_syslog(get_class($this) . '::info sql=' . $sql);
$result = $this->db->query($sql);
if ($result) {
if ($this->db->num_rows($result)) {
$obj = $this->db->fetch_object($result);
@@ -460,26 +481,26 @@ class AccountingAccount extends CommonObject
dol_print_error($this->db);
}
}
/**
* Account desactivate
* Account deactivated
*
* @param int $id Id
* @return int <0 if KO, >0 if OK
* @param int $id Id
* @return int <0 if KO, >0 if OK
*/
function account_desactivate($id) {
$result = $this->checkUsage();
if ($result > 0) {
$this->db->begin();
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
$sql .= "SET active = '0'";
$sql .= " WHERE rowid = " . $this->db->escape($id);
dol_syslog(get_class($this) . "::desactivate sql=" . $sql, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) {
$this->db->commit();
return 1;
@@ -492,20 +513,20 @@ class AccountingAccount extends CommonObject
return - 1;
}
}
/**
* Account activate
* Account activated
*
* @param int $id Id
* @return int <0 if KO, >0 if OK
* @param int $id Id
* @return int <0 if KO, >0 if OK
*/
function account_activate($id) {
$this->db->begin();
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account ";
$sql .= "SET active = '1'";
$sql .= " WHERE rowid = " . $this->db->escape($id);
dol_syslog(get_class($this) . "::activate sql=" . $sql, LOG_DEBUG);
$result = $this->db->query($sql);
if ($result) {
@@ -517,61 +538,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
* @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);
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
* @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');
}
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

@@ -29,7 +29,8 @@ class AccountingJournal extends CommonObject
public $element='accounting_journal';
public $table_element='accounting_journal';
public $fk_element = '';
protected $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto = 'generic';
var $rowid;
@@ -58,6 +59,8 @@ class AccountingJournal extends CommonObject
*/
function fetch($rowid = null, $journal_code = null)
{
global $conf;
if ($rowid || $journal_code)
{
$sql = "SELECT rowid, code, label, nature, active";
@@ -65,8 +68,11 @@ class AccountingJournal extends CommonObject
$sql .= " WHERE";
if ($rowid) {
$sql .= " rowid = " . (int) $rowid;
} elseif ($journal_code) {
}
elseif ($journal_code)
{
$sql .= " code = '" . $this->db->escape($journal_code) . "'";
$sql .= " AND entity = " . $conf->entity;
}
dol_syslog(get_class($this)."::fetch sql=" . $sql, LOG_DEBUG);
@@ -187,9 +193,6 @@ class AccountingJournal extends CommonObject
$url = DOL_URL_ROOT . '/accountancy/admin/journals_list.php?id=35';
$picto = 'billr';
$label='';
$label = '<u>' . $langs->trans("ShowAccountingJournal") . '</u>';
if (! empty($this->code))
$label .= '<br><b>'.$langs->trans('Code') . ':</b> ' . $this->code;
@@ -223,9 +226,11 @@ class AccountingJournal extends CommonObject
$label_link = $this->code;
if ($withlabel) $label_link .= ' - ' . $this->label;
if ($withpicto) $result.=($linkstart.img_object(($notooltip?'':$label), $picto, ($notooltip?'':'class="classfortooltip"'), 0, 0, $notooltip?0:1).$linkend);
if ($withpicto && $withpicto != 2) $result .= ' ';
if ($withpicto != 2) $result.=$linkstart . $label_link . $linkend;
$result .= $linkstart;
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.= $label_link;
$result .= $linkend;
return $result;
}

View File

@@ -32,45 +32,37 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
class BookKeeping extends CommonObject
{
/**
*
* @var string Error code (or message)
* @deprecated
*
* @see Accountingbookkeeping::errors
*/
public $error;
/**
*
* @var string[] Error codes (or messages)
*/
public $errors = array ();
/**
*
* @var string Id to identify managed objects
*/
public $element = 'accountingbookkeeping';
/**
*
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'accounting_bookkeeping';
public $entity = 1;
public $entity;
/**
*
* @var BookKeepingLine[] Lines
*/
public $lines = array ();
/**
*
* @var int ID
*/
public $id;
/**
*/
public $doc_date;
public $date_lim_reglement;
public $doc_type;
public $doc_ref;
public $fk_doc;
@@ -201,13 +193,18 @@ class BookKeeping extends CommonObject
$this->piece_num = 0;
// First check if line not yet already in bookkeeping
// First check if line not yet already in bookkeeping.
// Note that we must include doc_type - fk_doc - numero_compte - label to be sure to have unicity of line (we may have several lines
// with same doc_type, fk_odc, numero_compte for 1 invoice line when using localtaxes with same account)
// WARNING: This is not reliable, label may have been modified. This is just a small protection.
// The page to make journalization make the test on couple doc_type - fk_doc only.
$sql = "SELECT count(*) as nb";
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
$sql .= " WHERE doc_type = '" . $this->db->escape($this->doc_type) . "'";
$sql .= " AND fk_doc = " . $this->fk_doc;
$sql .= " AND fk_docdet = " . $this->fk_docdet; // This field can be 0 is record is for several lines
//$sql .= " AND fk_docdet = " . $this->fk_docdet; // This field can be 0 if record is for several lines
$sql .= " AND numero_compte = '" . $this->db->escape($this->numero_compte) . "'";
$sql .= " AND label_operation = '" . $this->db->escape($this->label_operation) . "'";
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";
$resql = $this->db->query($sql);
@@ -255,6 +252,7 @@ class BookKeeping extends CommonObject
$sql = "INSERT INTO " . MAIN_DB_PREFIX . $this->table_element . " (";
$sql .= "doc_date";
$sql .= ", date_lim_reglement";
$sql .= ", doc_type";
$sql .= ", doc_ref";
$sql .= ", fk_doc";
@@ -277,6 +275,7 @@ class BookKeeping extends CommonObject
$sql .= ', entity';
$sql .= ") VALUES (";
$sql .= "'" . $this->db->idate($this->doc_date) . "'";
$sql .= ", ".(! isset($this->date_lim_reglement) || dol_strlen($this->date_lim_reglement) == 0 ? 'NULL' : "'" . $this->db->idate($this->date_lim_reglement) . "'");
$sql .= ",'" . $this->db->escape($this->doc_type) . "'";
$sql .= ",'" . $this->db->escape($this->doc_ref) . "'";
$sql .= "," . $this->fk_doc;
@@ -296,7 +295,7 @@ class BookKeeping extends CommonObject
$sql .= ",'" . $this->db->escape($this->code_journal) . "'";
$sql .= ",'" . $this->db->escape($this->journal_label) . "'";
$sql .= "," . $this->db->escape($this->piece_num);
$sql .= ", " . (! isset($this->entity) ? '1' : $this->entity);
$sql .= ", " . (! isset($this->entity) ? $conf->entity : $this->entity);
$sql .= ")";
dol_syslog(get_class($this) . ":: create sql=" . $sql, LOG_DEBUG);
@@ -355,6 +354,67 @@ class BookKeeping extends CommonObject
}
}
/**
* Return a link to the object card (with optionaly the picto)
*
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
* @param string $option On what the link point to ('nolink', ...)
* @param int $notooltip 1=Disable tooltip
* @param string $morecss Add more css on link
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string String with URL
*/
function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
{
global $db, $conf, $langs;
global $dolibarr_main_authentication, $dolibarr_main_demo;
global $menumanager;
if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips
$result = '';
$companylink = '';
$label = '<u>' . $langs->trans("Transaction") . '</u>';
$label.= '<br>';
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->piece_num;
$url = DOL_URL_ROOT.'/accountancy/bookkeeping/card.php?piece_num='.$this->piece_num;
if ($option != 'nolink')
{
// Add param to save lastsearch_values or not
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
}
$linkclose='';
if (empty($notooltip))
{
if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$label=$langs->trans("ShowTransaction");
$linkclose.=' alt="'.dol_escape_htmltag($label, 1).'"';
}
$linkclose.=' title="'.dol_escape_htmltag($label, 1).'"';
$linkclose.=' class="classfortooltip'.($morecss?' '.$morecss:'').'"';
}
else $linkclose = ($morecss?' class="'.$morecss.'"':'');
$linkstart = '<a href="'.$url.'"';
$linkstart.=$linkclose.'>';
$linkend='</a>';
$result .= $linkstart;
if ($withpicto) $result.=img_object(($notooltip?'':$label), ($this->picto?$this->picto:'generic'), ($notooltip?(($withpicto != 2) ? 'class="paddingright"' : ''):'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip?0:1);
if ($withpicto != 2) $result.= $this->piece_num;
$result .= $linkend;
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
return $result;
}
/**
* Create object into database
*
@@ -364,6 +424,8 @@ class BookKeeping extends CommonObject
* @return int <0 if KO, Id of created object if OK
*/
public function createStd(User $user, $notrigger = false, $mode='') {
global $conf;
dol_syslog(__METHOD__, LOG_DEBUG);
$error = 0;
@@ -444,6 +506,7 @@ class BookKeeping extends CommonObject
// Insert request
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . $mode.'(';
$sql .= 'doc_date,';
$sql .= 'date_lim_reglement,';
$sql .= 'doc_type,';
$sql .= 'doc_ref,';
$sql .= 'fk_doc,';
@@ -466,6 +529,7 @@ class BookKeeping extends CommonObject
$sql .= 'entity';
$sql .= ') VALUES (';
$sql .= ' ' . (! isset($this->doc_date) || dol_strlen($this->doc_date) == 0 ? 'NULL' : "'" . $this->db->idate($this->doc_date) . "'") . ',';
$sql .= ' ' . (! isset($this->date_lim_reglement) || dol_strlen($this->date_lim_reglement) == 0 ? 'NULL' : "'" . $this->db->idate($this->date_lim_reglement) . "'") . ',';
$sql .= ' ' . (! isset($this->doc_type) ? 'NULL' : "'" . $this->db->escape($this->doc_type) . "'") . ',';
$sql .= ' ' . (! isset($this->doc_ref) ? 'NULL' : "'" . $this->db->escape($this->doc_ref) . "'") . ',';
$sql .= ' ' . (empty($this->fk_doc) ? '0' : $this->fk_doc) . ',';
@@ -485,7 +549,7 @@ class BookKeeping extends CommonObject
$sql .= ' ' . (empty($this->code_journal) ? 'NULL' : "'" . $this->db->escape($this->code_journal) . "'") . ',';
$sql .= ' ' . (empty($this->journal_label) ? 'NULL' : "'" . $this->db->escape($this->journal_label) . "'") . ',';
$sql .= ' ' . (empty($this->piece_num) ? 'NULL' : $this->db->escape($this->piece_num)).',';
$sql .= ' ' . (! isset($this->entity) ? '1' : $this->entity);
$sql .= ' ' . (! isset($this->entity) ? $conf->entity : $this->entity);
$sql .= ')';
$this->db->begin();
@@ -498,7 +562,7 @@ class BookKeeping extends CommonObject
}
if (! $error) {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element . $mode);
if (! $notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
@@ -540,6 +604,7 @@ class BookKeeping extends CommonObject
$sql = 'SELECT';
$sql .= ' t.rowid,';
$sql .= " t.doc_date,";
$sql .= " t.date_lim_reglement,";
$sql .= " t.doc_type,";
$sql .= " t.doc_ref,";
$sql .= " t.fk_doc,";
@@ -558,7 +623,8 @@ class BookKeeping extends CommonObject
$sql .= " t.import_key,";
$sql .= " t.code_journal,";
$sql .= " t.journal_label,";
$sql .= " t.piece_num";
$sql .= " t.piece_num,";
$sql .= " t.date_creation";
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element.$mode. ' as t';
$sql .= ' WHERE 1 = 1';
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";
@@ -577,6 +643,7 @@ class BookKeeping extends CommonObject
$this->id = $obj->rowid;
$this->doc_date = $this->db->jdate($obj->doc_date);
$this->date_lim_reglement = $this->db->jdate($obj->date_lim_reglement);
$this->doc_type = $obj->doc_type;
$this->doc_ref = $obj->doc_ref;
$this->fk_doc = $obj->fk_doc;
@@ -596,6 +663,7 @@ class BookKeeping extends CommonObject
$this->code_journal = $obj->code_journal;
$this->journal_label = $obj->journal_label;
$this->piece_num = $obj->piece_num;
$this->date_creation = $this->db->jdate($obj->date_creation);
}
$this->db->free($resql);
@@ -623,13 +691,15 @@ class BookKeeping extends CommonObject
* @param array $filter filter array
* @param string $filtermode filter mode (AND or OR)
*
* @return int <0 if KO, >0 if OK
* @return int <0 if KO, >=0 if OK
*/
public function fetchAllByAccount($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') {
global $conf;
dol_syslog(__METHOD__, LOG_DEBUG);
$this->lines = array();
$sql = 'SELECT';
$sql .= ' t.rowid,';
$sql .= " t.doc_date,";
@@ -651,7 +721,8 @@ class BookKeeping extends CommonObject
$sql .= " t.import_key,";
$sql .= " t.code_journal,";
$sql .= " t.journal_label,";
$sql .= " t.piece_num";
$sql .= " t.piece_num,";
$sql .= " t.date_creation";
// Manage filter
$sqlwhere = array ();
if (count($filter) > 0) {
@@ -668,6 +739,8 @@ class BookKeeping extends CommonObject
$sqlwhere[] = $key . ' LIKE \'' . $this->db->escape($value) . '%\'';
} elseif ($key == 't.label_operation') {
$sqlwhere[] = $key . ' LIKE \'' . $this->db->escape($value) . '%\'';
} elseif ($key == 't.date_creation>=' || $key == 't.date_creation<=') {
$sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\'';
} else {
$sqlwhere[] = $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
}
@@ -687,7 +760,6 @@ class BookKeeping extends CommonObject
if (! empty($limit)) {
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
}
$this->lines = array ();
$resql = $this->db->query($sql);
if ($resql) {
@@ -718,6 +790,7 @@ class BookKeeping extends CommonObject
$line->code_journal = $obj->code_journal;
$line->journal_label = $obj->journal_label;
$line->piece_num = $obj->piece_num;
$line->date_creation = $obj->date_creation;
$this->lines[] = $line;
}
@@ -728,7 +801,7 @@ class BookKeeping extends CommonObject
$this->errors[] = 'Error ' . $this->db->lasterror();
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
return - 1;
return -1;
}
}
@@ -770,7 +843,9 @@ class BookKeeping extends CommonObject
$sql .= " t.import_key,";
$sql .= " t.code_journal,";
$sql .= " t.journal_label,";
$sql .= " t.piece_num";
$sql .= " t.piece_num,";
$sql .= " t.date_creation,";
$sql .= " t.tms as date_modification";
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
// Manage filter
$sqlwhere = array ();
@@ -786,13 +861,18 @@ class BookKeeping extends CommonObject
$sqlwhere[] = $key . '=' . $value;
} elseif ($key == 't.subledger_account' || $key == 't.numero_compte') {
$sqlwhere[] = $key . ' LIKE \'' . $this->db->escape($value) . '%\'';
} elseif ($key == 't.date_creation>=' || $key == 't.date_creation<=') {
$sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\'';
} elseif ($key == 't.tms>=' || $key == 't.tms<=') {
$sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\'';
} elseif ($key == 't.credit' || $key == 't.debit') {
$sqlwhere[] = natural_search($key, $value, 1, 1);
} else {
$sqlwhere[] = $key . ' LIKE \'%' . $this->db->escape($value) . '%\'';
$sqlwhere[] = natural_search($key, $value, 0, 1);
}
}
}
$sql.= ' WHERE 1 = 1';
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";
$sql.= ' WHERE entity IN (' . getEntity('accountancy') . ')';
if (count($sqlwhere) > 0) {
$sql .= ' AND ' . implode(' ' . $filtermode . ' ', $sqlwhere);
}
@@ -834,6 +914,8 @@ class BookKeeping extends CommonObject
$line->code_journal = $obj->code_journal;
$line->journal_label = $obj->journal_label;
$line->piece_num = $obj->piece_num;
$line->date_creation = $this->db->jdate($obj->date_creation);
$line->date_modification = $this->db->jdate($obj->date_modification);
$this->lines[] = $line;
}
@@ -860,9 +942,12 @@ class BookKeeping extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
public function fetchAllBalance($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') {
public function fetchAllBalance($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
{
global $conf;
$this->lines = array();
dol_syslog(__METHOD__, LOG_DEBUG);
$sql = 'SELECT';
@@ -905,7 +990,6 @@ class BookKeeping extends CommonObject
if (! empty($limit)) {
$sql .= ' ' . $this->db->plimit($limit + 1, $offset);
}
$this->lines = array ();
$resql = $this->db->query($sql);
if ($resql) {
@@ -1072,22 +1156,26 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return number <0 if KO, >0 if OK
*/
public function updateByMvt($piece_num='', $field='', $value='', $mode='') {
public function updateByMvt($piece_num='', $field='', $value='', $mode='')
{
$error=0;
$this->db->begin();
$sql = "UPDATE " . MAIN_DB_PREFIX . $this->table_element . $mode . " as ab";
$sql .= ' SET ab.' . $field . '=' . (is_numeric($value)?$value:"'".$value."'");
$sql .= ' WHERE ab.piece_num=' . $piece_num ;
$resql = $this->db->query($sql);
if (! $resql) {
$error ++;
$error++;
$this->errors[] = 'Error ' . $this->db->lasterror();
dol_syslog(__METHOD__ . ' ' . join(',', $this->errors), LOG_ERR);
}
if ($error) {
$this->db->rollback();
return - 1 * $error;
return -1 * $error;
} else {
$this->db->commit();
@@ -1217,19 +1305,18 @@ class BookKeeping extends CommonObject
/**
* Delete bookkepping by piece number
*
* @param int $piecenum peicenum to delete
* @param string $mode Mode
* @return int Result
* @param int $piecenum Piecenum to delete
* @return int Result
*/
function deleteMvtNum($piecenum, $mode) {
function deleteMvtNum($piecenum) {
global $conf;
$this->db->begin();
// first check if line not yet in bookkeeping
$sql = "DELETE";
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element. $mode;
$sql .= " WHERE piece_num = " . $piecenum;
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
$sql .= " WHERE piece_num = " . (int) $piecenum;
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";
$resql = $this->db->query($sql);
@@ -1326,6 +1413,7 @@ class BookKeeping extends CommonObject
$this->code_journal = 'VT';
$this->journal_label = 'Journal de vente';
$this->piece_num = '';
$this->date_creation = $now;
}
/**
@@ -1338,7 +1426,7 @@ class BookKeeping extends CommonObject
public function fetchPerMvt($piecenum, $mode='') {
global $conf;
$sql = "SELECT piece_num,doc_date,code_journal,journal_label,doc_ref,doc_type";
$sql = "SELECT piece_num,doc_date,code_journal,journal_label,doc_ref,doc_type,date_creation";
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element.$mode;
$sql .= " WHERE piece_num = " . $piecenum;
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";
@@ -1354,6 +1442,7 @@ class BookKeeping extends CommonObject
$this->doc_date = $this->db->jdate($obj->doc_date);
$this->doc_ref = $obj->doc_ref;
$this->doc_type = $obj->doc_type;
$this->date_creation = $obj->date_creation;
} else {
$this->error = "Error " . $this->db->lasterror();
dol_syslog(get_class($this) . "::" . __METHOD__ . $this->error, LOG_ERR);
@@ -1404,7 +1493,7 @@ class BookKeeping extends CommonObject
$sql = "SELECT rowid, doc_date, doc_type,";
$sql .= " doc_ref, fk_doc, fk_docdet, thirdparty_code, subledger_account, subledger_label,";
$sql .= " numero_compte, label_compte, label_operation, debit, credit,";
$sql .= " montant, sens, fk_user_author, import_key, code_journal, journal_label, piece_num";
$sql .= " montant, sens, fk_user_author, import_key, code_journal, journal_label, piece_num, date_creation";
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element.$mode;
$sql .= " WHERE piece_num = " . $piecenum;
$sql .= " AND entity IN (" . getEntity('accountancy') . ")";
@@ -1437,6 +1526,7 @@ class BookKeeping extends CommonObject
$line->code_journal = $obj->code_journal;
$line->journal_label = $obj->journal_label;
$line->piece_num = $obj->piece_num;
$line->date_creation = $obj->date_creation;
$this->linesmvt[] = $line;
}
@@ -1515,11 +1605,16 @@ class BookKeeping extends CommonObject
* @param string $piece_num Piece num
* @return void
*/
public function transformTransaction($direction=0,$piece_num='') {
public function transformTransaction($direction=0,$piece_num='')
{
$error = 0;
$this->db->begin();
if ($direction==0) {
if ($direction==0)
{
$next_piecenum=$this->getNextNumMvt();
if ($result < 0) {
if ($next_piecenum < 0) {
$error++;
}
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element.'(doc_date, doc_type,';
@@ -1770,4 +1865,5 @@ class BookKeepingLine
public $code_journal;
public $journal_label;
public $piece_num;
public $date_creation;
}

View File

@@ -18,313 +18,297 @@
*/
/**
* \file accountancy/class/bookkeeping.class.php
* \ingroup Accounting Expert
* \brief Fichier de la classe des comptes comptable
* \file accountancy/class/bookkeeping.class.php
* \ingroup Advanced accountancy
* \brief File of class for lettering
*/
include_once DOL_DOCUMENT_ROOT."/accountancy/class/bookkeeping.class.php";
include_once DOL_DOCUMENT_ROOT."/societe/class/societe.class.php";
include_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php";
include_once DOL_DOCUMENT_ROOT . "/accountancy/class/bookkeeping.class.php";
include_once DOL_DOCUMENT_ROOT . "/societe/class/societe.class.php";
include_once DOL_DOCUMENT_ROOT . "/core/lib/date.lib.php";
/**
* Class lettering
*/
class lettering extends BookKeeping
{
/**
* lettrageTiers
*
* @param int $socid Thirdparty id
* @return void
*/
public function lettrageTiers($socid) {
/**
* lettrageTiers
*
* @param int $socid Thirdparty id
* @return void
*/
public function lettrageTiers($socid)
{
global $conf;
$db = $this->db;
$error = 0;
$object = new Societe($this->db);
$object->id = $socid;
$object->fetch($socid);
if( $object->code_compta == '411CUSTCODE')
if ($object->code_compta == '411CUSTCODE') {
$object->code_compta = '';
if( $object->code_compta_fournisseur == '401SUPPCODE')
$object->code_compta_fournisseur = '';
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.lettering_code, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.date_lettering ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE code_journal = 'BQ' AND ( ";
if(!empty($object->code_compta) )
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
$sql .= " OR ";
if(!empty($object->code_compta_fournisseur) )
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) AND ( bk.date_lettering ='' OR bk.date_lettering IS NULL ) AND bk.lettering_code !='' ";
$sql .= " GROUP BY bk.lettering_code ";
$resql = $db->query ( $sql );
if ($resql) {
$num = $db->num_rows ( $resql );
$i = 0;
while ( $i < $num ) {
$obj = $db->fetch_object ( $resql );
$i++;
$sql = "SELECT bk.rowid ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " WHERE bk.lettering_code = '".$obj->lettering_code."' ";
$sql .= " AND ( ";
if(!empty($object->code_compta) )
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
$sql .= " OR ";
if(!empty($object->code_compta_fournisseur) )
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) ";
// echo $sql;
$resql2 = $db->query ( $sql );
if ($resql2) {
$num2 = $db->num_rows ( $resql2 );
$i2 = 0;
$ids = array();
while ( $i2 < $num2 ) {
$obj2 = $db->fetch_object ( $resql2 );
$i2++;
$ids[] = $obj2->rowid;
}
if(count($ids) > 1 ){
$result = $this->updatelettrage($ids);
// var_dump($result);
// if( $result < 0 ){
// setEventMessages('', $BookKeeping->errors, 'errors' );
// $error++;
//
// }
}
}
}
}
if ($object->code_compta_fournisseur == '401SUPPCODE') {
$object->code_compta_fournisseur = '';
}
/**
Prise en charge des lettering complexe avec prelevment , virement
*/
$sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.code_tiers, bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.date_lettering, bu.url_id , bu.type ";
* Prise en charge des lettering complexe avec prelevment , virement
*/
$sql = "SELECT DISTINCT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, bk.subledger_account, ";
$sql .= " bk.numero_compte , bk.label_compte, bk.debit , bk.credit, bk.montant ";
$sql .= " , bk.sens , bk.code_journal , bk.piece_num, bk.date_lettering, bu.url_id , bu.type ";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu ON(bk.fk_doc = bu.fk_bank AND bu.type IN ('payment', 'payment_supplier') ) ";
$sql .= " WHERE code_journal = 'BQ' AND ( ";
if(!empty($object->code_compta) )
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
$sql .= " WHERE ( ";
if (! empty($object->code_compta))
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur))
$sql .= " OR ";
if(!empty($object->code_compta_fournisseur) )
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
if (! empty($object->code_compta_fournisseur))
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) AND date_lettering ='' ";
$sql .= " GROUP BY bk.lettering_code ";
$sql .= " ) AND (bk.date_lettering ='' OR bk.date_lettering IS NULL) ";
$sql .= " AND (bk.lettering_code != '' OR bk.lettering_code IS NULL) ";
$sql .= $this->db->order('bk.doc_date', 'DESC');
// echo $sql;
//
$resql = $db->query ( $sql );
// echo $sql;
//
$resql = $this->db->query($sql);
if ($resql) {
$num = $db->num_rows ( $resql );
$i = 0;
$num = $this->db->num_rows($resql);
while ( $i < $num ) {
$obj = $db->fetch_object ( $resql );
while ($obj = $this->db->fetch_object($resql) ) {
$ids = array();
$i++;
$ids_fact = array();
// print_r($obj);
if($obj->type =='payment_supplier' ) {
$ids[] = $obj->rowid;
$sql= 'SELECT bk.rowid, facf.ref, facf.ref_supplier, payf.fk_bank ';
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf ";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid";
$sql.= " INNER JOIN " .MAIN_DB_PREFIX . "accounting_bookkeeping as bk ON( bk.fk_doc = facf.ref) ";
// $sqlmid.= " LEFT JOIN " . MAIN_DB_PREFIX . "societe as soc ON soc.rowid=facf.fk_soc";
// $sqlmid.= " INNER JOIN " . MAIN_DB_PREFIX . "c_paiement as payc ON payc.id=payf.fk_paiement";
$sql .= " WHERE 1 ";
$sql .= " AND fk_paiementfourn = '".$obj->url_id."' ";
// $sql .= " AND (bk.numero_compte = '" . $object->code_compta . "' OR bk.numero_compte = '" . $object->code_compta_fournisseur . "') ";
$sql .= " AND ( ";
if(!empty($object->code_compta) )
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
$sql .= " OR ";
if(!empty($object->code_compta_fournisseur) )
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) ";
// echo $sql;
// exit;
if ($obj->type == 'payment_supplier')
{
$sql = 'SELECT DISTINCT bk.rowid, facf.ref, facf.ref_supplier, payf.fk_bank, facf.rowid as fact_id';
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf ";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk ON (bk.fk_doc = payf.fk_bank AND bk.code_journal='" . $obj->code_journal . "')";
$sql .= " WHERE payfacf.fk_paiementfourn = '" . $obj->url_id . "' ";
$sql .= " AND facf.entity = ".$conf->entity;
$sql .= " AND code_journal IN (SELECT code FROM " . MAIN_DB_PREFIX . "accounting_journal WHERE nature=4 AND entity=".$conf->entity.") ";
$sql .= " AND ( ";
if (! empty($object->code_compta)) {
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
}
elseif($obj->type =='payment' ){
$ids[] = $obj->rowid;
$sql= 'SELECT bk.rowid,fac.facnumber , pay.fk_bank ';
$sql.= " FROM " . MAIN_DB_PREFIX . "facture fac ";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
$sql.= " INNER JOIN " .MAIN_DB_PREFIX . "accounting_bookkeeping as bk ON( bk.fk_doc = fac.rowid) ";
$sql .= " WHERE 1 ";
$sql .= " AND payfac.fk_paiement = '".$obj->url_id."' ";
$sql .= " AND ( ";
if(!empty($object->code_compta) )
$sql .= " bk.code_tiers = '" . $object->code_compta . "' ";
if(!empty($object->code_compta) && !empty($object->code_compta_fournisseur) )
$sql .= " OR ";
if(!empty($object->code_compta_fournisseur) )
$sql .= " bk.code_tiers = '" . $object->code_compta_fournisseur . "' ";
$sql .= " ) ";
// echo $sql;
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur)) {
$sql .= " OR ";
}
if (! empty($object->code_compta_fournisseur)) {
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
}
$sql .= " ) ";
$resql2 = $db->query ( $sql );
$resql2 = $this->db->query($sql);
if ($resql2) {
$num2 = $db->num_rows ( $resql2 );
$i2 = 0;
while ( $i2 < $num2 ) {
$obj2 = $db->fetch_object ( $resql2 );
$i2++;
$ids[] = $obj2->rowid;
while ( $obj2 = $this->db->fetch_object($resql2) ) {
$ids[$obj2->rowid] = $obj2->rowid;
$ids_fact[] = $obj2->fact_id;
}
// print_r($ids);
// exit;
if(count($ids) > 1 ){
$result = $this->updatelettrage($ids);
// var_dump($result);
// if( $result < 0 ){
// setEventMessages('', $BookKeeping->errors, 'errors' );
// $error++;
//
// }
}
// exit;
} else {
$this->errors[] = $this->db->lasterror;
return - 1;
}
if (count($ids_fact)) {
$sql = 'SELECT bk.rowid, facf.ref, facf.ref_supplier ';
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn facf ";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk ON( bk.fk_doc = facf.rowid AND facf.rowid IN (" . implode(',', $ids_fact) . "))";
$sql .= " WHERE bk.code_journal IN (SELECT code FROM " . MAIN_DB_PREFIX . "accounting_journal WHERE nature=3 AND entity=".$conf->entity.") ";
$sql .= " AND facf.entity = ".$conf->entity;
$sql .= " AND ( ";
if (! empty($object->code_compta)) {
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
}
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur)) {
$sql .= " OR ";
}
if (! empty($object->code_compta_fournisseur)) {
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
}
$sql .= " ) ";
$resql2 = $this->db->query($sql);
if ($resql2) {
while ( $obj2 = $this->db->fetch_object($resql2) ) {
$ids[$obj2->rowid] = $obj2->rowid;
}
} else {
$this->errors[] = $this->db->lasterror;
return - 1;
}
}
} elseif ($obj->type == 'payment') {
$sql = 'SELECT DISTINCT bk.rowid, fac.ref, fac.ref, pay.fk_bank, fac.rowid as fact_id';
$sql .= " FROM " . MAIN_DB_PREFIX . "facture fac ";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement_facture as payfac ON payfac.fk_facture=fac.rowid";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "paiement as pay ON payfac.fk_paiement=pay.rowid";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk ON (bk.fk_doc = pay.fk_bank AND bk.code_journal='" . $obj->code_journal . "')";
$sql .= " WHERE payfac.fk_paiement = '" . $obj->url_id . "' ";
$sql .= " AND bk.code_journal IN (SELECT code FROM " . MAIN_DB_PREFIX . "accounting_journal WHERE nature=4 AND entity=".$conf->entity.") ";
$sql .= " AND fac.entity = ".$conf->entity;
$sql .= " AND ( ";
if (! empty($object->code_compta)) {
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
}
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur)) {
$sql .= " OR ";
}
if (! empty($object->code_compta_fournisseur)) {
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
}
$sql .= " ) ";
$resql2 = $this->db->query($sql);
if ($resql2) {
while ( $obj2 = $this->db->fetch_object($resql2) ) {
$ids[$obj2->rowid] = $obj2->rowid;
$ids_fact[] = $obj2->fact_id;
}
} else {
$this->errors[] = $this->db->lasterror;
return - 1;
}
if (count($ids_fact)) {
$sql = 'SELECT bk.rowid, fac.ref, fac.ref_supplier ';
$sql .= " FROM " . MAIN_DB_PREFIX . "facture fac ";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_bookkeeping as bk ON( bk.fk_doc = fac.rowid AND fac.rowid IN (" . implode(',', $ids_fact) . "))";
$sql .= " WHERE code_journal IN (SELECT code FROM " . MAIN_DB_PREFIX . "accounting_journal WHERE nature=2 AND entity=".$conf->entity.") ";
$sql .= " AND fac.entity = ".$conf->entity;
$sql .= " AND ( ";
if (! empty($object->code_compta)) {
$sql .= " bk.subledger_account = '" . $object->code_compta . "' ";
}
if (! empty($object->code_compta) && ! empty($object->code_compta_fournisseur)) {
$sql .= " OR ";
}
if (! empty($object->code_compta_fournisseur)) {
$sql .= " bk.subledger_account = '" . $object->code_compta_fournisseur . "' ";
}
$sql .= " ) ";
$resql2 = $this->db->query($sql);
if ($resql2) {
while ( $obj2 = $this->db->fetch_object($resql2) ) {
$ids[$obj2->rowid] = $obj2->rowid;
}
} else {
$this->errors[] = $this->db->lasterror;
return - 1;
}
}
}
if (count($ids) > 1) {
$result = $this->updatelettrage($ids);
}
}
}
if ($error) {
foreach ( $this->errors as $errmsg ) {
dol_syslog(get_class($this) . "::" . __METHOD__ . $errmsg, LOG_ERR);
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
}
return - 1 * $error;
} else {
return 1;
}
}
public function updatelettrage($ids, $notrigger=false){
/**
*
* @param array $ids ids array
* @param boolean $notrigger no trigger
* @return number
*/
public function updateLettrage($ids = array(), $notrigger = false)
{
$error = 0;
$lettre = 'AAA';
$sql = "SELECT lettering_code FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE ";
$sql .= " lettering_code != '' GROUP BY lettering_code ORDER BY lettering_code DESC limit 1; ";
// echo $sql;
$result = $this->db->query ( $sql );
dol_syslog(get_class($this) . "::" . __METHOD__, LOG_DEBUG);
$sql = "SELECT DISTINCT lettering_code FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE ";
$sql .= " lettering_code != '' ORDER BY lettering_code DESC limit 1; ";
$result = $this->db->query($sql);
if ($result) {
$obj = $this->db->fetch_object ( $result );
$lettre = (empty($obj->lettering_code)? 'AAA' : $obj->lettering_code );
if(!empty($obj->lettering_code))
$obj = $this->db->fetch_object($result);
$lettre = (empty($obj->lettering_code) ? 'AAA' : $obj->lettering_code);
if (! empty($obj->lettering_code))
$lettre++;
}
else{
$this->errors[] = 'Error'.$this->db->lasterror();;
} else {
$this->errors[] = 'Error' . $this->db->lasterror();
$error++;
}
// var_dump(__line__, $error);
$sql = "SELECT SUM(ABS(debit)) as deb, SUM(ABS(credit)) as cred FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping WHERE ";
$sql .= " rowid IN (".implode(',', $ids).") ";
$result = $this->db->query ( $sql );
$sql .= " rowid IN (" . implode(',', $ids) . ") ";
$result = $this->db->query($sql);
if ($result) {
$obj = $this->db->fetch_object ( $result );
// print_r($obj);
if( !(round(abs($obj->deb),2) === round(abs($obj->cred),2)) ){
// echo $sql;
// print_r($obj);
$this->errors[] = 'Total not exacts '.round(abs($obj->deb),2).' vs '. round(abs($obj->cred),2);
$obj = $this->db->fetch_object($result);
if (! (round(abs($obj->deb), 2) === round(abs($obj->cred), 2))) {
$this->errors[] = 'Total not exacts ' . round(abs($obj->deb), 2) . ' vs ' . round(abs($obj->cred), 2);
$error++;
}
}
else{
$this->errors[] = 'Erreur sql'.$this->db->lasterror();;
} else {
$this->errors[] = 'Erreur sql' . $this->db->lasterror();
$error++;
}
// Update request
$now = dol_now();
$sql = "UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping SET";
$sql.= " lettering_code='".$lettre."'";
$sql.= " , date_lettering = " .$now ; // todo correct date it's false
$sql.= " WHERE rowid IN (".implode(',', $ids).") ";
// echo $sql ;
//
// var_dump(__line__, $error);
// print_r($this->errors);
// exit;
$this->db->begin();
if (! $error)
{
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping SET";
$sql .= " lettering_code='" . $lettre . "'";
$sql .= " , date_lettering = '" . $this->db->idate($now) . "'"; // todo correct date it's false
$sql .= " WHERE rowid IN (" . implode(',', $ids) . ") ";
$this->db->begin();
dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
dol_syslog(get_class($this) . "::update sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
if (! $resql) {
$error++;
$this->errors[] = "Error " . $this->db->lasterror();
}
}
if (! $error)
{
if (! $notrigger)
{
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
if (! $error) {
if (! $notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
//// Call triggers
//include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
//$interface=new Interfaces($this->db);
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
}
// // Call triggers
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
// $interface=new Interfaces($this->db);
// $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
// // End call triggers
}
// var_dump(__line__, $error);
// Commit or rollback
if ($error)
{
// foreach($this->errors as $errmsg)
// {
// dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR);
// $this->error.=($this->error?', '.$errmsg:$errmsg);
// }
$this->db->rollback();
// echo $this->error;
// var_dump(__line__, $error);
return -1*$error;
}
else
{
$this->db->commit();
return 1;
}
// Commit or rollback
if ($error) {
foreach ( $this->errors as $errmsg ) {
dol_syslog(get_class($this) . "::update " . $errmsg, LOG_ERR);
$this->error .= ($this->error ? ', ' . $errmsg : $errmsg);
}
$this->db->rollback();
return - 1 * $error;
} else {
$this->db->commit();
return 1;
}
}
}

View File

@@ -18,9 +18,9 @@
*/
/**
* \file htdocs/accountancy/customer/card.php
* \ingroup Accountancy
* \brief Card customer ventilation
* \file htdocs/accountancy/customer/card.php
* \ingroup Advanced accountancy
* \brief Card customer ventilation
*/
require '../../main.inc.php';
@@ -33,6 +33,9 @@ $langs->load("bills");
$langs->load("accountancy");
$action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$codeventil = GETPOST('codeventil');
$id = GETPOST('id');
@@ -40,18 +43,21 @@ $id = GETPOST('id');
if ($user->societe_id > 0)
accessforbidden();
/*
* Actions
*/
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
if (! GETPOST('cancel', 'alpha')) {
if ($action == 'ventil' && $user->rights->accounting->bind->write)
{
if (! $cancel)
{
if ($codeventil < 0) $codeventil = 0;
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
$sql .= " SET fk_code_ventilation = " . $codeventil;
$sql .= " WHERE rowid = " . $id;
$resql = $db->query($sql);
if (! $resql) {
setEventMessages($db->lasterror(), null, 'errors');
@@ -59,6 +65,11 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) {
else
{
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
if ($backtopage)
{
header("Location: ".$backtopage);
exit();
}
}
} else {
header("Location: ./lines.php");
@@ -109,6 +120,7 @@ if (! empty($id)) {
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '" method="post">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="ventil">';
print '<input type="hidden" name="backtopage" value="'.dol_escape_htmltag($backtopage).'">';
print load_fiche_titre($langs->trans('CustomersVentilation'), '', 'title_setup');

View File

@@ -1,9 +1,9 @@
<?php
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
/* Copyright (C) 2013 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 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
@@ -21,9 +21,9 @@
*/
/**
* \file htdocs/accountancy/customer/index.php
* \file htdocs/accountancy/customer/index.php
* \ingroup Advanced accountancy
* \brief Home customer journalization page
* \brief Home customer journalization page
*/
require '../../main.inc.php';
@@ -47,52 +47,76 @@ if ($user->societe_id > 0)
if (! $user->rights->accounting->bind->write)
accessforbidden();
// Filter
$year = GETPOST("year",'int');
if ($year == 0) {
$year_current = strftime("%Y", time());
$year_start = $year_current;
} else {
$year_current = $year;
$year_start = $year;
$month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1);
if (GETPOST("year",'int')) $year_start = GETPOST("year",'int');
else
{
$year_start = dol_print_date(dol_now(), '%Y');
if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year
}
$year_end = $year_start + 1;
$month_end = $month_start - 1;
if ($month_end < 1)
{
$month_end = 12;
$year_end--;
}
$search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start);
$search_date_end = dol_get_last_day($year_end, $month_end);
$year_current = $year_start;
// Validate History
$action = GETPOST('action','aZ09');
/*
* Actions
*/
if ($action == 'clean' || $action == 'validatehistory')
{
// Clean database
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sql1 .= " SET fk_code_ventilation = 0";
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ' AND accnt.entity = '.$conf->entity.')';
$sql1 .= ' AND fd.fk_facture IN (SELECT rowid FROM ' . MAIN_DB_PREFIX . 'facture WHERE entity = '.$conf->entity.')';
$sql1 .= ' AND fk_code_ventilation <> 0';
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
setEventMessage($db->lasterror(), 'errors');
} else {
$db->commit();
}
// End clean database
}
if ($action == 'validatehistory') {
$error = 0;
$db->begin();
// First clean corrupted data
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sqlclean .= " SET fk_code_ventilation = 0";
$sqlclean .= ' WHERE fd.fk_code_ventilation NOT IN ';
$sqlclean .= ' (SELECT accnt.rowid ';
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sqlclean .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sqlclean .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
$resql = $db->query($sqlclean);
// Now make the binding. Bind automatically only for product with a dedicated account that exists into chart of account, others need a manual bind
if ($db->type == 'pgsql') {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "facturedet.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "facturedet.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity;
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
$sql1 .= " AND " . MAIN_DB_PREFIX . "facturedet.fk_code_ventilation = 0";
} else {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity;
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
$sql1 .= " AND fd.fk_code_ventilation = 0";
}
@@ -108,53 +132,6 @@ if ($action == 'validatehistory') {
$db->commit();
setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs');
}
} elseif ($action == 'fixaccountancycode') {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sql1 .= " SET fk_code_ventilation = 0";
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
setEventMessage($db->lasterror(), 'errors');
} else {
$db->commit();
setEventMessage($langs->trans('Done'), 'mesgs');
}
} elseif ($action == 'cleanaccountancycode') {
$error = 0;
$db->begin();
// Now clean
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sql1.= " SET fk_code_ventilation = 0";
$sql1.= " WHERE fd.fk_facture IN ( SELECT f.rowid FROM " . MAIN_DB_PREFIX . "facture as f";
$sql1.= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
$sql1.= " AND f.datef <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
$sql1.= " AND f.entity IN (" . getEntity('accountancy') . ")";
$sql1.=")";
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
setEventMessage($db->lasterror(), 'errors');
} else {
$db->commit();
setEventMessage($langs->trans('Done'), 'mesgs');
}
}
@@ -172,58 +149,40 @@ print load_fiche_titre($langs->trans("CustomersVentilation") . " " . $textprevye
print $langs->trans("DescVentilCustomer") . '<br>';
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
print '<br>';
//print '<div class="inline-block divButAction">';
// TODO Remove this. Should be done always or into the repair.php script.
if ($conf->global->MAIN_FEATURES_LEVEL > 1) 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";
$sql .= " , " . MAIN_DB_PREFIX . "facture as f";
$sql .= " WHERE fd.fk_code_ventilation = 0";
$sql .= " AND f.rowid = fd.fk_facture";
$sql .= " AND f.fk_statut > 0";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
dol_syslog('htdocs/accountancy/customer/index.php');
$result = $db->query($sql);
if ($result) {
$row = $db->fetch_row($result);
$nbfac = $row[0];
$db->free($result);
}
$y = $year_current;
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
print '<div class="div-table-responsive-no-min">';
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="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') . " AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $j, 'fd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(fd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " WHERE f.datef >= '" . $db->idate($search_date_start) . "'";
$sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND f.fk_statut > 0";
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NULL";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
@@ -266,33 +225,40 @@ if ($resql) {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
print '</div>';
print '<br>';
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), $buttonreset, '');
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
print '<div class="div-table-responsive-no-min">';
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="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') . " AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $j, 'fd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(fd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " WHERE f.datef >= '" . $db->idate($search_date_start) . "'";
$sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.fk_statut > 0";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {
@@ -315,6 +281,7 @@ if ($resql) {
}
else print length_accountg($row[0]);
print '</td>';
print '<td align="left">';
if ($row[0] == 'tobind')
{
@@ -322,7 +289,8 @@ if ($resql) {
}
else print $row[1];
print '</td>';
for($i = 2; $i <= 12; $i ++) {
for($i = 2; $i <= 12; $i++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right">' . price($row[13]) . '</td>';
@@ -334,7 +302,7 @@ if ($resql) {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
print '</div>';
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ?
@@ -344,24 +312,29 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
print_fiche_titre($langs->trans("OtherInfo"), '', '');
print "<br>\n";
print '<div class="div-table-responsive-no-min">';
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="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
}
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 ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, 'fd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $j, 'fd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(fd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " WHERE f.datef >= '" . $db->idate($search_date_start) . "'";
$sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.fk_statut > 0";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {
@@ -386,27 +359,34 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
print '</div>';
if (! empty($conf->margin->enabled)) {
print "<br>\n";
print '<div class="div-table-responsive-no-min">';
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="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
}
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 ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $i, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
$sql .= " SUM(" . $db->ifsql('MONTH(f.datef)=' . $j, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
$sql .= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND f.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " WHERE f.datef >= '" . $db->idate($search_date_start) . "'";
$sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
$sql .= " AND f.fk_statut > 0";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {
@@ -432,6 +412,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
print '</div>';
}
}

View File

@@ -32,6 +32,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
// Langs
$langs->load("bills");
@@ -51,6 +53,9 @@ $search_desc = GETPOST('search_desc', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
$search_account = GETPOST('search_account', 'alpha');
$search_vat = GETPOST('search_vat', 'alpha');
$search_day=GETPOST("search_day","int");
$search_month=GETPOST("search_month","int");
$search_year=GETPOST("search_year","int");
$search_country = GETPOST('search_country', 'alpha');
$search_tvaintra = GETPOST('search_tvaintra', 'alpha');
@@ -59,7 +64,7 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page', 'int');
if ($page < 0) $page = 0;
if (empty($page) || $page < 0) $page = 0;
$pageprev = $page - 1;
$pagenext = $page + 1;
$offset = $limit * $page;
@@ -95,6 +100,9 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$search_amount = '';
$search_account = '';
$search_vat = '';
$search_day = '';
$search_month = '';
$search_year = '';
$search_country = '';
$search_tvaintra = '';
}
@@ -102,27 +110,37 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
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) {
$error ++;
setEventMessages($db->lasterror(), null, 'errors');
}
if (! $error) {
$db->commit();
setEventMessages($langs->trans('Save'), null, 'mesgs');
} else {
$db->rollback();
setEventMessages($db->lasterror(), null, 'errors');
if (! (GETPOST('account_parent','int') >= 0))
{
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors');
}
if (! $error)
{
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as l";
$sql1 .= " SET l.fk_code_ventilation=" . (GETPOST('account_parent','int') > 0 ? GETPOST('account_parent','int') : '0');
$sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')';
dol_syslog('accountancy/customer/lines.php::changeaccount sql= ' . $sql1);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
setEventMessages($db->lasterror(), null, 'errors');
}
if (! $error) {
$db->commit();
setEventMessages($langs->trans('Save'), null, 'mesgs');
} else {
$db->rollback();
setEventMessages($db->lasterror(), null, 'errors');
}
$account_parent = ''; // Protection to avoid to mass apply it a second time
}
$account_parent = ''; // Protection to avoid to mass apply it a second time
}
@@ -130,6 +148,9 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
* View
*/
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("CustomersVentilation") . ' - ' . $langs->trans("Dispatched"));
print '<script type="text/javascript">
@@ -152,14 +173,14 @@ print '<script type="text/javascript">
/*
* Customer Invoice lines
*/
$sql = "SELECT f.rowid as factid, f.facnumber, f.type, f.datef, f.ref_client,";
$sql .= " fd.rowid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.vat_src_code, fd.total_ttc,";
$sql = "SELECT f.rowid as facid, f.facnumber, f.type, f.datef, f.ref_client,";
$sql .= " fd.rowid, fd.description, fd.product_type as line_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.vat_src_code, fd.total_ttc,";
$sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number, aa.label as label_compte,";
$sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number, aa.label as label_compte,";
$sql .= " fd.situation_percent, co.label as country, s.tva_intra";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = fd.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays ";
@@ -193,13 +214,26 @@ if (strlen(trim($search_account))) {
$sql .= natural_search("aa.account_number", $search_account);
}
if (strlen(trim($search_vat))) {
$sql .= natural_search("fd.tva_tx", $search_vat);
$sql .= natural_search("fd.tva_tx", price2num($search_vat), 1);
}
if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
{
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}
if (strlen(trim($search_country))) {
$sql .= natural_search("co.label", $search_country);
}
if (strlen(trim($search_tvaintra))) {
$sql .= natural_search("s.tva_intra", $search_tva_intra);
$sql .= natural_search("s.tva_intra", $search_tvaintra);
}
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder);
@@ -221,25 +255,19 @@ if ($result) {
$i = 0;
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($search_invoice)
$param .= "&search_invoice=" . $search_invoice;
if ($search_ref)
$param .= "&search_ref=" . $search_ref;
if ($search_label)
$param .= "&search_label=" . $search_label;
if ($search_desc)
$param .= "&search_desc=" . $search_desc;
if ($search_account)
$param .= "&search_account=" . $search_account;
if ($search_vat)
$param .= "&search_vat=" . $search_vat;
if ($search_country)
$param .= "&search_country=" . $search_country;
if ($search_tvaintra)
$param .= "&search_tvaintra=" . $search_tvaintra;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($search_invoice) $param .= "&search_invoice=" . urlencode($search_invoice);
if ($search_ref) $param .= "&search_ref=" . urlencode($search_ref);
if ($search_label) $param .= "&search_label=" . urlencode($search_label);
if ($search_desc) $param .= "&search_desc=" . urlencode($search_desc);
if ($search_account) $param .= "&search_account=" . urlencode($search_account);
if ($search_vat) $param .= "&search_vat=" . urlencode($search_vat);
if ($search_day) $param .= '&search_day='.urlencode($search_day);
if ($search_month) $param .= '&search_month='.urlencode($search_month);
if ($search_year) $param .= '&search_year='.urlencode($search_year);
if ($search_country) $param .= "&search_country=" . urlencode($search_country);
if ($search_tvaintra) $param .= "&search_tvaintra=" . urlencode($search_tvaintra);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
print '<input type="hidden" name="action" value="ventil">';
@@ -254,7 +282,7 @@ if ($result) {
print $langs->trans("DescVentilDoneCustomer") . '<br>';
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
print $formaccounting->select_account($account_parent, 'account_parent', 1);
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '"/></div>';
$moreforfilter = '';
@@ -265,7 +293,11 @@ if ($result) {
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre center">';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
$formother->select_year($search_year,'search_year',1, 20, 5);
print '</td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
@@ -302,12 +334,12 @@ if ($result) {
$codecompta = length_accountg($objp->account_number) . ' - ' . $objp->label_compte;
$facture_static->ref = $objp->facnumber;
$facture_static->id = $objp->factid;
$facture_static->id = $objp->facid;
$product_static->ref = $objp->product_ref;
$product_static->id = $objp->product_id;
$product_static->type = $objp->product_type;
$product_static->label = $objp->product_label;
$product_static->type = $objp->line_type;
print '<tr class="oddeven">';
@@ -334,12 +366,12 @@ if ($result) {
print '<td align="right">' . price($objp->total_ht) . '</td>';
print '<td align="right">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
print '<td align="center">';
print $codecompta . ' <a href="./card.php?id=' . $objp->rowid . '">';
print $codecompta . ' <a href="./card.php?id=' . $objp->rowid . '&backtopage='.urlencode($_SERVER["PHP_SELF"].($param?'?'.$param:'')).'">';
print img_edit();
print '</a>';
print '</td>';
print '<td align="center">' . $objp->country .'</td>';
print '<td>' . $objp->country .'</td>';
print '<td>' . $objp->tva_intra . '</td>';

View File

@@ -33,6 +33,8 @@ require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
// Langs
$langs->load("compta");
@@ -60,6 +62,10 @@ $search_desc = GETPOST('search_desc', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
$search_account = GETPOST('search_account', 'alpha');
$search_vat = GETPOST('search_vat', 'alpha');
$search_day=GETPOST("search_day","int");
$search_month=GETPOST("search_month","int");
$search_year=GETPOST("search_year","int");
$btn_ventil = GETPOST('ventil', 'alpha');
// Load variable for pagination
@@ -67,7 +73,7 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page','int');
if ($page < 0) { $page = 0; }
if (empty($page) || $page < 0) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -93,13 +99,15 @@ $accounting = new AccountingAccount($db);
$aarowid_s = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1);
$aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT, 1);
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
/*
* Action
*/
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@@ -118,6 +126,9 @@ if (empty($reshook))
$search_amount = '';
$search_account = '';
$search_vat = '';
$search_day = '';
$search_month = '';
$search_year = '';
}
// Mass actions
@@ -131,6 +142,7 @@ if (empty($reshook))
if ($massaction == 'ventil') {
$msg='';
//print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>';
if (! empty($mesCasesCochees)) {
$msg = '<div>' . $langs->trans("SelectedLines") . ': '.count($mesCasesCochees).'</div>';
@@ -158,7 +170,7 @@ if ($massaction == 'ventil') {
$accountventilated = new AccountingAccount($db);
$accountventilated->fetch($monCompte, '');
dol_syslog("/accountancy/customer/list.php sql=" . $sql, LOG_DEBUG);
dol_syslog("accountancy/customer/list.php sql=" . $sql, LOG_DEBUG);
if ($db->query($sql)) {
$msg.= '<div><font color="green">' . $langs->trans("Lineofinvoice") . ' ' . $monId . ' - ' . $langs->trans("VentilatedinAccount") . ' : ' . length_accountg($accountventilated->account_number) . '</font></div>';
$ok++;
@@ -184,26 +196,34 @@ if ($massaction == 'ventil') {
*/
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("Ventilation"));
if (empty($chartaccountcode))
{
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
llxFooter();
$db->close();
exit;
}
// Customer Invoice lines
$sql = "SELECT f.facnumber, f.rowid as facid, f.datef, f.type as ftype,";
$sql .= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
$sql .= " aa.rowid as aarowid";
$sql = "SELECT f.rowid as facid, f.facnumber, f.datef, f.type as ftype,";
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
$sql.= " aa.rowid as aarowid";
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
$sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql .= " AND product_type <= 2";
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_sell IS NULL OR p.accountancy_code_sell ='' OR p.accountancy_code_sell NOT IN
(SELECT aa.account_number FROM " . MAIN_DB_PREFIX . "accounting_account as aa , " . MAIN_DB_PREFIX . "accounting_system as asy WHERE fk_pcg_version = asy.pcg_version AND asy.rowid ='" . $conf->global->CHARTOFACCOUNTS . "'))";
$sql.= " FROM " . MAIN_DB_PREFIX . "facture as f";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity;
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.fk_pcg_version = '" . $chartaccountcode."' AND aa2.entity = " . $conf->entity;
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.fk_pcg_version = '" . $chartaccountcode."' AND aa3.entity = " . $conf->entity;
$sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql.= " AND l.product_type <= 2";
// Add search filter like
if ($search_lineid) {
$sql .= natural_search("l.rowid", $search_lineid, 1);
@@ -229,10 +249,23 @@ if (strlen(trim($search_account))) {
if (strlen(trim($search_vat))) {
$sql .= natural_search("l.tva_tx",$search_vat,1);
}
if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
{
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_STANDARD . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
}
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy
@@ -253,7 +286,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql .= $db->plimit($limit + 1, $offset);
dol_syslog("/accountancy/customer/list.php", LOG_DEBUG);
dol_syslog("accountancy/customer/list.php", LOG_DEBUG);
$result = $db->query($sql);
if ($result) {
$num_lines = $db->num_rows($result);
@@ -264,14 +297,23 @@ if ($result) {
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($search_lineid) $param.='&search_lineid='.urlencode($search_lineid);
if ($search_day) $param.='&search_day='.urlencode($search_day);
if ($search_month) $param.='&search_month='.urlencode($search_month);
if ($search_year) $param.='&search_year='.urlencode($search_year);
if ($search_invoice) $param.='&search_invoice='.urlencode($search_invoice);
if ($search_ref) $param.='&search_ref='.urlencode($search_ref);
if ($search_desc) $param.='&search_desc='.urlencode($search_desc);
if ($search_amount) $param.='&search_amount='.urlencode($search_amount);
if ($search_vat) $param.='&search_vat='.urlencode($search_vat);
$arrayofmassactions = array(
'ventil'=>$langs->trans("Ventilate")
//'presend'=>$langs->trans("SendByMail"),
//'builddoc'=>$langs->trans("PDFMerge"),
);
//if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
//if ($massaction == 'presend') $arrayofmassactions=array();
//if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete");
//if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
$massactionbutton=$form->selectMassAction('ventil', $arrayofmassactions, 1);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
@@ -287,6 +329,12 @@ if ($result) {
print $langs->trans("DescVentilTodoCustomer") . '</br><br>';
/*$topicmail="Information";
$modelmail="project";
$objecttmp=new Project($db);
$trackid='prj'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';*/
if ($msg) print $msg.'<br>';
$moreforfilter = '';
@@ -298,7 +346,11 @@ if ($result) {
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre center">';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
$formother->select_year($search_year,'search_year',1, 20, 5);
print '</td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidthonsmartphone" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
@@ -421,12 +473,14 @@ if ($result) {
// Suggested accounting account
print '<td align="center">';
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';
// Column with checkbox
print '<td align="center">';
print '<input type="checkbox" class="flat checkforselect" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
print '</td>';
print '</tr>';
$i ++;
}
@@ -438,5 +492,17 @@ if ($result) {
print $db->error();
}
// Add code to auto check the box when we select an account
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery(".codeventil").change(function() {
var s=$(this).attr("id").replace("codeventil", "")
console.log(s+" "+$(this).val());
if ($(this).val() == -1) jQuery(".checkforselect"+s).prop("checked", false);
else jQuery(".checkforselect"+s).prop("checked", true);
});
});
</script>';
llxFooter();
$db->close();
$db->close();

View File

@@ -23,7 +23,7 @@
*/
/**
* \file htdocs/accountancy/supplier/card.php
* \ingroup Accountancy
* \ingroup Advanced accountancy
* \brief Card expense report ventilation
*/
require '../../main.inc.php';
@@ -38,6 +38,9 @@ $langs->load("accountancy");
$langs->load("trips");
$action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$codeventil = GETPOST('codeventil');
$id = GETPOST('id');
@@ -45,18 +48,21 @@ $id = GETPOST('id');
if ($user->societe_id > 0)
accessforbidden();
/*
* Actions
*/
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
if (! GETPOST('cancel', 'alpha')) {
if ($action == 'ventil' && $user->rights->accounting->bind->write)
{
if (! $cancel)
{
if ($codeventil < 0) $codeventil = 0;
$sql = " UPDATE " . MAIN_DB_PREFIX . "expensereport_det";
$sql .= " SET fk_code_ventilation = " . $codeventil;
$sql .= " WHERE rowid = " . $id;
$resql = $db->query($sql);
if (! $resql) {
setEventMessages($db->lasterror(), null, 'errors');
@@ -64,6 +70,11 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) {
else
{
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
if ($backtopage)
{
header("Location: ".$backtopage);
exit();
}
}
} else {
header("Location: ./lines.php");
@@ -111,6 +122,7 @@ if (! empty($id)) {
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '" method="post">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="ventil">';
print '<input type="hidden" name="backtopage" value="'.dol_escape_htmltag($backtopage).'">';
print load_fiche_titre($langs->trans('ExpenseReportsVentilation'), '', 'title_setup');

View File

@@ -27,6 +27,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
// Langs
$langs->load("compta");
@@ -37,58 +38,82 @@ $langs->load("accountancy");
// Security check
if (empty($conf->accounting->enabled)) {
accessforbidden();
accessforbidden();
}
if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->bind->write)
accessforbidden();
// Filter
$year = GETPOST('year', 'int');
if ($year == 0) {
$year_current = strftime("%Y", time());
$year_start = $year_current;
} else {
$year_current = $year;
$year_start = $year;
$month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1);
if (GETPOST("year",'int')) $year_start = GETPOST("year",'int');
else
{
$year_start = dol_print_date(dol_now(), '%Y');
if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year
}
$year_end = $year_start + 1;
$month_end = $month_start - 1;
if ($month_end < 1)
{
$month_end = 12;
$year_end--;
}
$search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start);
$search_date_end = dol_get_last_day($year_end, $month_end);
$year_current = $year_start;
// Validate History
$action = GETPOST('action','aZ09');
/*
* Actions
*/
if ($action == 'clean' || $action == 'validatehistory')
{
// Clean database
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql1 .= " SET fk_code_ventilation = 0";
$sql1 .= ' WHERE erd.fk_code_ventilation NOT IN';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ' AND accnt.entity = '.$conf->entity.')';
$sql1 .= ' AND erd.fk_expensereport IN (SELECT rowid FROM ' . MAIN_DB_PREFIX . 'expensereport WHERE entity = '.$conf->entity.')';
$sql1 .= ' AND fk_code_ventilation <> 0';
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
setEventMessage($db->lasterror(), 'errors');
} else {
$db->commit();
}
// End clean database
}
if ($action == 'validatehistory') {
$error = 0;
$db->begin();
// First clean corrupted data
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sqlclean .= " SET fk_code_ventilation = 0";
$sqlclean .= ' WHERE erd.fk_code_ventilation NOT IN ';
$sqlclean .= ' (SELECT accnt.rowid ';
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sqlclean .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sqlclean .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
$resql = $db->query($sqlclean);
// Now make the binding
if ($db->type == 'pgsql') {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " FROM " . MAIN_DB_PREFIX . "c_type_fees as t, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "expensereport_det.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "expensereport_det.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity;
$sql1 .= " AND accnt.active = 1 AND t.accountancy_code = accnt.account_number";
$sql1 .= " AND " . MAIN_DB_PREFIX . "expensereport_det.fk_code_ventilation = 0";
} else {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd, " . MAIN_DB_PREFIX . "c_type_fees as t, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " SET erd.fk_code_ventilation = accnt.rowid";
$sql1 .= " WHERE erd.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " WHERE erd.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity;
$sql1 .= " AND accnt.active = 1 AND t.accountancy_code=accnt.account_number";
$sql1 .= " AND erd.fk_code_ventilation = 0";
}
@@ -104,55 +129,9 @@ if ($action == 'validatehistory') {
$db->commit();
setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs');
}
} elseif ($action == 'fixaccountancycode') {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql1 .= " SET fk_code_ventilation = 0";
$sql1 .= ' WHERE erd.fk_code_ventilation NOT IN ';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
setEventMessage($db->lasterror(), 'errors');
} else {
$db->commit();
setEventMessage($langs->trans('Done'), 'mesgs');
}
} elseif ($action == 'cleanaccountancycode') {
$error = 0;
$db->begin();
// Now clean
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql1.= " SET fk_code_ventilation = 0";
$sql1.= " WHERE erd.fk_expensereport IN ( SELECT er.rowid FROM " . MAIN_DB_PREFIX . "expensereport as er";
$sql1.= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
$sql1.= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
$sql1.= " AND er.entity IN (" . getEntity('accountancy') . ")";
$sql1.=")";
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
setEventMessage($db->lasterror(), 'errors');
} else {
$db->commit();
setEventMessage($langs->trans('Done'), 'mesgs');
}
}
/*
* View
*/
@@ -168,44 +147,39 @@ print $langs->trans("DescVentilExpenseReport") . '<br>';
print $langs->trans("DescVentilExpenseReportMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
print '<br>';
//print '<div class="inline-block divButAction">';
// TODO Remove this. Should be done always or into the repair.php script.
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
//print '</div>';
$y = $year_current;
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
print '<div class="div-table-responsive-no-min">';
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="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $j, 'erd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(erd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND er.fk_statut > 0 ";
$sql .= " WHERE er.date_debut >= '" . $db->idate($search_date_start) . "'";
$sql .= " AND er.date_debut <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.")";
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NULL";
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
@@ -213,9 +187,9 @@ $sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
dol_syslog('/accountancy/expensereport/index.php:: sql=' . $sql);
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
while ( $row = $db->fetch_row($resql)) {
print '<tr class="oddeven"><td>';
if ($row[0] == 'tobind')
@@ -243,34 +217,39 @@ if ($resql) {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
print '</div>';
print '<br>';
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), $buttonreset, '');
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
print '<div class="div-table-responsive-no-min">';
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="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_debut)=' . $j, 'erd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = erd.fk_code_ventilation";
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND er.fk_statut > 0 ";
$sql .= " WHERE er.date_debut >= '" . $db->idate($search_date_start) . "'";
$sql .= " AND er.date_debut <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.")";
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NOT NULL";
$sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
@@ -278,9 +257,9 @@ $sql .= " GROUP BY erd.fk_code_ventilation,aa.account_number,aa.label";
dol_syslog('htdocs/accountancy/expensereport/index.php');
$resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
while ( $row = $db->fetch_row($resql)) {
print '<tr class="oddeven"><td>';
if ($row[0] == 'tobind')
@@ -289,6 +268,7 @@ if ($resql) {
}
else print length_accountg($row[0]);
print '</td>';
print '<td align="left">';
if ($row[0] == 'tobind')
{
@@ -308,35 +288,39 @@ if ($resql) {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
print '</div>';
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report that should rely on result of this step ?
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report where results depends on next step (so not yet available) ?
{
print '<br>';
print '<br>';
print_fiche_titre($langs->trans("OtherInfo"), '', '');
print "<br>\n";
print '<div class="div-table-responsive-no-min">';
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="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("TotalExpenseReport") . "' AS label,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_create)=' . $i, 'erd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
$sql .= " SUM(" . $db->ifsql('MONTH(er.date_create)=' . $j, 'erd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(erd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expensereport as er ON er.rowid = erd.fk_expensereport";
$sql .= " WHERE er.date_debut >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND er.date_debut <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND er.fk_statut > 0 ";
$sql .= " WHERE er.date_debut >= '" . $db->idate($search_date_start) . "'";
$sql .= " AND er.date_debut <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.")";
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
dol_syslog('htdocs/accountancy/expensereport/index.php');
@@ -344,7 +328,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
if ($resql) {
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
while ($row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -358,6 +342,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
print '</div>';
}
llxFooter();

View File

@@ -31,6 +31,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
// Langs
$langs->load("compta");
@@ -41,7 +43,7 @@ $langs->load("accountancy");
$langs->load("trips");
$langs->load("productbatch");
$account_parent = GETPOST('account_parent');
$account_parent = GETPOST('account_parent','int');
$changeaccount = GETPOST('changeaccount');
// Search Getpost
$search_expensereport = GETPOST('search_expensereport', 'alpha');
@@ -50,16 +52,19 @@ $search_desc = GETPOST('search_desc', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
$search_account = GETPOST('search_account', 'alpha');
$search_vat = GETPOST('search_vat', 'alpha');
$search_day=GETPOST("search_day","int");
$search_month=GETPOST("search_month","int");
$search_year=GETPOST("search_year","int");
// Load variable for pagination
$limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page', 'int');
if ($page < 0) $page = 0;
$offset = $conf->liste_limit * $page;
if (empty($page) || $page < 0) $page = 0;
$pageprev = $page - 1;
$pagenext = $page + 1;
$offset = $limit * $page;
if (! $sortfield)
$sortfield = "erd.date, erd.rowid";
if (! $sortorder) {
@@ -90,32 +95,44 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$search_amount = '';
$search_account = '';
$search_vat = '';
$search_day = '';
$search_month = '';
$search_year = '';
}
if (is_array($changeaccount) && count($changeaccount) > 0) {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql1 .= " SET erd.fk_code_ventilation=" . GETPOST('account_parent');
$sql1 .= ' WHERE erd.rowid IN (' . implode(',', $changeaccount) . ')';
dol_syslog('accountancy/expensereport/lines.php::changeaccount sql= ' . $sql1);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
setEventMessages($db->lasterror(), null, 'errors');
}
if (! $error) {
$db->commit();
setEventMessages($langs->trans('Save'), null, 'mesgs');
} else {
$db->rollback();
setEventMessages($db->lasterror(), null, 'errors');
if (! (GETPOST('account_parent','int') >= 0))
{
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors');
}
$account_parent = ''; // Protection to avoid to mass apply it a second time
if (! $error)
{
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql1 .= " SET erd.fk_code_ventilation=" . (GETPOST('account_parent','int') > 0 ? GETPOST('account_parent','int') : '0');
$sql1 .= ' WHERE erd.rowid IN (' . implode(',', $changeaccount) . ')';
dol_syslog('accountancy/expensereport/lines.php::changeaccount sql= ' . $sql1);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
setEventMessages($db->lasterror(), null, 'errors');
}
if (! $error) {
$db->commit();
setEventMessages($langs->trans('Save'), null, 'mesgs');
} else {
$db->rollback();
setEventMessages($db->lasterror(), null, 'errors');
}
$account_parent = ''; // Protection to avoid to mass apply it a second time
}
}
@@ -123,6 +140,9 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
* View
*/
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("ExpenseReportsVentilation") . ' - ' . $langs->trans("Dispatched"));
print '<script type="text/javascript">
@@ -153,25 +173,38 @@ $sql .= " FROM " . MAIN_DB_PREFIX . "expensereport as er";
$sql .= " , " . MAIN_DB_PREFIX . "accounting_account as aa";
$sql .= " , " . MAIN_DB_PREFIX . "expensereport_det as erd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees";
$sql .= " WHERE er.rowid = erd.fk_expensereport and er.fk_statut >= 5 AND erd.fk_code_ventilation <> 0 ";
$sql .= " WHERE er.rowid = erd.fk_expensereport and er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.") AND erd.fk_code_ventilation <> 0 ";
$sql .= " AND aa.rowid = erd.fk_code_ventilation";
if (strlen(trim($search_expensereport))) {
$sql .= " AND er.ref like '%" . $search_expensereport . "%'";
$sql .= natural_search("er.ref", $search_expensereport);
}
if (strlen(trim($search_label))) {
$sql .= " AND f.label like '%" . $search_label . "%'";
$sql .= natural_search("f.label", $search_label);
}
if (strlen(trim($search_desc))) {
$sql .= " AND er.comments like '%" . $search_desc . "%'";
$sql .= natural_search("er.comments", $search_desc);
}
if (strlen(trim($search_amount))) {
$sql .= " AND erd.total_ht like '%" . $search_amount . "%'";
$sql .= natural_search("erd.total_ht", $search_amount, 1);
}
if (strlen(trim($search_account))) {
$sql .= " AND aa.account_number like '%" . $search_account . "%'";
$sql .= natural_search("aa.account_number", $search_account);
}
if (strlen(trim($search_vat))) {
$sql .= " AND (erd.tva_tx like '" . $search_vat . "%')";
$sql .= natural_search("erd.tva_tx", price2num($search_vat), 1);
}
if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
{
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
@@ -195,22 +228,18 @@ if ($result) {
$i = 0;
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($search_expensereport)
$param .= "&search_expensereport=" . $search_expensereport;
if ($search_label)
$param .= "&search_label=" . $search_label;
if ($search_desc)
$param .= "&search_desc=" . $search_desc;
if ($search_account)
$param .= "&search_account=" . $search_account;
if ($search_vat)
$param .= "&search_vat=" . $search_vat;
if ($search_country)
$param .= "&search_country=" . $search_country;
if ($search_tvaintra)
$param .= "&search_tvaintra=" . $search_tvaintra;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($search_expensereport) $param .= "&search_expensereport=" . urlencode($search_expensereport);
if ($search_label) $param .= "&search_label=" . urlencode($search_label);
if ($search_desc) $param .= "&search_desc=" . urlencode($search_desc);
if ($search_account) $param .= "&search_account=" . urlencode($search_account);
if ($search_vat) $param .= "&search_vat=" . urlencode($search_vat);
if ($search_day) $param .= '&search_day='.urlencode($search_day);
if ($search_month) $param .= '&search_month='.urlencode($search_month);
if ($search_year) $param .= '&search_year='.urlencode($search_year);
if ($search_country) $param .= "&search_country=" . urlencode($search_country);
if ($search_tvaintra) $param .= "&search_tvaintra=" . urlencode($search_tvaintra);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
print '<input type="hidden" name="action" value="ventil">';
@@ -226,7 +255,7 @@ if ($result) {
print $langs->trans("DescVentilDoneExpenseReport") . '<br>';
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
print $formaccounting->select_account(GETPOST('account_parent'), 'account_parent', 1);
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '" /></div>';
$moreforfilter = '';
@@ -237,7 +266,11 @@ if ($result) {
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"></td>';
print '<td><input type="text" class="flat maxwidth50" name="search_expensereport" value="' . dol_escape_htmltag($search_expensereport) . '"></td>';
print '<td class="liste_titre" align="right"></td>';
print '<td class="liste_titre center">';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
$formother->select_year($search_year,'search_year',1, 20, 5);
print '</td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
@@ -266,7 +299,6 @@ if ($result) {
$expensereport_static = new ExpenseReport($db);
$var = True;
while ( $i < min($num_lines, $limit) ) {
$objp = $db->fetch_object($result);
$codeCompta = length_accountg($objp->account_number) . ' - ' . $objp->label;
@@ -297,7 +329,7 @@ if ($result) {
print '<td>' . $codeCompta . '</td>';
print '<td align="left"><a href="./card.php?id=' . $objp->rowid . '">';
print '<td align="left"><a href="./card.php?id=' . $objp->rowid . '&backtopage='.urlencode($_SERVER["PHP_SELF"].($param?'?'.$param:'')). '">';
print img_edit();
print '</a></td>';
@@ -316,7 +348,7 @@ if ($result) {
print '</form>';
} else {
print $db->error();
print $db->lasterror();
}

View File

@@ -32,6 +32,8 @@ require_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
// Langs
$langs->load("compta");
@@ -58,6 +60,10 @@ $search_desc = GETPOST('search_desc', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
$search_account = GETPOST('search_account', 'alpha');
$search_vat = GETPOST('search_vat', 'alpha');
$search_day=GETPOST("search_day","int");
$search_month=GETPOST("search_month","int");
$search_year=GETPOST("search_year","int");
$btn_ventil = GETPOST('ventil', 'alpha');
// Load variable for pagination
@@ -65,7 +71,7 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page','int');
if ($page < 0) { $page = 0; }
if (empty($page) || $page < 0) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -86,13 +92,15 @@ if (! $user->rights->accounting->bind->write)
$formaccounting = new FormAccounting($db);
$accounting = new AccountingAccount($db);
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
/*
* Action
*/
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
// Purge search criteria
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
@@ -103,14 +111,17 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$search_amount = '';
$search_account = '';
$search_vat = '';
$search_day = '';
$search_month = '';
$search_year = '';
}
// Mass actions
$objectclass='Skeleton';
$objectlabel='Skeleton';
$permtoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output;
$objectclass='ExpenseReport';
$objectlabel='ExpenseReport';
$permtoread = $user->rights->expensereport->read;
$permtodelete = $user->rights->expensereport->delete;
$uploaddir = $conf->expensereport->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
if ($massaction == 'ventil') {
@@ -169,21 +180,28 @@ if ($massaction == 'ventil') {
*/
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("ExpenseReportsVentilation"));
if (empty($chartaccountcode))
{
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
llxFooter();
$db->close();
exit;
}
// Expense report lines
$sql = "SELECT er.ref, er.rowid as erid, er.date_debut,";
$sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht as price, erd.fk_code_ventilation, erd.tva_tx as tva_tx_line, erd.vat_src_code, erd.date,";
$sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label, f.accountancy_code as code_buy,";
$sql .= " aa.rowid as aarowid";
$sql .= " FROM " . MAIN_DB_PREFIX . "expensereport as er";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "expensereport_det as erd ON er.rowid = erd.fk_expensereport";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON f.accountancy_code = aa.account_number";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
$sql .= " WHERE er.fk_statut > 4 AND erd.fk_code_ventilation <= 0";
$sql .= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR f.accountancy_code IS NULL OR f.accountancy_code ='')";
$sql.= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht as price, erd.fk_code_ventilation, erd.tva_tx as tva_tx_line, erd.vat_src_code, erd.date,";
$sql.= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label, f.accountancy_code as code_buy,";
$sql.= " aa.rowid as aarowid";
$sql.= " FROM " . MAIN_DB_PREFIX . "expensereport as er";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "expensereport_det as erd ON er.rowid = erd.fk_expensereport";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "c_type_fees as f ON f.id = erd.fk_c_type_fees";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON f.accountancy_code = aa.account_number AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity;
$sql.= " WHERE er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.") AND erd.fk_code_ventilation <= 0";
// Add search filter like
if (strlen(trim($search_expensereport))) {
$sql .= natural_search("er.ref",$search_expensereport);
@@ -203,6 +221,19 @@ if (strlen(trim($search_account))) {
if (strlen(trim($search_vat))) {
$sql .= natural_search("erd.tva_tx",$search_vat,1);
}
if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(erd.date, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
{
$sql.= " AND erd.date BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
$sql .= $db->order($sortfield, $sortorder);
@@ -228,14 +259,23 @@ if ($result) {
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($search_lineid) $param.='&search_lineid='.urlencode($search_lineid);
if ($search_day) $param.='&search_day='.urlencode($search_day);
if ($search_month) $param.='&search_month='.urlencode($search_month);
if ($search_year) $param.='&search_year='.urlencode($search_year);
if ($search_expensereport) $param.='&search_expensereport='.urlencode($search_expensereport);
if ($search_label) $param.='&search_label='.urlencode($search_label);
if ($search_desc) $param.='&search_desc='.urlencode($search_desc);
if ($search_amount) $param.='&search_amount='.urlencode($search_amount);
if ($search_vat) $param.='&search_vat='.urlencode($search_vat);
$arrayofmassactions = array(
'ventil'=>$langs->trans("Ventilate")
//'presend'=>$langs->trans("SendByMail"),
//'builddoc'=>$langs->trans("PDFMerge"),
);
//if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
//if ($massaction == 'presend') $arrayofmassactions=array();
//if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete");
//if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
$massactionbutton=$form->selectMassAction('ventil', $arrayofmassactions, 1);
@@ -252,6 +292,12 @@ if ($result) {
print $langs->trans("DescVentilTodoExpenseReport") . '</br><br>';
/*$topicmail="Information";
$modelmail="project";
$objecttmp=new Project($db);
$trackid='prj'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';*/
if ($msg) print $msg.'<br>';
$moreforfilter = '';
@@ -263,7 +309,11 @@ if ($result) {
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_expensereport" value="' . dol_escape_htmltag($search_expensereport) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre center">';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
$formother->select_year($search_year,'search_year',1, 20, 5);
print '</td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidthonsmartphone" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
print '<td class="liste_titre" align="right"><input type="text" class="right flat maxwidth50" name="search_amount" value="' . dol_escape_htmltag($search_amount) . '"></td>';
@@ -313,6 +363,7 @@ if ($result) {
// Ref Expense report
print '<td>' . $expensereport_static->getNomUrl(1) . '</td>';
// Date
print '<td align="center">' . dol_print_date($db->jdate($objp->date), 'day') . '</td>';
// Fees label
@@ -343,11 +394,11 @@ if ($result) {
// Suggested accounting account
print '<td align="center">';
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';
print '<td align="center">';
print '<input type="checkbox" class="flat checkforselect" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
print '</td>';
print "</tr>";
@@ -362,5 +413,17 @@ if ($result) {
print $db->error();
}
// Add code to auto check the box when we select an account
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery(".codeventil").change(function() {
var s=$(this).attr("id").replace("codeventil", "")
console.log(s+" "+$(this).val());
if ($(this).val() == -1) jQuery(".checkforselect"+s).prop("checked", false);
else jQuery(".checkforselect"+s).prop("checked", true);
});
});
</script>';
llxFooter();
$db->close();

View File

@@ -63,108 +63,118 @@ print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy'
$step = 0;
print $langs->trans("AccountancyAreaDescIntro")."<br>\n";
print "<br>\n";print "<br>\n";
print_fiche_titre($langs->trans("AccountancyAreaDescActionOnce"), '', 'object_calendar')."<br>\n";
print '<hr>';
print "<br>\n";
// STEPS
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("AccountingJournals").'</strong>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Pcg_version").'</strong>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Chartofaccounts").'</strong>');
print "<br>\n";
print "<br>\n";
print $langs->trans("AccountancyAreaDescActionOnceBis");
print "<br>\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescMisc", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>')."\n";
print "<br>\n";
$step++;
$textlink = '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
print "<br>\n";
if (! empty($conf->tax->enabled))
if ($conf->accounting->enabled)
{
$textlink = '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong>';
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
print "<br>\n";
print $langs->trans("AccountancyAreaDescIntro")."<br>\n";
print "<br>\n";print "<br>\n";
print_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."<br>\n";
print '<hr>';
print "<br>\n";
// STEPS
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("AccountingJournals").'</strong>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Pcg_version").'</strong>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Chartofaccounts").'</strong>');
print "<br>\n";
print "<br>\n";
print $langs->trans("AccountancyAreaDescActionOnceBis");
print "<br>\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong>')."\n";
print "<br>\n";
$step++;
$textlink = '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
print "<br>\n";
if (! empty($conf->tax->enabled))
{
$textlink = '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong>';
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
print "<br>\n";
}
/*if (! empty($conf->salaries->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
// htdocs/admin/salaries.php
print "<br>\n";
print "<br>\n";
}*/
if (! empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong>');
print "<br>\n";
}
/*
if (! empty($conf->loan->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").'-'.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}
if (! empty($conf->don->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDonationAccounts").'</strong>');
print "<br>\n";
}*/
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>');
print "<br>\n";
print '<br>';
print "<br>\n";
print_fiche_titre('<span class="fa fa-calendar"></span> '.$langs->trans("AccountancyAreaDescActionFreq"), '', '');
print '<hr>';
print "<br>\n";
$step = 0;
$langs->loadLangs(array('bills', 'trips'));
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsCustomers"), '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsSuppliers"), '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("ExpenseReports"), '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64+$step), $langs->transnoentitiesnoconv("Journalization"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", chr(64+$step))."<br>\n";
print "<br>\n";
}
/*if (! empty($conf->salaries->enabled))
else
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
// htdocs/admin/salaries.php
print "<br>\n";
print "<br>\n";
}*/
if (! empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong>');
print "<br>\n";
print $langs->trans("Module10Desc")."<br>\n";
}
/*
if (! empty($conf->loan->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").'-'.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}
if (! empty($conf->don->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDonationAccounts").'</strong>');
print "<br>\n";
}*/
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>');
print "<br>\n";
$step++;
$textlink='<strong>'.$langs->transnoentitiesnoconv("MenuBankCash").'</strong>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, $textlink);
print "<br>\n";
print "<br>\n";
print_fiche_titre($langs->trans("AccountancyAreaDescActionFreq"), '', 'object_calendarweek');
print '<hr>';
print "<br>\n";
$step = 0;
$langs->loadLangs(array('bills', 'trips'));
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsCustomers"), '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsSuppliers"), '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("ExpenseReports"), '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64+$step), $langs->transnoentitiesnoconv("Journalization"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", chr(64+$step))."<br>\n";
print "<br>\n";
llxFooter();
$db->close();

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
<?php
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
/* Copyright (C) 2007-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
*
* 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
@@ -77,7 +77,7 @@ if ($pastmonth == 0) {
$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
$date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear);
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
if (! GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))) // We define date_start and date_end, only if we did not submit the form
{
$date_start = dol_get_first_day($pastmonthyear, $pastmonth, false);
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
@@ -101,10 +101,15 @@ $sql .= " AND erd.fk_code_ventilation > 0";
$sql .= " AND er.entity IN (" . getEntity('expensereport', 0) . ")"; // We don't share object for accountancy
if ($date_start && $date_end)
$sql .= " AND er.date_debut >= '" . $db->idate($date_start) . "' AND er.date_debut <= '" . $db->idate($date_end) . "'";
// Already in bookkeeping or not
if ($in_bookkeeping == 'already')
{
$sql .= " AND er.rowid IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='expense_report')";
}
if ($in_bookkeeping == 'notyet')
{
$sql .= " AND er.rowid NOT IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='expense_report')";
}
$sql .= " ORDER BY er.date_debut";
dol_syslog('accountancy/journal/expensereportsjournal.php', LOG_DEBUG);
@@ -183,6 +188,9 @@ if ($action == 'writebookkeeping') {
{
$errorforline = 0;
$totalcredit = 0;
$totaldebit = 0;
$db->begin();
// Thirdparty
@@ -208,6 +216,10 @@ if ($action == 'writebookkeeping') {
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;
$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;
$result = $bookkeeping->create($user);
if ($result < 0) {
@@ -254,6 +266,10 @@ if ($action == 'writebookkeeping') {
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;
$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;
$result = $bookkeeping->create($user);
if ($result < 0) {
@@ -298,7 +314,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_operation = $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]);
$bookkeeping->label_operation = $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).' %';
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
@@ -306,6 +322,10 @@ if ($action == 'writebookkeeping') {
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;
$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;
$result = $bookkeeping->create($user);
if ($result < 0) {
@@ -327,6 +347,14 @@ if ($action == 'writebookkeeping') {
}
}
// Protection against a bug on line before
if (price2num($totaldebit) != price2num($totalcredit))
{
$error++;
$errorforline++;
setEventMessages('Try to insert a non balanced transaction in book for '.$val["ref"].'. Canceled. Surely a bug.', null, 'errors');
}
if (! $errorforline)
{
$db->commit();
@@ -343,6 +371,8 @@ if ($action == 'writebookkeeping') {
}
}
$tabpay = $taber;
if (empty($error) && count($tabpay) > 0) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
}
@@ -367,7 +397,7 @@ if ($action == 'writebookkeeping') {
$param.='&date_endday='.$date_endday;
$param.='&date_endmonth='.$date_endmonth;
$param.='&date_endyear='.$date_endyear;
$param.='&in_bookeeping='.$in_bookeeping;
$param.='&in_bookkeeping='.$in_bookkeeping;
header("Location: ".$_SERVER['PHP_SELF'].($param?'?'.$param:''));
exit;
}
@@ -498,11 +528,11 @@ if (empty($action) || $action == 'view') {
$nomlink = '';
$periodlink = '';
$exportlink = '';
$builddate = time();
$builddate=dol_now();
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
$listofchoices=array('already'=>$langs->trans("AlreadyInGeneralLedger"), 'notyet'=>$langs->trans("NotYetInGeneralLedger"));
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("AlreadyInGeneralLedger").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
$period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
$varlink = 'id_journal=' . $id_journal;
@@ -510,30 +540,33 @@ if (empty($action) || $action == 'view') {
// Button to write into Ledger
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') {
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print '<br>'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
}
print '<div class="tabsAction tabsActionNoBottom">';
if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') {
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
}
else {
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
if ($in_bookkeeping == 'notyet') print '<input type="button" class="butAction" name="writebookkeeping" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
else print '<a href="#" class="butActionRefused" name="writebookkeeping">' . $langs->trans("WriteBookKeeping") . '</a>';
}
//print '<input type="button" class="butAction" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
//print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
print '</div>';
// TODO Avoid using js. We can use a direct link with $param
print '
<script type="text/javascript">
function launch_export() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("exportcsv");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
$("div.fiche form input[name=\"action\"]").val("exportcsv");
$("div.fiche form input[type=\"submit\"]").click();
$("div.fiche form input[name=\"action\"]").val("");
}
function writebookkeeping() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
console.log("click on writebookkeeping");
$("div.fiche form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche form input[type=\"submit\"]").click();
$("div.fiche form input[name=\"action\"]").val("");
}
</script>';
@@ -543,6 +576,7 @@ if (empty($action) || $action == 'view') {
print '<br>';
$i = 0;
print '<div class="div-table-responsive">';
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print "<td></td>";
@@ -550,7 +584,7 @@ if (empty($action) || $action == 'view') {
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("ExpenseReportRef") . ")</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
print "<td>" . $langs->trans("Label") . "</td>";
print "<td>" . $langs->trans("LabelOperation") . "</td>";
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
@@ -657,7 +691,7 @@ if (empty($action) || $action == 'view') {
// Subledger account
print "<td>";
print '</td>';
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).($numtax?' - Localtax '.$numtax:'');
print "<td>" . $userstatic->getNomUrl(0, 'user', 16) . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
print "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
@@ -668,6 +702,7 @@ if (empty($action) || $action == 'view') {
}
print "</table>";
print '</div>';
// End of page
llxFooter();

View File

@@ -56,9 +56,18 @@ $now = dol_now();
if ($user->societe_id > 0)
accessforbidden();
$hookmanager->initHooks(array('purchasesjournal'));
$parameters=array();
/*
* Actions
*/
$reshook=$hookmanager->executeHooks('doActions',$parameters,$user,$action); // Note that $action and $object may have been modified by some hooks
/*
* Views
*/
// Get informations of journal
$accountingjournalstatic = new AccountingJournal($db);
@@ -77,7 +86,7 @@ if ($pastmonth == 0) {
$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
$date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear);
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
if (! GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))) // We define date_start and date_end, only if we did not submit the form
{
$date_start = dol_get_first_day($pastmonthyear, $pastmonth, false);
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
@@ -85,31 +94,34 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
$idpays = $mysoc->country_id;
$sql = "SELECT f.rowid, f.ref, f.type, f.datef as df, f.libelle,f.ref_supplier,";
$sql = "SELECT f.rowid, f.ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlf, f.close_code,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code,";
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
$sql .= " p.accountancy_code_buy , aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
//$sql .= " ct.accountancy_code_buy as account_tva";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
//$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON fd.tva_tx = ct.taux AND ct.fk_pays = '" . $idpays . "'";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = fd.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
$sql .= " JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = fd.fk_facture_fourn";
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
$sql .= " WHERE f.fk_statut > 0"; // TODO Facture annulée ?
$sql .= " WHERE f.fk_statut > 0";
$sql .= " AND fd.fk_code_ventilation > 0";
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . FactureFournisseur::TYPE_STANDARD . "," . FactureFournisseur::TYPE_REPLACEMENT . "," . FactureFournisseur::TYPE_CREDIT_NOTE . "," . FactureFournisseur::TYPE_SITUATION . ")";
$sql .= " AND f.type IN (" . FactureFournisseur::TYPE_STANDARD . "," . FactureFournisseur::TYPE_REPLACEMENT . "," . FactureFournisseur::TYPE_CREDIT_NOTE . "," . FactureFournisseur::TYPE_SITUATION . ")";
} else {
$sql .= " AND f.type IN (" . FactureFournisseur::TYPE_STANDARD . "," . FactureFournisseur::TYPE_REPLACEMENT . "," . FactureFournisseur::TYPE_CREDIT_NOTE . "," . FactureFournisseur::TYPE_DEPOSIT . "," . FactureFournisseur::TYPE_SITUATION . ")";
$sql .= " AND f.type IN (" . FactureFournisseur::TYPE_STANDARD . "," . FactureFournisseur::TYPE_REPLACEMENT . "," . FactureFournisseur::TYPE_CREDIT_NOTE . "," . FactureFournisseur::TYPE_DEPOSIT . "," . FactureFournisseur::TYPE_SITUATION . ")";
}
if ($date_start && $date_end)
$sql .= " AND f.datef >= '" . $db->idate($date_start) . "' AND f.datef <= '" . $db->idate($date_end) . "'";
// Already in bookkeeping or not
if ($in_bookkeeping == 'already')
$sql .= " AND f.rowid IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='supplier_invoice')";
{
$sql .= " AND f.rowid IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='supplier_invoice')";
}
if ($in_bookkeeping == 'notyet')
$sql .= " AND f.rowid NOT IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='supplier_invoice')";
{
$sql .= " AND f.rowid NOT IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='supplier_invoice')";
}
$sql .= " ORDER BY f.datef";
dol_syslog('accountancy/journal/purchasesjournal.php', LOG_DEBUG);
@@ -123,6 +135,7 @@ if ($result) {
$tablocaltax1 = array ();
$tablocaltax2 = array ();
$tabcompany = array ();
$tabother = array();
$num = $db->num_rows($result);
@@ -147,20 +160,27 @@ if ($result) {
$vatdata = getTaxesFromId($obj->tva_tx.($obj->vat_src_code?' ('.$obj->vat_src_code.')':''), $mysoc, $mysoc, 0);
$compta_tva = (! empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
$compta_localtax1 = (! empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
$compta_localtax2 = (! empty($vatdata['accountancy_code_buy']) ? $vatdata['accountancy_code_buy'] : $cpttva);
$compta_counterpart_tva_npr = (! empty($conf->global->ACCOUNTING_COUNTERPART_VAT_NPR)) ? $conf->global->ACCOUNTING_COUNTERPART_VAT_NPR : 'NotDefined';
// Define array to display all VAT rates that use this accounting account $compta_tva
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
{
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':'')]=(vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':''));
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':'')]=(vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':''));
}
$line = new SupplierInvoiceLine($db);
$line->fetch($obj->fdid);
$tabfac[$obj->rowid]["date"] = $db->jdate($obj->df);
$tabfac[$obj->rowid]["datereg"] = $db->jdate($obj->dlr);
$tabfac[$obj->rowid]["ref"] = $obj->ref_supplier . ' (' . $obj->ref . ')';
$tabfac[$obj->rowid]["refsologest"] = $obj->ref;
$tabfac[$obj->rowid]["refsuppliersologest"] = $obj->ref_supplier;
$tabfac[$obj->rowid]["type"] = $obj->type;
$tabfac[$obj->rowid]["description"] = $obj->description;
$tabfac[$obj->rowid]["close_code"] = $obj->close_code; // close_code = 'replaced' for replacement invoices (not used in most european countries)
//$tabfac[$obj->rowid]["fk_facturefourndet"] = $obj->fdid;
// Avoid warnings
@@ -173,6 +193,10 @@ if ($result) {
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc;
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht;
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva;
if (! empty($line->tva_npr)) // Add an entry for counterpart
{
$tabother[$obj->rowid][$compta_counterpart_tva_npr] += $obj->total_tva;
}
$tablocaltax1[$obj->rowid][$compta_localtax1] += $obj->total_localtax1;
$tablocaltax2[$obj->rowid][$compta_localtax2] += $obj->total_localtax2;
$tabcompany[$obj->rowid] = array (
@@ -180,26 +204,53 @@ if ($result) {
'name' => $obj->name,
'code_fournisseur' => $obj->code_fournisseur,
'code_compta_fournisseur' => $compta_soc
);
);
$i ++;
$i++;
}
} else {
dol_print_error($db);
}
$errorforinvoice = array();
// Loop in invoices to detect lines with not binding lines
foreach ($tabfac as $key => $val) { // Loop on each invoice
$sql = "SELECT COUNT(fd.rowid) as nb";
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
$sql.= " WHERE fd.product_type <= 2 AND fd.fk_code_ventilation <= 0";
$sql.= " AND fd.total_ttc <> 0 AND fk_facture_fourn = ".$key;
$resql=$db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
if ($obj->nb > 0)
{
$errorforinvoice[$key]='somelinesarenotbound';
}
}
else dol_print_error($db);
}
//var_dump($errorforinvoice);exit;
// Bookkeeping Write
if ($action == 'writebookkeeping') {
$now = dol_now();
$error = 0;
$companystatic = new Societe($db);
$invoicestatic = new FactureFournisseur($db);
foreach ($tabfac as $key => $val) { // Loop on each invoice
$errorforline = 0;
$db->begin();
$totalcredit = 0;
$totaldebit = 0;
$companystatic = new Societe($db);
$invoicestatic = new FactureFournisseur($db);
$db->begin();
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
@@ -207,22 +258,50 @@ if ($action == 'writebookkeeping') {
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
$companystatic->code_client = $tabcompany[$key]['code_client'];
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
$companystatic->client = $tabcompany[$key]['code_client'];
$companystatic->fournisseur = 1;
$invoicestatic->id = $key;
$invoicestatic->ref = (string) $val["refsologest"];
$invoicestatic->refsupplier = $val["refsuppliersologest"];
$invoicestatic->ref_supplier = $val["refsuppliersologest"];
$invoicestatic->type = $val["type"];
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
$invoicestatic->close_code = $val["close_code"];
$date = dol_print_date($val["date"], 'day');
// Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
$replacedinvoice = 0;
if ($invoicestatic->close_code == FactureFournisseur::CLOSECODE_REPLACED)
{
$replacedinvoice = 1;
$alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping.
if ($alreadydispatched) $replacedinvoice = 2;
}
// If not already into bookkeeping, we won't add it. If yes, do nothing (should not happen because creating replacement not possible if invoice is accounted)
if ($replacedinvoice == 1)
{
$db->rollback();
continue;
}
// Error if some lines are not binded/ready to be journalized
if ($errorforinvoice[$key] == 'somelinesarenotbound')
{
$error++;
$errorforline++;
setEventMessages($langs->trans('ErrorInvoiceContainsLinesNotYetBounded', $val['ref']), null, 'errors');
}
// Thirdparty
if (! $errorforline)
{
foreach ( $tabttc[$key] as $k => $mt ) {
if ($mt) {
//if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_lim_reglement = $val["datereg"];
$bookkeeping->doc_ref = $val["refsologest"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
@@ -231,7 +310,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta_fournisseur'];
$bookkeeping->subledger_label = ''; // TODO To complete
$bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER;
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("SubledgerAccount");
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount");
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt >= 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt <= 0) ? -$mt : 0;
@@ -239,6 +318,10 @@ if ($action == 'writebookkeeping') {
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;
$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;
$result = $bookkeeping->create($user);
if ($result < 0) {
@@ -246,16 +329,18 @@ if ($action == 'writebookkeeping') {
{
$error++;
$errorforline++;
$errorforinvoice[$key]='alreadyjournalized';
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
$errorforinvoice[$key]='other';
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
//}
}
}
@@ -263,22 +348,23 @@ if ($action == 'writebookkeeping') {
if (! $errorforline)
{
foreach ( $tabht[$key] as $k => $mt ) {
if ($mt) {
//if ($mt) {
// get compte id and label
$accountingaccount = new AccountingAccount($db);
if ($accountingaccount->fetch(null, $k, true)) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_lim_reglement = $val["datereg"];
$bookkeeping->doc_ref = $val["refsologest"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->thirdparty_code = $companystatic->code_fournisseur;
$bookkeeping->thirdparty_code = $companystatic->code_fournisseur;
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $accountingaccount->label;
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $accountingaccount->label;
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
@@ -286,6 +372,10 @@ if ($action == 'writebookkeeping') {
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;
$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;
$result = $bookkeeping->create($user);
if ($result < 0) {
@@ -293,17 +383,19 @@ if ($action == 'writebookkeeping') {
{
$error++;
$errorforline++;
$errorforinvoice[$key]='alreadyjournalized';
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
$errorforinvoice[$key]='other';
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
//}
}
}
@@ -319,10 +411,64 @@ if ($action == 'writebookkeeping') {
if ($numtax == 2) $arrayofvat = $tablocaltax2;
foreach ( $arrayofvat[$key] as $k => $mt ) {
if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->date_lim_reglement = $val["datereg"];
$bookkeeping->doc_ref = $val["refsologest"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->thirdparty_code = $companystatic->code_fournisseur;
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT").' '.join(', ',$def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'');
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
$bookkeeping->credit = ($mt <= 0) ? -$mt : 0;
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;
$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;
$result = $bookkeeping->create($user);
if ($result < 0) {
if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists
{
$error++;
$errorforline++;
$errorforinvoice[$key]='alreadyjournalized';
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
$errorforinvoice[$key]='other';
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
}
// Counterpart of VAT for VAT NPR
// var_dump($tabother);
if (! $errorforline && is_array($tabother[$key]))
{
foreach ( $tabother[$key] as $k => $mt ) {
if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_lim_reglement = $val["datereg"];
$bookkeeping->doc_ref = $val["refsologest"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'supplier_invoice';
$bookkeeping->fk_doc = $key;
@@ -331,7 +477,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT").' '.join(', ',$def_tva[$key][$k]) . ($numtax?' - Localtax '.$numtax:'');
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT").' NPR';
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'C' : 'D';
$bookkeeping->debit = ($mt > 0) ? $mt : 0;
@@ -339,6 +485,10 @@ if ($action == 'writebookkeeping') {
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;
$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;
$result = $bookkeeping->create($user);
if ($result < 0) {
@@ -346,18 +496,28 @@ if ($action == 'writebookkeeping') {
{
$error++;
$errorforline++;
$errorforinvoice[$key]='alreadyjournalized';
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
$errorforinvoice[$key]='other';
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
}
// Protection against a bug on lines before
if (! $errorforline && (price2num($totaldebit) != price2num($totalcredit)))
{
$error++;
$errorforline++;
$errorforinvoice[$key]='amountsnotbalanced';
setEventMessages('Try to insert a non balanced transaction in book for '.$invoicestatic->ref.'. Canceled. Surely a bug.', null, 'errors');
}
if (! $errorforline)
@@ -370,12 +530,14 @@ if ($action == 'writebookkeeping') {
if ($error >= 10)
{
setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped"), null, 'errors');
break; // Break in the foreach
setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped"), null, 'errors');
break; // Break in the foreach
}
}
}
$tabpay = $tabfac;
if (empty($error) && count($tabpay) > 0) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
}
@@ -400,7 +562,7 @@ if ($action == 'writebookkeeping') {
$param.='&date_endday='.$date_endday;
$param.='&date_endmonth='.$date_endmonth;
$param.='&date_endyear='.$date_endyear;
$param.='&in_bookeeping='.$in_bookeeping;
$param.='&in_bookkeeping='.$in_bookkeeping;
header("Location: ".$_SERVER['PHP_SELF'].($param?'?'.$param:''));
exit;
}
@@ -415,7 +577,6 @@ $form = new Form($db);
// Export
if ($action == 'exportcsv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL;
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
@@ -424,78 +585,122 @@ if ($action == 'exportcsv') {
foreach ( $tabfac as $key => $val )
{
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->client = $tabcompany[$key]['code_client'];
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
$companystatic->code_client = $tabcompany[$key]['code_client'];
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
$companystatic->fournisseur = 1;
$invoicestatic->id = $key;
$invoicestatic->ref = $val["ref"];
$invoicestatic->ref = $val["refsologest"];
$invoicestatic->refsupplier = $val["refsuppliersologest"];
$invoicestatic->type = $val["type"];
$invoicestatic->description = dol_trunc($val["description"], 32);
$invoicestatic->id = $key;
$invoicestatic->ref = $val["refsologest"];
$invoicestatic->ref_supplier = $val["refsuppliersologest"];
$invoicestatic->type = $val["type"];
$invoicestatic->description = dol_trunc(html_entity_decode($val["description"]), 32);
$invoicestatic->close_code = $val["close_code"];
$date = dol_print_date($val["date"], 'day');
$date = dol_print_date($val["date"], 'day');
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
// Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
$replacedinvoice = 0;
if ($invoicestatic->close_code == FactureFournisseur::CLOSECODE_REPLACED)
{
$replacedinvoice = 1;
$alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping.
if ($alreadydispatched) $replacedinvoice = 2;
}
// If not already into bookkeeping, we won't add it. If yes, do nothing (should not happen because creating replacement not possible if invoice is accounted)
if ($replacedinvoice == 1)
{
continue;
}
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
//if ($mt) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["refsuppliersologest"] . '"' . $sep;
print '"' . $val["refsologest"] . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $langs->trans("Code_tiers") . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("Thirdparty") . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
print "\n";
}
//}
}
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
//if ($mt) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["refsologest"] . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '""' . $sep;
print '"' . utf8_decode ( dol_trunc($accountingaccount->label, 32) ) . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
print "\n";
//}
}
// VAT
$listoftax = array(0, 1, 2);
foreach ($listoftax as $numtax) {
$arrayofvat = $tabtva;
if ($numtax == 1) $arrayofvat = $tablocaltax1;
if ($numtax == 2) $arrayofvat = $tablocaltax2;
foreach ($arrayofvat[$key] as $k => $mt) {
if ($mt) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["refsuppliersologest"] . '"' . $sep;
print '"' . $val["refsologest"] . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print " " . $sep;
print '"' . utf8_decode ( dol_trunc($accountingaccount->label, 32) ) . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
print '""' . $sep;
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ',$def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
print "\n";
}
}
// VAT
$listoftax = array(0, 1, 2);
foreach ($listoftax as $numtax) {
$arrayofvat = $tabtva;
if ($numtax == 1) $arrayofvat = $tablocaltax1;
if ($numtax == 2) $arrayofvat = $tablocaltax2;
foreach ($arrayofvat[$key] as $k => $mt) {
if ($mt) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["refsuppliersologest"] . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print " " . $sep;
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . join(', ',$def_tva[$key][$k]) . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
print "\n";
// VAT counterpart for NPR
if (is_array($tabother[$key]))
{
foreach ( $tabother[$key] as $k => $mt ) {
if ($mt) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["refsologest"] . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 32) ). '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
print '"' . utf8_decode ( dol_trunc($companystatic->name, 16) ) . ' - ' . $val["refsuppliersologest"] . ' - ' . $langs->trans("VAT") . ' NPR"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"'. $sep;
print '"' . $journal . '"' ;
print "\n";
}
}
}
}
@@ -510,7 +715,7 @@ if (empty($action) || $action == 'view') {
$nomlink = '';
$periodlink = '';
$exportlink = '';
$builddate = time();
$builddate=dol_now();
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$description .= $langs->trans("DepositsAreNotIncluded");
@@ -518,8 +723,8 @@ if (empty($action) || $action == 'view') {
$description .= $langs->trans("DepositsAreIncluded");
}
$listofchoices=array('already'=>$langs->trans("AlreadyInGeneralLedger"), 'notyet'=>$langs->trans("NotYetInGeneralLedger"));
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("AlreadyInGeneralLedger").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
$period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
$varlink = 'id_journal=' . $id_journal;
@@ -527,30 +732,33 @@ if (empty($action) || $action == 'view') {
// Button to write into Ledger
if (empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER) || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') {
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
}
print '<div class="tabsAction tabsActionNoBottom">';
print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
}
else {
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
if ($in_bookkeeping == 'notyet') print '<input type="button" class="butAction" name="writebookkeeping" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
else print '<a href="#" class="butActionRefused" name="writebookkeeping">' . $langs->trans("WriteBookKeeping") . '</a>';
}
print '<input type="button" class="butAction" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
print '</div>';
// TODO Avoid using js. We can use a direct link with $param
print '
<script type="text/javascript">
function launch_export() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("exportcsv");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
$("div.fiche form input[name=\"action\"]").val("exportcsv");
$("div.fiche form input[type=\"submit\"]").click();
$("div.fiche form input[name=\"action\"]").val("");
}
function writebookkeeping() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
console.log("click on writebookkeeping");
$("div.fiche form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche form input[type=\"submit\"]").click();
$("div.fiche form input[name=\"action\"]").val("");
}
</script>';
@@ -560,6 +768,7 @@ if (empty($action) || $action == 'view') {
print '<br>';
$i = 0;
print '<div class="div-table-responsive">';
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print "<td></td>";
@@ -567,7 +776,7 @@ if (empty($action) || $action == 'view') {
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
print "<td>" . $langs->trans("Label") . "</td>";
print "<td>" . $langs->trans("LabelOperation") . "</td>";
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
@@ -577,56 +786,114 @@ if (empty($action) || $action == 'view') {
$invoicestatic = new FactureFournisseur($db);
$companystatic = new Fournisseur($db);
foreach ( $tabfac as $key => $val ) {
foreach ( $tabfac as $key => $val )
{
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
$companystatic->code_client = $tabcompany[$key]['code_client'];
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
$companystatic->fournisseur = 1;
$invoicestatic->id = $key;
$invoicestatic->ref = $val["ref"];
$invoicestatic->type = $val["type"];
$invoicestatic->ref = $val["refsologest"];
$invoicestatic->refsupplier = $val["refsuppliersologest"];
$invoicestatic->description = html_entity_decode(dol_trunc($val["description"], 32));
$invoicestatic->ref_supplier = $val["refsuppliersologest"];
$invoicestatic->type = $val["type"];
$invoicestatic->description = dol_trunc(html_entity_decode($val["description"]), 32);
$invoicestatic->close_code = $val["close_code"];
$date = dol_print_date($val["date"], 'day');
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
// Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
$replacedinvoice = 0;
if ($invoicestatic->close_code == FactureFournisseur::CLOSECODE_REPLACED)
{
$replacedinvoice = 1;
$alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping.
if ($alreadydispatched) $replacedinvoice = 2;
}
// If not already into bookkeeping, we won't add it, if yes, add the counterpart ???.
if ($replacedinvoice == 1)
{
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td><!-- Replaced invoice --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->supplier_code = $tabcompany[$key]['code_supplier'];
print "<td><strike>" . $invoicestatic->getNomUrl(1) . "</strike></td>";
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
}
else print $accountoshow;
print $langs->trans("Replaced");
print '</td>';
// Subledger account
print "<td>";
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
else print $accountoshow;
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
print "<td>";
print "</td>";
print '<td align="right"></td>';
print '<td align="right"></td>';
print "</tr>";
continue;
}
if ($errorforinvoice[$key] == 'somelinesarenotbound')
{
print '<tr class="oddeven">';
print "<td><!-- Some lines are not bound --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
print '<span class="error">'.$langs->trans('ErrorInvoiceContainsLinesNotYetBoundedShort', $val['ref']).'</span>';
print '</td>';
// Subledger account
print "<td>";
print '</td>';
print "<td>";
print "</td>";
print '<td align="right"></td>';
print '<td align="right"></td>';
print "</tr>";
}
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
//if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
}
else print $accountoshow;
print '</td>';
// Subledger account
print "<td>";
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
else print $accountoshow;
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
//}
}
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
if ($mt) {
//if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- Product --></td>";
print "<td>" . $date . "</td>";
@@ -645,11 +912,11 @@ if (empty($action) || $action == 'view') {
print '</td>';
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $accountingaccount->label . "</td>";
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $accountingaccount->label . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
//}
}
// VAT
@@ -661,33 +928,64 @@ if (empty($action) || $action == 'view') {
foreach ( $arrayofvat[$key] as $k => $mt ) {
if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").'</span>';
print '<tr class="oddeven">';
print "<td><!-- VAT --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Purchase").')'.'</span>';
}
else print $accountoshow;
print "</td>";
// Subledger account
print "<td>";
print '</td>';
print "<td>";
print $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
print "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
else print $accountoshow;
print "</td>";
// Subledger account
print "<td>";
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).($numtax?' - Localtax '.$numtax:'');
print "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
}
}
// VAT counterpart for NPR
if (is_array($tabother[$key]))
{
foreach ( $tabother[$key] as $k => $mt ) {
if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- VAT counterpart NPR --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("NPR counterpart").'). Set ACCOUNTING_COUNTERPART_VAT_NPR to the subvention account'.'</span>';
}
else print $accountoshow;
print '</td>';
// Subledger account
print "<td>";
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'supplier', 16) . ' - ' . $invoicestatic->ref_supplier . ' - ' . $langs->trans("VAT") . " NPR (counterpart)</td>";
print '<td align="right">' . ($mt < 0 ? - price(- $mt) : '') . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
}
}
}
}
print "</table>";
print '</div>';
// End of page
llxFooter();

View File

@@ -81,7 +81,7 @@ if ($pastmonth == 0) {
$date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear);
$date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear);
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
if (! GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))) // We define date_start and date_end, only if we did not submit the form
{
$date_start = dol_get_first_day($pastmonthyear, $pastmonth, false);
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
@@ -89,21 +89,19 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end
$idpays = $mysoc->country_id;
$sql = "SELECT f.rowid, f.facnumber, f.type, f.datef as df, f.ref_client,";
$sql = "SELECT f.rowid, f.facnumber, f.type, f.datef as df, f.ref_client, f.date_lim_reglement as dlr, f.close_code,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.situation_percent, fd.vat_src_code,";
$sql .= " s.rowid as socid, s.nom as name, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
$sql .= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
//$sql .= " ct.accountancy_code_sell as account_tva";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = fd.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = fd.fk_code_ventilation";
$sql .= " JOIN " . MAIN_DB_PREFIX . "facture as f ON f.rowid = fd.fk_facture";
$sql .= " JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
//$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_tva as ct ON ((fd.vat_src_code <> '' AND fd.vat_src_code = ct.code) OR (fd.vat_src_code = '' AND fd.tva_tx = ct.taux)) AND ct.fk_pays = '" . $idpays . "'";
$sql .= " WHERE fd.fk_code_ventilation > 0";
$sql .= " AND f.entity IN (".getEntity('facture', 0).')'; // We don't share object for accountancy
$sql .= " AND f.fk_statut > 0"; // TODO Facture annulée ?
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.entity IN (".getEntity('facture', 0).')'; // We don't share object for accountancy, we use source object sharing
$sql .= " AND f.fk_statut > 0";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { // Non common setup
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_SITUATION . ")";
} else {
$sql .= " AND f.type IN (" . Facture::TYPE_STANDARD . "," . Facture::TYPE_REPLACEMENT . "," . Facture::TYPE_CREDIT_NOTE . "," . Facture::TYPE_DEPOSIT . "," . Facture::TYPE_SITUATION . ")";
@@ -111,11 +109,19 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND fd.product_type IN (0,1)";
if ($date_start && $date_end)
$sql .= " AND f.datef >= '" . $db->idate($date_start) . "' AND f.datef <= '" . $db->idate($date_end) . "'";
// Already in bookkeeping or not
if ($in_bookkeeping == 'already')
$sql .= " AND f.rowid IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')";
{
$sql .= " AND f.rowid IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')";
// $sql .= " AND fd.rowid IN (SELECT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')"; // Useless, we save one line for all products with same account
}
if ($in_bookkeeping == 'notyet')
$sql .= " AND f.rowid NOT IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')";
{
$sql .= " AND f.rowid NOT IN (SELECT fk_doc FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')";
// $sql .= " AND fd.rowid NOT IN (SELECT fk_docdet FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as ab WHERE ab.doc_type='customer_invoice')"; // Useless, we save one line for all products with same account
}
$sql .= " ORDER BY f.datef";
//print $sql;
dol_syslog('accountancy/journal/sellsjournal.php', LOG_DEBUG);
$result = $db->query($sql);
@@ -156,15 +162,17 @@ if ($result) {
$compta_localtax2 = (! empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva);
// Define array to display all VAT rates that use this accounting account $compta_tva
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
if (price2num($obj->tva_tx) || ! empty($obj->vat_src_code))
{
$def_tva[$obj->rowid][$compta_tva][vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':'')]=(vatrate($obj->tva_tx).($obj->vat_src_code?' ('.$obj->vat_src_code.')':''));
}
// Situation invoices handling
$line = new FactureLigne($db);
$line->fetch($obj->fdid);
$prev_progress = $line->get_prev_progress($obj->fdid);
// Situation invoices handling
$prev_progress = $line->get_prev_progress($obj->rowid);
if ($obj->type == Facture::TYPE_SITUATION) {
// Avoid divide by 0
if ($obj->situation_percent == 0) {
@@ -178,9 +186,11 @@ if ($result) {
// Invoice lines
$tabfac[$obj->rowid]["date"] = $db->jdate($obj->df);
$tabfac[$obj->rowid]["datereg"] = $db->jdate($obj->dlr);
$tabfac[$obj->rowid]["ref"] = $obj->facnumber;
$tabfac[$obj->rowid]["type"] = $obj->type;
$tabfac[$obj->rowid]["description"] = $obj->label_compte;
$tabfac[$obj->rowid]["close_code"] = $obj->close_code; // close_code = 'replaced' for replacement invoices (not used in most european countries)
//$tabfac[$obj->rowid]["fk_facturedet"] = $obj->fdid;
// Avoid warnings
@@ -192,7 +202,7 @@ if ($result) {
$tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc * $situation_ratio;
$tabht[$obj->rowid][$compta_prod] += $obj->total_ht * $situation_ratio;
$tabtva[$obj->rowid][$compta_tva] += $obj->total_tva * $situation_ratio;
if (empty($line->tva_npr)) $tabtva[$obj->rowid][$compta_tva] += $obj->total_tva * $situation_ratio; // We ignore line if VAT is a NPR
$tablocaltax1[$obj->rowid][$compta_localtax1] += $obj->total_localtax1 * $situation_ratio;
$tablocaltax2[$obj->rowid][$compta_localtax2] += $obj->total_localtax2 * $situation_ratio;
$tabcompany[$obj->rowid] = array (
@@ -208,19 +218,44 @@ if ($result) {
dol_print_error($db);
}
$errorforinvoice = array();
// Loop in invoices to detect lines with not binding lines
foreach ($tabfac as $key => $val) { // Loop on each invoice
$sql = "SELECT COUNT(fd.rowid) as nb";
$sql.= " FROM " . MAIN_DB_PREFIX . "facturedet as fd";
$sql.= " WHERE fd.product_type <= 2 AND fd.fk_code_ventilation <= 0";
$sql.= " AND fd.total_ttc <> 0 AND fk_facture = ".$key;
$resql=$db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
if ($obj->nb > 0)
{
$errorforinvoice[$key]='somelinesarenotbound';
}
}
else dol_print_error($db);
}
//var_dump($errorforinvoice);exit;
// Bookkeeping Write
if ($action == 'writebookkeeping') {
$now = dol_now();
$error = 0;
$companystatic = new Societe($db);
$invoicestatic = new Facture($db);
foreach ($tabfac as $key => $val) { // Loop on each invoice
$errorforline = 0;
$db->begin();
$totalcredit = 0;
$totaldebit = 0;
$companystatic = new Societe($db);
$invoicestatic = new Facture($db);
$db->begin();
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
@@ -228,18 +263,47 @@ if ($action == 'writebookkeeping') {
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
$companystatic->code_client = $tabcompany[$key]['code_client'];
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
$companystatic->client = $tabcompany[$key]['code_client'];
$companystatic->client = 3;
$invoicestatic->id = $key;
$invoicestatic->ref = (string) $val["ref"];
$invoicestatic->type = $val["type"];
$invoicestatic->close_code = $val["close_code"];
$date = dol_print_date($val["date"], 'day');
// Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
$replacedinvoice = 0;
if ($invoicestatic->close_code == Facture::CLOSECODE_REPLACED)
{
$replacedinvoice = 1;
$alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping.
if ($alreadydispatched) $replacedinvoice = 2;
}
// If not already into bookkeeping, we won't add it. If yes, do nothing (should not happen because creating replacement not possible if invoice is accounted)
if ($replacedinvoice == 1)
{
$db->rollback();
continue;
}
// Error if some lines are not binded/ready to be journalized
if ($errorforinvoice[$key] == 'somelinesarenotbound')
{
$error++;
$errorforline++;
setEventMessages($langs->trans('ErrorInvoiceContainsLinesNotYetBounded', $val['ref']), null, 'errors');
}
// Thirdparty
if (! $errorforline)
{
foreach ( $tabttc[$key] as $k => $mt ) {
if ($mt) {
//if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->date_lim_reglement = $val["datereg"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'customer_invoice';
@@ -257,6 +321,10 @@ if ($action == 'writebookkeeping') {
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;
$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;
$result = $bookkeeping->create($user);
if ($result < 0) {
@@ -264,16 +332,18 @@ if ($action == 'writebookkeeping') {
{
$error++;
$errorforline++;
$errorforinvoice[$key]='alreadyjournalized';
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
$errorforinvoice[$key]='other';
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
//}
}
}
@@ -281,18 +351,19 @@ if ($action == 'writebookkeeping') {
if (! $errorforline)
{
foreach ( $tabht[$key] as $k => $mt ) {
if ($mt) {
//if ($mt) {
// get compte id and label
$accountingaccount = new AccountingAccount($db);
if ($accountingaccount->fetch(null, $k, true)) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->date_lim_reglement = $val["datereg"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'customer_invoice';
$bookkeeping->fk_doc = $key;
$bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add
$bookkeeping->thirdparty_code = $companystatic->code_client;
$bookkeeping->thirdparty_code = $companystatic->code_client;
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
@@ -304,6 +375,10 @@ if ($action == 'writebookkeeping') {
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;
$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;
$result = $bookkeeping->create($user);
if ($result < 0) {
@@ -311,22 +386,23 @@ if ($action == 'writebookkeeping') {
{
$error++;
$errorforline++;
$errorforinvoice[$key]='alreadyjournalized';
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
$errorforinvoice[$key]='other';
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
}
}
//}
}
}
// VAT
// var_dump($tabtva);
if (! $errorforline)
{
$listoftax=array(0, 1, 2);
@@ -340,6 +416,7 @@ if ($action == 'writebookkeeping') {
if ($mt) {
$bookkeeping = new BookKeeping($db);
$bookkeeping->doc_date = $val["date"];
$bookkeeping->date_lim_reglement = $val["datereg"];
$bookkeeping->doc_ref = $val["ref"];
$bookkeeping->date_create = $now;
$bookkeeping->doc_type = 'customer_invoice';
@@ -349,7 +426,7 @@ if ($action == 'writebookkeeping') {
$bookkeeping->subledger_account = '';
$bookkeeping->subledger_label = '';
$bookkeeping->numero_compte = $k;
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT").' '.join(', ',$def_tva[$key][$k]) . ($numtax?' - Localtax '.$numtax:'');
$bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT").' '.join(', ',$def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'');
$bookkeeping->montant = $mt;
$bookkeeping->sens = ($mt < 0) ? 'D' : 'C';
$bookkeeping->debit = ($mt < 0) ? -$mt : 0;
@@ -357,6 +434,10 @@ if ($action == 'writebookkeeping') {
$bookkeeping->code_journal = $journal;
$bookkeeping->journal_label = $journal_label;
$bookkeeping->fk_user_author = $user->id;
$bookkeeping->entity = $conf->entity;
$totaldebit += $bookkeeping->debit;
$totalcredit += $bookkeeping->credit;
$result = $bookkeeping->create($user);
if ($result < 0) {
@@ -364,12 +445,14 @@ if ($action == 'writebookkeeping') {
{
$error++;
$errorforline++;
$errorforinvoice[$key]='alreadyjournalized';
//setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->fk_doc.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings');
}
else
{
$error++;
$errorforline++;
$errorforinvoice[$key]='other';
setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors');
}
}
@@ -378,6 +461,15 @@ if ($action == 'writebookkeeping') {
}
}
// Protection against a bug on lines before
if (! $errorforline && (price2num($totaldebit) != price2num($totalcredit)))
{
$error++;
$errorforline++;
$errorforinvoice[$key]='amountsnotbalanced';
setEventMessages('Try to insert a non balanced transaction in book for '.$invoicestatic->ref.'. Canceled. Surely a bug.', null, 'errors');
}
if (! $errorforline)
{
$db->commit();
@@ -388,13 +480,15 @@ if ($action == 'writebookkeeping') {
if ($error >= 10)
{
setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped"), null, 'errors');
break; // Break in the foreach
setEventMessages($langs->trans("ErrorTooManyErrorsProcessStopped"), null, 'errors');
break; // Break in the foreach
}
}
}
$tabpay = $tabfac;
if (empty($error) && count($tabpay) > 0) {
setEventMessages($langs->trans("GeneralLedgerIsWritten"), null, 'mesgs');
}
@@ -419,7 +513,7 @@ if ($action == 'writebookkeeping') {
$param.='&date_endday='.$date_endday;
$param.='&date_endmonth='.$date_endmonth;
$param.='&date_endyear='.$date_endyear;
$param.='&in_bookeeping='.$in_bookeeping;
$param.='&in_bookkeeping='.$in_bookkeeping;
header("Location: ".$_SERVER['PHP_SELF'].($param?'?'.$param:''));
exit;
}
@@ -437,7 +531,6 @@ $form = new Form($db);
if ($action == 'exportcsv') {
$sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$sell_journal = $conf->global->ACCOUNTING_SELL_JOURNAL;
include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php';
@@ -448,49 +541,72 @@ if ($action == 'exportcsv') {
{
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->client = $tabcompany[$key]['code_client'];
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
$companystatic->code_client = $tabcompany[$key]['code_client'];
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
$companystatic->client = 3;
$invoicestatic->id = $key;
$invoicestatic->ref = $val["ref"];
$invoicestatic->ref = (string) $val["ref"];
$invoicestatic->type = $val["type"];
$invoicestatic->close_code = $val["close_code"];
$date = dol_print_date($val["date"], 'day');
// Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
$replacedinvoice = 0;
if ($invoicestatic->close_code == Facture::CLOSECODE_REPLACED)
{
$replacedinvoice = 1;
$alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping.
if ($alreadydispatched) $replacedinvoice = 2;
}
// If not already into bookkeeping, we won't add it. If yes, do nothing (should not happen because creating replacement not possible if invoice is accounted)
if ($replacedinvoice == 1)
{
continue;
}
// Third party
foreach ($tabttc[$key] as $k => $mt) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $langs->trans("Code_tiers") . '"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Code_tiers") . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . $sell_journal . '"';
print "\n";
//if ($mt) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER . '"' . $sep;
print '"' . length_accounta(html_entity_decode($k)) . '"' . $sep;
print '"' . $langs->trans("Thirdparty") . '"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("Thirdparty") . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . $journal . '"';
print "\n";
//}
}
// Product / Service
foreach ($tabht[$key] as $k => $mt) {
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
if ($mt) {
//if ($mt) {
print '"' . $key . '"' . $sep;
print '"' . $date . '"' . $sep;
print '"' . $val["ref"] . '"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print " " . $sep;
print '""' . $sep;
print '"' . utf8_decode(dol_trunc($accountingaccount->label, 32)) . '"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . dol_trunc($accountingaccount->label, 32) . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . $sell_journal . '"';
print '"' . $journal . '"';
print "\n";
}
//}
}
// VAT
@@ -508,12 +624,12 @@ if ($action == 'exportcsv') {
print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep;
print " " . $sep;
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . '"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . join(', ',$def_tva[$key][$k]) . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
print '""' . $sep;
print '"' . $langs->trans("VAT") . ' - ' . $def_tva[$key] . ' %"' . $sep;
print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . join(', ',$def_tva[$key][$k]) .' %' . ($numtax?' - Localtax '.$numtax:'') . '"' . $sep;
print '"' . ($mt < 0 ? price(- $mt) : '') . '"' . $sep;
print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;
print '"' . $sell_journal . '"';
print '"' . $journal . '"';
print "\n";
}
}
@@ -531,15 +647,15 @@ if (empty($action) || $action == 'view') {
$nomlink = '';
$periodlink = '';
$exportlink = '';
$builddate = time();
$builddate=dol_now();
$description.= $langs->trans("DescJournalOnlyBindedVisible").'<br>';
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS))
$description .= $langs->trans("DepositsAreNotIncluded");
else
$description .= $langs->trans("DepositsAreIncluded");
$listofchoices=array('already'=>$langs->trans("AlreadyInGeneralLedger"), 'notyet'=>$langs->trans("NotYetInGeneralLedger"));
$period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("AlreadyInGeneralLedger").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
$listofchoices=array('notyet'=>$langs->trans("NotYetInGeneralLedger"), 'already'=>$langs->trans("AlreadyInGeneralLedger"));
$period = $form->select_date($date_start?$date_start:-1, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end?$date_end:-1, 'date_end', 0, 0, 0, '', 1, 0, 1). ' - ' .$langs->trans("JournalizationInLedgerStatus").' '. $form->selectarray('in_bookkeeping', $listofchoices, $in_bookkeeping, 1);
$varlink = 'id_journal=' . $id_journal;
@@ -547,30 +663,33 @@ if (empty($action) || $action == 'view') {
// Button to write into Ledger
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone");
print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
}
print '<div class="tabsAction tabsActionNoBottom">';
print '<input type="button" class="butAction" name="exportcsv" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') {
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
print '<input type="button" class="butActionRefused" title="'.dol_escape_htmltag($langs->trans("SomeMandatoryStepsOfSetupWereNotDone")).'" value="' . $langs->trans("WriteBookKeeping") . '" />';
}
else {
print '<input type="button" class="butAction" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
if ($in_bookkeeping == 'notyet') print '<input type="button" class="butAction" name="writebookkeeping" value="' . $langs->trans("WriteBookKeeping") . '" onclick="writebookkeeping();" />';
else print '<a href="#" class="butActionRefused" name="writebookkeeping">' . $langs->trans("WriteBookKeeping") . '</a>';
}
print '<input type="button" class="butAction" value="' . $langs->trans("ExportDraftJournal") . '" onclick="launch_export();" />';
print '</div>';
// TODO Avoid using js. We can use a direct link with $param
print '
<script type="text/javascript">
function launch_export() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("exportcsv");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
$("div.fiche form input[name=\"action\"]").val("exportcsv");
$("div.fiche form input[type=\"submit\"]").click();
$("div.fiche form input[name=\"action\"]").val("");
}
function writebookkeeping() {
$("div.fiche div.tabBar form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche div.tabBar form input[type=\"submit\"]").click();
$("div.fiche div.tabBar form input[name=\"action\"]").val("");
console.log("click on writebookkeeping");
$("div.fiche form input[name=\"action\"]").val("writebookkeeping");
$("div.fiche form input[type=\"submit\"]").click();
$("div.fiche form input[name=\"action\"]").val("");
}
</script>';
@@ -580,6 +699,7 @@ if (empty($action) || $action == 'view') {
print '<br>';
$i = 0;
print '<div class="div-table-responsive">';
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print "<td></td>";
@@ -587,62 +707,124 @@ if (empty($action) || $action == 'view') {
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
print "<td>" . $langs->trans("AccountAccounting") . "</td>";
print "<td>" . $langs->trans("SubledgerAccount") . "</td>";
print "<td>" . $langs->trans("Label") . "</td>";
print "<td>" . $langs->trans("LabelOperation") . "</td>";
print "<td align='right'>" . $langs->trans("Debit") . "</td>";
print "<td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$r = '';
$invoicestatic = new Facture($db);
$companystatic = new Client($db);
$invoicestatic = new Facture($db);
foreach ( $tabfac as $key => $val )
{
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->code_compta = $tabcompany[$key]['code_compta'];
$companystatic->code_compta_fournisseur = $tabcompany[$key]['code_compta_fournisseur'];
$companystatic->code_client = $tabcompany[$key]['code_client'];
$companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur'];
$companystatic->client = 3;
foreach ( $tabfac as $key => $val ) {
$invoicestatic->id = $key;
$invoicestatic->ref = $val["ref"];
$invoicestatic->ref = (string) $val["ref"];
$invoicestatic->type = $val["type"];
$invoicestatic->close_code = $val["close_code"];
$date = dol_print_date($val["date"], 'day');
// Third party
foreach ( $tabttc[$key] as $k => $mt ) {
// Is it a replaced invoice ? 0=not a replaced invoice, 1=replaced invoice not yet dispatched, 2=replaced invoice dispatched
$replacedinvoice = 0;
if ($invoicestatic->close_code == Facture::CLOSECODE_REPLACED)
{
$replacedinvoice = 1;
$alreadydispatched = $invoicestatic->getVentilExportCompta(); // Test if replaced invoice already into bookkeeping.
if ($alreadydispatched) $replacedinvoice = 2;
}
// If not already into bookkeeping, we won't add it, if yes, add the counterpart ???.
if ($replacedinvoice == 1)
{
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td><!-- Replaced invoice --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
$companystatic->id = $tabcompany[$key]['id'];
$companystatic->name = $tabcompany[$key]['name'];
$companystatic->customer_code = $tabcompany[$key]['code_client'];
print "<td><strike>" . $invoicestatic->getNomUrl(1) . "</strike></td>";
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
}
else print $accountoshow;
print $langs->trans("Replaced");
print '</td>';
// Subledger account
print "<td>";
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
else print $accountoshow;
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "<td>";
print "</td>";
print '<td align="right"></td>';
print '<td align="right"></td>';
print "</tr>";
continue;
}
if ($errorforinvoice[$key] == 'somelinesarenotbound')
{
print '<tr class="oddeven">';
print "<td><!-- Some lines are not bound --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
print '<span class="error">'.$langs->trans('ErrorInvoiceContainsLinesNotYetBoundedShort', $val['ref']).'</span>';
print '</td>';
// Subledger account
print "<td>";
print '</td>';
print "<td>";
print "</td>";
print '<td align="right"></td>';
print '<td align="right"></td>';
print "</tr>";
}
// Third party
foreach ($tabttc[$key] as $k => $mt)
{
//if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- Thirdparty --></td>";
print "<td>" . $date . "</td>";
print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';
}
else print $accountoshow;
print '</td>';
// Subledger account
print "<td>";
$accountoshow = length_accounta($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>';
}
else print $accountoshow;
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("SubledgerAccount") . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "</tr>";
//}
}
// Product / Service
foreach ( $tabht[$key] as $k => $mt ) {
foreach ($tabht[$key] as $k => $mt)
{
$accountingaccount = new AccountingAccount($db);
$accountingaccount->fetch(null, $k, true);
if ($mt) {
//if ($mt) {
print '<tr class="oddeven">';
print "<td><!-- Product --></td>";
print "<td>" . $date . "</td>";
@@ -665,12 +847,13 @@ if (empty($action) || $action == 'view') {
print "<td align='right'>" . ($mt < 0 ? price(- $mt) : '') . "</td>";
print "<td align='right'>" . ($mt >= 0 ? price($mt) : '') . "</td>";
print "</tr>";
}
//}
}
// VAT
$listoftax = array(0, 1, 2);
foreach ($listoftax as $numtax) {
foreach ($listoftax as $numtax)
{
$arrayofvat = $tabtva;
if ($numtax == 1) $arrayofvat = $tablocaltax1;
if ($numtax == 2) $arrayofvat = $tablocaltax2;
@@ -686,14 +869,14 @@ if (empty($action) || $action == 'view') {
$accountoshow = length_accountg($k);
if (empty($accountoshow) || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("VATAccountNotDefined").'</span>';
print '<span class="error">'.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Sale").')'.'</span>';
}
else print $accountoshow;
print "</td>";
// Subledger account
print "<td>";
print '</td>';
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).($numtax?' - Localtax '.$numtax:'');
print "<td>" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT"). ' '.join(', ',$def_tva[$key][$k]).' %'.($numtax?' - Localtax '.$numtax:'');
print "</td>";
print '<td align="right">' . ($mt < 0 ? price(- $mt) : '') . "</td>";
print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
@@ -704,6 +887,7 @@ if (empty($action) || $action == 'view') {
}
print "</table>";
print '</div>';
// End of page
llxFooter();

View File

@@ -1,302 +0,0 @@
<?php
/* Copyright (C) 2016/17 Jamal Elbaz <jamelbaz@gmail.com>
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/accountancy/report/result.php
* \ingroup Advanced accountancy
* \brief Page for accounting result
*/
require '../../main.inc.php';
// Class
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/report.lib.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancycategory.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
$error = 0;
// Langs
$langs->load("accountancy");
$langs->load("compta");
$mesg = '';
$action = GETPOST('action','aZ09');
$cat_id = GETPOST('account_category');
$selectcpt = GETPOST('cpt_bk');
$id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
$cancel = GETPOST('cancel');
$simple_report = GETPOST('simple_report');
// Filter
$year = GETPOST('year','int');
if ($year == 0) {
$year_current = strftime("%Y", time());
$year_start = $year_current;
} else {
$year_current = $year;
$year_start = $year;
}
if($cat_id == 0){
$cat_id = null;
}
// Security check
if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->comptarapport->lire)
accessforbidden();
$AccCat = new AccountancyCategory($db);
/*
* View
*/
llxheader('', $langs->trans('ReportInOut'));
$formaccounting = new FormAccounting($db);
$form = new Form($db);
$textprevyear = '<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current - 1) . '">' . img_previous() . '</a>';
$textnextyear = '&nbsp;<a href="' . $_SERVER["PHP_SELF"] . '?year=' . ($year_current + 1) . '">' . img_next() . '</a>';
$nom = $langs->trans("ReportInOut").', '.$langs->trans("ByAccounts");
$nomlink = '';
$periodlink = '';
$exportlink = '';
$builddate = time();
$description = '';
$period = $langs->trans("Detail").' '. $form->selectyesno('simple_report',$simple_report,0) . " " .$textprevyear . " " . $langs->trans("Year") . " " . $year_start . " " . $textnextyear ;
report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => ''));
$moreforfilter='';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
$months = array( $langs->trans("JanuaryMin"),
$langs->trans("FebruaryMin"),
$langs->trans("MarchMin"),
$langs->trans("AprilMin"),
$langs->trans("MayMin"),
$langs->trans("JuneMin"),
$langs->trans("JulyMin"),
$langs->trans("AugustMin"),
$langs->trans("SeptemberMin"),
$langs->trans("OctoberMin"),
$langs->trans("NovemberMin"),
$langs->trans("DecemberMin"),
);
print '<tr class="liste_titre">';
print '<th class="liste_titre">'.$langs->trans("Account").'</th>';
print '<th class="liste_titre">'.$langs->trans("Description").'</th>';
print '<th class="liste_titre" align="center">N-1</th>';
print '<th class="liste_titre" align="center">'.$langs->trans("NReal").'</th>';
foreach($months as $k => $v){
print '<th class="liste_titre" align="center">'.$langs->trans($v).'</th>';
}
print '</tr>';
//All categories
$cats = $AccCat->getCats();
if ($catsCalcule < 0) dol_print_error($db, $AccCat->error, $AccCat->errors);
$j=1;
$sommes = array();
foreach($cats as $cat ){
if(!empty($cat['category_type'])){ // category calculed
$formula = $cat['formula'];
print "<tr class='liste_titre'>";
print '<td colspan="2">' . $cat['label'] . '</td>';
$vars = array();
// Previous Fiscal year (N-1)
foreach($sommes as $code => $det){
$vars[$code] = $det['NP'];
}
$result = strtr($formula, $vars);
$r = $AccCat->calculate($result);
print '<td align="right"><font color="blue">' . price($r) . '</td>';
$code = $cat['code']; // code categorie de calcule
$sommes[$code]['NP'] += $r;
// Current fiscal year (N)
if (is_array($sommes) && ! empty($sommes)){
foreach($sommes as $code => $det){
$vars[$code] = $det['N'];
}
}
$result = strtr($formula, $vars);
$r = $AccCat->calculate($result);
print '<td align="right"><font color="blue">' . price($r) . '</td>';
$sommes[$code]['N'] += $r;
// Detail by month
foreach($months as $k => $v){
foreach($sommes as $code => $det){
$vars[$code] = $det['M'][$k];
}
$result = strtr($formula, $vars);
$r = $AccCat->calculate($result);
print '<td align="right"><font color="blue">' . price($r) . '</td>';
$sommes[$code]['M'][$k] += $r;
}
print "</tr>\n";
}else{ // normal category
$totCat = array();
$totCat['M'] = array();
// get cpts of category
$cpts = $AccCat->getCptsCat($cat['rowid']);
print "<tr class='liste_titre'>";
print '<td colspan="2">' . $cat['label'] . '</td>';
foreach($cpts as $i => $cpt){
$var = ! $var;
$code = $cat['code'];
// N-1
$return = $AccCat->getResult($cpt['account_number'], 0, $year_current -1, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultNP=0;
} else {
$resultNP=$AccCat->sdc;
}
//N
$return = $AccCat->getResult($cpt['account_number'], 0, $year_current, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultN=0;
} else {
$resultN=$AccCat->sdc;
}
$totCat['NP'] += $resultNP;
$totCat['N'] += $resultN;
foreach($months as $k => $v){
$return = $AccCat->getResult($cpt['account_number'], $k+1, $year_current, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultM=0;
} else {
$resultM=$AccCat->sdc;
}
$totCat['M'][$k] += $resultM;
}
}
print '<td align="right">' . price($totCat['NP']) . '</td>';
print '<td align="right">' . price($totCat['N']) . '</td>';
foreach($totCat['M'] as $k => $v){
print '<td align="right">' . price($v) . '</td>';
}
print "</tr>\n";
foreach($cpts as $i => $cpt){
$var = ! $var;
$code = $cat['code'];
// N-1
$return = $AccCat->getResult($cpt['account_number'], 0, $year_current -1, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultNP=0;
} else {
$resultNP=$AccCat->sdc;
}
//N
$return = $AccCat->getResult($cpt['account_number'], 0, $year_current, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultN=0;
} else {
$resultN=$AccCat->sdc;
}
$sommes[$code]['NP'] += $resultNP;
$sommes[$code]['N'] += $resultN;
print '<tr'. $bc[$var].'>';
if ($simple_report == 'yes') {
print '<td>' . length_accountg($cpt['account_number']) . '</td>';
print '<td>' . $cpt['name_cpt'] . '</td>';
print '<td align="right">' . price($resultNP) . '</td>';
print '<td align="right">' . price($resultN) . '</td>';
}
foreach($months as $k => $v){
$return = $AccCat->getResult($cpt['account_number'], $k+1, $year_current, $cpt['dc']);
if ($return < 0) {
setEventMessages(null, $AccCat->errors, 'errors');
$resultM=0;
} else {
$resultM=$AccCat->sdc;
}
$sommes[$code]['M'][$k] += $resultM;
if ($simple_report == 'yes') {
print '<td align="right">' . price($resultM) . '</td>';
}
}
print "</tr>\n";
}
}
}
print "</table>";
print '</div>';
llxFooter();
$db->close();

View File

@@ -22,9 +22,9 @@
*
*/
/**
* \file htdocs/accountancy/supplier/card.php
* \ingroup Accountancy
* \brief Card supplier ventilation
* \file htdocs/accountancy/supplier/card.php
* \ingroup Advanced accountancy
* \brief Card supplier ventilation
*/
require '../../main.inc.php';
@@ -37,6 +37,9 @@ $langs->load("bills");
$langs->load("accountancy");
$action = GETPOST('action', 'alpha');
$cancel = GETPOST('cancel', 'alpha');
$backtopage = GETPOST('backtopage', 'alpha');
$codeventil = GETPOST('codeventil');
$id = GETPOST('id');
@@ -44,13 +47,15 @@ $id = GETPOST('id');
if ($user->societe_id > 0)
accessforbidden();
/*
* Actions
*/
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
if (! GETPOST('cancel', 'alpha')) {
if ($action == 'ventil' && $user->rights->accounting->bind->write)
{
if (! $cancel)
{
if ($codeventil < 0) $codeventil = 0;
$sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
@@ -64,6 +69,11 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) {
else
{
setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs');
if ($backtopage)
{
header("Location: ".$backtopage);
exit();
}
}
} else {
header("Location: ./lines.php");
@@ -97,20 +107,21 @@ if (! empty($id)) {
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn ";
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = " . $id;
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
dol_syslog("/accounting/supplier/card.php sql=" . $sql, LOG_DEBUG);
$result = $db->query($sql);
if ($result) {
$num_lines = $db->num_rows($result);
$i = 0;
if ($num_lines) {
$objp = $db->fetch_object($result);
print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '" method="post">' . "\n";
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
print '<input type="hidden" name="action" value="ventil">';
print '<input type="hidden" name="backtopage" value="'.dol_escape_htmltag($backtopage).'">';
print load_fiche_titre($langs->trans('SuppliersVentilation'), '', 'title_setup');

View File

@@ -38,58 +38,83 @@ $langs->load("accountancy");
// Security check
if (empty($conf->accounting->enabled)) {
accessforbidden();
accessforbidden();
}
if ($user->societe_id > 0)
accessforbidden();
if (! $user->rights->accounting->bind->write)
accessforbidden();
// Filter
$year = GETPOST("year",'int');
if ($year == 0) {
$year_current = strftime("%Y", time());
$year_start = $year_current;
} else {
$year_current = $year;
$year_start = $year;
$month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1);
if (GETPOST("year",'int')) $year_start = GETPOST("year",'int');
else
{
$year_start = dol_print_date(dol_now(), '%Y');
if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year
}
$year_end = $year_start + 1;
$month_end = $month_start - 1;
if ($month_end < 1)
{
$month_end = 12;
$year_end--;
}
$search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start);
$search_date_end = dol_get_last_day($year_end, $month_end);
$year_current = $year_start;
// Validate History
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action','aZ09');
/*
* Actions
*/
if ($action == 'clean' || $action == 'validatehistory')
{
// Clean database
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
$sql1 .= " SET fk_code_ventilation = 0";
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ' AND accnt.entity = '.$conf->entity.')';
$sql1 .= ' AND fd.fk_facture_fourn IN (SELECT rowid FROM ' . MAIN_DB_PREFIX . 'facture_fourn WHERE entity = '.$conf->entity.')';
$sql1 .= ' AND fk_code_ventilation <> 0';
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
setEventMessage($db->lasterror(), 'errors');
} else {
$db->commit();
}
// End clean database
}
if ($action == 'validatehistory') {
$error = 0;
$db->begin();
// First clean corrupted data
$sqlclean = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd";
$sqlclean .= " SET fk_code_ventilation = 0";
$sqlclean .= ' WHERE fd.fk_code_ventilation NOT IN ';
$sqlclean .= ' (SELECT accnt.rowid ';
$sqlclean .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sqlclean .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sqlclean .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
$resql = $db->query($sqlclean);
// Now make the binding. Bind automatically only for product with a dedicated account that exists into chart of account, others need a manual bind
if ($db->type == 'pgsql') {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "facture_fourn_det.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "facture_fourn_det.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity;
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number";
$sql1 .= " AND " . MAIN_DB_PREFIX . "facture_fourn_det.fk_code_ventilation = 0";
} else {
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS;
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . $conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity;
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_buy=accnt.account_number";
$sql1 .= " AND fd.fk_code_ventilation = 0";
}
@@ -105,54 +130,9 @@ if ($action == 'validatehistory') {
$db->commit();
setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs');
}
} elseif ($action == 'fixaccountancycode') {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
$sql1 .= " SET fk_code_ventilation = 0";
$sql1 .= ' WHERE fd.fk_code_ventilation NOT IN ';
$sql1 .= ' (SELECT accnt.rowid ';
$sql1 .= ' FROM ' . MAIN_DB_PREFIX . 'accounting_account as accnt';
$sql1 .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'accounting_system as syst';
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=' . $conf->global->CHARTOFACCOUNTS . ')';
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
setEventMessage($db->lasterror(), 'errors');
} else {
$db->commit();
setEventMessage($langs->trans('Done'), 'mesgs');
}
} elseif ($action == 'cleanaccountancycode') {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as fd";
$sql1.= " SET fk_code_ventilation = 0";
$sql1.= " WHERE fd.fk_facture_fourn IN ( SELECT f.rowid FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
$sql1.= " WHERE f.datef >= '" . $db->idate(dol_get_first_day($year_current, 1, false)) . "'";
$sql1.= " AND f.datef <= '" . $db->idate(dol_get_last_day($year_current, 12, false)) . "'";
$sql1.= " AND f.entity IN (" . getEntity('accountancy') . ")";
$sql1.= ")";
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
$db->rollback();
setEventMessage($db->lasterror(), 'errors');
} else {
$db->commit();
setEventMessage($langs->trans('Done'), 'mesgs');
}
}
/*
* View
*/
@@ -168,40 +148,38 @@ print $langs->trans("DescVentilSupplier") . '<br>';
print $langs->trans("DescVentilMore", $langs->transnoentitiesnoconv("ValidateHistory"), $langs->transnoentitiesnoconv("ToBind")) . '<br>';
print '<br>';
//print '<div class="inline-block divButAction">';
// TODO Remove this. Should be done always or into the repair.php script.
if ($conf->global->MAIN_FEATURES_LEVEL > 1) print '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=fixaccountancycode">' . $langs->trans("CleanFixHistory", $year_current) . '</a>';
//print '</div>';
$y = $year_current;
$buttonbind = '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=validatehistory">' . $langs->trans("ValidateHistory") . '</a>';
$buttonreset = '<a class="butActionDelete" href="' . $_SERVER['PHP_SELF'] . '?year=' . $year_current . '&action=cleanaccountancycode">' . $langs->trans("CleanHistory", $year_current) . '</a>';
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesNotBound"), $buttonbind, '');
print '<div class="div-table-responsive-no-min">';
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="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $j, 'ffd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(ffd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND ff.fk_statut > 0 ";
$sql .= " WHERE ff.datef >= '" . $db->idate($search_date_start) . "'";
$sql .= " AND ff.datef <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND ff.fk_statut > 0";
$sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NULL";
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
@@ -239,35 +217,39 @@ if ($resql) {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
print '</div>';
print '<br>';
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), $buttonreset, '');
print_fiche_titre($langs->trans("OverviewOfAmountOfLinesBound"), '', '');
print '<div class="div-table-responsive-no-min">';
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="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label') . " AS intitule,";
for($i = 1; $i <= 12; $i ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $j, 'ffd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(ffd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = ffd.fk_code_ventilation";
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND ff.fk_statut > 0 ";
$sql .= " WHERE ff.datef >= '" . $db->idate($search_date_start) . "'";
$sql .= " AND ff.datef <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND ff.fk_statut > 0";
$sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
$sql .= " AND aa.account_number IS NOT NULL";
$sql .= " GROUP BY ffd.fk_code_ventilation,aa.account_number,aa.label";
@@ -293,7 +275,7 @@ if ($resql) {
}
else print $row[1];
print '</td>';
for($i = 2; $i <= 12; $i ++) {
for($i = 2; $i <= 12; $i++) {
print '<td align="right">' . price($row[$i]) . '</td>';
}
print '<td align="right">' . price($row[13]) . '</td>';
@@ -305,7 +287,7 @@ if ($resql) {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
print '</div>';
@@ -316,24 +298,28 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
print_fiche_titre($langs->trans("OtherInfo"), '', '');
print "<br>\n";
print '<div class="div-table-responsive-no-min">';
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="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
}
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 ++) {
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $i, 'ffd.total_ht', '0') . ") AS month" . str_pad($i, 2, '0', STR_PAD_LEFT) . ",";
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
$sql .= " SUM(" . $db->ifsql('MONTH(ff.datef)=' . $j, 'ffd.total_ht', '0') . ") AS month" . str_pad($j, 2, '0', STR_PAD_LEFT) . ",";
}
$sql .= " SUM(ffd.total_ht) as total";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as ffd";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "facture_fourn as ff ON ff.rowid = ffd.fk_facture_fourn";
$sql .= " WHERE ff.datef >= '" . $db->idate(dol_get_first_day($y, 1, false)) . "'";
$sql .= " AND ff.datef <= '" . $db->idate(dol_get_last_day($y, 12, false)) . "'";
$sql .= " AND ff.fk_statut > 0 ";
$sql .= " WHERE ff.datef >= '" . $db->idate($search_date_start) . "'";
$sql .= " AND ff.datef <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND ff.fk_statut > 0";
$sql .= " AND ff.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
dol_syslog('htdocs/accountancy/supplier/index.php');
@@ -341,9 +327,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
if ($resql) {
$num = $db->num_rows($resql);
while ( $row = $db->fetch_row($resql)) {
while ($row = $db->fetch_row($resql)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
@@ -351,12 +335,12 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange.
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
print '</tr>';
}
$db->free($resql);
} else {
print $db->lasterror(); // Show last sql error
}
print "</table>\n";
print '</div>';
}

View File

@@ -32,6 +32,8 @@ require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
// Langs
$langs->load("compta");
@@ -52,6 +54,9 @@ $search_desc = GETPOST('search_desc', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
$search_account = GETPOST('search_account', 'alpha');
$search_vat = GETPOST('search_vat', 'alpha');
$search_day=GETPOST("search_day","int");
$search_month=GETPOST("search_month","int");
$search_year=GETPOST("search_year","int");
$search_country = GETPOST('search_country', 'alpha');
$search_tvaintra = GETPOST('search_tvaintra', 'alpha');
@@ -60,8 +65,8 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page', 'int');
if ($page < 0) $page = 0;
$offset = $conf->liste_limit * $page;
if (empty($page) || $page < 0) $page = 0;
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortfield)
@@ -96,6 +101,9 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$search_amount = '';
$search_account = '';
$search_vat = '';
$search_day = '';
$search_month = '';
$search_year = '';
$search_country = '';
$search_tvaintra = '';
}
@@ -103,27 +111,36 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
if (is_array($changeaccount) && count($changeaccount) > 0) {
$error = 0;
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as l";
$sql1 .= " SET l.fk_code_ventilation=" . GETPOST('account_parent');
$sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')';
dol_syslog('accountancy/supplier/lines.php::changeaccount sql= ' . $sql1);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
setEventMessages($db->lasterror(), null, 'errors');
}
if (! $error) {
$db->commit();
setEventMessages($langs->trans('Save'), null, 'mesgs');
} else {
$db->rollback();
setEventMessages($db->lasterror(), null, 'errors');
if (! (GETPOST('account_parent','int') >= 0))
{
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Account")), null, 'errors');
}
$account_parent = ''; // Protection to avoid to mass apply it a second time
if (! $error)
{
$db->begin();
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det as l";
$sql1 .= " SET l.fk_code_ventilation=" . (GETPOST('account_parent','int') > 0 ? GETPOST('account_parent','int') : '0');
$sql1 .= ' WHERE l.rowid IN (' . implode(',', $changeaccount) . ')';
dol_syslog('accountancy/supplier/lines.php::changeaccount sql= ' . $sql1);
$resql1 = $db->query($sql1);
if (! $resql1) {
$error ++;
setEventMessages($db->lasterror(), null, 'errors');
}
if (! $error) {
$db->commit();
setEventMessages($langs->trans('Save'), null, 'mesgs');
} else {
$db->rollback();
setEventMessages($db->lasterror(), null, 'errors');
}
$account_parent = ''; // Protection to avoid to mass apply it a second time
}
}
@@ -131,6 +148,9 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
* View
*/
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("SuppliersVentilation") . ' - ' . $langs->trans("Dispatched"));
print '<script type="text/javascript">
@@ -154,17 +174,16 @@ print '<script type="text/javascript">
* Supplier Invoice lines
*/
$sql = "SELECT f.rowid as facid, f.ref as facnumber, f.ref_supplier, f.libelle as invoice_label, f.datef, f.fk_soc,";
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht , l.qty, l.tva_tx, l.vat_src_code,";
$sql.= " l.rowid, l.fk_product, l.product_type as line_type, l.description, l.total_ht , l.qty, l.tva_tx, l.vat_src_code,";
$sql.= " aa.label, aa.account_number, ";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, co.label as country, s.tva_intra";
$sql.= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, co.label as country, s.tva_intra";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as l";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = l.fk_code_ventilation";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON aa.rowid = l.fk_code_ventilation";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn as f ON f.rowid = l.fk_facture_fourn";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "societe as s ON s.rowid = f.fk_soc";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_country as co ON co.rowid = s.fk_pays ";
$sql.= " WHERE f.rowid = l.fk_facture_fourn and f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 ";
$sql.= " AND aa.rowid = l.fk_code_ventilation";
if ($search_lineid) {
$sql .= natural_search("l.rowid", $search_lineid, 1);
}
@@ -184,16 +203,29 @@ if (strlen(trim($search_amount))) {
$sql .= natural_search("l.total_ht", $search_amount, 1);
}
if (strlen(trim($search_account))) {
$sql .= natural_search("aa.account_number", $search_account, 1);
$sql .= natural_search("aa.account_number", $search_account);
}
if (strlen(trim($search_vat))) {
$sql .= natural_search("l.tva_tx", $search_vat, 1);
$sql .= natural_search("l.tva_tx", price2num($search_vat), 1);
}
if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
{
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}
if (strlen(trim($search_country))) {
$sql .= " AND (co.label like'" . $search_country . "%')";
$sql .= natural_search("co.label", $search_country);
}
if (strlen(trim($search_tvaintra))) {
$sql .= " AND (s.tva_intra like'" . $search_tvaintra . "%')";
$sql .= natural_search("s.tva_intra", $search_tvaintra);
}
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
@@ -217,24 +249,19 @@ if ($result) {
$i = 0;
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($search_invoice)
$param .= "&search_invoice=" . $search_invoice;
if ($search_ref)
$param .= "&search_ref=" . $search_ref;
if ($search_label)
$param .= "&search_label=" . $search_label;
if ($search_desc)
$param .= "&search_desc=" . $search_desc;
if ($search_account)
$param .= "&search_account=" . $search_account;
if ($search_vat)
$param .= "&search_vat=" . $search_vat;
if ($search_country)
$param .= "&search_country=" . $search_country;
if ($search_tvaintra)
$param .= "&search_tvaintra=" . $search_tvaintra;
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit);
if ($search_invoice) $param .= "&search_invoice=" . urlencode($search_invoice);
if ($search_ref) $param .= "&search_ref=" . urlencode($search_ref);
if ($search_label) $param .= "&search_label=" . urlencode($search_label);
if ($search_desc) $param .= "&search_desc=" . urlencode($search_desc);
if ($search_account) $param .= "&search_account=" . urlencode($search_account);
if ($search_vat) $param .= "&search_vat=" . urlencode($search_vat);
if ($search_day) $param .= '&search_day='.urlencode($search_day);
if ($search_month) $param .= '&search_month='.urlencode($search_month);
if ($search_year) $param .= '&search_year='.urlencode($search_year);
if ($search_country) $param .= "&search_country=" . urlencode($search_country);
if ($search_tvaintra) $param .= "&search_tvaintra=" . urlencode($search_tvaintra);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
print '<input type="hidden" name="action" value="ventil">';
@@ -250,7 +277,7 @@ if ($result) {
print $langs->trans("DescVentilDoneSupplier") . '<br>';
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
print $formaccounting->select_account(GETPOST('account_parent'), 'account_parent', 1);
print $formaccounting->select_account($account_parent, 'account_parent', 2, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone valignmiddle');
print '<input type="submit" class="button valignmiddle" value="' . $langs->trans("ChangeBinding") . '" /></div>';
$moreforfilter = '';
@@ -262,7 +289,11 @@ if ($result) {
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre center">';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
$formother->select_year($search_year,'search_year',1, 20, 5);
print '</td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
@@ -307,8 +338,8 @@ if ($result) {
$product_static->ref = $objp->product_ref;
$product_static->id = $objp->product_id;
$product_static->type = $objp->type;
$product_static->label = $objp->product_label;
$product_static->type = $objp->line_type;
print '<tr class="oddeven">';
@@ -337,13 +368,13 @@ if ($result) {
print '</td>';
print '<td align="right">' . price($objp->total_ht) . '</td>';
print '<td align="center">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
print '<td align="left">';
print $codecompta . ' <a href="./card.php?id=' . $objp->rowid . '">';
print '<td align="right">' . vatrate($objp->tva_tx.($objp->vat_src_code?' ('.$objp->vat_src_code.')':'')) . '</td>';
print '<td align="center">';
print $codecompta . ' <a href="./card.php?id=' . $objp->rowid . '&backtopage='.urlencode($_SERVER["PHP_SELF"].($param?'?'.$param:'')) . '">';
print img_edit();
print '</a></td>';
print '<td align="right">' . $objp->country .'</td>';
print '<td align="center">' . $objp->tva_intra . '</td>';
print '<td>' . $objp->country .'</td>';
print '<td>' . $objp->tva_intra . '</td>';
print '<td class="center"><input type="checkbox" class="checkforaction" name="changeaccount[]" value="' . $objp->rowid . '"/></td>';
print "</tr>";
@@ -358,7 +389,7 @@ if ($result) {
print '</form>';
} else {
print $db->error();
print $db->lasterror();
}

View File

@@ -33,6 +33,8 @@ require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.product.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
// Langs
$langs->load("compta");
@@ -60,6 +62,10 @@ $search_desc = GETPOST('search_desc', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
$search_account = GETPOST('search_account', 'alpha');
$search_vat = GETPOST('search_vat', 'alpha');
$search_day=GETPOST("search_day","int");
$search_month=GETPOST("search_month","int");
$search_year=GETPOST("search_year","int");
$btn_ventil = GETPOST('ventil', 'alpha');
// Load variable for pagination
@@ -67,7 +73,7 @@ $limit = GETPOST('limit','int')?GETPOST('limit', 'int'):(empty($conf->global->AC
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOST('page','int');
if ($page < 0) { $page = 0; }
if (empty($page) || $page < 0) { $page = 0; }
$offset = $limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
@@ -94,13 +100,15 @@ $accounting = new AccountingAccount($db);
$aarowid_s = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT, 1);
$aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT, 1);
$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
/*
* Action
*/
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
if (GETPOST('cancel','alpha')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction','alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@@ -111,36 +119,40 @@ if (empty($reshook))
// Purge search criteria
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
$search_desc = '';
$search_amount = '';
$search_account = '';
$search_vat = '';
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
$search_desc = '';
$search_amount = '';
$search_account = '';
$search_vat = '';
$search_day = '';
$search_month = '';
$search_year = '';
}
// Mass actions
$objectclass='AccountingAccount';
$objectclass='AccountingAccount';
$permtoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}
if ($massaction == 'ventil') {
$msg='';
//print '<div><font color="red">' . $langs->trans("Processing") . '...</font></div>';
if (! empty($mesCasesCochees)) {
$msg = '<div>' . $langs->trans("SelectedLines") . ': '.count($mesCasesCochees).'</div>';
$msg.='<div class="detail">';
$mesCodesVentilChoisis = $codeventil;
$cpt = 0;
$ok=0;
$ko=0;
foreach ( $mesCasesCochees as $maLigneCochee ) {
foreach ($mesCasesCochees as $maLigneCochee) {
$maLigneCourante = explode("_", $maLigneCochee);
$monId = $maLigneCourante[0];
$monCompte = GETPOST('codeventil'.$monId);
@@ -185,12 +197,21 @@ if ($massaction == 'ventil') {
*/
$form = new Form($db);
$formother = new FormOther($db);
llxHeader('', $langs->trans("SuppliersVentilation"));
if (empty($chartaccountcode))
{
print $langs->trans("ErrorChartOfAccountSystemNotSelected");
llxFooter();
$db->close();
exit;
}
// Supplier Invoice Lines
$sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_label, f.datef,";
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht as price, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_label, f.datef, f.type as ftype,";
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,";
$sql.= " aa.rowid as aarowid";
$parameters=array();
@@ -199,12 +220,9 @@ $sql.=$hookmanager->resPrint;
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_system as accsys ON accsys.pcg_version = aa.fk_pcg_version";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "accounting_account as aa ON p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '" . $chartaccountcode."' AND aa.entity = " . $conf->entity;
$sql.= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
$sql.= " AND product_type <= 2";
$sql.= " AND (accsys.rowid='" . $conf->global->CHARTOFACCOUNTS . "' OR p.accountancy_code_buy IS NULL OR p.accountancy_code_buy =''OR p.accountancy_code_buy NOT IN
(SELECT aa.account_number FROM " . MAIN_DB_PREFIX . "accounting_account as aa , " . MAIN_DB_PREFIX . "accounting_system as asy WHERE fk_pcg_version = asy.pcg_version AND asy.rowid ='" . $conf->global->CHARTOFACCOUNTS . "'))";
$sql.= " AND l.product_type <= 2";
// Add search filter like
if ($search_lineid) {
$sql .= natural_search("l.rowid", $search_lineid, 1);
@@ -230,6 +248,24 @@ if (strlen(trim($search_account))) {
if (strlen(trim($search_vat))) {
$sql .= natural_search("l.tva_tx",$search_vat,1);
}
if ($search_month > 0)
{
if ($search_year > 0 && empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,$search_month,false))."' AND '".$db->idate(dol_get_last_day($search_year,$search_month,false))."'";
else if ($search_year > 0 && ! empty($search_day))
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'";
else
$sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'";
}
else if ($search_year > 0)
{
$sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year,1,false))."' AND '".$db->idate(dol_get_last_day($search_year,12,false))."'";
}
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql .= " AND f.type IN (" . FactureFournisseur::TYPE_STANDARD . "," . FactureFournisseur::TYPE_REPLACEMENT . "," . FactureFournisseur::TYPE_CREDIT_NOTE . "," . FactureFournisseur::TYPE_SITUATION . ")";
} else {
$sql .= " AND f.type IN (" . FactureFournisseur::TYPE_STANDARD . "," . FactureFournisseur::TYPE_REPLACEMENT . "," . FactureFournisseur::TYPE_CREDIT_NOTE . "," . FactureFournisseur::TYPE_DEPOSIT . "," . FactureFournisseur::TYPE_SITUATION . ")";
}
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy
// Add where from hooks
@@ -260,14 +296,23 @@ if ($result) {
$param='';
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($search_lineid) $param.='&search_lineid='.urlencode($search_lineid);
if ($search_day) $param.='&search_day='.urlencode($search_day);
if ($search_month) $param.='&search_month='.urlencode($search_month);
if ($search_year) $param.='&search_year='.urlencode($search_year);
if ($search_invoice) $param.='&search_invoice='.urlencode($search_invoice);
if ($search_ref) $param.='&search_ref='.urlencode($search_ref);
if ($search_desc) $param.='&search_desc='.urlencode($search_desc);
if ($search_amount) $param.='&search_amount='.urlencode($search_amount);
if ($search_vat) $param.='&search_vat='.urlencode($search_vat);
$arrayofmassactions = array(
'ventil'=>$langs->trans("Ventilate")
//'presend'=>$langs->trans("SendByMail"),
//'builddoc'=>$langs->trans("PDFMerge"),
);
//if ($user->rights->mymodule->supprimer) $arrayofmassactions['delete']=$langs->trans("Delete");
//if ($massaction == 'presend') $arrayofmassactions=array();
//if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']=$langs->trans("Delete");
//if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array();
$massactionbutton=$form->selectMassAction('ventil', $arrayofmassactions, 1);
print '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">' . "\n";
@@ -283,20 +328,29 @@ if ($result) {
print $langs->trans("DescVentilTodoCustomer") . '</br><br>';
/*$topicmail="Information";
$modelmail="project";
$objecttmp=new Project($db);
$trackid='prj'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';*/
if ($msg) print $msg.'<br>';
$moreforfilter = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
// We add search filter
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_lineid" value="' . dol_escape_htmltag($search_lineid) . '""></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_invoice" value="' . dol_escape_htmltag($search_invoice) . '"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre"></td>';
print '<td class="liste_titre center">';
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
$formother->select_year($search_year,'search_year',1, 20, 5);
print '</td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_ref" value="' . dol_escape_htmltag($search_ref) . '"></td>';
//print '<td class="liste_titre"><input type="text" class="flat maxwidth50" name="search_label" value="' . dol_escape_htmltag($search_label) . '"></td>';
print '<td class="liste_titre"><input type="text" class="flat maxwidthonsmartphone" name="search_desc" value="' . dol_escape_htmltag($search_desc) . '"></td>';
@@ -404,7 +458,7 @@ if ($result) {
print '</td>';
print '<td align="right">';
print price($objp->price);
print price($objp->total_ht);
print '</td>';
// Vat rate
@@ -426,15 +480,15 @@ if ($result) {
// Suggested accounting account
print '<td align="center">';
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print $formaccounting->select_account($objp->aarowid_suggest, 'codeventil'.$objp->rowid, 1, array(), 0, 0, 'codeventil maxwidth300 maxwidthonsmartphone', 'cachewithshowemptyone');
print '</td>';
// Colonne choix ligne a ventiler
// Column with checkbox
print '<td align="center">';
print '<input type="checkbox" class="flat checkforselect" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
print '<input type="checkbox" class="flat checkforselect checkforselect'.$objp->rowid.'" name="toselect[]" value="' . $objp->rowid . "_" . $i . '"' . ($objp->aarowid ? "checked" : "") . '/>';
print '</td>';
print "</tr>";
print '</tr>';
$i ++;
}
@@ -446,5 +500,17 @@ if ($result) {
print $db->error();
}
// Add code to auto check the box when we select an account
print '<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery(".codeventil").change(function() {
var s=$(this).attr("id").replace("codeventil", "")
console.log(s+" "+$(this).val());
if ($(this).val() == -1) jQuery(".checkforselect"+s).prop("checked", false);
else jQuery(".checkforselect"+s).prop("checked", true);
});
});
</script>';
llxFooter();
$db->close();

View File

@@ -53,7 +53,7 @@ if ($action == 'updateall')
{
$db->begin();
$res1=$res2=$res3=$res4=$res5=$res6=0;
$res1=dolibarr_set_const($db, 'ADHERENT_LOGIN_NOT_REQUIRED', GETPOST('ADHERENT_LOGIN_NOT_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
$res1=dolibarr_set_const($db, 'ADHERENT_LOGIN_NOT_REQUIRED', GETPOST('ADHERENT_LOGIN_NOT_REQUIRED', 'alpha')?0:1, 'chaine', 0, '', $conf->entity);
$res2=dolibarr_set_const($db, 'ADHERENT_MAIL_REQUIRED', GETPOST('ADHERENT_MAIL_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
$res3=dolibarr_set_const($db, 'ADHERENT_DEFAULT_SENDINFOBYMAIL', GETPOST('ADHERENT_DEFAULT_SENDINFOBYMAIL', 'alpha'), 'chaine', 0, '', $conf->entity);
$res4=dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
@@ -141,7 +141,7 @@ $help_url='EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Mie
llxHeader('',$langs->trans("MembersSetup"),$help_url);
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
@@ -162,7 +162,7 @@ print "</tr>\n";
// Login/Pass required for members
print '<tr class="oddeven"><td>'.$langs->trans("AdherentLoginRequired").'</td><td>';
print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1);
print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED', (! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1), 1);
print "</td></tr>\n";
// Mail required for members
@@ -203,7 +203,7 @@ if ($conf->facture->enabled)
print '</td>';
}
print "</tr>\n";
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
{
print '<tr class="oddeven"><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>';
@@ -240,9 +240,9 @@ $constantes=array(
print load_fiche_titre($langs->trans("MembersCards"),'','');
$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
$helptext.='%YEAR%, %MONTH%, %DAY%';
$helptext.='__DOL_MAIN_URL_ROOT__, __ID__, __FIRSTNAME__, __LASTNAME__, __FULLNAME__, __LOGIN__, __PASSWORD__, ';
$helptext.='__COMPANY__, __ADDRESS__, __ZIP__, __TOWN__, __COUNTRY__, __EMAIL__, __BIRTH__, __PHOTO__, __TYPE__, ';
$helptext.='__YEAR__, __MONTH__, __DAY__';
form_constantes($constantes, 0, $helptext);
@@ -257,43 +257,9 @@ $constantes=array('ADHERENT_ETIQUETTE_TYPE','ADHERENT_ETIQUETTE_TEXT');
print load_fiche_titre($langs->trans("MembersTickets"),'','');
$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
$helptext.='%YEAR%, %MONTH%, %DAY%';
form_constantes($constantes, 0, $helptext);
print '<br>';
/*
* Editing global variables not related to a specific theme
*/
$constantes=array(
'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT',
'ADHERENT_AUTOREGISTER_NOTIF_MAIL',
'ADHERENT_AUTOREGISTER_MAIL_SUBJECT',
'ADHERENT_AUTOREGISTER_MAIL',
'ADHERENT_MAIL_VALID_SUBJECT',
'ADHERENT_MAIL_VALID',
'ADHERENT_MAIL_COTIS_SUBJECT',
'ADHERENT_MAIL_COTIS',
'ADHERENT_MAIL_RESIL_SUBJECT',
'ADHERENT_MAIL_RESIL',
'ADHERENT_MAIL_FROM',
);
print load_fiche_titre($langs->trans("Other"),'','');
$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
$helptext.='%YEAR%, %MONTH%, %DAY%';
$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
$helptext.='%DOL_MAIN_URL_ROOT%, %ID%, %FIRSTNAME%, %LASTNAME%, %FULLNAME%, %LOGIN%, %PASSWORD%, ';
$helptext.='%COMPANY%, %ADDRESS%, %ZIP%, %TOWN%, %COUNTRY%, %EMAIL%, %BIRTH%, %PHOTO%, %TYPE%, ';
//$helptext.='%YEAR%, %MONTH%, %DAY%'; // Not supported
$helptext.='__DOL_MAIN_URL_ROOT__, __ID__, __FIRSTNAME__, __LASTNAME__, __FULLNAME__, __LOGIN__, __PASSWORD__, ';
$helptext.='__COMPANY__, __ADDRESS__, __ZIP__, __TOWN__, __COUNTRY__, __EMAIL__, __BIRTH__, __PHOTO__, __TYPE__, ';
$helptext.='__YEAR__, __MONTH__, __DAY__';
form_constantes($constantes, 0, $helptext);

View File

@@ -0,0 +1,190 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
* Copyright (C) 2015 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/adherents/admin/adherent.php
* \ingroup member
* \brief Page to setup the module Foundation
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
$langs->load("admin");
$langs->load("members");
if (! $user->admin) accessforbidden();
$type=array('yesno','texte','chaine');
$action = GETPOST('action','alpha');
/*
* Actions
*/
//
if ($action == 'updateall')
{
$db->begin();
$res1=$res2=$res3=$res4=$res5=$res6=0;
$res1=dolibarr_set_const($db, 'ADHERENT_LOGIN_NOT_REQUIRED', GETPOST('ADHERENT_LOGIN_NOT_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
$res2=dolibarr_set_const($db, 'ADHERENT_MAIL_REQUIRED', GETPOST('ADHERENT_MAIL_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
$res3=dolibarr_set_const($db, 'ADHERENT_DEFAULT_SENDINFOBYMAIL', GETPOST('ADHERENT_DEFAULT_SENDINFOBYMAIL', 'alpha'), 'chaine', 0, '', $conf->entity);
$res4=dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
// Use vat for invoice creation
if ($conf->facture->enabled)
{
$res4=dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
$res5=dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
{
$res6=dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
}
}
if ($res1 < 0 || $res2 < 0 || $res3 < 0 || $res4 < 0 || $res5 < 0 || $res6 < 0)
{
setEventMessages('ErrorFailedToSaveDate', null, 'errors');
$db->rollback();
}
else
{
setEventMessages('RecordModifiedSuccessfully', null, 'mesgs');
$db->commit();
}
}
// Action mise a jour ou ajout d'une constante
if ($action == 'update' || $action == 'add')
{
$constname=GETPOST('constname','alpha');
$constvalue=(GETPOST('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname) : GETPOST('constvalue'));
if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE' || $constname=='ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && $constvalue == -1) $constvalue='';
if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice
{
if ($constvalue) $constvalue=0;
else $constvalue=1;
}
$consttype=GETPOST('consttype','alpha');
$constnote=GETPOST('constnote');
$res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity);
if (! $res > 0) $error++;
if (! $error)
{
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
else
{
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
// Action activation d'un sous module du module adherent
if ($action == 'set')
{
$result=dolibarr_set_const($db, GETPOST('name','alpha'),GETPOST('value'),'',0,'',$conf->entity);
if ($result < 0)
{
print $db->error();
}
}
// Action desactivation d'un sous module du module adherent
if ($action == 'unset')
{
$result=dolibarr_del_const($db,GETPOST('name','alpha'),$conf->entity);
if ($result < 0)
{
print $db->error();
}
}
/*
* View
*/
$form = new Form($db);
$help_url='EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros';
llxHeader('',$langs->trans("MembersSetup"),$help_url);
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');
$head = member_admin_prepare_head();
dol_fiche_head($head, 'emails', $langs->trans("Members"), -1, 'user');
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="updateall">';
/*
* Editing global variables not related to a specific theme
*/
$constantes=array(
'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT',
'ADHERENT_AUTOREGISTER_NOTIF_MAIL',
'ADHERENT_AUTOREGISTER_MAIL_SUBJECT',
'ADHERENT_AUTOREGISTER_MAIL',
'ADHERENT_MAIL_VALID_SUBJECT',
'ADHERENT_MAIL_VALID',
'ADHERENT_MAIL_COTIS_SUBJECT',
'ADHERENT_MAIL_COTIS',
'ADHERENT_MAIL_RESIL_SUBJECT',
'ADHERENT_MAIL_RESIL',
'ADHERENT_MAIL_FROM',
);
$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
$helptext.='__DOL_MAIN_URL_ROOT__, __ID__, __FIRSTNAME__, __LASTNAME__, __FULLNAME__, __LOGIN__, __PASSWORD__, ';
$helptext.='__COMPANY__, __ADDRESS__, __ZIP__, __TOWN__, __COUNTRY__, __EMAIL__, __BIRTH__, __PHOTO__, __TYPE__, ';
$helptext.='__YEAR__, __MONTH__, __DAY__';
$helptext='*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
$helptext.='__DOL_MAIN_URL_ROOT__, __ID__, __FIRSTNAME__, __LASTNAME__, __FULLNAME__, __LOGIN__, __PASSWORD__, ';
$helptext.='__COMPANY__, __ADDRESS__, __ZIP__, __TOWN__, __COUNTRY__, __EMAIL__, __BIRTH__, __PHOTO__, __TYPE__, ';
//$helptext.='__YEAR__, __MONTH__, __DAY__'; // Not supported
form_constantes($constantes, 0, $helptext);
dol_fiche_end();
llxFooter();
$db->close();

View File

@@ -37,7 +37,7 @@ $form = new Form($db);
// List of supported format
$tmptype2label=ExtraFields::$type2label;
$type2label=array('');
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
$action=GETPOST('action', 'alpha');
$attrname=GETPOST('attrname', 'alpha');
@@ -64,7 +64,7 @@ $help_url='EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Mie
llxHeader('',$langs->trans("MembersSetup"),$help_url);
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("MembersSetup"),$linkback,'title_setup');

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