Compare commits

..

908 Commits

Author SHA1 Message Date
Laurent Destailleur
192510316b
Merge pull request #21013 from atm-greg/FIX_12.0_get_batch_only_for_same_fk_product
fix sql to avoid getting product_stock of another product with same batch
2022-05-24 21:23:02 +02:00
Laurent Destailleur
6f83c8c6f3
Update productbatch.class.php 2022-05-24 21:22:14 +02:00
atm-greg
8213756c37 fix sql to avoid getting product_stock of another product with same batch 2022-05-24 16:49:55 +02:00
Laurent Destailleur
a254412c61 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/debugbar/class/DataCollector/DolLogsCollector.php
2022-05-03 11:54:28 +02:00
Laurent Destailleur
cc1a3080d0 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-05-03 11:53:23 +02:00
Laurent Destailleur
b5f887b3e4 Fix DEBUGBAR_USE_LOG_FILE 2022-05-03 11:52:32 +02:00
Laurent Destailleur
694357d48e
Merge pull request #19420 from marc-dll/12.0_FIX_project_activity_default_workingdays
FIX: project timesheets: assume Saturday and Sunday as default weekend days when working days conf is empty or badly formed
2022-04-14 23:23:12 +02:00
Laurent Destailleur
c4f80b4e71
Merge pull request #19424 from marc-dll/12.0_FIX_employee_tab_holiday_length
FIX: user employee tab: offset in open days messes up holiday length calculation
2022-04-14 22:59:20 +02:00
Laurent Destailleur
ece9f3037a
Merge pull request #19788 from OPEN-DSI/v12-fix-user-card-modify-transverse-rights
FIX user actions rights when multi-company transverse mode is enabled
2022-04-02 18:15:50 +02:00
Laurent Destailleur
8dd44246b0
Merge pull request #20348 from daraelmin/daraelmin-patch-5
Fix #20263 Accountancy setup displayed with right
2022-03-29 14:47:57 +02:00
Laurent Destailleur
76470c9548
Merge pull request #20297 from aspangaro/12p23
FIX #20279 Accountancy - PostGreSQL - Error on mass update lines already binded
2022-03-24 20:30:01 +01:00
stickler-ci
19be5f662d Fixing style errors. 2022-03-14 08:25:15 +00:00
daraelmin
3eebbc0b14
Fix #20263 Accountancy setup displayed with right
Fix #20263 Accountancy setup is displayed only for user with rights->accounting->chartofaccount
2022-03-14 09:24:26 +01:00
Laurent Destailleur
d27c0b31fc Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2022-03-10 15:54:08 +01:00
Laurent Destailleur
a1534955a1 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-03-10 15:52:50 +01:00
Laurent Destailleur
79371f66b0 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2022-03-10 15:52:28 +01:00
Laurent Destailleur
4569cb82b2 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2022-03-10 15:52:04 +01:00
Laurent Destailleur
04d33f4594 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2022-03-10 15:51:42 +01:00
Laurent Destailleur
af6e95aa79 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/class/utils.class.php
2022-03-10 15:49:51 +01:00
Laurent Destailleur
5d942c9d1a Fix infinit logs 2022-03-10 15:46:00 +01:00
Laurent Destailleur
cc57d3dbc1 Fix phpcs 2022-03-09 22:25:29 +01:00
Alexandre SPANGARO
87b187bded FIX #20279 Accountancy - PostGreSQL - Error on mass update lines already binded 2022-03-08 03:43:40 +01:00
Laurent Destailleur
df0b20aad3
Merge pull request #20241 from noec764/12.0_Product_Fournisseur_Migration
Correction of the modification on the fly of the table llx_product_fournisseur_price
2022-03-07 15:01:40 +01:00
Laurent Destailleur
e085c3989a
Update product.php 2022-03-07 14:59:55 +01:00
Laurent Destailleur
e67c208b57
Merge pull request #20271 from rycks/12.0
fix #20270 : use product_id in sql only if product_id is defined
2022-03-07 14:07:27 +01:00
Laurent Destailleur
e13038dc30
Update product.class.php 2022-03-07 14:06:54 +01:00
Eric Seigne
744b84cb09 fix #20270 : use product_id in sql only if product_id is defined 2022-03-04 15:20:50 +01:00
stickler-ci
5c3b0847c2 Fixing style errors. 2022-03-01 15:20:28 +00:00
noec764
f1af7ca2f2
Update product.php 2022-03-01 16:17:32 +01:00
Noé Courtier
035bc32323 Correction of the modification on the fly of the table llx_product_fournisseur_price by an addition in the script creation of the table as well as in the script of version upgrade from 12 ->13 2022-03-01 16:14:31 +01:00
Laurent Destailleur
a70d45b3ab
Merge pull request #20148 from marc-dll/12.0_FIX_medias_blocked_when_logged_with_multicompany
FIX: viewimage.php blocks requests with multicompany from other enties
2022-02-25 14:32:49 +01:00
Marc de Lima Lucio
1574254dcf FIX: viewimage.php: bad call to dol_check_secure_access_document() caused images to be blocked with multicompany from entities > 1 2022-02-22 17:13:26 +01:00
Laurent Destailleur
1c129fd3ea
Merge pull request #20038 from atm-quentin/FIX_12_sort_ht_amount
FIX sort amount ht on cabyprodserv.php
2022-02-18 21:04:52 +01:00
Laurent Destailleur
97575854d0
Merge pull request #20094 from thomas-Ngr/12_fix_ticket_public_email_wrong_custom_url
fix ticket: wrong link sent to customer
2022-02-17 19:18:36 +01:00
Laurent Destailleur
2e744a4517
Update create_ticket.php 2022-02-17 19:18:22 +01:00
Thomas Negre
1ad8700810 empty commit to force travis try rebuild 2022-02-17 11:08:23 +01:00
Thomas Negre
1c8c98ac0f fix ticket public interface:
When sending an email to the customer,
If a custom URL had been provided for ticket public interface,
the link provided in the email did lead to the index of the public interface.
We want it to lead to /view.php
2022-02-17 09:53:36 +01:00
Laurent Destailleur
92cb95a184
Merge pull request #20064 from ATM-Consulting/FIX_uniformize_pdf_logo_behaviour
Fix uniformize pdf logo behaviour for supplier orders
2022-02-16 21:09:45 +01:00
atm-greg
96c7a9f77c fix pdf_cornas 2022-02-14 15:16:36 +01:00
atm-greg
3ebdb89133 fix pdf_mucadet 2022-02-14 15:11:26 +01:00
Quentin VIAL-GOUTEYRON
d819d427c3 FIX sort amount ht 2022-02-10 16:46:19 +01:00
Laurent Destailleur
db81b32a5d
Merge pull request #20028 from noec764/12.0_Fix_Double_CommandeFournisseurDet
Change of SQL request when fetching CommandeFournisseurLigne
2022-02-10 09:30:36 +01:00
Laurent Destailleur
793e43c7c6
Update fournisseur.commande.class.php 2022-02-10 09:29:11 +01:00
noec764
d9bac75a63
Merge branch '12.0' into 12.0_Fix_Double_CommandeFournisseurDet 2022-02-09 15:33:45 +01:00
Noé Courtier
e4c1978e12 Change of SQL request when fetching CommandeFournisseurLigne 2022-02-09 12:24:33 +01:00
Laurent Destailleur
a0154503f4
Merge pull request #19838 from OPEN-DSI/v12-fix-supplier-order-print-error
FIX replace print error with event message when error on update line …
2022-01-23 13:37:09 +01:00
lvessiller
a9c76f2e44 FIX replace print error with event message when error on update line in supplier order 2022-01-14 16:09:30 +01:00
Laurent Destailleur
5b6133ad62
Merge pull request #19821 from marc-dll/12.0_FIX_shipment_all_lines
FIX: order to shipment: debug hidden conf SHIPMENT_GETS_ALL_ORDER_PRODUCTS
2022-01-14 10:19:28 +01:00
Laurent Destailleur
90c3c90864
Merge pull request #19829 from OPEN-DSI/v12-fix-supplier-order-list-search-user
FIX search by user in supplier order list
2022-01-14 09:45:06 +01:00
lvessiller
cacff0c2d4 FIX cast int for search user 2022-01-13 16:18:57 +01:00
lvessiller
22f6d204a2 FIX search by user in supplier order list 2022-01-13 16:01:23 +01:00
Marc de Lima Lucio
b110ca6ead FIX: order to shipment: FIX hidden conf SHIPMENT_GETS_ALL_ORDER_PRODUCTS (still not working when not preselecting a warehouse) 2022-01-12 16:40:43 +01:00
lvessiller
400f6b244b FIX user actions rights when mulit-company transverse mode is enabled 2022-01-11 17:29:02 +01:00
Laurent Destailleur
cde290c78a
Merge pull request #19402 from atm-gauthier/fix_reorder_lines_after_delete_line_everywhere
FIX : reorder all lines when delete document line everywhere (4 documents were missing)
2022-01-10 21:23:23 +01:00
Laurent Destailleur
b23b82bd6f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2022-01-07 15:49:09 +01:00
Laurent Destailleur
7dfb369a98 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-01-07 15:48:23 +01:00
Laurent Destailleur
265aeb76e6 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/class/utils.class.php
	htdocs/expensereport/class/expensereport.class.php
2022-01-07 15:48:13 +01:00
Laurent Destailleur
5ee74d7c07 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2022-01-07 15:45:51 +01:00
Laurent Destailleur
1541e20870 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/class/utils.class.php
2022-01-07 15:43:28 +01:00
Laurent Destailleur
53709cf509 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/core/class/utils.class.php
2022-01-07 15:40:05 +01:00
Laurent Destailleur
10e32c056e FIX avoid infinite loop on dump with popen 2022-01-07 15:35:33 +01:00
Laurent Destailleur
8728ad2eff
Merge pull request #19730 from fmarcet/12.0
Fix: Correctly display product translations
2022-01-06 10:57:47 +01:00
Laurent Destailleur
5de6c193ff
Merge pull request #19745 from daraelmin/patch-1
Fix #19723 - Belgium provinces incorrect mapping
2022-01-06 10:41:19 +01:00
daraelmin
1f6e9a1a9e
Fix install - Belgium provinces incorrect mapping 2022-01-04 18:46:29 +01:00
Ferran Marcet
26c6908f66 Fix: Correctly display product translations 2022-01-03 13:22:07 +01:00
Ferran Marcet
08685cc6b0 Fix: Correctly display product translations 2022-01-03 13:14:40 +01:00
Laurent Destailleur
7bdfc998bf Fix regression 2021-12-30 17:49:53 +01:00
Laurent Destailleur
76a0caf116
Merge pull request #19717 from OPEN-DSI/fix-company-list-title-on-nature-of
FIX title for nature of third party in company list
2021-12-30 17:25:08 +01:00
Laurent Destailleur
c57dc82eaa
Merge pull request #19688 from atm-maxime/fix_modbuilder_numbering_model
Fix modulebuilder params for updatemask action
2021-12-30 17:07:27 +01:00
lvessiller
f16166c47c FIX title for nature of third party in company list 2021-12-30 15:35:49 +01:00
Maxime Kohlhaas
d82c1f34e0 Fix modulebuilder params for updatemask action 2021-12-25 11:33:26 +01:00
Laurent Destailleur
0a72aed3d7 Fix missing space before union 2021-12-23 13:35:38 +01:00
Laurent Destailleur
856b010a45 FIX #19651 2021-12-21 15:56:59 +01:00
Laurent Destailleur
9d6ddced56
Merge pull request #19607 from fbosman/patch-1
Update functions.lib.php
2021-12-16 17:33:13 +01:00
Laurent Destailleur
36ba158a8b
Merge pull request #19637 from atm-john/12.0_fix_get_prev_progress
FIX : test of method exist on wrong object
2021-12-16 16:49:59 +01:00
Laurent Destailleur
140cca7596
Merge pull request #19640 from atm-kevin/FIX_Holidays_Filter
FIX Holiday month report
2021-12-16 16:36:54 +01:00
kevin
a5b8d0cd4b FIX Take into consideration work leave over serveral months 2021-12-16 15:41:13 +01:00
John BOTELLA
d149596043 fix test of method exist on wrong object 2021-12-16 10:33:53 +01:00
Frans Bosman
cf05f38e54
Update functions.lib.php
Change exists to isset in price2num
2021-12-13 19:56:06 +01:00
Laurent Destailleur
57ebcf94c0
Merge pull request #19554 from atm-quentin/FIX_setoptionalfrompost
FIX set optional from post, we cant untick boolean field on product card
2021-12-08 16:27:41 +01:00
Quentin VIAL-GOUTEYRON
826bde0656 FIX set optional from post 2021-12-06 11:19:12 +01:00
Laurent Destailleur
d84d09556c Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-11-30 15:55:57 +01:00
Laurent Destailleur
7937a798b7
Merge pull request #18331 from marc-dll/12.0_FIX_invoice_multicurrency_discount
FIX: multicurrency: fields in discount unitialized when creating deposit
2021-11-30 14:23:37 +01:00
Laurent Destailleur
ce8312c744
Merge pull request #19464 from atm-quentin/FIX_11_TAB_INVOICE
FIX : Urgent onglet contact inaccessible depuis une facture
2021-11-30 11:45:56 +01:00
Laurent Destailleur
cf4beafb68
Merge pull request #19484 from aspangaro/12p23
FIX Option MAIN_DIRECT_STATUS_UPDATE broken. Ajax on/off not saving value in DB after updating to version >=12
2021-11-30 11:39:44 +01:00
Laurent Destailleur
9a72f147d1
Merge pull request #19500 from marc-dll/12.0_FIX_holiday_massdelete
FIX: holiday list: only mass delete if leave request is not in draft, canceled or refused, like in card
2021-11-30 11:31:59 +01:00
Marc de Lima Lucio
f5343c55c3 FIX: holiday mass deletion: correct return of record deleted 2021-11-26 18:23:31 +01:00
Marc de Lima Lucio
1361abffe5 FIX: holiday list: only mass delete if leave request is not in draft, canceled or refused, like in card 2021-11-26 18:22:31 +01:00
Alexandre SPANGARO
9d2fb782fa FIX Option MAIN_DIRECT_STATUS_UPDATE broken. Ajax on/off not saving value in DB after updating to version >=12 2021-11-25 15:41:28 +01:00
Quentin VIAL-GOUTEYRON
632147ad88 object->id is always empty 2021-11-24 12:04:18 +01:00
Marc de Lima Lucio
1129222064 FIX: user employee tab: offset in open days messes up holiday length calculation 2021-11-19 15:59:34 +01:00
Marc de Lima Lucio
7cb657c991 FIX: project timesheets: assume Saturday and Sunday are default weekend days when working days conf is empty or badly formed 2021-11-19 14:49:11 +01:00
Laurent Destailleur
efb9d184e4
Merge pull request #19382 from OPEN-DSI/fix-societe-list-region-filter
FIX filter on region in company list
2021-11-18 20:29:36 +01:00
Laurent Destailleur
44d4ab6f9c
Merge pull request #19384 from fmarcet/12.0
Fix: Bad date conversion
2021-11-18 20:10:50 +01:00
Laurent Destailleur
8f96383186
Update expedition.class.php 2021-11-18 20:10:04 +01:00
Ferran Marcet
db975bbcc2 Fix: The error not correctly collected on insertation line failure 2021-11-18 17:17:00 +01:00
Gauthier PC portable 024
23249751d5 FIX : reorder all lines when delete document line everywhere 2021-11-17 12:10:12 +01:00
Ferran Marcet
7af883abc1 Fix: Bad date conversion 2021-11-15 16:43:54 +01:00
lvessiller
e365a14b5a FIX filter on region in company list 2021-11-15 14:41:16 +01:00
Laurent Destailleur
e188855dca Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/datapolicy/class/datapolicy.class.php
2021-11-11 16:01:37 +01:00
Laurent Destailleur
9aa5c94612 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-11-11 15:59:48 +01:00
Laurent Destailleur
ba724204a4 FIX Bad use of dol_concatdesc() 2021-11-11 15:50:32 +01:00
Laurent Destailleur
8518c772fb
Merge pull request #19343 from OPEN-DSI/fix-takepos-report-terminal
FIX close cash with some terminals in TakePOS
2021-11-11 14:42:12 +01:00
lvessiller
33e40c12c8 FIX close cash with some terminals in TakePOS 2021-11-09 14:12:28 +01:00
Laurent Destailleur
19b9412c13 FIX #19305 2021-11-05 12:49:33 +01:00
Laurent Destailleur
23749b57ec
Merge pull request #19311 from atm-john/12.0_fix_missing_return_status_for_getrow
FIX : missing return status
2021-11-05 12:42:54 +01:00
Laurent Destailleur
3959d12a39
Update DoliDB.class.php 2021-11-05 12:42:42 +01:00
ATM john
dd8d4e9e98 Fix missing return status 2021-11-04 12:10:19 +01:00
Laurent Destailleur
9247bbcc1d
Merge pull request #19223 from noec764/12.0_FIX_resource_list_extrafields_filter
FIX: resource list : Use standard code to handle list filters
2021-10-31 16:15:08 +01:00
Laurent Destailleur
01c6de1085 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-10-31 14:24:53 +01:00
Laurent Destailleur
6d918ad1c7 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-10-31 14:24:19 +01:00
Laurent Destailleur
ff696e0dad
Merge pull request #19236 from marc-dll/11.0_FIX_invoice_creation_blocked
FIX: URGENT: impossible to create an invoice
2021-10-31 14:03:11 +01:00
Laurent Destailleur
3dcd1aa05d
Update info.php 2021-10-31 14:02:34 +01:00
Laurent Destailleur
8dfe4fe05f
Update note.php 2021-10-31 14:02:14 +01:00
Laurent Destailleur
65d59405da
Update document.php 2021-10-31 14:01:56 +01:00
Laurent Destailleur
0e2e8fe27f
Update contact.php 2021-10-31 14:01:40 +01:00
Laurent Destailleur
7232e38dbe
Merge pull request #19248 from fmarcet/12.0
Fix: Import don't work if extrafield is separator
2021-10-31 13:54:31 +01:00
Laurent Destailleur
f2c282305e
Merge pull request #19260 from aspangaro/12p21
FIX Ticket - Duplicate field project when we create ticket from project
2021-10-31 13:53:58 +01:00
Alexandre SPANGARO
54b81312b5 FIX Ticket - Duplicate field project when we create ticket from project 2021-10-30 22:49:32 +02:00
Ferran Marcet
1336d3e791 Fix: Import don't work if extrafield is separator 2021-10-29 12:25:50 +02:00
Marc de Lima Lucio
eb8d7f92c3 FIX: invoice: inpossible to create an invoice because of very bad check + warnings when trying to print tabs for invoice with no ID 2021-10-28 15:26:40 +02:00
Administrator
c998abe54e FIX: resource list : Use standard code to handle list filters 2021-10-27 11:09:00 +02:00
Laurent Destailleur
181991ee47 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-10-26 13:10:23 +02:00
Laurent Destailleur
c8bcd01a10
Merge pull request #19162 from atm-maxime/fix_no_mail_in_now_unsubscribe
Fix #18961 : no_email field has been replaced by mailing_unsubscribe table
2021-10-24 00:42:48 +02:00
Maxime Kohlhaas
983e28691b Use a subselect instead of a join 2021-10-24 00:02:55 +02:00
Maxime Kohlhaas
29950a6afa Replace != by <> in SQL requests 2021-10-23 22:27:29 +02:00
Maxime Kohlhaas
00b617d17f Fix #18961 : no_email field has been replaced by mailing_unsubscribe table 2021-10-23 22:22:45 +02:00
Laurent Destailleur
fc0c4295bd
Merge pull request #19118 from atm-florianm/FIX_12.0_tcpdf_issue_315_roman_numeral_bomb_vulnerability
FIX tcpdf roman numeral rendering bomb, cf. tecnickom/TCPDF PR 315
2021-10-22 19:10:13 +02:00
atm-florian
17773f8414 FIX tcpdf vulnerability to roman numeral bomb, cf. tecnickom/TCPDF issue #315 2021-10-22 18:26:23 +02:00
Laurent Destailleur
e1af439a6d
Merge pull request #18931 from atm-florianm/FIX_11.0_consistent_UX_for_invoices_when_no_id_or_ref
FIX: consistent UX when calling a tab from the invoice card with empty ref/id
2021-10-17 13:52:30 +02:00
Laurent Destailleur
bd52613331 Fix phpcs 2021-10-16 17:06:10 +02:00
Laurent Destailleur
3875d26a2f Fix filter for supplierinvoice stats 2021-10-14 15:55:12 +02:00
Laurent Destailleur
db3d16f080 Fix filter tag for supplier invoice statistics 2021-10-14 15:43:35 +02:00
Laurent Destailleur
bc230dbfc2 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-10-14 12:00:33 +02:00
Laurent Destailleur
371c75e76a FIX list of categories in stats of supplier invoices 2021-10-14 11:58:21 +02:00
Laurent Destailleur
3a32787f15 Fix for backward compatibility 2021-10-11 16:14:34 +02:00
atm-florian
57052e2fba FIX PR#18931 Remove useless explicit call to dol_shutdown 2021-10-11 11:10:14 +02:00
atm-florian
2da16ade6c FIX: consistent UX when calling a tab from the invoice card with empty ref / id 2021-10-08 17:24:52 +02:00
Laurent Destailleur
68ac62d09c Fix phpcs 2021-10-07 11:05:06 +02:00
Laurent Destailleur
5910d10021 Add hidden option to allow to fix corrupted situations 2021-10-07 10:43:50 +02:00
Laurent Destailleur
eba377cdf0
Merge pull request #18860 from FHenry/12_fix_selectline_from_supplier_order_to_supplier_invoice
fix: Supplier order => Supplier Invoice : line selector (checkbox) wasn't working
2021-10-06 15:31:14 +02:00
Laurent Destailleur
10f0434116
Update card.php 2021-10-06 15:30:19 +02:00
Florian HENRY
6d00097c89 fix 2021-09-30 16:37:52 +02:00
Laurent Destailleur
fc4a16b356 Fix avoid error when trigger run on downgraded version. 2021-09-30 16:18:07 +02:00
Florian HENRY
d0508d557b fix: checkbox for line selection between supplier order and supplier invoice was infective 2021-09-30 14:56:02 +02:00
Laurent Destailleur
422191def1
Merge pull request #18858 from FHenry/12_fix_dict_tva
fix: search code on tva dict
2021-09-30 14:05:07 +02:00
Laurent Destailleur
620d7109b5
Update dict.php 2021-09-30 14:04:56 +02:00
Florian HENRY
332fa77d90 fix: search code on tva dict 2021-09-30 13:49:02 +02:00
Laurent Destailleur
c3d539abff
Merge pull request #18833 from marc-dll/12.0_FIX_product_extrafields_update
FIX: products/services card: hidden extrafields were overridden
2021-09-28 12:13:08 +02:00
Marc de Lima Lucio
6abe6462e6 FIX: products/services card: hidden extrafields were overridden 2021-09-27 14:33:57 +02:00
Laurent Destailleur
505517d142
Merge pull request #18629 from Gjuju/12.0
Fix : GET extrafields on API "get events list" requests
2021-09-17 12:16:32 +02:00
Laurent Destailleur
1c43a83a8b
Merge pull request #18737 from marc-dll/12.0_FIX_projet_task_time_user_filter
FIX: task time: can't filter by user with pgsql + show error message
2021-09-17 11:31:45 +02:00
Marc de Lima Lucio
571d130c3c FIX: task time: keep on using natural_search 2021-09-17 10:51:37 +02:00
Marc de Lima Lucio
88cd8fface FIX: task time: can't filter by user with pgsql + show error message 2021-09-16 17:53:47 +02:00
Laurent Destailleur
87bb971d75 FIX autocalculation of the supplier price in main currency.
Conflicts:
	htdocs/product/fournisseurs.php
2021-09-16 13:22:22 +02:00
Julien Gainza
65c4a21898 FIX move fetch_optionnal into $ac_static->fetch() 2021-09-13 16:35:13 +02:00
Julien Gainza
9d89e48d15 Fix : Add extrafields on API "get events list" 2021-09-06 15:55:33 +02:00
Laurent Destailleur
68bc85124b
Merge pull request #18601 from frederic34/patch-8
fix #17634
2021-09-05 01:07:46 +02:00
Frédéric FRANCE
456f25d57e
fix #17634 2021-09-04 11:30:03 +02:00
Laurent Destailleur
74f3b98ea9 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
2021-09-01 17:54:21 +02:00
Laurent Destailleur
cd09099409
Merge pull request #18563 from atm-maxime/patch-3
Fix supplier invoice pdf generation canelle
2021-09-01 13:37:50 +02:00
Maxime Kohlhaas
d09d036f06
Fix supplier invoice pdf generation canelle
Thirdparty wrongly fetched was causing errors on mass generation
2021-08-31 16:10:55 +02:00
Laurent Destailleur
b28180d759
Merge pull request #18471 from aspangaro/12p19
FIX Accountancy - Some problems of length with general & subledger ac…
2021-08-24 14:19:16 +02:00
Alexandre SPANGARO
a0378549b8 FIX Accountancy - Some problems of length with general & subledger account 2021-08-23 15:19:27 +02:00
Laurent Destailleur
bdf8c3ddc6 Fix test 2021-08-20 23:26:56 +02:00
Laurent Destailleur
35e48f3a27 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-08-20 21:12:22 +02:00
Laurent Destailleur
9d285ea232 Fix: Can delete a price when date is in future to fix corrupted data 2021-08-20 21:11:20 +02:00
Laurent Destailleur
35ebaf7b79
Merge pull request #18282 from aspangaro/12p18
FIX: Manage credit note on situation invoice for calculate margin
2021-08-17 19:26:16 +02:00
Laurent Destailleur
16c290f735
Merge pull request #18383 from marc-dll/12.0_FIX_invoice_tiny_negative_vat
FIX: invoice validation: when checking if any VAT rate has a negative amount, prevent false positives with -1.0E-14 amounts
2021-08-17 18:24:33 +02:00
Alexandre SPANGARO
f88abb9a6f Add parenthesis 2021-08-15 07:32:46 +02:00
Alexandre SPANGARO
0d467972cd Merge branch '12.0' into 12p18 2021-08-15 07:19:33 +02:00
Laurent Destailleur
dd70d68b4c Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-08-11 21:06:42 +02:00
Laurent Destailleur
eba55d0cf2 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/core/tpl/extrafields_list_search_sql.tpl.php
2021-08-11 21:06:33 +02:00
Laurent Destailleur
dad251493a
Merge pull request #18355 from marc-dll/12.0_FIX_holiday_card_hooks
FIX: holiday card: hooks uninitialized
2021-08-11 19:58:50 +02:00
Laurent Destailleur
ab8f78f29a
Merge pull request #18366 from atm-quentin/FIX_11_postgre_select_filter_extrafield
FIX compatibility postgre sql
2021-08-11 15:45:04 +02:00
Laurent Destailleur
8da328b183
Update extrafields_list_search_sql.tpl.php 2021-08-11 15:44:48 +02:00
Laurent Destailleur
3964bd28db
Merge pull request #18385 from marc-dll/12.0_FIX_workflow_shipment_validate_trigger
FIX: shipping validation workflow: 'ORDER_CLOSE' trigger called from wrong object
2021-08-11 15:28:12 +02:00
Laurent Destailleur
e637a1e59a
Merge pull request #18392 from atm-gauthier/FIX_fetch_lines_cmd_fourn_with_same_supplier_price
FIX : on supplier order, JOIN with product fourn price table must be …
2021-08-11 15:16:33 +02:00
Gauthier PC portable 024
087e269103 FIX : on supplier order, JOIN with product fourn price table must be done with fk_soc too to avoid display several times a same line (because of same supplier product ref) 2021-08-10 17:34:47 +02:00
Marc de Lima Lucio
b610cc1c6c FIX: shipping validation workflow: 'ORDER_CLOSE' trigger called from wrong object 2021-08-10 11:18:25 +02:00
Marc de Lima Lucio
08f21e3fc4 FIX: invoice validation: when checking if any vat rate has a negative amount, prevent false positives with -1E-14 amounts 2021-08-10 10:23:56 +02:00
Quentin VIAL-GOUTEYRON
108a5ff7cb FIX postgre filter select search extrafield 2021-08-09 15:14:25 +02:00
Marc de Lima Lucio
864a8b4b3e FIX: holiday card: hooks uninitialized 2021-08-06 16:22:19 +02:00
Marc de Lima Lucio
9d234a8541 FIX: multicurrency: fields in discount unitialized when creating deposit 2021-08-03 18:32:22 +02:00
Laurent Destailleur
a983dc7506
Merge pull request #18214 from FHenry/12_fix_css_form_confirmlist
fix: since commit be62c2f7 selectlist from formconfirm were behind form confirm
2021-08-01 14:53:08 +02:00
Laurent Destailleur
b77ec22590
Merge pull request #18278 from aspangaro/12p17
FIX: Invoice - Missing button to reopen an abandoned situation invoice
2021-07-31 12:19:26 +02:00
Laurent Destailleur
f4ed3941a7
Merge pull request #18287 from atm-maxime/12.0
Fix right check on thirdparty set on ticket card
2021-07-30 15:11:27 +02:00
Maxime Kohlhaas
12b2ba64eb Fix right check on thirdparty set on ticket card 2021-07-29 17:49:37 +02:00
Alexandre SPANGARO
ca6dd8850a FIX: Manage credit note on situation invoice for calculate margin 2021-07-29 15:24:08 +02:00
Alexandre SPANGARO
262dd1600b FIX: Invoice - Missing button to reopen an abandoned situation invoice 2021-07-29 06:23:12 +02:00
Laurent Destailleur
c9a46ab0cc
Merge pull request #18273 from aspangaro/12p17
FIX: Accountancy - Debug Export Sage50 / CIEL Compta / CIEL Compta Evo (Format XIMPORT)
2021-07-28 18:55:47 +02:00
Laurent Destailleur
bd731d9213
Merge pull request #18226 from FHenry/fix_addtimespend
FIX: cannot add time spend when column ref is not displayed
2021-07-28 17:38:04 +02:00
Alexandre SPANGARO
cd63ede35a Correctif date 2021-07-28 16:46:57 +02:00
Laurent Destailleur
97e829c7de
Merge pull request #18262 from aspangaro/12p17
FIX: Accountancy - Debug Export Sage50 / CIEL Compta / CIEL Compta Evo (Format XIMPORT)
2021-07-28 15:27:58 +02:00
Alexandre SPANGARO
7acebd28ca Add information 2021-07-28 14:08:53 +02:00
Alexandre SPANGARO
712f0b897d FIX: Accountancy - Debug Export Sage50 / CIEL Compta / CIEL Compta Evo (Format XIMPORT) 2021-07-28 12:02:45 +02:00
Florian HENRY
a7cef1aa15 FIX: cannot add time spend when column ref is not displayed 2021-07-26 10:20:11 +02:00
Florian HENRY
e93a362a0d fix: since be62c2f7 commit selectlist from formconfirm were behind the form confirm 2021-07-23 18:33:18 +02:00
Laurent Destailleur
90fa36b46a
Merge pull request #18145 from atm-gauthier/12.0_fix_method_exists
FIX : method_exists needs object at first param
2021-07-14 13:52:03 +02:00
Gauthier PC portable 024
0fe46b53d8 FIX : method_exists needs object at first param 2021-07-13 15:18:40 +02:00
Laurent Destailleur
14f52f2871
Merge pull request #18118 from aspangaro/12p16
FIX Problem of z-index with popup and top menu
2021-07-08 23:40:18 +02:00
Alexandre SPANGARO
be62c2f7f4 FIX Problem of z-index with popup and top menu 2021-07-08 22:11:41 +02:00
Laurent Destailleur
a345d38320 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-07-06 15:24:01 +02:00
Laurent Destailleur
026f38fe06
Merge pull request #18094 from marc-dll/11.0_FIX_holiday_pgsql
FIX: holiday: balances not updated correctly with pgsql because of case sensitivity
2021-07-06 14:47:08 +02:00
Marc de Lima Lucio
eea90cef56 FIX: holiday: balances not updated correctly with pgsql because of case sensitivity 2021-07-05 16:31:33 +02:00
Laurent Destailleur
d03cbd88ae Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-07-02 16:05:59 +02:00
Laurent Destailleur
a7f850dafb Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-07-02 16:05:51 +02:00
Laurent Destailleur
cc54ba1866
Merge pull request #18070 from altairisfr/fixof
FIX : division by zero on of create
2021-07-02 16:00:24 +02:00
Christophe Battarel
3c5bc3fef4 fix division by zero on of create 2021-07-02 11:53:32 +02:00
Laurent Destailleur
246f7b054e
Merge pull request #18060 from atm-arnaud/FIX_deposit_can_create_credit_note_in_payment_conf
FIX deposit can create credit note in payment conf
2021-06-30 14:48:29 +02:00
atm-arnaud
8772c53723 FIX deposit can create credit note in payment conf 2021-06-30 12:37:21 +02:00
Laurent Destailleur
ce18eff133 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-06-29 15:48:06 +02:00
Laurent Destailleur
e2c4a14939 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-06-29 15:47:58 +02:00
Laurent Destailleur
80759541b4
Merge pull request #18038 from atm-maxime/fix_order_delay_warning
Fix #17836 : order delay warning in list was wrong
2021-06-29 15:38:14 +02:00
Laurent Destailleur
0472ab4690
Merge pull request #18040 from OPEN-DSI/v11-fix-contact-update-perso-birthday-alert
FIX update contact birthday alert
2021-06-29 15:37:38 +02:00
lvessiller
fa28a02d74 FIX update contact birthday alert 2021-06-28 11:03:22 +02:00
Maxime Kohlhaas
c3cbd29542 Fix #17836 : order delay warning in list was wrong, date_commande is deprecated 2021-06-27 09:04:47 +02:00
Laurent Destailleur
90be70be58
Merge pull request #18015 from atm-lena/12.0_FIX_LeftMenu_Companies_CreateAndList
FIX List and Create Companies Left Menus
2021-06-26 12:20:56 +02:00
atm-lena
7eddf43aef FIX List and Create Companies Left Menus 2021-06-23 17:33:02 +02:00
Laurent Destailleur
c9d4ccd40a
Merge pull request #17845 from atm-gauthier/fix_libstatus_invoice_in_linked_objects_block
FIX : need to add payment sum to getlibstatus function in object linked block (bug still exists in 13.0)
2021-06-23 10:48:22 +02:00
Laurent Destailleur
9c657206b3
Update linkedobjectblock.tpl.php 2021-06-23 10:47:51 +02:00
Laurent Destailleur
56212508e7
Update linkedobjectblock.tpl.php 2021-06-23 10:47:23 +02:00
Laurent Destailleur
de57769d92
Merge pull request #17995 from aspangaro/12_p6
FIX Accoutancy Limit date payment not register on purchases operations
2021-06-21 11:41:10 +02:00
Alexandre SPANGARO
c8326c1365 FIX Accoutancy Limit date payment not register on purchases operations 2021-06-20 21:55:48 +02:00
Laurent Destailleur
51eaecdc6b Fix phpcs 2021-06-17 22:02:06 +02:00
Laurent Destailleur
98a0959b64 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-06-17 21:31:00 +02:00
Laurent Destailleur
e4056b8a1d Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-06-17 21:30:50 +02:00
Laurent Destailleur
ce9dbfccd7
Merge pull request #17953 from atm-gauthier/fix_trackingnumber_line_not_displaied_if_empty
FIX : Tracking number label shouldn't be displaied on "espadon" model…
2021-06-17 13:36:42 +02:00
Laurent Destailleur
96da2a6a37
Merge pull request #17962 from atm-lena/12.0_FIX_AddTrigger_MailingDelete
12.0 fix add trigger mailing delete
2021-06-17 13:35:01 +02:00
Gauthier PC portable 024
50bc832532 FIX : better correction 2021-06-17 10:48:48 +02:00
atm-lena
9769e33eab notigger parameter 2021-06-17 10:41:55 +02:00
atm-lena
5b8a6f1d71 Add Trigger "MAILING_DELETE" 2021-06-17 10:41:03 +02:00
Juanjo Menent
eeef78760a fix: Bad position of the printFieldListWhere hook 2021-06-17 10:29:43 +02:00
Gauthier PC portable 024
657972b79b FIX : Tracking number label shouldn't be displaied on "espadon" model if shipping tracking number is empty 2021-06-16 16:49:24 +02:00
stickler-ci
745ad8b403 Fixing style errors. 2021-06-14 15:10:24 +00:00
Gauthier PC portable 024
564a3b66c2 FIX : method exists 2021-06-14 17:08:16 +02:00
Gauthier PC portable 024
33553f3347 FIX : same thing on supplier orders 2021-06-14 17:01:59 +02:00
Laurent Destailleur
c8a41fab11 Doc 2021-06-14 15:24:50 +02:00
Laurent Destailleur
819aa108e9 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-06-14 15:24:14 +02:00
Laurent Destailleur
1d9310055e Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-06-14 15:19:11 +02:00
Laurent Destailleur
e81023c35a Update doc 2021-06-14 15:12:08 +02:00
Laurent Destailleur
6078267f86 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php
2021-06-14 14:43:46 +02:00
Laurent Destailleur
dcca3011ee Clean code 2021-06-14 14:41:50 +02:00
Laurent Destailleur
e41a3a2f42
Merge pull request #17867 from OPEN-DSI/v11-fix-clone-invoice-with-acount-line
FIX clone invoice with acount line
2021-06-14 14:41:05 +02:00
Laurent Destailleur
5117be4b36
Merge pull request #17920 from atm-adrien/FIX/12.0_bookmarks_on_searchlist
FIX : Allow to set bookmarks on list filtered by multiselect fields
2021-06-14 14:18:28 +02:00
Adrien Raze
0f91c4cfa2 FIX : Allow to set bookmarks on list filtered by multiselect fields 2021-06-14 10:02:44 +02:00
Laurent Destailleur
65f8405ca4 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-06-11 18:44:45 +02:00
Laurent Destailleur
6bf9a72dab Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-06-11 18:44:37 +02:00
Laurent Destailleur
06201fa9bb
Merge pull request #17848 from atm-greg/FIX_update_only_vat_on_multiprice
verify vat change to update multiprice
2021-06-11 18:22:40 +02:00
Laurent Destailleur
4e66e134bd
Update price.php 2021-06-11 18:21:00 +02:00
Laurent Destailleur
41d9324600
Merge pull request #17888 from marc-dll/11.0_FIX_activity_task_assignment
FIX: project time spent by day/week: quote mismatch in SQL query to assign to check task assigment
2021-06-11 18:12:57 +02:00
Laurent Destailleur
a8f11fec31
Update perweek.php 2021-06-11 18:12:39 +02:00
Laurent Destailleur
057d91698f
Update perday.php 2021-06-11 18:11:55 +02:00
Laurent Destailleur
794b10ec54
Merge pull request #17889 from marc-dll/12.0_FIX_activity_task_assignment
FIX: project time spent by month: quote mismatch in SQL query to assign to check task assigment
2021-06-11 18:11:19 +02:00
Laurent Destailleur
0315f45198
Update permonth.php 2021-06-11 18:10:57 +02:00
Marc de Lima Lucio
3f72f9b544 FIX: project time spent by month: quote mismatch in SQL query to assign to check task assigment 2021-06-10 23:29:37 +02:00
Marc de Lima Lucio
96656ff148 FIX: project time spent by day/week: quote mismatch is SQL query to assign to check task assigment 2021-06-10 23:26:33 +02:00
Laurent Destailleur
c44a368213 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-06-10 16:47:53 +02:00
Laurent Destailleur
24f8b6386e Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/core/class/commonobject.class.php
2021-06-10 16:47:45 +02:00
Laurent Destailleur
5d6735f364
Merge pull request #17826 from ptibogxiv/patch-428
Fix date_start of last subscription
2021-06-10 13:01:07 +02:00
Laurent Destailleur
92b20d3595
Merge pull request #17831 from atm-john/11.0_fix_doc_childtablesoncascade
FIX : childtablesoncascade doc
2021-06-10 12:59:19 +02:00
Laurent Destailleur
b7ba9df6b4
Update societe.class.php 2021-06-10 12:59:04 +02:00
Laurent Destailleur
8a46fd376f
Update commonobject.class.php 2021-06-10 12:58:42 +02:00
Laurent Destailleur
0c6f3a2616
Merge pull request #17862 from atm-gauthier/fix_rounding_on_formatted_tags
FIX : auto rounding on "_FORMATED_" tags
2021-06-10 12:50:50 +02:00
Laurent Destailleur
f5be9b6244
Merge pull request #17859 from aspangaro/12p14
FIX Missing link to language file
2021-06-10 12:19:19 +02:00
Laurent Destailleur
9ed7a3a5c5
Merge pull request #17863 from marc-dll/11.0_FIX_holiday_massaction_delete_right
FIX: holiday list: bad right for mass deletion
2021-06-10 12:13:10 +02:00
Laurent Destailleur
729c12a8e4
Merge pull request #17864 from DorianVabre/FIX_11.0_CSMSFile_count
Fix: using strlen() instead of count() to measure a message length on CSMSFile
2021-06-10 12:12:43 +02:00
Laurent Destailleur
4d5aa723d4
Merge pull request #17870 from aspangaro/12p15
FIX Customer invoice list - Pagination lost search_date_xxx information
2021-06-10 12:09:57 +02:00
Alexandre SPANGARO
08186fdff1 Fix warning - search_societe is already present 2021-06-10 06:28:09 +02:00
Alexandre SPANGARO
b216c81c60 FIX Customer invoice list - Pagination lost search_date_xxx information 2021-06-10 06:22:03 +02:00
lvessiller
c37c371392 FIX clone invoice with acount line 2021-06-09 17:18:01 +02:00
Dorian Vabre
0a23cf029d using strlen instead of count 2021-06-09 14:13:50 +02:00
Marc de Lima Lucio
5d9aa40065 FIX: holiday list: bad right for mass deletion 2021-06-09 12:40:34 +02:00
Gauthier PC portable 024
4b6fb7dd47 FIX : auto rounding on "_FORMATED_" tags 2021-06-09 12:26:28 +02:00
Alexandre SPANGARO
a4f3792cec FIX Missing link to language file 2021-06-09 07:42:05 +02:00
atm-greg
37433ffee7 verify vat change to update multiprice 2021-06-08 11:39:04 +02:00
Gauthier PC portable 024
e64c27e1c3 FIX : need to add payment sum to getlibstatus function in object linked block 2021-06-08 10:27:33 +02:00
ATM john
1aca7efce3 Fix childtablesoncascade doc 2021-06-06 13:15:03 +02:00
ptibogxiv
36accba5c9
Fix date_start of last subscription 2021-06-05 14:43:40 +02:00
Laurent Destailleur
d1d305e470
Merge pull request #17738 from frederic34/patch-11
fix bad setup of MAIN_USE_BACKGROUND_ON_PDF
2021-06-04 12:42:26 +02:00
Laurent Destailleur
9b0605f979 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-06-04 09:41:35 +02:00
Laurent Destailleur
164fe9fb4a
Merge pull request #17786 from FHenry/12_fix_ordersupplierstats
FIX: order supplier stats by category now display figures
2021-06-04 09:39:17 +02:00
Laurent Destailleur
aafb074b41
Merge pull request #17793 from ATM-Consulting/Fix_12.0_update_usergroup_label
update ->nom field if different from ->name
2021-06-04 09:21:51 +02:00
atm-greg
f875bcfe09 update ->nom field if different from ->name 2021-06-02 10:30:48 +02:00
Florian HENRY
c91b9d613a FIX: order supplier stats by category now display figures 2021-06-01 15:30:17 +02:00
Frédéric FRANCE
3ebe6eb014
fix bad setup of MAIN_USE_BACKGROUND_ON_PDF 2021-05-27 00:02:01 +02:00
Laurent Destailleur
3187c096c3
Merge pull request #17731 from atm-adrien/FIX_add_parameters_for_user_DoActions_hook
FIX : Add parameters (object and action) for user list DoActions hook
2021-05-26 17:48:42 +02:00
Laurent Destailleur
1753e980b8
Merge pull request #17728 from atm-maxime/fix_compta_export_dateech
Fix Quadra accountancy export for due date
2021-05-26 17:25:56 +02:00
Laurent Destailleur
5c3923240d
Merge pull request #17729 from atm-maxime/fix_compta_export_dateech2
Fix Winfic accountancy export for due date
2021-05-26 17:25:37 +02:00
Adrien Raze
9c83bdff51 FIX : Add parameters (object and action) for user list DoActions hook 2021-05-26 17:02:34 +02:00
Maxime Kohlhaas
b3a6bcd34f Fix Winfic accountancy export for due date 2021-05-26 15:01:31 +02:00
Maxime Kohlhaas
1d5b8cbb19 Fix Quadra accountancy export for due date 2021-05-26 14:59:28 +02:00
Laurent Destailleur
2ac9099e7d
Merge pull request #17618 from piernov/12.0-fix-addUserToGroupLDAP
Fix add/del user to group modifies LDAP group
2021-05-25 21:23:17 +02:00
Laurent Destailleur
6d637bf1e1
Merge pull request #17707 from FHenry/12_fix_export_balance
fix: export balance with double quote
2021-05-25 19:36:57 +02:00
piernov
60176f7f5e
Fix add/del user to group modifies LDAP group
Adding or removing a user from a group modifies the user object on Dolibarr's side.
In LDAP however, members of a group are stored in the group itself.
Therefore group must be updated after adding/removing a user from it.
Update group in LDAP with new list of users at the end of USER_MODIFY trigger.
2021-05-24 18:01:27 +02:00
Florian HENRY
7d223beae5 fix: export balance with doublequote 2021-05-24 12:51:58 +02:00
Laurent Destailleur
3359ae93d8
Merge pull request #17654 from atm-adrien/FIX_missing_hooks
FIX : Missing hook in cibles.php (for mailing)
2021-05-20 15:24:12 +02:00
Laurent Destailleur
04e9f2c988 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/admin/translation.php
2021-05-20 15:00:39 +02:00
Laurent Destailleur
93558d5bbb Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-05-20 14:58:57 +02:00
Laurent Destailleur
865ecf7a94 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/admin/translation.php
2021-05-20 14:58:50 +02:00
Laurent Destailleur
e8d9e9e697
Merge pull request #17659 from gmilad/gmilad-fix-17608-b10
Fix issue #17608 for branch 10
2021-05-20 14:34:12 +02:00
Laurent Destailleur
90443e26ac
Merge pull request #17660 from gmilad/gmilad-fix-17608-b11
Fix issue #17608 for branch 11
2021-05-20 14:30:30 +02:00
Laurent Destailleur
5fd4da66cb
Merge pull request #17673 from OPEN-DSI/v11-fix-supplier-order-special-code
FIX keep special code on supplier order lines for external modules
2021-05-20 14:13:07 +02:00
lvessiller
e2e6d4ba14 FIX keep special code on supplier order lines for external modules 2021-05-19 14:29:46 +02:00
gmilad
4bb18db905
Fix issue #17608 for branch 11
Fix issue #17608 for branch 11
2021-05-18 19:53:35 +02:00
gmilad
57732d4265
Fix issue #17608 for branch 10
Fix issue #17608 for branch 10
2021-05-18 19:45:15 +02:00
Adrien Raze
90d159fbc3 FIX : Missing hook in cibles.php (for mailing) 2021-05-18 14:58:46 +02:00
Laurent Destailleur
6b12dd4143 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-05-18 12:02:52 +02:00
Laurent Destailleur
6170b28c3b FIx #17651 2021-05-18 11:58:49 +02:00
Laurent Destailleur
df2297bca3 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/user/class/api_users.class.php
2021-05-17 19:21:58 +02:00
Laurent Destailleur
a865f49d72 Fix phpcs 2021-05-17 19:19:26 +02:00
Laurent Destailleur
c54e010126 Fix perms on API user 2021-05-17 16:16:45 +02:00
Laurent Destailleur
cb9db6e3a8
Merge pull request #17630 from DorianVabre/Fix_11.0_api_user_right
Fix: user rest api rights
2021-05-17 15:58:11 +02:00
stickler-ci
a3aba28c95 Fixing style errors. 2021-05-17 10:06:41 +00:00
Dorian Vabre
547f1dd370 Fix: user rest api rights 2021-05-17 11:54:53 +02:00
Laurent Destailleur
985301939d Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-05-17 10:31:25 +02:00
Laurent Destailleur
5305a983c7
Merge pull request #17629 from fmarcet/11.0
Fix: Before there was no mistake
2021-05-17 10:30:46 +02:00
Ferran Marcet
f923c70f38 Fix: Before there was no mistake 2021-05-17 10:17:54 +02:00
Laurent Destailleur
2637f9af63
Merge pull request #17586 from atm-quentin/FIX_missing_town_and_zip_filter
FIX missing town and zip filter in contract list sql request
2021-05-17 10:08:44 +02:00
Laurent Destailleur
fd6147578a
Merge pull request #17611 from atm-maxime/fix/supplier_discount_replenish
Fix use supplier relative discount in replenish order creation
2021-05-17 09:44:39 +02:00
Laurent Destailleur
892a38e681 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-05-17 09:15:21 +02:00
Laurent Destailleur
592cfb5e93
Merge pull request #17602 from fmarcet/11.0
FIX: Impossible to add multiple localtax2
2021-05-17 09:13:58 +02:00
Laurent Destailleur
b8b2928dd1 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-05-17 07:29:30 +02:00
Laurent Destailleur
5a15dbf545 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/user/class/usergroup.class.php
2021-05-17 07:29:19 +02:00
Laurent Destailleur
6a2afabcac
Merge pull request #17617 from piernov/11.0-fix-LDAPposixGroupId
Fix: properly set gid for Group LDAP synchro
2021-05-17 07:14:25 +02:00
Laurent Destailleur
fc22565532
Merge pull request #17613 from atm-maxime/fix/date_propal
Fix use of DatePropal instead of Date
2021-05-17 07:09:35 +02:00
Laurent Destailleur
829f6520bd
Merge pull request #17621 from atm-maxime/patch-1
Update admin_extrafields_view.tpl.php
2021-05-17 07:01:41 +02:00
Maxime Kohlhaas
7af0bda3a5
Update admin_extrafields_view.tpl.php 2021-05-16 11:33:07 +02:00
piernov
1cbe0e3f2d
Fix: properly set gid for Group LDAP synchro
Even if the gidNumber field was set in the configuration, a gid different from the Dolibarr's one was generated and stored into LDAP.
Now the gidNumber is properly set to Dolibarr's gid if gidNumber field is set in the LDAP module configuration.
2021-05-15 18:01:34 +02:00
Maxime Kohlhaas
db32f882e8 Fix use of DatePropal instead of Date 2021-05-15 07:45:04 +02:00
Maxime Kohlhaas
acadef72c1 Fix use supplier relative discount in replenish order creation 2021-05-14 18:01:22 +02:00
Ferran Marcet
c577d1c51e FIX: Impossible to add multiple localtax2 2021-05-13 13:35:28 +02:00
Quentin VIAL-GOUTEYRON
56d78cf12a FIX missing town and zip filter in contract list sql request 2021-05-12 11:02:27 +02:00
Laurent Destailleur
8dc1e1cb33 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-05-11 20:17:24 +02:00
Laurent Destailleur
3683461c40 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	.travis.yml
	htdocs/societe/consumption.php
2021-05-11 20:17:15 +02:00
Laurent Destailleur
b5c88d5817 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-05-11 20:15:32 +02:00
Laurent Destailleur
c2fa19a0b4 fix phpcs 2021-05-11 20:15:20 +02:00
Laurent Destailleur
82400ca2a5
Merge pull request #17542 from atm-john/patch-2
FIX : var case
2021-05-11 18:43:57 +02:00
Laurent Destailleur
9971aee835
Merge pull request #17576 from atm-lena/12.0_FIX_AddHook_ExtrafieldsUpdate
Add Hook Extrafields Update - init extrafieldssdao
2021-05-11 17:53:21 +02:00
atm-lena
8fb474c687 Add Hook Extrafields Update - init extrafieldssdao 2021-05-11 11:35:54 +02:00
John BOTELLA
2fda3b1b46
FIX ; var case
On this page $datePrint is not used but $dateprint yes
2021-05-08 13:53:20 +02:00
Laurent Destailleur
f6f4968af6 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/societe/consumption.php
2021-05-06 16:52:36 +02:00
Laurent Destailleur
824a601014
Merge pull request #17507 from atm-john/11.0_fix_search_accent_in_description
FIX : search accented words in product description (consumption page)
2021-05-06 16:45:21 +02:00
Laurent Destailleur
9ce23ac6b2
Merge pull request #17494 from atm-john/fix_not_enabled_email_template
FIX saving template email
2021-05-06 16:22:19 +02:00
Laurent Destailleur
a4d93424dc
Merge pull request #17498 from marc-dll/FIX_11.0_pgsql_where_boolean
FIX: pgsql: prevent 'WHERE 1'
2021-05-06 15:58:41 +02:00
ATM john
63292255cc Fix search accented words in product description 2021-05-05 18:45:23 +02:00
Marc de Lima Lucio
139ae3db00 FIX: pgsql: prevent 'WHERE 1' 2021-05-05 11:49:11 +02:00
ATM john
6574e54a41 Fix saving template email 2021-05-04 18:09:13 +02:00
Laurent Destailleur
17cb441569 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-05-03 18:58:50 +02:00
Laurent Destailleur
540e4f3d2e Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-05-03 18:58:41 +02:00
Laurent Destailleur
e6b4f1eab6
Merge pull request #17442 from atm-john/11.0_fix_showInputField_checkbox_selection
FIX : Show input field checkbox selection
2021-05-03 16:16:56 +02:00
Laurent Destailleur
33a20ae9a1
Update extrafields.class.php 2021-05-03 16:16:44 +02:00
ATM john
6e4962bb39 Merge branch '11.0' of github.com:Dolibarr/dolibarr into 11.0_fix_showInputField_checkbox_selection 2021-04-30 12:22:31 +02:00
ATM john
6c1e0919c8 Fix checkbox multiselect pre-selected value from get/post 2021-04-30 12:20:43 +02:00
Laurent Destailleur
27e2c69e4e
Merge pull request #17439 from atm-lena/11.0_FIX_ShowContactSearch_SQLError
FIX SQL Error show_contacts : socialnetworks
2021-04-30 12:03:40 +02:00
Laurent Destailleur
0d4eaca3e8
Merge pull request #17426 from daraelmin/daraelmin-patch-v11
Fix wrong alias in natural_search v11-v14
2021-04-30 11:58:53 +02:00
Laurent Destailleur
08c85a88c8
Merge pull request #17437 from daraelmin/daraelmin-patch-v11-2
Fix logical test always false V11 to v14
2021-04-30 11:57:58 +02:00
stickler-ci
81b964db45 Fixing style errors. 2021-04-30 08:12:24 +00:00
atm-lena
5e98d99321 FIX SQL Error show_contacts : socialnetworks 2021-04-30 10:04:21 +02:00
daraelmin
749aeeb233
Fix $objp->subscription =="yes" 2021-04-29 23:16:21 +02:00
daraelmin
4174ebd9c0
Fix subscription =="yes" 2021-04-29 23:11:51 +02:00
daraelmin
965eb2d639
Fix logical test always false
subscription is an integer and is set to 0 or 1. So subscription is never equal to "yes"
2021-04-29 22:57:39 +02:00
daraelmin
68415322ec
Fix v11 wrong alias in natural_search 2021-04-29 10:00:54 +02:00
Laurent Destailleur
0a871546ee
Merge pull request #17379 from atm-adrien/FIX_add_function_price2num_to_productAlertStock_box_12.0
FIX : Add function price2num for rounding values in productAlertStock…
2021-04-27 18:45:26 +02:00
Adrien Raze
e8c2085abd FIX : Change parameters MF to MS for price2num() function 2021-04-27 09:24:22 +02:00
Laurent Destailleur
ea19747bc6 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-04-27 02:16:16 +02:00
Laurent Destailleur
2e9cf8d00b Fix phpcs 2021-04-27 02:15:58 +02:00
Laurent Destailleur
9513f25a36 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-04-27 02:11:11 +02:00
Laurent Destailleur
c7f38c4cf0 Fix bad var 2021-04-27 02:10:52 +02:00
Laurent Destailleur
098582d7a7 Fix bad merge 2021-04-27 02:09:43 +02:00
Laurent Destailleur
b3f8a6758e Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-04-27 01:46:13 +02:00
Laurent Destailleur
804eac55e9 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-04-27 01:46:04 +02:00
Laurent Destailleur
7a6edfd61f
Merge pull request #17295 from atm-gauthier/fix_adv_target_emailing_extrafields_link
FIX : type link extrafield case for advanced target emailing
2021-04-27 01:45:26 +02:00
Laurent Destailleur
e9b8e81773
Update advtargetemailing.class.php 2021-04-27 01:45:10 +02:00
Laurent Destailleur
5a6d3b7c88
Merge pull request #17372 from marc-dll/FIX_11.0_invoice__generation_after_paiement
FIX: invoice PDF generation after payment
2021-04-26 22:49:56 +02:00
Laurent Destailleur
f66c506011
Merge pull request #17381 from atm-lena/12.0_FormAttachOptions_AddHookParameters_Options
Add parameter "option" to hook formattachOptions
2021-04-26 21:00:12 +02:00
atm-lena
3d3fb17da3 Add parameter "option" to hook formattachOptions 2021-04-23 15:41:43 +02:00
Adrien Raze
c5775cc902 FIX : Add parameter to function price2num() 2021-04-23 12:31:45 +02:00
Adrien Raze
2ab17c44e9 FIX : Add function price2num for rounding values in productAlertStock box 2021-04-23 11:11:47 +02:00
Marc de Lima Lucio
ce022ab36c FIX: payment validation: invoices PDF were no re-generated, make it with correct display options 2021-04-22 15:57:06 +02:00
Marc de Lima Lucio
ee96fb6470 FIX: payment creation: re-generate invoice PDF with correct display options 2021-04-22 15:56:12 +02:00
Laurent Destailleur
e2d7e84072
Merge pull request #17326 from atm-greg/FIX_warehouse_label_edition
fix warehouse label field edition
2021-04-19 20:26:56 +02:00
atm-greg
74345c4f21 fix warehouse label field edition 2021-04-19 16:03:22 +02:00
stickler-ci
318a783237 Fixing style errors. 2021-04-19 07:19:45 +00:00
Gauthier PC portable 024
8c428081ab FIX : test on link type 2021-04-19 09:17:33 +02:00
Gauthier PC portable 024
ff8aae1209 Merge branch 'fix_adv_target_emailing_extrafields_link' of github.com:atm-gauthier/dolibarr into fix_adv_target_emailing_extrafields_link 2021-04-19 09:16:06 +02:00
Gauthier PC portable 024
5b6439ca5e FIX : cast int 2021-04-19 09:15:47 +02:00
stickler-ci
37f44f4a07 Fixing style errors. 2021-04-16 14:58:57 +00:00
Gauthier PC portable 024
f8fcf7c16b FIX : type link extrafield case for advanced target emailing 2021-04-16 16:55:19 +02:00
Laurent Destailleur
e8bf09862f
Merge pull request #17152 from marc-dll/FIX_12.0_zero_packaging
FIX: supplier order: error 500 when using packaging with product where it is not defined
2021-04-09 13:51:16 +02:00
Laurent Destailleur
9ddd1cf8cd
Merge pull request #17198 from atm-gauthier/12.0_fix_test_string
FIX : test must be === and not ==
2021-04-09 11:36:50 +02:00
Gauthier PC portable 024
c35c15e782 FIX : test must be === and not == 2021-04-09 11:31:50 +02:00
Laurent Destailleur
91bf759242
Merge pull request #17117 from ptibogxiv/patch-423
Fix order status label in comm index page
2021-04-08 16:21:24 +02:00
Marc de Lima Lucio
7df09b6e9e FIX: esupplier order: error 500 when using packaging with product where it is not defined 2021-04-07 10:41:36 +02:00
ptibogxiv
bd88806982
Fix order status label in comm index page 2021-04-05 12:07:51 +02:00
Laurent Destailleur
a0e423f1b8
Merge pull request #17098 from youvious/12.0
Clean llx_accounting_account_be.sql of all 'PRODUCT' and 'SERVICE'
2021-04-04 01:21:46 +02:00
Youvious
5e9ce734a7 Clean llx_accounting_account_be.sql of all 'PRODUCT' and 'SERVICE' (pcg_subtype) 2021-04-03 15:14:33 +02:00
Laurent Destailleur
1880cb92a4 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-03-31 13:47:00 +02:00
Laurent Destailleur
ddaaabfb7a
Merge pull request #17054 from aspangaro/12p13
FIX: Accountancy - Import in general ledger
2021-03-31 13:46:04 +02:00
Laurent Destailleur
521dec7792
Merge pull request #17018 from fmarcet/11.0
FIX: Show Ref.Supplier in LinkToObjectBlock
2021-03-31 13:44:53 +02:00
Ferran Marcet
b6faa6b605 FIX: Show Ref.Supplier in LinkToObjectBlock 2021-03-31 09:40:12 +02:00
Alexandre SPANGARO
14a62442c4 FIX: Accountancy - Import in general ledger 2021-03-31 05:07:05 +02:00
Ferran Marcet
b4f638602a FIX: Show Ref.Supplier in LinkToObjectBlock 2021-03-30 11:10:07 +02:00
Laurent Destailleur
6057d8aabd Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/core/tpl/login.tpl.php
2021-03-29 21:37:21 +02:00
Laurent Destailleur
eabe5ae616 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-03-29 21:35:54 +02:00
Laurent Destailleur
8c08b3945b Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-03-29 21:35:46 +02:00
Laurent Destailleur
b9a91f92ea
Merge pull request #16984 from aspangaro/10p38
FIX Search on date in accountancy
2021-03-29 16:12:31 +02:00
Alexandre SPANGARO
56ae51375d FIX Search on date in accountancy 2021-03-27 07:11:28 +01:00
Laurent Destailleur
30543bda71
Merge pull request #16947 from atm-john/11.0_fix_something_that_not_exist
FIX : shhhhhh ! There is nothing here...
2021-03-25 01:09:20 +01:00
ATM john
4f693b86c2 shhhhhh ! There is nothing here... 2021-03-23 19:27:40 +01:00
Laurent Destailleur
af593099df Clean string 2021-03-22 23:52:14 +01:00
Laurent Destailleur
d5865dbfcc
Merge pull request #16791 from Robin-Yann/12.0
FIX: fix checkbox displayed according to module project setup parameters - work in progress
2021-03-20 12:06:03 +01:00
Laurent Destailleur
2df54d5da7
Merge pull request #16858 from frederic34/patch-10
fix nested comments for doxygen
2021-03-20 11:25:01 +01:00
Frédéric FRANCE
2de2f1ce4d
fix nested comments for doxygen 2021-03-20 09:02:29 +01:00
Robin
d89d0782c9 Merge branch '12.0' of https://github.com/Robin-Yann/dolibarr into 12.0 2021-03-19 11:15:24 +01:00
Robin
26dc897042 Merge branch '12.0' of https://github.com/Robin-Yann/dolibarr into 12.0
htdocs/projet/card.php
2021-03-19 11:12:49 +01:00
Robin
cb4c047aa3 Merge branch '12.0' of https://github.com/Robin-Yann/dolibarr into 12.0
htdocs/projet/card.php
2021-03-19 10:00:10 +01:00
Robin
d852816101 FIX: fix checkbox displayed according to module project setup parameters 2021-03-19 09:54:11 +01:00
Robin
b3757a6f69 FIX: fix checkbox displayed according to module project setup parameters - work in progress 2021-03-18 11:07:48 +01:00
Laurent Destailleur
a29a9e5435 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-03-16 15:14:46 +01:00
Laurent Destailleur
66bbc7f54f
Merge pull request #16734 from AlexisLaurier/11.0
correct nb_expedition count
2021-03-16 15:12:18 +01:00
Alexis LAURIER
971b97d78f correct nb_expedition count 2021-03-16 15:00:46 +01:00
Laurent Destailleur
b5edfdf6f6
Merge pull request #16687 from atm-florianm/fix/12.0_min_php_version_in_composer_json
Fix/12.0 min php version in composer json
2021-03-15 17:16:27 +01:00
Florian Mortgat
a5f6ee5889 Merge branch '12.0' of github.com:Dolibarr/dolibarr into fix/12.0_min_php_version_in_composer_json 2021-03-15 15:06:54 +01:00
Florian Mortgat
631aad94e7 FIX PHP version requirement in composer.json 2021-03-15 15:05:01 +01:00
Laurent Destailleur
d905d92434
Merge pull request #16637 from frederic34/patch-4
force check if newref needed if project create fail
2021-03-15 11:31:07 +01:00
Laurent Destailleur
fede7b7a15
Merge pull request #16633 from frederic34/patch-3
fix number is already used doesn't propose new code with elephant
2021-03-12 20:18:46 +01:00
Frédéric FRANCE
815a7683a2
force getnextref if project create fail 2021-03-12 16:48:43 +01:00
Frédéric FRANCE
7a2e28497d
fix number is already used doesn't propose new code with elephant 2021-03-12 13:14:53 +01:00
Laurent Destailleur
43836836e4
Merge pull request #16610 from atm-lena/12.0_FIX_Sociales_Create_KeepValues_Error
FIX create sociales : keep values error form
2021-03-10 15:30:06 +01:00
Laurent Destailleur
c209d9b45e
Update paiement_charge.php 2021-03-10 15:29:05 +01:00
atm-lena
b798535af9 FIX create sociales : keep values error form 2021-03-10 14:15:03 +01:00
Laurent Destailleur
7cb10eae2e
Merge pull request #16588 from atm-adrien/FIX/add_nowLink_on_socialCharges_card_creation
FIX : Add "Now" link on social charges creation card
2021-03-08 16:31:41 +01:00
Laurent Destailleur
8b555d33e7
Merge pull request #16586 from atm-adrien/FIX/rouding_socialesCard_amount_on_card_updating
FIX : Rounding amount on social charges card updating
2021-03-08 16:30:53 +01:00
Laurent Destailleur
20c30bade8
Update card.php 2021-03-08 16:30:32 +01:00
Laurent Destailleur
5c7685c1b8
Merge pull request #16581 from frederic34/patch-7
Do not return specimen if searching empty string value
2021-03-08 16:29:04 +01:00
Adrien Raze
67c6577177 FIX : Add "Now" link on social charges card creation 2021-03-08 15:47:02 +01:00
Adrien Raze
cbb7751a15 FIX : rounding amount on card updating 2021-03-08 11:51:18 +01:00
Frédéric FRANCE
c0c9ac439f
Update api_agendaevents.class.php 2021-03-08 00:23:05 +01:00
Laurent Destailleur
e5d8267786
Merge pull request #16546 from FHenry/12.0
fix: set class attribute at right place
2021-03-06 11:18:02 +01:00
Laurent Destailleur
1ad04bb67a
Merge pull request #16548 from frederic34/patch-5
Fix #16544
2021-03-06 11:09:58 +01:00
Laurent Destailleur
98c7814fa3 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-03-05 18:28:37 +01:00
Laurent Destailleur
6aa929cbf8 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-03-05 18:28:15 +01:00
Frédéric FRANCE
7543b63a6e
Fix #16544 2021-03-05 08:49:56 +01:00
Florian HENRY
6de6782458 fix: set class at right place 2021-03-05 08:41:04 +01:00
Laurent Destailleur
eda0b4dc37
Merge pull request #16531 from FHenry/12.0
avoid warning into modulebuilder
2021-03-04 16:52:47 +01:00
Laurent Destailleur
672a07fdac
Merge pull request #16535 from atm-greg/Fix_attach_files_when_models_are_available
Fix : if mailmodels exist in database attached files are always cleared
2021-03-04 16:45:00 +01:00
atm-greg
c41b59b14c Fix : when we have got models in database attached files are cleared even if we did not have selected a model 2021-03-04 14:23:08 +01:00
Florian HENRY
bf775855f6 avoid warning into modulebuilder 2021-03-04 10:28:41 +01:00
Laurent Destailleur
5fd341bbd3 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
2021-03-02 15:11:18 +01:00
Laurent Destailleur
ef789376e7
Merge pull request #16501 from atm-gauthier/FIX/HeightForTotWhenTooMuchPayment_SI
FIX : handling $heightforinfotot when he's superior to a page height …
2021-03-02 12:49:58 +01:00
stickler-ci
d20ba5a665 Fixing style errors. 2021-03-01 15:38:15 +00:00
Gauthier PC portable 024
861b583668 FIX : handling $heightforinfotot when he's superior to a page height on Supplier Invoice 2021-03-01 16:34:42 +01:00
Laurent Destailleur
5afc0e33c9
Merge pull request #16475 from frederic34/patch-4
FIX #16465
2021-02-28 13:24:29 +01:00
Frédéric FRANCE
8bfa7565bd
Update commonobject.class.php 2021-02-27 08:52:40 +01:00
Frédéric FRANCE
2cc635fd09
FIX https://github.com/Dolibarr/dolibarr/issues/16465 2021-02-27 08:00:02 +01:00
Laurent Destailleur
5c0fba26e2 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-26 10:25:55 +01:00
Laurent Destailleur
549136efeb Removed useless log 2021-02-26 10:25:30 +01:00
Laurent Destailleur
99a17cadb7 Fix sql syntax 2021-02-26 10:25:08 +01:00
Laurent Destailleur
8e8efce7d1 Fix sql syntax 2021-02-26 10:23:53 +01:00
Laurent Destailleur
9db211b1a7
Merge pull request #16433 from ATM-Consulting/fix/11.0_contact_updateRoles_sql_injection_of_socid
FIX 11.0 - $this->socid injected in query without checking for empty string
2021-02-26 10:22:50 +01:00
Florian Mortgat
d59ee06438 FIX 11.0 - $this->socid injected in query without checking for empty value 2021-02-25 14:51:57 +01:00
Laurent Destailleur
eee936b91c Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-22 15:51:16 +01:00
Laurent Destailleur
c010cab47e Fix translation of default value for contacts 2021-02-22 15:51:00 +01:00
Laurent Destailleur
9b0659c50a
Merge pull request #16238 from frederic34/patch-2
FIX massaction validate invoice do not regenerate pdf
2021-02-20 17:13:51 +01:00
Laurent Destailleur
45fda63a20 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-19 14:08:51 +01:00
Laurent Destailleur
d7c3cc4d18 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/compta/bank/various_payment/list.php
2021-02-19 14:08:36 +01:00
Laurent Destailleur
dc3377f0f0
Merge pull request #16348 from ptibogxiv/patch-416
Fix multientity in cash fence report
2021-02-19 13:51:44 +01:00
Laurent Destailleur
556651a3ae
Update report.php 2021-02-19 13:51:15 +01:00
Laurent Destailleur
efb9ee458a
Merge pull request #16349 from ivanmestre/v12-fix-bank-account-filter-reset-payment-various
V12 FIX #16241 Bank Account filter resets on Miscellaneous Payments
2021-02-19 12:39:33 +01:00
Iván Mestre
57e9277376 Fixed Bank Account filter resets on payment various
Changed GET search bank account GET parameter from search_amount to search_account
2021-02-18 16:23:18 -03:00
ptibogxiv
cafc6a3da2
Fix multientity in cash fence report
it make no sense to merge cash fence in différent entity with same terminal number.
2021-02-18 20:04:09 +01:00
Laurent Destailleur
0c73cdb129 Prepare 12.0.5 2021-02-16 13:42:26 +01:00
Laurent Destailleur
1d6893e928 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-15 16:43:46 +01:00
Laurent Destailleur
6132843586 FIX Filter on date of next generation on template invoices 2021-02-15 16:43:24 +01:00
Laurent Destailleur
a848069178
Merge pull request #16258 from ivanmestre/fix-data-filter-reset-payment-various
Fix #16241 Date filter resets on Miscellaneous Payments
2021-02-11 18:59:32 +01:00
Laurent Destailleur
a779ce36f3
Merge pull request #16257 from ivanmestre/fix-bank-account-filter-reset-payment-various
FIX #16241 Bank Account filter resets on payment various
2021-02-11 18:36:59 +01:00
Laurent Destailleur
73cd5e144b
Merge pull request #16263 from aspangaro/12p11
WIP FIX: Accountancy - Fix some problems on CEGID export
2021-02-11 18:33:40 +01:00
Laurent Destailleur
c306e8ebe9 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-11 18:23:47 +01:00
Laurent Destailleur
e1334f34b6 Complete repair to clean not correctly available extrafields on proposal 2021-02-11 18:08:01 +01:00
Alexandre SPANGARO
83f9451b43 FIX: Accountancy - Fix some problems on CEGID export 2021-02-11 13:17:20 +01:00
Iván Mestre
a249f4f35a Fix #16241 Date filter resets on Miscellaneous Payments
Changed $search_date_start and $search_date_end variables to get values from search_date_start and search_date_end GET parameters if no their value is empty after checking POST parameters
2021-02-10 15:03:17 -03:00
Iván Mestre
cb4cfbd27d Fixed Bank Account filter resets on payment various
Changed GET search bank account GET parameter from search_amount to search_account
2021-02-10 14:43:19 -03:00
Laurent Destailleur
90d1b2d349 Prepare 12.0.5 2021-02-10 18:05:36 +01:00
Laurent Destailleur
1282494211
Merge pull request #16243 from ptibogxiv/patch-414
FIX update order by api
2021-02-10 01:17:33 +01:00
Laurent Destailleur
9c535d6d7e Fix comment in js must be a js comment 2021-02-09 21:09:46 +01:00
Laurent Destailleur
0e2c27d795 Fix javascript error 2021-02-09 21:06:11 +01:00
ptibogxiv
e5f6a64846
FIX update order by api
fix update shipping method and shipping date by API (no change with code or functionality juste fix this pb with updating)
2021-02-09 19:24:36 +01:00
Frédéric FRANCE
71a2c20d4b
massaction validate invoice do not regenerate pdf 2021-02-09 14:32:04 +01:00
Laurent Destailleur
a84bc05f01
Merge pull request #16146 from FHenry/12_fix_pricemin_PRODUIT_CUSTOMER_PRICES
FIX: manage price min for PRODUIT_CUSTOMER_PRICES
2021-02-09 13:39:25 +01:00
Laurent Destailleur
1efee54541
Merge pull request #16230 from FHenry/12_fix_error_assignement
12 fix error assignement
2021-02-09 13:22:57 +01:00
Laurent Destailleur
8acc5e1486 Fix calculation of profit 2021-02-08 23:37:32 +01:00
Florian HENRY
6bcb63c53d fix indent 2021-02-08 20:46:59 +01:00
Florian HENRY
ff6b5c768d fix indent 2021-02-08 20:46:21 +01:00
Florian HENRY
dbbebba497 this->errors is set on triggers action must be set by callers 2021-02-08 20:44:40 +01:00
Laurent Destailleur
8b3c872f2a Fix warning 2021-02-08 17:35:21 +01:00
Laurent Destailleur
3b1143df91
Merge pull request #16223 from ATM-Consulting/fix/12.0_order_addline_remove_warning
FIX: warning when adding a line if $remise_percent is an empty string
2021-02-08 17:34:29 +01:00
Florian Mortgat
ff3707b650 FIX: warning when adding a line if $remise_percent is an empty string 2021-02-08 17:24:40 +01:00
Laurent Destailleur
78052e3239 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-08 17:20:24 +01:00
Laurent Destailleur
a143635f53 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-08 17:20:17 +01:00
Laurent Destailleur
25823d7b90
Merge pull request #16158 from atm-lena/FIX_12.0_SUPPLIER_OBJECTLINE_CONF_DISPLAY
Add hidden conf to display supplier in object lines
2021-02-08 16:58:28 +01:00
Laurent Destailleur
ff9070ff9c
Merge pull request #16206 from atm-maxime/fix_supp_inv_backtolistlink
Fix links to go back on supplier invoice list
2021-02-08 15:04:23 +01:00
Laurent Destailleur
9f9ace0565 FIX Localtax must be converted with price2num 2021-02-07 22:15:21 +01:00
Laurent Destailleur
cb94216098
Merge pull request #16205 from atm-maxime/fix_supp_inv_list_leftjoin
Fix #15940 mixing different joins
2021-02-07 19:58:33 +01:00
Maxime Kohlhaas
414a2366fb Fix links to go back on supplier invoice list 2021-02-07 19:28:00 +01:00
Maxime Kohlhaas
0e1353733d Fix #15940 mixing different joins 2021-02-07 19:21:52 +01:00
Laurent Destailleur
d8a33b46de Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-06 01:08:46 +01:00
Laurent Destailleur
4428e2b18e Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/compta/prelevement/card.php
	htdocs/product/price.php
2021-02-06 01:08:37 +01:00
Laurent Destailleur
87c8d917e9 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/compta/prelevement/card.php
2021-02-06 01:03:31 +01:00
Laurent Destailleur
c888ce08c1
Merge pull request #16174 from atm-florianm/fix/10.0_check_withdrawal_already_credited_before_crediting_it
FIX 10.0 - before crediting a withdrawal receipt, check whether it has been credited already
2021-02-06 01:00:56 +01:00
Laurent Destailleur
7d14cde45e
Merge pull request #16173 from fappels/11_backport_price_patch
FIX: Add critical price patch from 12 to 11.
2021-02-06 00:59:52 +01:00
Laurent Destailleur
d8c262691b
Merge pull request #16175 from nicolas-eoxia/12_fix_missing_hook
fix: add missing hook addMoreActionsButtons in viewcat.php
2021-02-06 00:43:52 +01:00
Laurent Destailleur
e9fa5a647d Fix import 2021-02-05 14:35:10 +01:00
Nicolas
cdd2c165ef add missing hook addMoreActionsButtons in viewcat.php 2021-02-05 11:36:12 +01:00
Florian Mortgat
3f862bf43e FIX 10.0 - before crediting a withdrawal receipt, check whether it has been credited already 2021-02-05 11:34:39 +01:00
Francis Appels
1b55935577 Add critical price patch from 12 to 11. 2021-02-05 10:39:46 +01:00
Laurent Destailleur
3006cf770c FIX Timeout during import 2021-02-05 01:06:59 +01:00
Laurent Destailleur
b58b3a4932 FIX link to create event when task is in a project with a thirdparty 2021-02-04 13:03:05 +01:00
atm-lena
c5f73ec12a Resolve ret 2021-02-04 10:42:42 +01:00
Laurent Destailleur
91c594a66a Fix syntax error 2021-02-03 23:03:47 +01:00
Laurent Destailleur
041decaf93 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-03 20:43:39 +01:00
Laurent Destailleur
4bba124c3f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-03 20:43:32 +01:00
Laurent Destailleur
2576973dc3
Merge pull request #16140 from OPEN-DSI/v11-fix-model-mail-selected
FIX select default mail template
2021-02-03 20:26:40 +01:00
Laurent Destailleur
83e32f96b7
Merge pull request #16138 from ibuiv/patch-3
FIX(path) htdocs removed
2021-02-03 20:25:02 +01:00
Laurent Destailleur
c16ed62ada
Merge pull request #16149 from ptibogxiv/patch-410
FIX cash fence for takepos with multientity
2021-02-03 19:57:21 +01:00
Laurent Destailleur
8b6de8fe26 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-02-03 17:09:56 +01:00
Laurent Destailleur
6ab723e85c Fix bad path of include 2021-02-03 17:09:26 +01:00
atm-lena
e9b5a52a4f Add hidden conf to display supplier in object lines 2021-02-03 15:22:04 +01:00
ptibogxiv
3132877349
FIX cash fence for takepos with multientity 2021-02-02 23:09:23 +01:00
Florian HENRY
d3d0617996 fix: manage price min for PRODUIT_CUSTOMER_PRICES 2021-02-02 13:43:33 +01:00
lvessiller
3b050c3452 FIX select default mail template 2021-02-02 10:34:33 +01:00
ibuiv
fc1d8a2c5b
FIX(path) htdocs removed 2021-02-02 10:01:54 +01:00
Laurent Destailleur
99ccfee9ed
Merge pull request #16120 from pvma/12.0
Fix/FIX: Show missing notification in Event in user dashboard if assigned by others
2021-01-31 19:07:59 +01:00
Laurent Destailleur
d023afb66f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-31 18:55:11 +01:00
Laurent Destailleur
188ed6984f Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-01-31 18:54:32 +01:00
Laurent Destailleur
08aa3eac00 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2021-01-31 18:54:19 +01:00
Laurent Destailleur
9ef5f26624
Merge pull request #14022 from OPEN-DSI/fix_supplier_order_dispatching
FIX: Fix detect dispatched product and set to received completely when the supplier order have services
2021-01-31 18:51:57 +01:00
Paul Vincent M. Ancajas
d80709a7b9 Fix/FIX: making sure the return agenda is only specific to user 2021-02-01 01:41:19 +08:00
Laurent Destailleur
758d91b4a3
Merge pull request #16087 from ATM-Consulting/fix/11.0_required_extrafields_of_type_sellist_not_properly_checked
FIX 11.0 - mandatory extrafields of type sellist
2021-01-31 18:18:05 +01:00
stickler-ci
726e0ceff0 Fixing style errors. 2021-01-31 08:16:59 +00:00
Paul Vincent M. Ancajas
80714d8d6d Fix/FIX: Show notification in Event box of user in his dashboard if assigned by others 2021-01-31 16:09:35 +08:00
Laurent Destailleur
244ee05a9c FIX #14290 #15900 2021-01-30 18:09:13 +01:00
Laurent Destailleur
4f73d26f6a
Merge pull request #16094 from aspangaro/12p1
FIX: Accountancy - label_operation is used instead of label_compte
2021-01-30 13:04:54 +01:00
Alexandre SPANGARO
413fc95f9a FIX: Accountancy - label_operation is used instead of label_compte 2021-01-28 23:40:15 +01:00
Laurent Destailleur
62622a2065 Fix: It was no more possible to create paymentintent for offline payment 2021-01-28 23:16:24 +01:00
Laurent Destailleur
1a52eb5ffa Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-28 19:52:17 +01:00
Laurent Destailleur
099fcd7e4e Fix test email
Conflicts:
	htdocs/admin/mails.php
2021-01-28 19:51:54 +01:00
Laurent Destailleur
33964c659e Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-28 14:14:14 +01:00
Laurent Destailleur
d637bbd7e9 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-28 14:14:03 +01:00
Laurent Destailleur
c63a124d1c More complete fix 2021-01-28 14:13:29 +01:00
Juanjo Menent
2f98d8035c Fix: Bad supplier price updater 2021-01-28 13:37:43 +01:00
Laurent Destailleur
19a5caf212 Merge branch '12.0' of https://github.com/dolibarr/dolibarr into 12.0 2021-01-28 00:18:35 +01:00
Laurent Destailleur
2be157c91f Trans 2021-01-28 00:18:11 +01:00
Florian Mortgat
8dfe39258b FIX 11.0 - when a mandatory extrafield of type sellist contains '0' it should be considered empty and trigger an error message upon insertion 2021-01-27 23:46:09 +01:00
Laurent Destailleur
76fb64e8fe Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-27 21:05:17 +01:00
Laurent Destailleur
dd70bee773 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-27 21:05:09 +01:00
Laurent Destailleur
e431b5aacb
Merge pull request #16074 from ATM-Consulting/11.0_FIX_wrong_extrafield_insertion_when_creating_intervention
FIX 11.0: when a new intervention is created from an object, a new $e…
2021-01-27 19:35:05 +01:00
Florian Mortgat
35448e3307 FIX 11.0: when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized
Because of this, missing mandatory extrafields are not checked and no extrafields are inserted
2021-01-26 12:42:04 +01:00
Laurent Destailleur
9a754625bd
Merge pull request #16053 from ptibogxiv/patch-406
Fix stripe off_session set/unset
2021-01-24 15:17:41 +01:00
ptibogxiv
ae2b61d5ef
Fix stripe off_session set/unset 2021-01-23 18:49:11 +01:00
Laurent Destailleur
9b6b1e055c Fix trans 2021-01-23 12:20:18 +01:00
Laurent Destailleur
86e853f27d Look and feel v12 2021-01-23 12:18:07 +01:00
Laurent Destailleur
2acf2353a3 Fix bad link 2021-01-23 12:16:25 +01:00
Laurent Destailleur
5aba1f9ccd FIX missing socid into link to create event from project agenda tab 2021-01-22 01:07:45 +01:00
Laurent Destailleur
0e684abceb
Merge pull request #16039 from ATM-Consulting/fix/12.0_ticket_extrafields_of_type_date_are_not_saved
FIX 12.0 - ticket extrafields of type 'date' are not saved
2021-01-21 18:27:36 +01:00
BlackMirror
a55d23f363 [FM] FIX - ticket extrafields of type 'date' are not saved 2021-01-21 15:55:52 +01:00
Laurent Destailleur
12b3b72fe3
Merge pull request #16028 from ATM-Consulting/fix/12.0_pdf_strato_label_instead_of_ref
[FM] Fix 12.0 - duplicate label, probably mistaken for ref
2021-01-21 13:25:54 +01:00
BlackMirror
640cf50b7f [FM] Fix 12.0 - duplicate label, probably mistaken for ref 2021-01-20 15:20:50 +01:00
Laurent Destailleur
755de9fff2 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-19 16:19:46 +01:00
Laurent Destailleur
a0fe2a8abc
Merge pull request #16022 from frederic34/patch-1
Update .gitignore
2021-01-19 16:19:26 +01:00
Laurent Destailleur
560d401cff Code comment 2021-01-19 15:54:24 +01:00
Laurent Destailleur
a81b3a0d61 FIX #15946 2021-01-19 15:23:36 +01:00
Laurent Destailleur
0917b37bb9 FIX #15966 #15967 2021-01-19 15:20:35 +01:00
Frédéric FRANCE
b2d790b46a
Update .gitignore 2021-01-19 14:27:31 +01:00
Laurent Destailleur
d69ce5b917
Merge pull request #15952 from FHenry/12_fix_autofill_date_payment
12 fix autofill date payment
2021-01-18 19:20:33 +01:00
Florian HENRY
a8cdecf1b8 better fix 2021-01-18 19:17:23 +01:00
Florian HENRY
6b61545189 Merge branch '12.0' of github.com:Dolibarr/dolibarr into 12_fix_autofill_date_payment 2021-01-18 19:07:30 +01:00
Laurent Destailleur
2baeec1537
Merge pull request #15964 from FHenry/12.0
extrafeild selllist can be use with string fk
2021-01-18 18:53:01 +01:00
Laurent Destailleur
7195a6880f
Merge pull request #15992 from atm-kevin/FIX/GETPOST_param_card_presend
FIX : missing GETPOST parameters on card_presend.tpl.php
2021-01-18 18:49:28 +01:00
Laurent Destailleur
a109dd8948 Fix removed unexpected values in stats graph
Conflicts:
	htdocs/projet/graph_opportunities.inc.php
2021-01-18 13:55:11 +01:00
Florian HENRY
c4f8e81d5d better fix 2021-01-18 09:18:42 +01:00
Florian HENRY
1cd0f71c09 Merge branch '12.0' of github.com:Dolibarr/dolibarr into 12.0 2021-01-18 09:12:29 +01:00
Florian HENRY
33a0cf078c better fix 2021-01-18 09:12:23 +01:00
Laurent Destailleur
440f923b01
Merge pull request #15983 from zuiko/patch-2
Fix #15820 Bug: Unable to edit the pricing in Sales Order
2021-01-16 18:34:41 +01:00
Laurent Destailleur
8b9287055e
Update functions.lib.php 2021-01-16 18:34:25 +01:00
Laurent Destailleur
1d5182adf0
Merge pull request #15973 from frederic34/patch-10
missing default value
2021-01-16 17:27:33 +01:00
Laurent Destailleur
871691bf69 Fix missing popup 2021-01-16 16:34:49 +01:00
kevin
fb14f7c0b8 Modify GETPOST parameters to match with v12 2021-01-15 14:40:55 +01:00
Laurent Destailleur
60ab32c7fb
Merge pull request #15987 from ATM-Consulting/fix/ticket_filter_openall_does_not_include_read_tickets
FIX 12.0 - "openall" filter on ticket list does not include read tickets
2021-01-15 12:17:03 +01:00
Florian Mortgat
d3cbcedce3 FIX 12.0 (ticket) - the "openall" filter on the ticket list does not include tickets with status READ 2021-01-15 09:55:42 +01:00
zuiko
fd5948f716
Update functions.lib.php
Fix #15820
Fix #15820
function price2num
add underscore in the pattern in instruction 
$amount = preg_replace('/[a-zA-Z\/\\\*\(\)\<\>]/', '', $amount);
as this:
$amount = preg_replace('/[a-zA-Z\/\\\*\(\)\<\>\_\-]/', '', $amount);
in order to cover some constantes cases as 20% (TX_NORMAL) or 10% (TX_REDUIT) where underscore is used.
it seems that some constantes use also "-" so I added it in the pattern.
I don't know if other characters have to be added to this pattern.
2021-01-14 15:00:53 +01:00
zuiko
727751e0c1
Update functions.lib.php
Fix #15820
function price2num
add underscore in the pattern in instruction 
$amount = preg_replace('/[a-zA-Z\/\\\*\(\)\<\>]/', '', $amount);
as this:
$amount = preg_replace('/[a-zA-Z\/\\\*\(\)\<\>\_]/', '', $amount);
in order to cover some constantes cases as 20% (TX_NORMAL) or 10% (TX_REDUIT) where underscore is used.
I don't know if other characters have to be added to this pattern.
2021-01-14 14:44:32 +01:00
Florian HENRY
0fa7134bd1 better fix 2021-01-14 13:04:02 +01:00
Laurent Destailleur
ea47a55144 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-14 12:59:27 +01:00
Laurent Destailleur
1cf86931b3 Fix graph of opportunity when a status has been removed. 2021-01-14 12:58:50 +01:00
Frédéric FRANCE
11100b3017
missing default value 2021-01-13 15:16:43 +01:00
Florian HENRY
7e30812529 fix review 2021-01-12 22:01:53 +01:00
Laurent Destailleur
2b9ce6995f
Merge pull request #15951 from FHenry/12_fix_update_groupname
fix: update group name
2021-01-12 20:26:17 +01:00
Florian HENRY
33d7998a96 fix: date auto fill date paiement tax 2021-01-11 19:47:20 +01:00
Florian HENRY
e5ef455628 fix: date auto fill date paiement tax 2021-01-11 19:46:08 +01:00
Florian HENRY
77f213832e fix: update group name 2021-01-11 19:40:44 +01:00
Laurent Destailleur
080ffa6a51
Merge pull request #15947 from atm-lena/12.0_FIX_Translation_FR_Permission777
12.0 FIX Translation Permission777 FR
2021-01-11 17:10:29 +01:00
atm-lena
f17474a8de 12.0 FIX Translation Permission777 FR 2021-01-11 16:56:19 +01:00
Laurent Destailleur
788ef257a9 Fix GETPOST for qty 2021-01-11 13:02:05 +01:00
Laurent Destailleur
fe7be8362f Fix td balance 2021-01-11 12:03:28 +01:00
Laurent Destailleur
a3fd6f07e9 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-08 15:10:05 +01:00
Laurent Destailleur
243b227c33 Fix prerequisites 2021-01-08 15:09:49 +01:00
Laurent Destailleur
24c926b32f Update doc 2021-01-08 15:09:16 +01:00
Laurent Destailleur
8ca639b79f
Merge pull request #15916 from atm-maxime/fix_commonfieldadd_type
Fix date and datetime type in commonfield_add.tpl
2021-01-07 10:28:10 +01:00
Maxime Kohlhaas
1b7d194e18 Finish fix on add form values 2021-01-07 09:03:25 +01:00
Laurent Destailleur
1aa7e4adeb Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-06 21:32:46 +01:00
Laurent Destailleur
0dc182553e
Merge pull request #15896 from atm-lena/FIX/issue_14197
FIX balance starting and ending fiscal month #14197
2021-01-06 21:32:02 +01:00
Laurent Destailleur
2a31ca969f FIX #15388 #15891 2021-01-06 21:29:58 +01:00
Laurent Destailleur
8918299364
Update commonfields_add.tpl.php 2021-01-06 21:24:37 +01:00
Maxime Kohlhaas
42e45d4a7a Fix date and datetime type in commonfield_add.tpl 2021-01-06 21:14:40 +01:00
Laurent Destailleur
93323f6d61
Merge pull request #15889 from atm-quentin/FIX/issue_15516
FIX wrong name for search status param issue #15516
2021-01-06 20:35:52 +01:00
Laurent Destailleur
8f1617884a
Merge pull request #15888 from atm-quentin/FIX/issue_15659
FIX issue 15659 : Missing test if supplier conf is enabled
2021-01-06 20:35:34 +01:00
Laurent Destailleur
679948e207
Merge pull request #15893 from atm-lena/FIX_issue_15629
FIX #15629
2021-01-06 20:34:31 +01:00
Laurent Destailleur
654cf2d990 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/core/lib/functions.lib.php
2021-01-06 20:27:46 +01:00
Laurent Destailleur
9e50a06f2b
Merge pull request #15894 from atm-john/11.0_fix_issue_14833
Fix #14833 A security mecanism generates data loss
2021-01-06 20:26:19 +01:00
Laurent Destailleur
a955df21bf
Merge pull request #15905 from atm-quentin/FIX/issue_14501
FIX useless tracking number displayed on pdf if empty issue #14501
2021-01-06 20:22:43 +01:00
Laurent Destailleur
170814c718 Fix missing rollback 2021-01-06 20:21:22 +01:00
Laurent Destailleur
7f21332533 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2021-01-06 20:12:17 +01:00
Laurent Destailleur
17306bc715 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/core/boxes/box_shipments.php
2021-01-06 20:12:09 +01:00
Laurent Destailleur
d3bc6aadec
Merge pull request #15902 from atm-john/11.0_fix_box_issue_15465
FIX #15465 External user sees last 5 shipments to other customers in the dashboard
2021-01-06 19:56:57 +01:00
Laurent Destailleur
7372a18283
Update box_shipments.php 2021-01-06 19:56:49 +01:00
Laurent Destailleur
33b138b5ba
Merge pull request #15904 from atm-jpb/12.0_Fix
Fix add ticket on elementList
2021-01-06 19:48:10 +01:00
Laurent Destailleur
99066eaf5c
Merge pull request #15912 from atm-jpb/12.0_fix_cat_product_list
FIX : add categories params  on llxHeader filter
2021-01-06 19:38:57 +01:00
Laurent Destailleur
4f2c6e2901
Merge pull request #15911 from atm-kevin/Fix_create_contact_from_thirdparty_from_member
Fix #15829
2021-01-06 19:33:25 +01:00
Laurent Destailleur
fead1b7e86
Merge pull request #15907 from atm-kevin/Fix_multicurrency_supplier_invoice_puht_devise
Fix #14353
2021-01-06 19:32:53 +01:00
Laurent Destailleur
35d74035be
Merge pull request #15913 from atm-john/fix/12.0_bom_unit
FIX bom line unit display #13831
2021-01-06 19:31:59 +01:00
jpb
142800f951 Merge branch '12.0_fix_cat_product_list' of github.com:atm-jpb/dolibarr into 12.0_fix_cat_product_list 2021-01-06 16:06:42 +01:00
jpb
2be2cdaadf fix style errors 2021-01-06 16:06:03 +01:00
ATM john
cf324f75d7 Fix bom line unit display #13831 2021-01-06 16:01:19 +01:00
stickler-ci
f9ae8acbc7 Fixing style errors. 2021-01-06 14:47:54 +00:00
jpb
99b977a08e add categories params on llxHeader filter 2021-01-06 15:38:30 +01:00
kevin
5164a96aa0 Fix #15829 2021-01-06 15:35:33 +01:00
kevin
e8ba4de832 Fix #14353 2021-01-06 14:46:56 +01:00
stickler-ci
ca557cfacd Fixing style errors. 2021-01-06 13:22:35 +00:00
quentin
e44b14364a FIX useless tracking number displayed on pdf if empty 2021-01-06 14:17:06 +01:00
jpb
19ee163f31 Fix add ticket on elementList 2021-01-06 13:54:51 +01:00
ATM john
50b5226d10 FIX #15465 External user sees last 5 shipments to other customers in the dashboard 2021-01-06 12:40:38 +01:00
atm-lena
4b9bb824d0 FIX balance starting and ending fiscal month #14197 2021-01-06 11:16:51 +01:00
ATM john
92a4314779 Fix security mecanism generating data loss 2021-01-06 10:45:54 +01:00
atm-lena
6f15683709 FIX create ticket : thirdparty/contact notification #15629 2021-01-06 10:42:48 +01:00
quentin
2f932330d3 FIX wrong name for search status param 2021-01-06 10:10:39 +01:00
quentin
7161ca9e70 FIX issue 15659 : Missing test if conf is enabled 2021-01-06 09:54:02 +01:00
Laurent Destailleur
58e33c59f4 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/product/list.php
2021-01-05 19:07:53 +01:00
Laurent Destailleur
5709216427
Merge pull request #15881 from OPEN-DSI/v11-fix-product-list-vat-rate-show-right
FIX right to show VAT rate in product list
2021-01-05 18:57:06 +01:00
lvessiller
ca6899c138 FIX right to show VAT rate in product list 2021-01-05 16:11:46 +01:00
Laurent Destailleur
1960c712df
Merge pull request #15866 from atm-maxime/fix_contactelement
Fix dict contact type element list
2021-01-04 12:02:57 +01:00
Laurent Destailleur
bb22f2ccaf
Update admin.lib.php 2021-01-04 12:02:41 +01:00
Juanjo Menent
d892d8c3c7 FIX: Bad dates filtering in the ticket list causes sql error 2021-01-04 10:59:45 +01:00
Maxime Kohlhaas
e190b010d3 Fix dict contact type element list 2021-01-03 16:05:04 +01:00
Laurent Destailleur
8ad5dc81de GETPOST 2021-01-03 15:13:29 +01:00
Laurent Destailleur
f462f68056 Code comment 2021-01-03 15:10:33 +01:00
Laurent Destailleur
fd4dab495f FIX Bad cleaning of VAT rate when numbers are into code 2021-01-02 16:51:34 +01:00
Laurent Destailleur
d46eb08083 More log and use id to refresh/reload an invoice. 2021-01-02 15:36:19 +01:00
Laurent Destailleur
a8d15fafd2 Fix missing span 2021-01-02 14:17:54 +01:00
Laurent Destailleur
65edc377c3 FIX Visible date of payment 2020-12-30 22:53:21 +01:00
Laurent Destailleur
40d19e6c36 Fix tooltip on timezone 2020-12-30 22:01:26 +01:00
Laurent Destailleur
79da047802 FIX Dates of sales start in TakePOS
Conflicts:
	htdocs/langs/en_US/cashdesk.lang
2020-12-30 21:46:40 +01:00
Laurent Destailleur
1ec763fc14 FIX When creating a new POS sell, the creation date must be modified. 2020-12-30 21:22:54 +01:00
Laurent Destailleur
c6c697cb43
Merge pull request #15835 from aspangaro/12p10
FIX: #15751 Miscellaneous payment type change to 0 after updating subledger account
2020-12-30 12:42:57 +01:00
Laurent Destailleur
9e04217e35
Merge pull request #15802 from aspangaro/12p9
FIX: Accountancy - Retire entire opening balance feature
2020-12-30 11:21:34 +01:00
Alexandre SPANGARO
a336e45098 FIX: #15751 Miscellaneous payment type change to 0 after updating subledger 2020-12-30 08:11:20 +01:00
Alexandre SPANGARO
0e2b7d8b3c Remove typo 2020-12-30 07:23:26 +01:00
Laurent Destailleur
c3326a0963 FIX Creation of thirdparty when setup is empty 2020-12-29 04:30:37 +01:00
Alexandre SPANGARO
49a1268ba1 Merge branch '12.0' into 12p9 2020-12-28 03:12:57 +01:00
Alexandre SPANGARO
26791714ce Fix : Introduce constant ACCOUNTANCY_SHOW_OPENING_BALANCE 2020-12-28 03:07:33 +01:00
Laurent Destailleur
d2af03856c
Merge pull request #15808 from FHenry/12.0
fix: colspan balance accountanty
2020-12-27 13:56:07 +01:00
Laurent Destailleur
3abceadb86 Add info 2020-12-24 13:02:45 +01:00
Laurent Destailleur
739695c442 Fix delay to wait between email for emailing refused float. 2020-12-24 12:49:17 +01:00
Laurent Destailleur
360a85cbbc FIX add autofix of count of email target when data is corrupted 2020-12-24 12:32:34 +01:00
Florian HENRY
60d8fb4719 fic porject mass action right 2020-12-24 00:48:48 +01:00
Florian HENRY
7d1d588225 fix service right problem for mass action 2020-12-23 23:48:45 +01:00
Laurent Destailleur
8658f903fa FIX Must delete extrafields before main table on product deletion. 2020-12-23 15:00:25 +01:00
Florian HENRY
77c335c5f3 fix colspan balance accountanty 2020-12-23 09:19:56 +01:00
Alexandre SPANGARO
f273273129 FIX: Accountancy - Retire entire opening balance feature 2020-12-22 06:57:55 +01:00
Laurent Destailleur
33f8c53cca Fix var_dump 2020-12-20 14:03:10 +01:00
Laurent Destailleur
8c87050703 FIX Check of customer/vendor code fails in some cases 2020-12-20 13:54:02 +01:00
Laurent Destailleur
ba86448bce Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-12-19 14:57:17 +01:00
Laurent Destailleur
31790e255c
Merge pull request #15756 from zuiko/patch-1
Update V12 fournisseurs.php to Fix #15755 Product: purchase price tab, supplier price table with list of products not "responsive"
2020-12-19 14:56:16 +01:00
Laurent Destailleur
a61c07a205
Merge pull request #15787 from ptibogxiv/patch-399
FIX php alert sms.php
2020-12-19 14:34:40 +01:00
ptibogxiv
22b2247442
Update sms.php 2020-12-19 13:41:49 +01:00
Laurent Destailleur
f10c69680c Ajax combo at a better place (after select) 2020-12-17 21:42:10 +01:00
Laurent Destailleur
c97fcaec87 Better fix select2 bug https://github.com/select2/select2/issues/5832 2020-12-17 21:41:39 +01:00
Laurent Destailleur
b5db5f7474 Better responsive 2020-12-17 21:11:44 +01:00
Laurent Destailleur
f79dec80e6 Fix phpcs 2020-12-17 16:45:56 +01:00
Laurent Destailleur
73dfa7d44a Try a better fix for #15770 2020-12-17 14:37:02 +01:00
Laurent Destailleur
768e143188 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-12-17 14:10:57 +01:00
Laurent Destailleur
b04cc22350 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/admin/prelevement.php
2020-12-17 14:10:45 +01:00
Laurent Destailleur
f0d787debb Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-12-17 14:07:24 +01:00
Laurent Destailleur
6bbc25e8c3
Merge pull request #15775 from Haldarys/10.0-fix-prelevement
Fix PRELEVEMENT_ADDDAYS check
2020-12-17 13:53:44 +01:00
Laurent Destailleur
27542ed8ed
Update prelevement.php 2020-12-17 13:53:09 +01:00
Laurent Destailleur
36d6b472ce
Update prelevement.php 2020-12-17 13:52:03 +01:00
Haldarys
10ac74162e Fix PRELEVEMENT_ADDDAYS check
If we used a positive value in PRELEVEMENT_ADDDAYS it couldn't submit the changes to database
2020-12-17 10:19:21 +01:00
Laurent Destailleur
1c32f44814
Merge pull request #15768 from atm-lena/12.0_FIX_SituationFactureOut_Status
FIX Invoice Situation Out : status condition
2020-12-16 15:19:57 +01:00
atm-lena
cb2c1f3ece FIX Facture Situation Out : status condition 2020-12-16 10:54:32 +01:00
Laurent Destailleur
17bd362d3c
Merge pull request #15760 from FHenry/fix_duplicate_customersupliercode
Fix duplicate customersupliercode
2020-12-16 00:24:16 +01:00
stickler-ci
9ca2e98a66 Fixing style errors. 2020-12-15 21:12:52 +00:00
Florian HENRY
b80bd8d1f8 FIX : dupliacete customer or supplier code must be error dipslayed with new code proposed 2020-12-15 22:03:15 +01:00
Florian HENRY
7a93c11ae0 FIX : dupliacete customer or supplier code must be error dipslayed with new code proposed 2020-12-15 22:01:33 +01:00
zuiko
943f1022c0
Update fournisseurs.php
Product: purchase price tab, the supplier price table with its list of products is not "responsive", as a result, the right-clickable areas, including the "Add purchase price" button, disappear to the right of the screens that are not full HD which forces the user to drag his window with the mouse.
The solution is to change the CSS class of the table to adopt the CSS class of the equivalent table of the selling price tab, which is "responsive" to it.
We therefore replace :
print '<table class="centpercent list">';
by :
print '<table class="noborder centpercent">';

Knowing that the class is used in 24 files, there might be other places where this class poses the same ergonomic problem. I don't know enough Dolibarr to generalize the correction ...
2020-12-15 09:26:27 +01:00
Laurent Destailleur
5f9b53004b Fix warning 2020-12-14 17:40:40 +01:00
Laurent Destailleur
56c32e3c81 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-12-13 15:07:33 +01:00
Laurent Destailleur
4f79fdb4ab Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-12-13 15:07:25 +01:00
Laurent Destailleur
7886a6e838 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-12-13 15:06:54 +01:00
Laurent Destailleur
04c233c229
Merge pull request #15747 from aspangaro/10_p57
FIX: Export FEC - Force Carriage Return Line Feed
2020-12-13 15:06:19 +01:00
Alexandre SPANGARO
35b3d4f40a FIX: Export FEC - Force Carriage Return Line Feed 2020-12-13 14:11:04 +01:00
Laurent Destailleur
ac34fce015
Merge pull request #15696 from StephaneLesage/12importexporticonslabels
Fix & sync import/export entity icons/labels translation
2020-12-13 12:50:30 +01:00
Juanjo Menent
4fc57d096e Fix #15556 2020-12-12 20:37:00 +01:00
Laurent Destailleur
57b3b3db3a Prepare 12.0.4 2020-12-12 19:18:45 +01:00
Laurent Destailleur
2592344601 Fix missing price2num 2020-12-12 17:27:27 +01:00
Laurent Destailleur
b3d49c4dce Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-12-11 15:54:31 +01:00
Laurent Destailleur
4fcd3fe493 Fix disallow -- string into filename for security purpose. Vulnerability
reported by Yılmaz Değirmenci
2020-12-11 15:12:42 +01:00
Laurent Destailleur
ad4a8eac52
Merge pull request #15725 from fmarcet/11.0
FIX: Bad rigths to send contract
2020-12-11 14:41:08 +01:00
Stephane Lesage
bcf4f65cc9 Fix & sync import/export entity icons/labels translation 2020-12-10 14:15:33 +01:00
Ferran Marcet
7360fcd03e FIX: Bad rigths to send contract 2020-12-10 13:11:55 +01:00
Laurent Destailleur
89854ea137 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-12-08 22:24:14 +01:00
Laurent Destailleur
75b8794d72 Fix column must be NULL 2020-12-08 22:23:24 +01:00
Laurent Destailleur
51128c1d55
Merge pull request #15692 from ATM-Consulting/FIX/12.0_regression_basic_html_tags_no_longer_allowed_in_product_label
FIX 12.0 - XSS protection too stringent -> replace 'alphanohtml' with 'restricthtml'
2020-12-08 22:09:27 +01:00
Laurent Destailleur
34e7943d09 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/fourn/class/paiementfourn.class.php
2020-12-08 18:14:56 +01:00
Laurent Destailleur
4e72543fde Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/accountancy/class/accountancyexport.class.php
	htdocs/fourn/class/paiementfourn.class.php
	htdocs/fourn/paiement/card.php
2020-12-08 18:11:39 +01:00
Laurent Destailleur
111d6aa621
Merge pull request #15695 from aspangaro/10_p57
FIX : Export FEC - Remove line at zero
2020-12-08 17:55:31 +01:00
Laurent Destailleur
996e01fe6a Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-12-08 17:52:01 +01:00
Laurent Destailleur
485fe0fc62 FIX Can receipt of a product that required lot after disabling stock and
lot module
2020-12-08 17:51:26 +01:00
Florian Mortgat
617c9f7ea9 FIX: enable HTML in product labels depending on conf MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML 2020-12-08 09:30:31 +01:00
Alexandre SPANGARO
7c77a0d84b FIX : Export FEC - Remove line at zero 2020-12-07 23:53:09 +01:00
Laurent Destailleur
ee9c938ea2
Merge pull request #15691 from fbosman/patch-4
Update product.class.php
2020-12-07 19:03:28 +01:00
Laurent Destailleur
669205af1c
Update product.class.php 2020-12-07 19:02:49 +01:00
Florian Mortgat
f871ade545 FIX 12.0 - the stringent XSS prodection provided by 'alphanohtml' causes problems with some clients who used basic tags (bold, italic, underline) in product labels. Using 'restricthtml' instead could be a good compromise. 2020-12-07 15:15:41 +01:00
Frans Bosman
7ad70c7c21
Update product.class.php
Added Hidden Option STOCK_DEFAULT_BATCH, in order to replace the default '000000' batchnumber for the existing stock  when batchnumbers are enabled for a product.
2020-12-07 14:33:44 +01:00
Laurent Destailleur
d1c66059cd Add missing tag order_ref and order_ref_customer on shipments for ODT
generation.

Conflicts:
	htdocs/core/class/commondocgenerator.class.php
2020-12-06 19:03:46 +01:00
Laurent Destailleur
12b15a3d90
Merge pull request #15634 from aspangaro/10_p57
FIX: Problem on supplier payment card
2020-12-04 22:05:06 +01:00
Laurent Destailleur
3770eef8dc Fix can import all categories 2020-12-04 19:51:14 +01:00
Laurent Destailleur
c1b6e58bbd Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-12-04 19:12:22 +01:00
Laurent Destailleur
49db52134b Fix for negative numbers 2020-12-04 18:19:51 +01:00
Laurent Destailleur
e0b737b622
Merge pull request #15650 from atm-lena/12.0_FIX_PriceToNum_ConvertNegativToPositiv
pricetonum() - preg-replace() delete "-" negativ number
2020-12-04 18:19:22 +01:00
Laurent Destailleur
c69821794e
Merge pull request #15651 from fappels/11_fix_volume_calculation
FIX product auto volume calculation
2020-12-04 18:17:38 +01:00
Laurent Destailleur
aeda250df4 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/install/mysql/data/llx_c_shipment_mode.sql
2020-12-04 18:14:57 +01:00
Laurent Destailleur
283d4742f4 Merge branch 'FHenry-12.0_fix_fourn_commande_round' into 12.0 2020-12-04 18:13:29 +01:00
Laurent Destailleur
bc7cb4a148
Merge pull request #15640 from ATM-Consulting/FIX/12.0_Opensurvey_filters_by_entity_but_always_sets_entity_to_1
FIX 12.0 - on survey creation, entity is always set to 1 ⇒ set it to $conf->entity
2020-12-04 18:11:24 +01:00
Laurent Destailleur
46bb49c490
Merge pull request #15638 from ptibogxiv/patch-396
Fix limit product in customer margins
2020-12-04 18:10:49 +01:00
Laurent Destailleur
628257d771
Merge pull request #15649 from atm-benoit/FIX_SUPPLIER_PROPOSAL
Fix supplier proposal
2020-12-04 18:06:08 +01:00
Francis Appels
223205cf9d Fix volume calcution, depends on surface not surface_units
surface_unit can be 0 for m2
2020-12-04 16:54:40 +01:00
atm-lena
d22646e6ae pricetonum() - preg-replace() delete "-" negativ number 2020-12-04 16:06:10 +01:00
Laurent Destailleur
2c9e490853
Merge pull request #15643 from atm-benoit/FIX_INSTALL_12_SHIP_MODE
FIX SHIP MODE install v12 bug insert
2020-12-04 15:58:44 +01:00
stickler-ci
ddf82f3e7a Fixing style errors. 2020-12-04 14:45:26 +00:00
atm-benoit
b9461322d9 FIX SUPPLIER PROPOSAL v12 bug add 2020-12-04 15:37:00 +01:00
atm-benoit
575bb7d420 FIX SHIP MODE install v12 bug insert 2020-12-04 14:20:25 +01:00
Francis Appels
5218550014 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-12-04 11:08:21 +01:00
Florian Mortgat
7685ed8295 FIX excess comma 2020-12-04 10:10:44 +01:00
Florian HENRY
94d57cd462 fix rounding 2020-12-04 10:03:06 +01:00
Florian Mortgat
c752bfe1a6 FIX 12.0 - set entity to $conf->entity (instead of 1 by default) when creating a survey; otherwise the survey cannot be listed from the entity it was created on unless it is the main entity 2020-12-04 10:02:39 +01:00
ptibogxiv
d712e1e6d4
Fix limit product in customer margins
Fix limit of 20 products in product list/search
2020-12-04 09:42:30 +01:00
Florian HENRY
7a5a6a14f0 fix At install insert shipment mode failed 2020-12-04 09:10:36 +01:00
Alexandre SPANGARO
0a24298385 FIX: Problem on supplier payment card 2020-12-04 02:57:40 +01:00
Laurent Destailleur
ac30348081 Prepare 12.0.4 2020-12-03 19:16:34 +01:00
Laurent Destailleur
df48704154 Fix label 2020-12-03 18:45:56 +01:00
Laurent Destailleur
8a7f7b3551 FIX Request on purchase orders in timeout even on very small databases 2020-12-03 18:38:18 +01:00
Laurent Destailleur
a1428c963b Fix phpcs 2020-12-03 16:53:26 +01:00
Laurent Destailleur
c8eaa4743c Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-12-03 16:35:56 +01:00
Laurent Destailleur
ac29db92cb FIX #15618 2020-12-03 16:35:42 +01:00
Laurent Destailleur
35766fb5bf
Merge pull request #15625 from atm-florianm/FIX/12.0_error_when_adding_lines_on_order
FIX 12.0 - error when displaying lines on order after adding a new line
2020-12-03 14:30:25 +01:00
Laurent Destailleur
068587fcee
Update card.php 2020-12-03 14:30:07 +01:00
Laurent Destailleur
af4f473c93 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/core/boxes/box_produits.php
2020-12-03 11:22:34 +01:00
Laurent Destailleur
0ad6ee209a Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-12-03 11:21:08 +01:00
Laurent Destailleur
b324425db8 code comment 2020-12-03 11:19:41 +01:00
Laurent Destailleur
0fd865d8af FIX Better error message with IMAP when connection fails 2020-12-03 11:16:02 +01:00
Florian Mortgat
17d5bb5cd4 FIX 12.0 - error when displaying lines on order after adding a line if both MAIN_MULTILANGS and MAIN_DISABLE_PDF_AUTOUPDATE are activated 2020-12-02 22:25:08 +01:00
Laurent Destailleur
589da1d4b9 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-12-02 19:40:19 +01:00
Laurent Destailleur
bc1dc1e9f0 FIX #15590 manually 2020-12-02 19:34:04 +01:00
Laurent Destailleur
8d64485705
Merge pull request #15623 from Dolibarr/revert-15607-12edit-extrafield-computed-multiline
Revert "Create/Edit extra-field with multi-line text area for computed value"
2020-12-02 18:56:06 +01:00
Laurent Destailleur
a2dca42965
Revert "Create/Edit extra-field with multi-line text area for computed value" 2020-12-02 18:55:55 +01:00
Laurent Destailleur
4918b41384
Merge pull request #15607 from StephaneLesage/12edit-extrafield-computed-multiline
Create/Edit extra-field with multi-line text area for computed value
2020-12-02 18:55:47 +01:00
Laurent Destailleur
662fe4c358
Merge pull request #15611 from StephaneLesage/12more_llx_c_shipment_mode.sql
More transporters in llx_c_shipment_mode.sql
2020-12-02 18:33:48 +01:00
Stephane Lesage
1c4876b417 more transporters in llx_c_shipment_mode.sql 2020-12-01 21:17:03 +01:00
Stephane Lesage
3caf65ce6f Create/Edit extra-field with multi-line text area for computed value 2020-12-01 19:30:09 +01:00
Francis Appels
5ec351911d Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-12-01 16:04:11 +01:00
Laurent Destailleur
fde7c4ffb3
Merge pull request #15575 from StephaneLesage/fix12-userlist-filter-by-gender
Fix Users list filter by gender
2020-11-30 15:48:06 +01:00
Laurent Destailleur
627d09d75e
Merge pull request #15580 from teleassist/teleassist-12.0Fix15374
FIX #15374 : "New" doesn't clear total amounts
2020-11-30 15:40:19 +01:00
Laurent Destailleur
7870a33fd3
Update invoice.php 2020-11-30 15:39:35 +01:00
stickler-ci
9ee37153f7 Fixing style errors. 2020-11-30 10:32:58 +00:00
teleassist
560194c3b9
FIX #15374 : "New" doesn't clear total amounts
Invoice's total amounts where not updated because of direct lines deleting in database.
2020-11-30 11:22:49 +01:00
Laurent Destailleur
4f762cf73d Fix label 2020-11-30 08:29:19 +01:00
Stephane Lesage
0046bfc53f Fix Users list filter by gender 2020-11-29 23:42:47 +01:00
Laurent Destailleur
58eaef37d2 Fix regression 2020-11-29 21:29:22 +01:00
Laurent Destailleur
d45fe6c17f FIx #15551 2020-11-29 20:39:39 +01:00
Laurent Destailleur
d3a2aa664f FIX #15572 2020-11-29 20:27:40 +01:00
Laurent Destailleur
df17c2f26a Removed dead code generating warning.
CSS
2020-11-28 16:48:32 +01:00
Laurent Destailleur
c6b2ee57ca Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	.travis.yml
2020-11-27 16:19:44 +01:00
Laurent Destailleur
5ed2bbb204 Fix error message 2020-11-27 16:13:27 +01:00
Laurent Destailleur
4a5cdd0092 Several fixes in export and repair tool 2020-11-27 15:27:35 +01:00
Laurent Destailleur
ac3c129735 Clean code 2020-11-27 14:24:15 +01:00
Laurent Destailleur
26f07992a9 Reduce travis load for v11 2020-11-27 00:27:52 +01:00
Laurent Destailleur
6de24e0c2e Reduce travis load for v12 2020-11-27 00:19:45 +01:00
Laurent Destailleur
4da4499569 FIX Param joinfiles not sanitized
Conflicts:
	htdocs/admin/mails_templates.php
2020-11-26 23:07:52 +01:00
Laurent Destailleur
b043442b91 Fix link and selection of status of purchase order. 2020-11-26 17:53:57 +01:00
Laurent Destailleur
22c2cfd9ec FIX warning for purchase order delivery late. 2020-11-26 16:57:39 +01:00
Laurent Destailleur
dfa161ca30 Fix property 2020-11-26 16:19:45 +01:00
Laurent Destailleur
3ccc9d3e57 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-26 15:29:57 +01:00
Laurent Destailleur
bd780a8c51 FIX Warning on late purchase order delivery 2020-11-26 15:29:18 +01:00
Laurent Destailleur
f91226a9f0
Merge pull request #15537 from maboelfotoh/maboelfotoh-fix-pr-13067
FIX #13067 including opening balance in calculation of displayed balance
2020-11-25 17:54:09 +01:00
Laurent Destailleur
168e35a035 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-25 17:29:09 +01:00
Laurent Destailleur
16e3baeff2 FIX filter on project list 2020-11-25 17:28:53 +01:00
Muhammad Aboelfotoh
551256b779 FIX #13067 including opening balance in calculation of displayed balance 2020-11-25 15:11:09 +00:00
Laurent Destailleur
c9371e9eb0
Merge pull request #15512 from fappels/12_fix_transfer_expline_extrafield
Fix issue #15506 tansfer line extrafield order  to expedition
2020-11-25 15:30:07 +01:00
Francis Appels
a734e1caa7 line is order line not exp line 2020-11-25 15:06:07 +01:00
Laurent Destailleur
3f1c00dcb2
Merge pull request #15517 from dumbbell/remove-PCG99-BASE-left-over-fields
Fix #15515: Getting errors when importing the "PCG99-BASE" accounts
2020-11-25 12:59:53 +01:00
Jean-Sébastien Pédron
9b1dbf8d2a
llx_accounting_account_fr.sql: Remove left over field data
In commit 86d9622360, the `pcg_subtype`
was removed from the inserted values.

In commit a85dfaf71e, values associated
with this field were removed. However, at least two lines in the
PCG99-BASE accounting accounts still had that field values.

This led to errors when importing the PCG99-BASE accounts. This patch
fixes the problem and the accounts can be imported successfully.
2020-11-24 22:19:21 +01:00
Laurent Destailleur
d17ecbeccd Fix #15438 2020-11-24 20:56:11 +01:00
Francis Appels
7eec1155a0 Fix issue #15506 tansfer line extrafield order to expedition 2020-11-24 18:58:37 +01:00
Laurent Destailleur
faa33f2d3c FIX #15501 2020-11-24 12:52:39 +01:00
Laurent Destailleur
817de18a5d Fix remove log 2020-11-24 12:25:32 +01:00
Laurent Destailleur
14ea3a1697 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-24 10:56:43 +01:00
Laurent Destailleur
53208e620e Use of . as thousand separator. Can use it for decimal if not 3 digits. 2020-11-24 10:56:05 +01:00
Laurent Destailleur
6042b8df4e
Merge pull request #15499 from frederic34/patch-8
fix status on tooltip in box last product
2020-11-24 09:05:46 +01:00
Frédéric FRANCE
69ea0ea791
Update box_produits.php 2020-11-23 23:44:15 +01:00
Frédéric FRANCE
c7d886c918
fix status on tooltip in box last product 2020-11-23 23:25:09 +01:00
Laurent Destailleur
890f7a0602
Merge pull request #15497 from atm-john/12.0_fix_thirdparty_propagate_extrafields_to
FIX  Dol print error : conf usage thirdparty propagate extrafields to
2020-11-23 21:43:03 +01:00
Laurent Destailleur
5822fcfbed FIX several warning with the barcode use in ODT templates 2020-11-23 21:38:45 +01:00
Laurent Destailleur
9cb5673c36 Fix remove var_dump 2020-11-23 19:46:24 +01:00
Laurent Destailleur
c5278197fb More phpunit test for price2num 2020-11-23 19:45:11 +01:00
Laurent Destailleur
e7dbc8407f FIX formating of prices with foreign languages 2020-11-23 19:08:26 +01:00
ATM john
fbc911aea1 Fix conf usage thirdparty propagate extrafields to 2020-11-23 16:40:31 +01:00
Laurent Destailleur
3c84962891
Merge pull request #15472 from atm-florianm/FIX_12.0_CRON_methods_cant_be_called_without_params
Fix 12.0 cron methods cant be called without params
2020-11-21 23:39:39 +01:00
Florian Mortgat
6c75997b27 FIX wrong tab 2020-11-20 19:15:15 +01:00
Florian Mortgat
f7228d96af FIX 12.0 - when the cronjob 'params' field is empty, the cron method is called with one empty string param instead of no params at all 2020-11-20 19:12:59 +01:00
Laurent Destailleur
823e399d8d
Merge pull request #15428 from atm-quentin/FIX/actioncomm_desc_cant_be_empty
FIX cant empty action comm desc
2020-11-18 12:47:37 +01:00
Laurent Destailleur
4ae121d870 FIX Can't create shipment for virtual product. Add
STOCK_EXCLUDE_VIRTUAL_PRODUCTS as a quick hack to solve this.
2020-11-16 19:43:45 +01:00
quentin
6ce006f853 FIX cant empty action comm desc 2020-11-16 15:46:16 +01:00
Laurent Destailleur
217aa9c420 Clean CI 2020-11-15 23:50:11 +01:00
Laurent Destailleur
8ac3d5f9bf Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-15 23:49:22 +01:00
Laurent Destailleur
7fdc63faa6 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-11-15 23:48:52 +01:00
Laurent Destailleur
556888d55c Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2020-11-15 23:48:18 +01:00
Laurent Destailleur
5e1cd459b1 Fix travis 2020-11-15 23:47:53 +01:00
Laurent Destailleur
b9192744cc Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-15 17:16:05 +01:00
Laurent Destailleur
30681f9179 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-15 17:15:56 +01:00
Laurent Destailleur
f101b3e43d
Merge pull request #15402 from BlueGarm/BlueGarm-Order-Partially-and-Delay
Add orders received partially and delay icons
2020-11-15 17:13:07 +01:00
Laurent Destailleur
dff5b13700
Merge pull request #15418 from atm-maxime/fix_ticket_list_filter
Fix #15377 ticket list filter on author
2020-11-15 17:01:47 +01:00
Maxime Kohlhaas
44c5988853 Fix #15377 ticket list filter on author 2020-11-15 10:42:15 +01:00
BlueGarm
2425cf82d3 Add Partially Received Order and Delay
Edit file to allow following order received partially and to upgrade lisibility of delayed orders
2020-11-14 13:25:02 +01:00
Mikaël MARTIN
0c37d31e04
Update box_supplier_orders_awaiting_reception.php 2020-11-14 13:01:36 +01:00
Laurent Destailleur
0764cb2abd Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-12 14:13:19 +01:00
Laurent Destailleur
777ae9af9b Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-12 14:12:13 +01:00
Laurent Destailleur
02158928cc FIX #15365 export of extrafields for user and resources 2020-11-12 14:11:59 +01:00
Laurent Destailleur
dd46ca9c3c
Merge pull request #15356 from FHenry/12_fix_php7.4_deprecated
fix deprecated warning php 7.4
2020-11-12 12:36:19 +01:00
Laurent Destailleur
2907df8253
Merge pull request #15364 from frederic34/patch-15
Fix missing getpost for scandir odt path
2020-11-12 12:33:59 +01:00
Frédéric FRANCE
ad05451427
Fix missing getpost for scandir odt path 2020-11-12 11:23:03 +01:00
Florian HENRY
b16af0a7c3 fix deprecated warning php 7.4 2020-11-11 15:43:36 +01:00
Laurent Destailleur
2db08c8e0d
Merge pull request #15341 from atm-quentin/FIX/HeightForTotWhenTooMuchPayment
FIX : handling $heightforinfotot when he's superior to a page height
2020-11-10 14:38:39 +01:00
Laurent Destailleur
73df033000 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/accountancy/journal/bankjournal.php
	htdocs/core/boxes/box_birthdays.php
2020-11-10 11:05:53 +01:00
quentin
fb27c98f9c FIX : handling $heightforinfotot when he's superior to a page height 2020-11-10 09:40:45 +01:00
Laurent Destailleur
8458025e1d Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-11-09 19:47:33 +01:00
Laurent Destailleur
4a5c7d299f Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/accountancy/class/accountancyexport.class.php
2020-11-09 19:47:25 +01:00
Laurent Destailleur
59abed9153
Merge pull request #15337 from ATM-Consulting/FIX_12.0_remove_set_thirdparty_action_on_invoice
Following PR#15336: it should not be possible to modify the third par…
2020-11-09 19:08:14 +01:00
Laurent Destailleur
18d4840f85
Merge pull request #15334 from aspangaro/10_p57
FIX: Accountancy - Some ajustments on length of the account (general & auxiliary)
2020-11-09 19:02:35 +01:00
Laurent Destailleur
c529a92b92
Merge pull request #15333 from atm-gauthier/11.0_fix_disabled_sales_representative
FIX : disabled users must not be available in sales representative list on societe edit mode
2020-11-09 19:02:01 +01:00
Florian Mortgat
bf27c56fa7 Following PR#15336: it should not be possible to modify the third party of an invoice 2020-11-09 17:09:06 +01:00
Alexandre SPANGARO
0a078da8e4 FIX: Accountancy - Some ajustments on length of the account 2020-11-09 14:59:29 +01:00
Alexandre SPANGARO
617c930574 FIX: Accountancy - Some ajustments on length of the account (general & auxiliary) 2020-11-09 14:13:09 +01:00
Got2be
2f11f4e104 FIX : disabled users must not be available in sales representative list on societe edit mode 2020-11-09 11:22:07 +01:00
Laurent Destailleur
a017943083
Merge pull request #15321 from atm-lena/11.0_FIX_BoxBirthdayAndSocCommercial_UserStatus
FIX - Don't display inactive users in birthday box and company card
2020-11-06 18:43:56 +01:00
atm-lena
047785b273 FIX - Don't display inactive users in birthday box and soc card 2020-11-06 11:58:36 +01:00
Laurent Destailleur
4689d42afd FIX #15303 2020-11-05 14:10:46 +01:00
Laurent Destailleur
6080e5335f Minor fix 2020-11-05 12:56:20 +01:00
Laurent Destailleur
9380ea4bc5 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-05 09:43:38 +01:00
Laurent Destailleur
a5328f4230 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-05 09:43:28 +01:00
Laurent Destailleur
6bb598498e Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2020-11-05 09:42:51 +01:00
Laurent Destailleur
4b7c8a0d1d
Merge pull request #15291 from prietojc/12.0_patch-1
FIX force payment mode to withdraw
2020-11-04 20:36:29 +01:00
Laurent Destailleur
e505586926
Merge pull request #15280 from prietojc/12.0
Fix computed import
2020-11-04 18:49:17 +01:00
jcp
1f483d7c28 Fix force payment mode to create withdrawal 2020-11-04 11:43:03 +01:00
jcp
3ce7a23c70 Revert "NEW massaction for BankTransfer"
This reverts commit a39ff26def.
2020-11-03 20:21:53 +01:00
jcp
a39ff26def NEW massaction for BankTransfer 2020-11-03 20:16:56 +01:00
jcp
bae05bbe7d Fix computed import 2020-11-03 18:43:03 +01:00
Laurent Destailleur
f25a6b2e67
Merge pull request #15213 from ATM-Consulting/fix/10.0_delete_action_from_redirect_url_when_reordering_lines
FIX - 10.0 - remove 'action' parameter from redirect URL when reordering lines
2020-11-02 09:41:00 +01:00
Florian Mortgat
400acf9f65 FIX - 10.0 - regex to remove 'action' parameter: taking feedback from PR#15213 into account 2020-11-02 08:26:36 +01:00
Laurent Destailleur
2cdbfa2048 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2020-11-01 17:45:22 +01:00
Laurent Destailleur
72160deef7 FIX #14979 2020-11-01 17:01:26 +01:00
Laurent Destailleur
ad922bfde6 FIX #15074 2020-11-01 16:08:09 +01:00
Laurent Destailleur
49ccf2a3cb Update doc 2020-11-01 15:55:51 +01:00
Laurent Destailleur
45f834cb15 FIX #15199 2020-11-01 15:20:33 +01:00
Laurent Destailleur
63a03cdad6 FIX #15208 2020-11-01 14:34:29 +01:00
Laurent Destailleur
d9ca9fe22d Fix clean of contract 2020-10-30 14:50:38 +01:00
Florian Mortgat
5e2962ef38 FIX - 10.0 - remove 'action' parameter from redirect URL when reordering lines on a document 2020-10-29 10:50:13 +01:00
Francis Appels
3e55699275 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-07-16 21:30:15 +02:00
kamel
5bae9db0a8 FIX: Fix detect distached product and set to received completely when the supplier order have services (support STOCK_SUPPORTS_SERVICES) 2020-06-02 17:29:55 +02:00
Francis Appels
02c67fe2fa Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-05-21 16:49:08 +02:00
Francis Appels
1591b76050 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-05-19 16:36:09 +02:00
Francis Appels
a05ea83c5c Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-05-15 12:06:29 +02:00
Francis Appels
8d900baa82 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-05-12 10:02:39 +02:00
Francis Appels
e3b9012486 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-05-11 09:36:31 +02:00
Francis Appels
2749f1726c Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-04-22 15:51:26 +02:00
Francis Appels
a44ffbf40c Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-04-21 11:41:11 +02:00
Francis Appels
b8586d4950 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-04-13 11:30:00 +02:00
Francis Appels
db00366c5d Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-04-09 12:13:51 +02:00
Francis Appels
896891130d Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-04-06 11:43:06 +02:00
Francis Appels
5e4a412ec7 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-03-30 10:15:17 +02:00
Francis Appels
20fd489194 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-03-21 10:16:53 +01:00
Francis Appels
13c3a8d3b3 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-03-15 16:39:16 +01:00
Francis Appels
ee3226900c Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-03-12 20:39:35 +01:00
Francis Appels
1041a58cb9 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-03-07 16:23:04 +01:00
Francis Appels
df89db3ed6 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-03-03 14:26:17 +01:00
Francis Appels
6929efc417 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-03-01 16:07:40 +01:00
Francis Appels
0d4c784a0e Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-02-26 12:02:06 +01:00
Francis Appels
232f201007 Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-02-23 17:02:08 +01:00
Francis Appels
145caacbea Merge remote-tracking branch 'Dolibarr/11.0' into 11 2020-02-20 16:32:10 +01:00
4068 changed files with 233691 additions and 273254 deletions

View File

@ -56,7 +56,7 @@ You can add it to your git configuration using:
git config --local commit.template .gitmessage
```
where
where
#### Keyword
In uppercase if you want to have the log comment appears into the generated ChangeLog file.
@ -101,7 +101,7 @@ Long description (Can span accross multiple lines).
</pre>
### Pull Requests
Pull Request (PR) process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules to know and
Pull Request (PR) process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules to know and
a process to follow to optimize the chance to have PRs merged efficiently...
* A PR must be atomic. It means it must contains the lower possible changes for 1 need (1 bug fix or 1 new feature) without breaking usability of code. If a PR can be split into several PRs, it often means your PR is not atomic.
@ -120,7 +120,7 @@ Once a PR has been submitted, you may need to wait for its integration. It is co
If the label of PR start with "Draft" or "WIP" (Work In Progress), it will not be analyzed for merging until you change the label of PR (but it can be analyzed for discussion).
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR.
@ -141,7 +141,7 @@ Translations done on transifex are available in the next major release.
Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
to retrieve all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.
to retreive all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.
### Resources

View File

@ -1,17 +0,0 @@
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: "Exakat analysis"
on:
schedule:
- cron: "0 20 * * *"
jobs:
exakat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Exakat
uses: docker://exakat/exakat-ga
with:
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/WrongNumberOfArguments,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Structures/MergeIfThen,Structures/ElseIfElseif,Structures/RepeatedPrint,Structures/UselessParenthesis,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UseConstant'
ignore_dirs: '/htdocs/includes,/htdocs/build,/htdocs/dev,/htdocs/doc,/htdocs/scripts,/htdocs/test'

View File

@ -14,11 +14,11 @@ jobs:
- uses: Dolibarr/stale@staleunstale
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).'
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).'
stale-label: 'Issue Stale (automatic label)'
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,hacktoberfest,hacktoberfest-accepted,good first issue,Bug Security (CVE),Analysis of PR in progress'
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,Hacktoberfest,good first issue,Bug Security (CVE),Analysis of PR in progres'
days-before-stale: 365
days-before-close: 10
days-before-close: 15
operations-per-run: 100
dry-run: false

16
.gitignore vendored
View File

@ -16,6 +16,7 @@ default.properties
.DS_Store
.idea
*.iml
*.orig
Thumbs.db
/dolibarr_genesis.mp4
# Log files
@ -36,21 +37,8 @@ htdocs/includes/jakub-onderka/
htdocs/includes/phpdocumentor/
htdocs/includes/phpspec/
htdocs/includes/phpunit/
htdocs/includes/php-parallel-lint/
htdocs/includes/sebastian/
htdocs/includes/squizlabs/
htdocs/includes/symfony/
htdocs/includes/webmozart/
htdocs/.well-known/apple-developer-merchantid-domain-association
# Node Modules
build/yarn-error.log
build/node_modules/
node_modules/
#yarn
yarn.lock
#package-lock
package-lock.json
doc/install.lock

View File

@ -17,10 +17,8 @@ filter:
- build/*
- dev/*
- doc/*
- documents/*
- htdocs/includes/*
- node_modules/*
- test/*
- htdocs/includes/*
paths:
- htdocs/*
- scripts/*

View File

@ -6,8 +6,6 @@
os: linux
dist: xenial
#dist: bionic
# Deprecated: The key sudo has no effect anymore.
#sudo: required
language: php
@ -33,53 +31,25 @@ addons:
# We need pgloader for import mysql database into pgsql
- pgloader
php:
- '5.6'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- nightly
env:
global:
# Set to true for very verbose output
- DEBUG=false
jobs:
# MariaDB overrides MySQL installation so it's not possible to test both yet
#- DB=mariadb
- DB=mysql
- DB=postgresql
# See https://docs.travis-ci.com/user/languages/php/#Apache-%2B-PHP
#- WS=apache
# See https://github.com/DracoBlue/travis-ci-nginx-php-fpm-test
#- WS=nginx
jobs:
fast_finish: true
allow_failures:
- php: nightly
# We exclude some combinations not usefull to save Travis CPU
exclude:
- php: '7.0'
env: DB=mysql
- php: '7.1'
env: DB=mysql
- php: '7.2'
env: DB=mysql
- php: '7.3'
env: DB=mysql
- php: '7.0'
env: DB=postgresql
- php: '7.1'
env: DB=postgresql
- php: '7.2'
env: DB=postgresql
- php: '7.3'
env: DB=postgresql
- php: nightly
env: DB=postgresql
include:
- if: type = push
php: '5.6'
env: DB=postgresql
- if: type = pull_request OR type = push
php: '7.4'
env: DB=mysql
- if: type = push AND branch = develop
php: nightly
env: DB=mysql
notifications:
email:
@ -112,26 +82,32 @@ install:
echo "Updating Composer"
rm $TRAVIS_BUILD_DIR/composer.json
rm $TRAVIS_BUILD_DIR/composer.lock
composer -V
composer self-update
# To have composer making parallel downloads
composer global require hirak/prestissimo
composer -n init
composer -n config vendor-dir htdocs/includes
composer -n config -g vendor-dir htdocs/includes
echo
- |
echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer - for $TRAVIS_PHP_VERSION"
echo "Installing Composer dependencies (PHP Unit, Parallel Lint & PHP CodeSniffer"
if [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then
composer -n require phpunit/phpunit ^4 \
jakub-onderka/php-parallel-lint ^0 \
jakub-onderka/php-console-highlighter ^0 \
squizlabs/php_codesniffer ^3
fi
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] \
[ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then
composer -n require phpunit/phpunit ^5 \
php-parallel-lint/php-parallel-lint ^1 \
php-parallel-lint/php-console-highlighter ^0 \
jakub-onderka/php-parallel-lint ^0 \
jakub-onderka/php-console-highlighter ^0 \
squizlabs/php_codesniffer ^3
fi
if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
composer -n require --ignore-platform-reqs phpunit/phpunit ^5 \
php-parallel-lint/php-parallel-lint ^1.2 \
php-parallel-lint/php-console-highlighter ^0 \
jakub-onderka/php-parallel-lint ^0 \
jakub-onderka/php-console-highlighter ^0 \
squizlabs/php_codesniffer ^3
fi
echo
@ -139,6 +115,9 @@ install:
- |
echo "Adding path of binaries tools installed by composer to the PATH"
export PATH="$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH"
echo $PATH
ls $TRAVIS_BUILD_DIR/vendor
ls $TRAVIS_BUILD_DIR/htdocs/includes/bin
echo
@ -165,15 +144,20 @@ before_script:
- |
echo "Versions information"
echo
# Check PHP
echo "PHP version"
php -i | head -
# Check PHP CodeSniffer installation
# Check Parallel-lint version
echo "Parallel-lint version"
which parallel-lint
parallel-lint -V
# Check PHP CodeSniffer version
echo "PHPCS version"
which phpcs
phpcs --version | head -
phpcs -i | head -
# Check PHPUnit installation
# Check PHPUnit version
echo "PHPUnit version"
which phpunit
phpunit --version | head -
@ -278,21 +262,18 @@ script:
# Ensure we catch errors
set -e
#parallel-lint --exclude htdocs/includes --blame .
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --blame .
parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/Shared --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/composer/autoload_static.php --blame .
set +e
echo
- |
echo "Checking coding style (excluding Pull Requests builds)"
echo "Checking coding style (excluding Pull Requests builds to not overload travis, excluding also some jobs to avoid duplicate tests)"
# Ensure we catch errors
set -e
# Exclusions are defined in the ruleset.xml file
#phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .; fi
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4" ] && [ "$DB" = "mysql" ]; then
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
fi
set +e
echo
@ -404,9 +385,6 @@ script:
php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log
php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log
php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log
php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log
php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log
php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log
# Enable modules not enabled into original dump
php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log

View File

@ -164,12 +164,6 @@ source_file = htdocs/langs/en_US/hrm.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.intracommreport]
file_filter = htdocs/langs/<lang>/intracommreport.lang
source_file = htdocs/langs/en_US/intracommreport.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.install]
file_filter = htdocs/langs/<lang>/install.lang
source_file = htdocs/langs/en_US/install.lang
@ -332,12 +326,6 @@ source_file = htdocs/langs/en_US/receptions.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.recruitment]
file_filter = htdocs/langs/<lang>/recruitment.lang
source_file = htdocs/langs/en_US/recruitment.lang
source_lang = en_US
type = MOZILLAPROPERTIES
[dolibarr.resource]
file_filter = htdocs/langs/<lang>/resource.lang
source_file = htdocs/langs/en_US/resource.lang

View File

@ -21,7 +21,7 @@ Mobiledetect 2.8.34 MIT License Yes
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
ParseDown 1.6 MIT License Yes Markdown parser
PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
@ -39,7 +39,7 @@ TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes
JS libraries:
Ace 1.4.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
ChartJS 2.9.3 MIT License Yes JS library for graph
jQuery 3.5.1 MIT License Yes JS library
jQuery 3.4.1 MIT License Yes JS library
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)

461
ChangeLog
View File

@ -3,246 +3,155 @@ English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 13.0.0 compared to 12.0.0 *****
For users:
NEW: Add module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files.
NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable.
NEW: Several security issues after a private bug bounty campaign.
NEW: #15065 Fix formatting
NEW: #15065 Put the product label in bold in the PDF templates if configured
NEW: Accountancy - Add chart of sub accounts
NEW: Accountancy - Add options to disable binding on sales, purchases & expense reports independently of the modules
NEW: Accountancy balance - Add a input to show subtotal by group
NEW: Accountancy - Move to real ledger, real journals, menu disposition
NEW: Accountancy - On transfers, select the periodicity by default
NEW: New currency rate editor.
NEW: Add 2 rules for emailcollector: Message send/not sent from Dolibarr
NEW: Add a counter of number of words of pages in website module
NEW: add alert before change thirdparty in takepos
NEW: Add a page to list Stock at a given date.
NEW: Add a start date to begin binding in accountancy
NEW: Add a stat page to list popularity of products on invoices
NEW: Add calendar selection for agenda view
NEW: add class for ticket edition (pdf or odt)
NEW: Add column payment term into list of supplier invoices.
NEW: Add column quantity in product margin page
NEW: Add column vat rate in page to define accounting account on product/service
NEW: Add common list function for available app/module page
NEW: add costprice in fields of products list
NEW: ADDED IMPORT TOOL FOR CUSTOMER ORDER, PO, PROPOSAL MODULE, SUPPLIER INVOICE
NEW: Added incoterms to substitution array
NEW: Add employee in expense report binding page
NEW: Add export for various payment
NEW: add extra fields labels and values in mail on create ticket
NEW: Add extrafields support on ECM module
NEW: Add filter rules "is answer" and "is not answer" in email collector
NEW: Add focus when editing on product/stock/product.php Close #14548
NEW: add formConfirm hook on product page
NEW: add free text on each terminal of cash desk
NEW: Add function dolButtonToOpenUrlInDialogPopup() to be able to open
NEW: Add global search for customer payments and vendor payments
NEW: Add global search for miscellaneous payments
NEW: Add helper function for table headers with numbers
NEW: add hooks on stats pages
NEW: Add link to edit property from search result of website pages
NEW: Add link to reset qty on supplier dispatch page
NEW: add MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER const to remove header in email collector
NEW: Add Manufacturing Orders into the automatic ECM
NEW: add margin info in invoice list
NEW: Add mass action to set category on a list of website pages.
NEW: Add mass deletion for events
NEW: Add __MEMBER_TYPE__ substitution key
NEW: Add message in error_log after detection of SQL or script injection
NEW: Add module Credit transfer SEPA to manage payment of supplier using
NEW: Add more filters on monthly statement list
NEW: Add option TAKEPOS_CAN_FORCE_BANK_ACCOUNT_DURING_PAYMENT
NEW: Add option to define a default warehouse at user level
NEW: Add option to include products without alert in replenish
NEW: add order by lastname and firstname by default in get sales representatives
NEW: Add param to not show links when output tags
NEW: Add PDF document templates for warehouses (list of stock)
NEW: Add property cssview when declaring fields of an object
NEW: Add prospect status managment for the contact with managment of custom icon
NEW: Add public note on products. This also partially fix the #14342
NEW: Add quick dropdown menu in top right menu (MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN)
NEW: add region in export companies and contacts
NEW: add rights on margin info on invoice list
NEW: Add search param for close date on order list
NEW: add send context for ticket
NEW: Add show preview for mail attachement on form mail
NEW: add state origin for product
NEW: add State/Province origin for products
NEW: Add the workflow interaction close intervention on closing ticket
NEW: Add third order printer to TakePOS
NEW: add tracking number in list and search_all items
NEW: add two hooks printFieldListFrom and printFieldSearchParam
NEW: Add __TYPE__ substitution key
NEW: Add validation of MX domain for emails
NEW: add vcard for aderent and user
NEW: add week number for month view in agenda
NEW: Algeria data (tva and forme_juridique)
NEW: Allow click on all header numbers on commerce area
NEW: Allow to reopen interventions (green button)
NEW: Allow zero quality on supplier/vendor order line
NEW: Appearance tab in TakePOS with more visual parameters
NEW: Better currency rate editor
NEW: Calculate the virtual stock in transverse mode ( not on getEntity('commande'), ... but on getEntity('stock') )
NEW: Can add event to log into blockedlog module with a constant.
NEW: Can build vendor invoice from vendor orders
NEW: Can change a product in line of recurring invoice or contract
NEW: Can change size of logo on PDF documents
NEW: Can change VAT rate of all lines of a draft object in one step.
NEW: Can define date range of validity of a login during creation
NEW: Can disable, from edit page, the whole web site
NEW: can edit and set sales representatives directly on thirdparty card
NEW: Can edit the list of sending email profiles.
NEW: Can enable/disable users in bulk actions
NEW: Can filter on accounting system ref in export of chart of account
NEW: Can filter on container type, language and tags in the list of pages
NEW: Can force the antivirus from conf file or autoprepend ini setup.
NEW: Can hide eatby, sellby dates with option PRODUCT_DISABLE_SELLBY and PRODUCT_DISABLE_EATBY
NEW: Can import proposals, sales orders, supplier invoices
NEW: can set a dedicated SMTP config for sending email from public ticket interface
NEW: Can set tags/categories to website pages.
NEW: Can set type of price without tax per default for new sale price creation
NEW: Can use desired stock of a given warehouse for replenishment
NEW: Can use THEME_DARKMODEENABLED=2 for a preview of theme in dark mode
NEW: change thirdparty with barcode scan in takepos
NEW: Common behavior for monthly leave list view
NEW: conf to allow show full arbo in warehouse getnomurl
NEW: convert all subscription in datetime
NEW: create thirdparty customer from TAKEPOS
NEW: Date shipment from order accepts hours
NEW: Declinaison price level compatibility
NEW: Delayed payment in TakePOS
NEW: Development of module Recruitment
NEW: display date range if exist in takepos
NEW: display resiliate status in takepos for member
NEW: display stat for BOM on "object referent"/linked Object product tab
NEW: edit and update a ticket
NEW: edit or delete dispatched lines
NEW: Email configuration - Allow auto signed certificat when smtp ssl activated
NEW: enable free emails input with select2
NEW: endpoint getContacts and Clean results
NEW: Events in agenda for contact
NEW: Field to link website page to an other object
NEW: Fill ECM src object fields in dol_add_file_process
NEW: filter on progress column in task list
NEW: filter product list by country and/or state/province
NEW: format tickets sent by mail in public interface
NEW: add juridical status for Algeria
NEW: form to add customer/supplier into categories
NEW: Framework is ready for CSRF token protection on explicit GET URLs.
NEW: get all child recursively
NEW: Get contacts list of a given order
NEW: helper functions for export with phpspreadsheet
NEW: hide closed contract lines
NEW: hide label in pdf for variants
NEW: Hook on propal card
NEW: If specific help page is available, we change color of icon
NEW: Include the tag editor of page as a popup into website editor
NEW: Introduce constant FACTUREFOURN_REUSE_NOTES_ON_CREATE_FROM
NEW: Introducing new modal boxes in TakePOS
NEW: Keep takepos terminal when login/logout
NEW: Link on balance to the ledger
NEW: MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER const in email collector
NEW: manage errors on update extra fields in ticket card
NEW: mass-actions for the event list view
NEW: Module Intracomm report
NEW: More filter for "View change logs"
NEW: multicurrency total in takepos
NEW: multiselect type and date to date filter
NEW: Nature of product is now a dictionay
NEW: new line template: hidden conf to fill service dates from the last service line
NEW: PDF model storm for delivery
NEW: possibilty to group payments by mode and show their subtotal
NEW: Print payment method and change in TakePOS
NEW: Priority and transparency from external calendar events
NEW: Products Import/Export 'default warehouse' and 'use batch number' fields
NEW: Purchase price table: Added filterable table columns
NEW: rate editor for multicurrency
NEW: ref_ext field for Commande lines, order lines, Attributes and Combinations, Invoice lines, payments, order lines
NEW: remove new lines in mail on add ticket message
NEW: restrict thirdparty to customer in takepos
NEW: Allow to edit "demand reason" field though API
NEW: Rule "email to" accept wildcard *
NEW: Save filter of the project homepage
NEW: Select-able columns on customer invoice paymnet list
NEW: Select-able columns on miscellaneous payments + more data columns
NEW: Select-able columns on social taxes list
NEW: Select-able columns on supplier invoice payment list
NEW: send context and remove new lines on create ticket
NEW: set entity when creating invoice on takepos
NEW: Show available stock in TakePOS
NEW: Show category filter on lists only when user have rights to read categories
NEW: Show header number and make it clickable in warehouse arean, payment area, shipment area
NEW: Show image of user in the combo select of users
NEW: Show label on batch card
NEW: Show line number on intervention card (via MAIN_VIEW_LINE_NUMBER)
NEW: show links for select and multi-select in category extra field
NEW: Show module and permission ids on user/group rights (only admin)
NEW: Show place from events on import calender
NEW: Show references in contract form on interventions
NEW: Show tags and status in search list of website pages
NEW: Show user on external calender events (when found)
NEW: subject title with company name instead of application title in ticket message
NEW: Support for Samba4 AD
NEW: TakePOS connector compatibility with RECEIPT PRINTERS module
NEW: TakePOS Gift Receipt
NEW: TakePOS Multicurrency compatibility
NEW: The global header of a website can also have dynamic content
NEW: Third-Party Import new fields: mother company,outstanding debt limit,bank account,incoterms
NEW: Thirdparty module : box on customer/supplier tab for invoice outsantding amount late
NEW: ticket classification on create from email collector
NEW: Ticket message notifications when edited from public interface
NEW: translate classification labels in ticket
NEW: triggers create, modify, delete
NEW: VAT for Algeria
NEW: Use preselect third-party from list on new card
NEW: Vat report - Invert constant to show by default zero vat in reports
NEW: website page fields selection
NEW: Weighing Scale compatibility with TakePOS connector
NEW: When creating a user from a member linked to a thirdparty, you can choose to create if as external or internal user
NEW: Add clone functionality on miscellaneous payment
For developers:
NEW: Can use dynamic code into the 'enabled' property of DAO fields
NEW: API Can update a payment
NEW: api get member by thirdparty
NEW: API get thirdparty by barcode
NEW: API get users by email / login
NEW: fetch contact by email with REST API
NEW: field ref_ext in llx_commandedet
NEW: fields ref_ext for Attributes and Combinations
NEW: get state by REST API
NEW: get state dictionnary by REST API
NEW: Improve Product API for variant products
NEW: Oauth SCOPE for Admin SDK
NEW: Retrieve discount from invoice from API
NEW: standardizes API thirdparties by email like other object
NEW: thirdparty REST API: endpoint to set price level
NEW: Use new category API for project list view
NEW: Triggers Attributes and Attributes values
NEW: Add hooks on newpayment page to allow external payment modules
WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The object "livraison" has been renamed into "delivery" (directory, class, keys, methods with livraison in name ...).
* All properties ->contactid have been renamed into ->contact_id
* All properties ->titre have been renamed into ->title
* Property $paiementid in API 'api_supplier_invoices.php' has been renamed into into $payment_mode_id
* Property 'num_paiement' has been renamed 'num_payment' everywhere for better code consistency.
* The deprecated subsitution key __SIGNATURE__ has been removed. Use __USER_SIGNATURE__ if you used the old syntax in your email templates.
* The hidden option HOLIDAY_MORE_PUBLIC_HOLIDAYS has been removed. Use instead the dictionary table if you need to define custom days of holiday.
* If you build a class that implement CommonObject to use the incoterm properties or methods (->fk_incoterm, ->label_incoterm, ->location_incoterm),
you must now also include declaration of the Trait 'CommonIncoterm' in your class. All incoterm functions were moved into this Trait.
* The GETPOST(..., 'alpha') has now the same behaviour than GETPOST(..., 'alphanohtml') so no html will be allowed. Use GETPOST(..., 'restricthtml') to accept HTML.
* If you have links in your code with '&action=add', '&action=update', '&action=delete' as a parameter, you must also add '&token='.newToken() as another parameter to avoid CSRF protection errors.
* The API addPayment for api_invoice has evolved to accept amount into a foreign currency. You must provide array(amount=>X,mutlicurrency_ammount=>Y) instead of simple amount.
* The method select_thirdparty(), deprecated since 3.8, into html.form.class.php has been removed.
* Depreciate all methods with name ->valide(). Use instead methods ->validate().
***** ChangeLog for 12.0.5 compared to 12.0.4 *****
FIX: before crediting a withdrawal receipt, check whether it has been credited already
FIX: mandatory extrafields of type sellist
FIX: when a mandatory extrafield of type sellist contains '0' it should be considered empty and trigger an error message upon insertion
FIX: when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized
FIX: "openall" filter on ticket list does not include read tickets
FIX: ticket - extrafields of type 'date' are not saved
FIX: ticket - the "openall" filter on the ticket list does not include tickets with status READ
FIX: #14290 #15900
FIX: #15388 #15891
FIX: #15465 External user sees last 5 shipments to other customers in the dashboard
FIX: #15629
FIX: #15751 Miscellaneous payment type change to 0 after updating subledger account
FIX: #15946
FIX: #15966 #15967
FIX: Accountancy - Fix some problems on CEGID export
FIX: Accountancy - label_operation is used instead of label_compte
FIX: Accountancy - Retire entire opening balance feature
FIX: add autofix of count of email target when data is corrupted
FIX: add categories params on llxHeader filter
FIX: Add critical price patch from 12 to 11.
FIX: Bad cleaning of VAT rate when numbers are into code
FIX: Bad dates filtering in the ticket list causes sql error
FIX: balance starting and ending fiscal month #14197
FIX: bom line unit display #13831
FIX: cash fence for takepos with multientity
FIX: Check of customer/vendor code fails in some cases
FIX: create ticket : thirdparty/contact notification #15629
FIX: Creation of thirdparty when setup is empty
FIX: Dates of sales start in TakePOS
FIX: dupliacete customer or supplier code must be error dipslayed with new code proposed
FIX: Export FEC - Force Carriage Return Line Feed
FIX: Facture Situation Out : status condition
FIX: Filter on date of next generation on template invoices
FIX: Fix detect dispatched product and set to received completely when the supplier order have services (support STOCK_SUPPORTS_SERVICES)
FIX: Invoice Situation Out : status condition
FIX: issue 15659 : Missing test if supplier conf is enabled
FIX: link to create event when task is in a project with a thirdparty
FIX: Localtax must be converted with price2num
FIX: manage price min for PRODUIT_CUSTOMER_PRICES
FIX: missing GETPOST parameters on card_presend.tpl.php
FIX: missing socid into link to create event from project agenda tab
FIX: Must delete extrafields before main table on product deletion.
FIX: (path) htdocs removed
FIX: php alert sms.php
FIX: right to show VAT rate in product list
FIX: select default mail template
FIX: Timeout during import
FIX: update order by api
FIX: useless tracking number displayed on pdf if empty issue #14501
FIX: Visible date of payment
FIX: warning when adding a line if $remise_percent is an empty string
FIX: When creating a new POS sell, the creation date must be modified.
FIX: wrong name for search status param issue #15516
***** ChangeLog for 12.0.4 compared to 12.0.3 *****
FIX: make formConfirm an addreplace-type hook
FIX: regex to remove 'action' parameter: taking feedback from PR#15213 into account
FIX: remove 'action' parameter from redirect URL when reordering lines on a document
FIX: error when displaying lines on order after adding a line if both MAIN_MULTILANGS and MAIN_DISABLE_PDF_AUTOUPDATE are activated
FIX: on survey creation, entity is always set to 1 ⇒ set it to $conf->entity
FIX: set entity to $conf->entity (instead of 1 by default) when creating a survey; otherwise the survey cannot be listed from the entity it was created on unless it is the main entity
FIX: the stringent XSS protection provided by 'alphanohtml' causes problems with some clients who used basic tags (bold, italic, underline) in product labels. Using 'restricthtml' instead could be a good compromise.
FIX: third party of object is not always fetched when initiating the e-mail presend action (e.g. from an order)
FIX: when the cronjob 'params' field is empty, the cron method is called with one empty string param instead of no params at all
FIX: XSS protection too stringent -> replace 'alphanohtml' with 'restricthtml'
FIX: #13067 including opening balance in calculation of displayed balance
FIX: #14326
FIX: #14649
FIX: #14901
FIX: #14927 Change ContratLigne property type to product_type
FIX: #14979
FIX: #15074
FIX: #15111 Fix special characters output in PDF
FIX: #15161 MO translation conflict
FIX: #15163
FIX: #15199
FIX: #15208
FIX: #15303
FIX: #15365 export of extrafields for user and resources
FIX: #15374 : "New" doesn't clear total amounts
FIX: #15501
FIX: #15572
FIX: #15590
FIX: #15618
FIX: supplier proposals as linked objects of events are not correctly fetched
FIX: when users create an event from a supplier proposal, the "linked objects" section says "Deleted"
FIX: Accountancy - Some ajustments on length of the account (general & auxiliary)
FIX: admin conf selected
FIX: also check if there is a method $object->fetch_thirdparty() before calling it
FIX: autofocus on first setup
FIX: Bad rigths to send contract
FIX: Better error message with IMAP when connection fails
FIX: Can create user but not update user with activedirectory
FIX: Can receipt of a product that required lot after disabling stock and
FIX: Can't create shipment for virtual product. Add
FIX: cant empty action comm desc
FIX: CA report by product/service : subcategory filter
FIX: Clean orphan records in llx_ecm_files into repair script.
FIX: default accountancy values and posted values
FIX: Deletion of expensereport + other generated object not complete.
FIX: disabled users must not be available in sales representative list on societe edit mode
FIX: Dol print error : conf usage thirdparty propagate extrafields to
FIX: Don't display inactive users in birthday box and company card
FIX: empty value is needed on filter list
FIX: enable HTML in product labels depending on conf MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML
FIX: error 500 on cash closure
FIX: excess comma
FIX: Export FEC - Remove line at zero
FIX: extrafield required error after submit
FIX: filter on project list
FIX: force payment mode to withdraw
FIX: formating of prices with foreign languages
FIX: handling $heightforinfotot when he's superior to a page height
FIX: if no PDF default model in admin for expense report, do not create a PDF
FIX: invoice payment terms edition: error management
FIX: list of fields in list of recurring invoices was empty
FIX: load default linked options for linked sellist extra fields
FIX: Loan - Return on list when you cancel create form or delete a loan
FIX: Missing lang trans
FIX: no empty value in required extrafield
FIX: Param joinfiles not sanitized
FIX: Payment by BankTransfer
FIX: pdf_getlinetotalwithtax must show total incl tax
FIX: Problem on supplier payment card
FIX: product auto volume calculation
FIX: product customer prices: missing triggers in CRUD class
FIX: Request on purchase orders in timeout even on very small databases
FIX: set paid on total discount of a product in cash desk
FIX: several warning with the barcode use in ODT templates
FIX: SHIP MODE install v12 bug insert
FIX: stripe for connect mode
FIX: subcat filter
FIX: supplier invoice: automatically calculate payment term when modifying payment condition
FIX: SUPPLIER PROPOSAL v12 bug add
FIX: table making extrafield input too small on advance target mailing
FIX: table making extrafield too small advtagertmailing
FIX: Unable to edit extrafields in expense report
FIX: update margins rates on object line edit
FIX: uses price2numjs
FIX: various payments: bad data handling for subledger account + useless db commit/rollback
FIX: virtual products: displayed value is by unit
FIX: virtual products: supplier discount was not applied in component list
FIX: warning for purchase order delivery late.
FIX: Warning on late purchase order delivery
FIX: WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING must not consider services while STOCK_SUPPORTS_SERVICES is empty
FIX: wrong tab
FIX: Yogosha report 4425 (backport)
FIX: Yogosha report 4434 (backport)
***** ChangeLog for 12.0.3 compared to 12.0.2 *****
FIX: 10.0 - when the mime file name is different from the filesystem name, the attachment name should be the mime filename
@ -600,29 +509,29 @@ Following changes may create regressions for some external modules, but were nec
* Default mode for GETPOST function is now 'alphanohtml' instead of 'none'. So check when you make POST or GET requests with
HTML content that you make a GETPOST('myparam', 'restricthtml') or GETPOST('myparam', 'none') if you really need posted content without sanitizing
the HTML code of content (in such a case, sanitize data later)
* Removed hidden constant MAIN_EXTRAFIELDS_IN_ONE_TD that was useless.
* Reference of object including a "/" are no more allowed. It is never used by default but to support setup that introduced it, the "/" will be replaced
by a "_" automatically when a reference (with a custom numbering mask that use it) is generated.
* Removed hidden constant MAIN_EXTRAFIELDS_IN_ONE_TD that was useless.
* Reference of object including a "/" are no more allowed. It is never used by default but to support setup that introduced it, the "/" will be replaced
by a "_" automatically when a reference (with a custom numbering mask that use it) is generated.
* Library jflot (replace with chartjs) was removed.
* Library geoip (replaced with geoip2) was removed.
* Library geoip (replaced with geoip2) was removed.
* Hidden constant COMMANDE_VALID_AFTER_CLOSE_PROPAL was renamed into ORDER_VALID_AFTER_CLOSE_PROPAL.
* Object field ref_int is deprecated and set to 'not used', method to fetch object by only ref_int is not supported anymore.
* UserGroup class has been refactored with new architecture. Triggers of class UserGroup are now USERGROUP_CREATE, USERGROUP_MODIFY, USERGROUP_DELETE
* A new way to navigate between pages in list is available. To use it (not mandatory), you must:
- replace line $page = GETPOST('page', 'int') with $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
- replace line $page = GETPOST('page', 'int') with $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
- remove input field in form '<input type="hidden" name="page" value="'.$page.'">';'
- add parameter $pagenavastextinput to value 1 when calling print_barre_liste()
WARNING FOR DOLIWAMP USERS ONLY:
Only people that installed Dolibarr using the all-in-one auto-installer for Windows called "DoliWAMP" are concerned by the following warnings:
* DoliWAMP auto-installer for Windows is no more available on 32 bits systems. Use standard package if you need to use such architecture.
* It is not possible to migrate from an installation done with the old DoliWAMP auto-installer for Windows by using this new one.
You must make a backup of your database, make a fresh installation using the new installer and reload your backup.
Don't forget that DoliWAMP is a good solution to make a quick test of Dolibarr on your local computer but is not recommended as a production
solution on a local desktop since a local desktop computer has often no backup and security policy, or not as good as on a server (when there is one).
DoliWAMP remains a solution for fast test or demo purposes. Prefer using standard packages for production.
Only people that installed Dolibarr using the all-in-one autoinstaller for Windows called "DoliWAMP" are concerned by the following warnings:
* DoliWAMP autoinstaller for Windows is not more available on 32bits systems. Use standard package if you need to use such architecture.
* It is not possible to migrate from an installation done with the old DoliWAMP autoinstaller for Windows by using this new one. You must make a backup
of your database, make a fresh installation using the new installer and reload.
* Don't forget that DoliWAMP is a good solution to make a quick test of Dolibarr on your local computer but was never recommanded as a production
solution on a local desktop since a desktop computer has not a backup and security policy as good as on a server (when there is one).
DoliWAMP remains a solution for fast test or demo purposes.
***** ChangeLog for 11.0.5 compared to 11.0.4 *****
@ -785,7 +694,7 @@ FIX: #13118
FIX: #13124
FIX: #13131
FIX: #13135
FIX: #13146
FIX: #13146
FIX: #13198
FIX: #13175
FIX: #13182
@ -852,7 +761,7 @@ FIX: Confusion between 'bank reconciled' and 'accounted'. Show both data.
FIX: Count of Stripe payment mode must take test/live into account
FIX: Creation of Stripe card from backoffice must return a clean message
FIX: CVE-201917223
FIX: CVE-201917223
FIX: CVE-201917223
FIX: CVE-2020-7994
FIX: CVE Need permission to be able to develop modules
FIX: #13053
@ -1052,7 +961,7 @@ NEW: #4301
For Developers or integrators:
NEW: Compatible with PHP 7.4
NEW: Compatible with PHP 7.4
NEW: Code for extrafields uses the new array $extrafields->attributes
NEW: Can set a filter on object linked in modulebuilder.
NEW: Can defined a position of numbering submodules for thirdparties
@ -1119,9 +1028,9 @@ Following changes may create regressions for some external modules, but were nec
* Removed function dol_micro_time. Use native PHP microtime instead.
* The trigger BON_PRELEVEMENT_CREATE has been renamed into DIRECT_DEBIT_ORDER_CREATE.
* The constant INVOICE_SHOW_POS_IN_EXPORT has been renamed into INVOICE_SHOW_POS.
* If your logo is no more visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible again.
* All properties 'libstatut', 'labelstatut', 'labelstatus' were renamed into 'labelStatus'.
* All properties 'labelstatusshort' and 'labelstatut_short' were renamed into 'labelStatusShort'.
* If your logo is no more visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible again.
* All properties 'libstatut', 'labelstatut', 'labelstatus' were renamed into 'labelStatus'.
* All properties 'labelstatusshort' and 'labelstatut_short' were renamed into 'labelStatusShort'.
* All properties 'type_libelle' were renamed into 'type_label'.
* Renamed property of thirdparty "statut_commercial" into "status_prospect_label"
* The jquery plugin/dependency multiselect has been removed. It was not used by Dolibarr core.
@ -1271,11 +1180,11 @@ FIX: wrong invoice id for fetchObjetctLinked
***** ChangeLog for 10.0.3 compared to 10.0.2 *****
IMPORTANT : This version fixes a serious bug in saving the units of weight, size, surface and volume on product card.
The unit were not saved correctly in database making calculation on shipments wrong.
The unit were not saved correctly in database making calculation on shipments wrong.
Update to this version must be done if you use them and have installed version 10.0.0, 10.0.1 or 10.0.2 and set some products after installing or upgrading to one of this version.
Once update is done you must then edit (manually) the product that has bad unit to set the correct unit to have features restored.
FIX: #11702
FIX: #11702
FIX: #11861 No consistent code to manage measuring units
FIX: #11942
FIX: #12026
@ -1337,7 +1246,7 @@ FIX: wrong test
FIX: XSS
FIX: Payment from POS ware not recorded.
FIX: Can validate invoice with amount including tax of zero for the case of having a final invoice with
VAT that includes a deposit without vat.
VAT that includes a deposit without vat.
***** ChangeLog for 10.0.2 compared to 10.0.1 *****
FIX: #10460 compatibility with MariaDB 10.4
@ -1440,14 +1349,14 @@ FIX: Wrong variable. Must be PROJECT_HIDE_UNSELECTABLES
***** ChangeLog for 10.0.1 compared to 10.0.0 *****
FIX: #10930
FIX: #10984
FIX: #10984
FIX: reposition on "Build backup" button
FIX: #11400
FIX: #11412
FIX: #11460
FIX: #11460
FIX: #11463
FIX: #11466
FIX: #11492
FIX: #11492
FIX: #11498
FIX: #11505
FIX: #11506
@ -1456,7 +1365,7 @@ FIX: #11509
FIX: #11537
FIX: #11543
FIX: #11553
FIX: #11576
FIX: #11576
FIX: #11584
FIX: #11590
FIX: accounting mode must be taken from global conf, because there's no way to choose a mode with interface
@ -1549,14 +1458,14 @@ FIX: wrong path sociales/index.php doesnt exist anymore
***** ChangeLog for 10.0.1 compared to 10.0.0 *****
FIX: #10930
FIX: #10984
FIX: #10984
FIX: reposition on "Build backup" button
FIX: #11400
FIX: #11412
FIX: #11460
FIX: #11460
FIX: #11463
FIX: #11466
FIX: #11492
FIX: #11492
FIX: #11498
FIX: #11505
FIX: #11506
@ -1565,7 +1474,7 @@ FIX: #11509
FIX: #11537
FIX: #11543
FIX: #11553
FIX: #11576
FIX: #11576
FIX: #11584
FIX: #11590
FIX: accounting mode must be taken from global conf, because there's no way to choose a mode with interface
@ -1734,7 +1643,7 @@ NEW: Manage account sell_intra & sell_export in page accoutancy admin default pr
NEW: Manage loan schedule.
NEW: Manage status of member types.
NEW: Mass action "create bills" for validated reception
NEW: Measuring unit are now defined into an editable dictionary. Add product size/unit into product import.
NEW: Measuring unit are now defined into an editable dictionary. Add product size/unit into product import.
NEW: Template pdf 'canelle_reception' displays linked reception lines.
NEW: Moral/physic status can be defined at member type level
NEW: Pagination into list of time spent.
@ -1797,7 +1706,7 @@ NEW: Enhance management of webhooks
NEW: Generation of doc by modulebuilder can include README and CHANGELOG
NEW: massfilesarea feature is possible for external modules
NEW: Show list of enabled modules in dol_print_error().
NEW: Simplification of CSS styles of default themes.
NEW: Simplification of CSS styles of default themes.
NEW: Clean code of a lot of deprecated code.
NEW: Add hidden option to set a search entry to the top
NEW: add hidden option DISPLAY_DISCOUNTED_SUPPLIER_PRICE
@ -1817,8 +1726,8 @@ Following changes may create regressions for some external modules, but were nec
* The PHP extension php-intl is not mandatory and must be installed to have new features working correctly.
* Method GetUrlTrackingStatus were renamed into getUrlTrackingStatus for consistency with naming rules.
* API getListOfCivility has been renamed into getListOfCivilities for consistency with naming rules.
* Deprecated function img_phone as been removed. You can use img_picto(..., 'call|call_out') instead.;
* Files for variables of themes were renamed from graph-color.php into theme_vars.inc.php to match naming
* Deprecated function img_phone as been removed. You can use img_picto(..., 'call|call_out') instead.;
* Files for variables of themes were renamed from graph-color.php into theme_vars.inc.php to match naming
convention of extension .inc.php for files to be included.
* All methods set_draft() were renamed into setDraft().
* Signatures of methods createFromClone() has been standardized. All methods requires the object User as first parameter.
@ -1830,7 +1739,7 @@ Following changes may create regressions for some external modules, but were nec
* Deprecated property ->fk_departement is now ->state_id everywhere.
* Removed the method 4 of GETPOST (to get $_COOKIE). It was not used and not recommanded to use in Dolibarr.
* Column llx_facture.facnumber change to llx_facture.ref
* Variable $dolibarr_main_cookie_cryptkey is no more created at install (it was not used by Dolibarr). A new variable
* Variable $dolibarr_main_cookie_cryptkey is no more created at install (it was not used by Dolibarr). A new variable
called $dolibarr_main_instance_unique_id is now generated at each installation. It will be used by some future features.
@ -3602,7 +3511,7 @@ Following changes may create regression for some external modules, but were nece
entities and to review completely the rights of the groups and the users.
* Use getEntity('xxx') instead getEntity('xxx', 1) and use getEntity('xxx', 0) instead getEntity('xxx')
* Some other change were done in the way we read permission of a user when module multicompany is enabled. You can
retrieve the old behavior by adding constant MULTICOMPANY_BACKWARD_COMPATIBILITY to 1.
retreive the old behavior by adding constant MULTICOMPANY_BACKWARD_COMPATIBILITY to 1.
* The hook formObjectOptions was not implemented correctly in previous version. Sometimes, you had to return output
content by doing a print into function, sometimes by returning content into "resprint". This has been fixed to follow
hook specifications so you must return output into "resprint".
@ -6348,7 +6257,7 @@ For users:
- Fix: [Bug #958] LocalTax2 for Spain fails on Suppliers
- Fix: [ bug #972 ] Auto completion contact field do not take account the min caract number before search
- Fix: [ bug #971 ] html.form.class.php select_contact with autocomplete do not exclude id from exclude array
- Fix: Expedition creation, can retrieve product from other expedition
- Fix: Expedition creation, can retreive product from other expedition
For translators:
- Update language files.

View File

@ -2,18 +2,14 @@
![Downloads per day](https://img.shields.io/sourceforge/dw/dolibarr.svg)
![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg?style=flat-square)](https://php.net/)
[![GitHub release](https://img.shields.io/github/v/release/Dolibarr/dolibarr)](https://github.com/Dolibarr/dolibarr)
Dolibarr ERP & CRM is a modern software package that helps 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 suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
It's an Open Source Software (written in PHP language) designed for small, medium or large companies, foundations and freelancers.
You can freely use, study, modify or distribute it according to its licence.
You can freely use, study, modify or distribute it according to its Free Software licence.
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
Dolibarr has a large community ready to help you, free forums and [oficially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
You can use it as a standalone application or as a web application to be able to access it from the Internet or a LAN.
![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_1920x1080.jpg)
@ -31,23 +27,19 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git
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](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_DoliWamp)
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian)
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp)
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
Releases can be downloaded from [official website](https://www.dolibarr.org/).
### Advanced setup
You can use a web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
On GNU/Linux, first check if your distribution has already packaged Dolibarr.
#### Generic install steps:
You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Versions).
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later):
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git):
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...)
@ -78,13 +70,13 @@ If you don't have time to install it yourself, you can try some commercial 'read
## UPGRADING
Dolibarr supports upgrading usually wihtout the need for any (commercial) support (depending on if you use any commercial extensions) and supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
- At first make a backup of your Dolibarr files & than [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr
- Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md).
- Overwrite all old files from 'dolibarr' directory with files provided into the new version's package.
- At first next access, Dolibarr will redirect you 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 in 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 be safely done multiple times by calling the `/install/index.php` page*
## WHAT'S NEW
@ -147,7 +139,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
- APIs
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
- Support a lot of country specific features:
- Spanish Tax RE and ISPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
@ -157,7 +149,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
- Compatible with European GDPR rules
- ...
- Flexible PDF & ODT generation for invoices, proposals, orders...
- PDF or ODT generation for invoice, proposals, orders...
- …
### System Environment / Requirements
@ -175,12 +167,12 @@ These are features that Dolibarr does **not** yet fully support:
- Tasks dependencies in projects
- Payroll module
- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
- No native embedded Webmail
- Dolibarr can't do coffee (yet)
## DOCUMENTATION
Administrator, user, developer and translator's documentations are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org).
## CONTRIBUTING
@ -190,7 +182,7 @@ This project exists thanks to all the people who contribute. [[Contribute](https
## CREDITS
Dolibarr is the work of many contributors over the years and uses some fine PHP libraries.
Dolibarr is the work of many contributors over the years and uses some fine libraries.
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.

View File

@ -1,115 +1,13 @@
# Security Policy
This file contains some policies about the security reports on Dolibarr ERP CRM project, one of the most popular Open Source ERP and CRM in the world.
## Supported Versions for security reports
| Version | Supported |
| --------- | ------------------ |
| <= 9.0.* | :x: |
| >= 10.0.* | :white_check_mark: |
## Supported Versions
| Version | Supported |
| -------- | ------------------ |
| <= 8.0.* | :x: |
| >= 9.0.* | :white_check_mark: |
## Reporting a Vulnerability
To report a vulnerability, please send an email to security@dolibarr.org
In most cases, after fixing the security, we make an answer by email to say the issue has been fixed.
## Hunting vulnerabilities on Dolibarr
We believe that future of software is online SaaS. This means software are more and more critical and no technology is perfect. Working with skilled security researchers is crucial in identifying weaknesses in our technology.
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery.
Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
We recommand to install Dolibarr ERP CRM on you own server (as most Open Source software, download and use is free: https://www.dolibarr.org/download) to get access on every side of application.
### User Agent
If you try to find bug on Dolibarr, we recommend to append to your user-agent header the following value: '-BugHunting-dolibarr'.
### Account access
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from https://www.dolibarr.org/download
## Eligibility and Responsible Disclosure
We are happy to thank everyone who submits valid reports which help us improve the security of Dolibarr however, only those that meet the following eligibility requirements may receive a monetary reward:
You must be the first reporter of a vulnerability.
The vulnerability must be a qualifying vulnerability (see below)
Any vulnerability found must be reported no later than 24 hours after discovery
You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary.
You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install softwate on your own platform.
You must not leak, manipulate, or destroy any user data.
You must not be a former or current employee of Dolibarr or one of its contractor.
Reports about vulnerabilities are examined by our security analysts.
Our analysis is always based on worst case exploitation of the vulnerability, as is the reward we pay.
No vulnerability disclosure, including partial is allowed for the moment.
## Scope for qualified vulnerabilities
ONLY vulnerabilities discovered, when the following setup on test platform is used, are accepted:
* $dolibarr_main_prod must be set to 1 into conf.php
* $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value)
* $dolibarr_main_force_https must be set to something else than 0.
* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 1 into backoffice menu Home - Setup - Other (this protection should be enabled soon by default)
* The module DebugBar must NOT be enabled (by default, this module is not enabled. This is a developer tool)
* The module ModuleBuilder must NOT be enabled (by default, this module is not enabled. This is a developer tool)
* ONLY security reports on modules provided by default and with the "stable" status are allowed (troubles into "experimental", "developement" or external modules are not accepted).
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
* The web server setup must be done so only the documents directory is in write mode. The root directory called htdocs must be readonly.
* CSRF attacks are accepted for all when using a POST URL, but are accepted only for creating or updating data resctricted to the admin user when using GET URL.
* Ability for a high level user to edit web site pages in the CMS by including javascript is an expected feature.
Scope is the web application (back office) and the APIs.
## Qualifying vulnerabilities for Bug bounty programs
* Remote code execution (RCE)
* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA)
* Code injections (HTML, JS, SQL, PHP, ...)
* Cross-Site Scripting (XSS)
* Cross-Site Requests Forgery (CSRF) with real security impact
* Open redirect
* Broken authentication & session management
* Insecure direct object references
* CORS with real security impact
* Horizontal and vertical privilege escalation
* "HTTP Host Header" XSS
* Software version disclosure (for non admin users only)
* Stack traces or path disclosure (for non admin users only)
## Non-qualifying vulnerabilities for Bug bounty programs, but qualified for reporting
* "Self" XSS
* SSL/TLS best practices
* Denial of Service attacks
* Clickjacking/UI redressing
* Physical or social engineering attempts or issues that require physical access to a victims computer/device
* Presence of autocomplete attribute on web forms
* Vulnerabilities affecting outdated browsers or platforms
* Logout and other instances of low-severity Cross-Site Request Forgery
* Missing cookie flags
* Missing security-related HTTP headers which do not lead directly to a vulnerability
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
* Reports on features flagged as "experimental" or "development"
* Software version or private IP disclosure when logged user is admin
* Stack traces or path disclosure when logged user is admin
* Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities".

View File

@ -19,34 +19,30 @@ Note: Prerequisites to build autoexe DoliWamp package:
> Launch "wine cmd" to check a drive Z: pointing to / exists.
> Install InnoSetup
For example by running isetup-5.3.9.exe (http://www.jrsoftware.org)
> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB
For example by running wampserver3.2.0_x64.exe (http://www.wampserver.com). See file build/exe/doliwamp.iss to know the doliwamp version currently setup.
> Install WampServer into "C:\Program Files\Wamp"
For example by running wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe (http://www.wampserver.com)
> Install WampServer addon to have versions: Mysql5.0.45
For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com)
> To build from Windows (running from makepack-dolibarr.pl script is however
recommanded), open file build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build.
> Add path to ISCC into PATH windows var:
Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH
> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded),
open file build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build.
- To build a theme package, launch the script
> perl makepack-dolibarrtheme.pl
- To build a package for a module, launch the script
> perl makepack-dolibarrmodule.pl
- To build developper documentation, launch the script
> perl dolibarr-doxygen-build.pl
Note:
The build directory and all its contents is absolutely not required to make Dolibarr working.
It is here only to build Dolibarr packages, and those generated packages will not contains this "build" directory.
The build directory and all its contents is absolutely not required to make
Dolibarr working. It is here only to build Dolibarr packages, and those
generated packages will not contains this "build" directory.
You can find in "build", following sub-directories:
@ -63,9 +59,6 @@ To build Mac OS package (not ready yet).
* doap:
To build Doap descriptor to promote/describe Dolibarr releases.
* docker:
To deploy Dolibarr with docker.
* doxygen:
Dir with config file to build doxygen documentation.
@ -73,12 +66,12 @@ Dir with config file to build doxygen documentation.
To build exe package for Windows that distribute Dolibarr sources or
to build the complete DoliWamp package.
* gource:
To build the video of history of git changes.
* launchpad:
Doc file to explain how to use launchpad.
* live:
Doc file to explain how to create a demo live CD.
* obs:
Doc file to explain how to push release onto OBS.
@ -97,8 +90,5 @@ To build Redhat, Opensuse or Mandriva package.
* tgz:
To build a tgz package.
* travis-ci:
Used by travis to make CI.
* zip:
To build a zip package.

View File

@ -232,7 +232,7 @@ $dolibarr_main_prod='0';
# Examples:
# $dolibarr_mailing_limit_sendbycli='0';
# dolibarr_main_distrib
# dolibarr_distrib
# A key to identify the distribution used for first installation
$dolibarr_main_distrib = 'debian';
$dolibarr_distrib = 'deb';

View File

@ -24,7 +24,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='444';
$force_install_distrib='debian';
// Value to overwrite path to use shared libraries/fonts instead of embedded one.
// If during install, we enable/disable declaration to use non embedded libraries, we must also check they are

View File

@ -1,63 +1,38 @@
FROM php:7.3-apache
FROM php:7.2-apache
ENV HOST_USER_ID 33
ENV PHP_INI_DATE_TIMEZONE 'UTC'
ENV PHP_INI_MEMORY_LIMIT 256M
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg62-turbo-dev \
libjpeg62-turbo \
libpng-dev \
libpng16-16 \
libldap2-dev \
libxml2-dev \
libzip-dev \
zlib1g-dev \
libicu-dev \
g++ \
default-mysql-client \
unzip \
curl \
apt-utils \
msmtp \
msmtp-mta \
mailutils \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install -j$(nproc) ldap && \
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev libzip-dev zlib1g-dev libicu-dev g++\
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
&& docker-php-ext-install gd \
&& docker-php-ext-install zip \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
&& docker-php-ext-install ldap \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install calendar \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& apt-get autoremove --purge -y libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++
RUN mkdir /var/documents
RUN chown www-data:www-data /var/documents
RUN chown www-data /var/documents
COPY docker-run.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-run.sh
RUN pecl install xdebug && docker-php-ext-enable xdebug
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.remote_autostart=1' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.remote_enable=1' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.default_enable=1' >> ${PHP_INI_DIR}/php.ini
#RUN echo 'xdebug.remote_host=docker.host' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.remote_port=9000' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.remote_connect_back=1' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.profiler_enable=0' >> ${PHP_INI_DIR}/php.ini
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
#RUN echo 'localhost docker.host' >> /etc/hosts
# set up sendmail config, to use maildev
RUN echo "account default" > /etc/msmtprc
RUN echo "auth off" >> /etc/msmtprc
RUN echo "port 25" >> /etc/msmtprc
RUN echo "host mail" >> /etc/msmtprc
RUN echo "from local@localdomain.com" >> /etc/msmtprc
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
RUN echo "localhost localhost.localdomain" >> /etc/hosts
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_host=docker.host' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini
RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini
RUN echo '172.17.0.1 docker.host' >> /etc/hosts
EXPOSE 80

View File

@ -1,8 +1,6 @@
# How to use it ?
The docker-compose.yml file is used to build and run Dolibarr in the current workspace.
This docker image intended for developpement usage.
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
Before build/run, define the variable HOST_USER_ID as following:
@ -16,7 +14,7 @@ And then, you can run :
docker-compose up
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
This will run 3 container Docker : Dolibarr, MariaDB and PhpMyAdmin.
The URL to go to the Dolibarr is :
@ -25,10 +23,6 @@ The URL to go to the Dolibarr is :
The URL to go to PhpMyAdmin is (login/password is root/root) :
http://0.0.0.0:8080
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
http://0.0.0.0:8081
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
Setup documents folder, during the installation process, to /var/documents
Setup the database connection during the installation process, please use mariad
b (name of the database container) as database host.

View File

@ -1,57 +1,25 @@
version: '3'
mariadb:
build: mariadb
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dolibarr
networks:
internal-pod:
internal: true
external-pod:
internal: false
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: mariadb
links:
- mariadb
ports:
- "8080:80"
services:
mariadb:
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: dolibarr
ports:
- "3306:3306"
networks:
- internal-pod
- external-pod
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment:
PMA_HOST: mariadb
depends_on:
- mariadb
ports:
- "8080:80"
networks:
- internal-pod
- external-pod
web:
build: .
environment:
HOST_USER_ID: $HOST_USER_ID
volumes:
- ../../htdocs:/var/www/html/
- ../../documents:/var/documents
ports:
- "80:80"
- "9000:9000"
depends_on:
- mariadb
- mail
networks:
- internal-pod
- external-pod
mail:
image: maildev/maildev
ports:
- "8081:80"
- "25:25"
networks:
- internal-pod
- external-pod
web:
build: .
environment:
HOST_USER_ID: $HOST_USER_ID
volumes:
- ../../htdocs:/var/www/html
links:
- mariadb
ports:
- "80:80"

View File

@ -1,21 +1,15 @@
#!/bin/bash
usermod -u ${HOST_USER_ID} www-data
groupmod -g ${HOST_USER_ID} www-data
usermod -u $HOST_USER_ID www-data
groupmod -g $HOST_USER_ID www-data
chgrp -hR www-data /var/www/html
chmod g+rwx /var/www/html/conf
if [ ! -d /var/documents ]; then
echo "[docker-run] => create volume directory /var/documents ..."
mkdir -p /var/documents
fi
echo "[docker-run] => Set Permission to www-data for /var/documents"
chown -R www-data:www-data /var/documents
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

View File

@ -5,7 +5,6 @@ It's a dedicated Dolibarr version for Windows newbies with no technical knowledg
This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready
to be distributed (for Windows).
The build of .exe files need to have some windows executable files already installed (Apache, MariaDb). The package to install to get this files are defined into the file *doliwamp.iss* (searhc line starting with "; Value OK:")
If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file).

View File

@ -542,7 +542,7 @@ $cfg['ThemePerServer'] = FALSE; // allow diferent theme for each co
* %f will be replaced by a list of field names.
* (%t and %f only applies to DefaultQueryTable)
*/
$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1';
$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1 = 1';
$cfg['DefaultQueryDatabase'] = '';
/**

View File

@ -22,7 +22,6 @@ $force_install_databaserootpass='WAMPMYSQLNEWPASSWORD';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='644';
$force_install_distrib='doliwamp';
$force_install_module='';
?>

View File

@ -110,7 +110,7 @@ print "Working on files into : ".DOL_DOCUMENT_ROOT."\n";
print "Include custom in signature : ".$includecustom."\n";
print "Include constants in signature : ";
foreach ($includeconstants as $countrycode => $tmp) {
foreach ($tmp as $constname => $constvalue) {
foreach($tmp as $constname => $constvalue) {
print $constname.'='.$constvalue." ";
}
}
@ -130,7 +130,7 @@ fputs($fp, '<checksum_list version="'.$release.'" date="'.dol_print_date(dol_now
foreach ($includeconstants as $countrycode => $tmp) {
fputs($fp, '<dolibarr_constants country="'.$countrycode.'">'."\n");
foreach ($tmp as $constname => $constvalue) {
foreach($tmp as $constname => $constvalue) {
$valueforchecksum=(empty($constvalue)?'0':$constvalue);
$checksumconcat[]=$valueforchecksum;
fputs($fp, ' <constant name="'.$constname.'">'.$valueforchecksum.'</constant>'."\n");

View File

@ -620,9 +620,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/autoload.php`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;
}

View File

@ -1,10 +1,9 @@
To make htmldoc working from wiki.dolibarr.org, the wiki must be modified to have
To make htmldoc working from wiki.dolibarr.org, them must be modified to have
To disable part of content, add:
class="htmldoc-ignore"
with css
.htmldoc-ignore { display: none; }
Note:
$_SERVER["HTTP_USER_AGENT"] is "HTMLDOC/x.y.z"
$_COOKIE["htmldoc"] may also be defined if set on command line.
To disable part, add
class="htmldoc-ignore" with css
.htmldoc-ignore { display: none; }

View File

@ -1,7 +1,7 @@
#----------------------------------------------------------------------------
# \file dolibarr.pl
# \brief Dolibarr script install for Virtualmin Pro
# \author (c)2009-2020 Regis Houssin <regis.houssin@inodbox.com>
# \author (c)2009-2019 Regis Houssin <regis.houssin@inodbox.com>
#----------------------------------------------------------------------------
@ -30,7 +30,7 @@ return "Regis Houssin";
# script_dolibarr_versions()
sub script_dolibarr_versions
{
return ( "12.0.3", "11.0.5", "10.0.7", "9.0.4", "8.0.6", "7.0.5" );
return ( "10.0.0", "9.0.3", "8.0.5", "7.0.5", "6.0.8" );
}
sub script_dolibarr_release
@ -77,16 +77,6 @@ if ($ver >= 3.6) {
push(@rv, "Dolibarr requires PHP version 5.3 or later");
}
}
if ($ver >= 12.0) {
# Check for PHP 5.6+
local $phpv = &get_php_version($phpver || 5, $d);
if (!$phpv) {
push(@rv, "Could not work out exact PHP version");
}
elsif ($phpv < 5.6) {
push(@rv, "Dolibarr requires PHP version 5.6 or later");
}
}
return @rv;
}
@ -386,7 +376,7 @@ sub script_dolibarr_realversion
local ($d, $opts, $sinfo) = @_;
local $lref = &read_file_lines("$opts->{'dir'}/filefunc.inc.php", 1);
foreach my $l (@$lref) {
if ($l =~ /'DOL_VERSION',\s?'([0-9a-z\.\-]+)'/) {
if ($l =~ /'DOL_VERSION','([0-9a-z\.\-]+)'/) {
return $1;
}
}
@ -400,8 +390,6 @@ sub script_dolibarr_check_latest
{
local ($ver) = @_;
local @vers = &osdn_package_versions("dolibarr",
$ver >= 12.0 ? "dolibarr\\-(12\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 11.0 ? "dolibarr\\-(11\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 10.0 ? "dolibarr\\-(10\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 9.0 ? "dolibarr\\-(9\\.0\\.[0-9\\.]+)\\.tgz" :
$ver >= 8.0 ? "dolibarr\\-(8\\.0\\.[0-9\\.]+)\\.tgz" :
@ -422,7 +410,7 @@ return $ver eq $vers[0] ? undef : $vers[0];
sub script_dolibarr_site
{
return 'https://www.dolibarr.org/';
return 'http://www.dolibarr.org/';
}
sub script_dolibarr_passmode

View File

@ -181,7 +181,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector
@ -197,8 +196,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/imports
%_datadir/dolibarr/htdocs/includes
%_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin

View File

@ -261,7 +261,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector
@ -277,8 +276,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/imports
%_datadir/dolibarr/htdocs/includes
%_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin

View File

@ -177,7 +177,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/custom
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
@ -194,8 +193,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/imports
%_datadir/dolibarr/htdocs/includes
%_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin

View File

@ -189,7 +189,6 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/datapolicy
%_datadir/dolibarr/htdocs/dav
%_datadir/dolibarr/htdocs/debugbar
%_datadir/dolibarr/htdocs/delivery
%_datadir/dolibarr/htdocs/don
%_datadir/dolibarr/htdocs/ecm
%_datadir/dolibarr/htdocs/emailcollector
@ -205,8 +204,8 @@ done >>%{name}.lang
%_datadir/dolibarr/htdocs/imports
%_datadir/dolibarr/htdocs/includes
%_datadir/dolibarr/htdocs/install
%_datadir/dolibarr/htdocs/intracommreport
%_datadir/dolibarr/htdocs/langs/HOWTO-Translation.txt
%_datadir/dolibarr/htdocs/livraison
%_datadir/dolibarr/htdocs/loan
%_datadir/dolibarr/htdocs/mailmanspip
%_datadir/dolibarr/htdocs/margin

View File

@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='444';
$force_install_distrib='rpmfedora';
// Value to overwrite path to use shared libraries/fonts instead of embedded one
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';

View File

@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='444';
$force_install_distrib='rpmgeneric';
// Value to overwrite path to use shared libraries/fonts instead of embedded one
// We don't force any external lib with generic package

View File

@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='444';
$force_install_distrib='rpmmandriva';
// Value to overwrite path to use shared libraries/fonts instead of embedded one
$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';

View File

@ -17,7 +17,6 @@ $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1';
$force_install_lockinstall='444';
$force_install_distrib='rpmopensuse';
// Value to overwrite path to use shared libraries/fonts instead of embedded one
//$force_dolibarr_lib_ADODB_PATH='/usr/share/php/adodb';

View File

@ -1 +1 @@
https://wiki.dolibarr.org/
http://wiki.dolibarr.org/

View File

@ -33,13 +33,11 @@
"restler/framework" : "3.0.0-RC6",
"tecnickcom/tcpdf" : "6.3.2",
"nnnick/chartjs" : "^2.9",
"stripe/stripe-php" : "6.43.1",
"maximebf/debugbar" : "1.15.1",
"symfony/var-dumper": "3"
"stripe/stripe-php" : "6.43.1"
},
"require-dev" : {
"php-parallel-lint/php-parallel-lint" : "^0",
"php-parallel-lint/php-console-highlighter" : "^0",
"jakub-onderka/php-parallel-lint" : "^0",
"jakub-onderka/php-console-highlighter" : "^0",
"phpunit/phpunit" : "^4",
"squizlabs/php_codesniffer" : "^2",
"phpunit/phpunit-selenium" : "^2"

458
composer.lock generated
View File

@ -1,10 +1,10 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "1dbd2d05cc0836acfca5988f29005cf2",
"content-hash": "17e906996157e8a94564f686a6096dc5",
"packages": [
{
"name": "ckeditor/ckeditor",
@ -47,67 +47,6 @@
],
"time": "2019-06-28T10:41:23+00:00"
},
{
"name": "maximebf/debugbar",
"version": "v1.15.1",
"source": {
"type": "git",
"url": "https://github.com/maximebf/php-debugbar.git",
"reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6c4277f6117e4864966c9cb58fb835cee8c74a1e",
"reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e",
"shasum": ""
},
"require": {
"php": ">=5.6",
"psr/log": "^1.0",
"symfony/var-dumper": "^2.6|^3|^4"
},
"require-dev": {
"phpunit/phpunit": "^5"
},
"suggest": {
"kriswallsmith/assetic": "The best way to manage assets",
"monolog/monolog": "Log using Monolog",
"predis/predis": "Redis storage"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.15-dev"
}
},
"autoload": {
"psr-4": {
"DebugBar\\": "src/DebugBar/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Maxime Bouroumeau-Fuseau",
"email": "maxime.bouroumeau@gmail.com",
"homepage": "http://maximebf.com"
},
{
"name": "Barry vd. Heuvel",
"email": "barryvdh@gmail.com"
}
],
"description": "Debug bar in the browser for php application",
"homepage": "https://github.com/maximebf/php-debugbar",
"keywords": [
"debug",
"debugbar"
],
"time": "2019-09-24T14:55:42+00:00"
},
{
"name": "mike42/escpos-php",
"version": "v2.2",
@ -314,53 +253,6 @@
"abandoned": "phpoffice/phpspreadsheet",
"time": "2015-05-01T07:00:55+00:00"
},
{
"name": "psr/log",
"version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"time": "2020-03-23T09:12:05+00:00"
},
{
"name": "restler/framework",
"version": "3.0.0-RC6",
@ -368,12 +260,12 @@
"source": {
"type": "git",
"url": "https://github.com/Luracast/Restler-Framework.git",
"reference": "d52e61600d153bca60a287c35141c5c01863127b"
"reference": "0f6b0f26152f83e43a2a86820206c455095fb2b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/d52e61600d153bca60a287c35141c5c01863127b",
"reference": "d52e61600d153bca60a287c35141c5c01863127b",
"url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/0f6b0f26152f83e43a2a86820206c455095fb2b0",
"reference": "0f6b0f26152f83e43a2a86820206c455095fb2b0",
"shasum": ""
},
"require": {
@ -420,7 +312,7 @@
"rest",
"server"
],
"time": "2020-02-13T16:05:12+00:00"
"time": "2019-05-12T15:15:11+00:00"
},
{
"name": "stripe/stripe-php",
@ -478,146 +370,6 @@
],
"time": "2019-08-29T16:56:12+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/var-dumper",
"version": "v3.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
"reference": "737e07704cca83f9dd0af926d45ce27eedc25657"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/737e07704cca83f9dd0af926d45ce27eedc25657",
"reference": "737e07704cca83f9dd0af926d45ce27eedc25657",
"shasum": ""
},
"require": {
"php": ">=5.5.9",
"symfony/polyfill-mbstring": "~1.0"
},
"require-dev": {
"twig/twig": "~1.20|~2.0"
},
"suggest": {
"ext-symfony_debug": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
}
},
"autoload": {
"files": [
"Resources/functions/dump.php"
],
"psr-4": {
"Symfony\\Component\\VarDumper\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony mechanism for exploring and dumping PHP variables",
"homepage": "https://symfony.com",
"keywords": [
"debug",
"dump"
],
"time": "2015-11-18T13:48:51+00:00"
},
{
"name": "tecnickcom/tcpdf",
"version": "6.3.2",
@ -737,16 +489,16 @@
"time": "2015-06-14T21:17:01+00:00"
},
{
"name": "php-parallel-lint/php-console-color",
"name": "jakub-onderka/php-console-color",
"version": "v0.2",
"source": {
"type": "git",
"url": "https://github.com/php-parallel-lint/PHP-Console-Color.git",
"url": "https://github.com/JakubOnderka/PHP-Console-Color.git",
"reference": "d5deaecff52a0d61ccb613bb3804088da0307191"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191",
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191",
"reference": "d5deaecff52a0d61ccb613bb3804088da0307191",
"shasum": ""
},
@ -779,31 +531,28 @@
"time": "2018-09-29T17:23:10+00:00"
},
{
"name": "php-parallel-lint/php-console-highlighter",
"version": "v0.5",
"name": "jakub-onderka/php-console-highlighter",
"version": "v0.4",
"source": {
"type": "git",
"url": "https://github.com/php-parallel-lint/PHP-Console-Highlighter.git",
"reference": "21bf002f077b177f056d8cb455c5ed573adfdbb8"
"url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git",
"reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Highlighter/zipball/21bf002f077b177f056d8cb455c5ed573adfdbb8",
"reference": "21bf002f077b177f056d8cb455c5ed573adfdbb8",
"url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547",
"reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.4.0",
"php-parallel-lint/php-console-color": "~0.2"
},
"replace": {
"jakub-onderka/php-console-highlighter": "*"
"jakub-onderka/php-console-color": "~0.2",
"php": ">=5.4.0"
},
"require-dev": {
"php-parallel-lint/php-code-style": "~1.0",
"php-parallel-lint/php-parallel-lint": "~1.0",
"php-parallel-lint/php-var-dump-check": "~0.1",
"jakub-onderka/php-code-style": "~1.0",
"jakub-onderka/php-parallel-lint": "~1.0",
"jakub-onderka/php-var-dump-check": "~0.1",
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~1.5"
},
@ -825,19 +574,19 @@
}
],
"description": "Highlight PHP code in terminal",
"time": "2020-05-13T07:37:49+00:00"
"time": "2018-09-29T18:48:56+00:00"
},
{
"name": "php-parallel-lint/php-parallel-lint",
"name": "jakub-onderka/php-parallel-lint",
"version": "v0.9.2",
"source": {
"type": "git",
"url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git",
"url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git",
"reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa",
"url": "https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa",
"reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa",
"shasum": ""
},
@ -1333,7 +1082,6 @@
"keywords": [
"tokenizer"
],
"abandoned": true,
"time": "2017-12-04T08:55:13+00:00"
},
{
@ -2037,159 +1785,6 @@
],
"time": "2019-08-06T08:03:45+00:00"
},
{
"name": "symfony/polyfill-php72",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php72.git",
"reference": "639447d008615574653fb3bc60d1986d7172eaae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
"reference": "639447d008615574653fb3bc60d1986d7172eaae",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php72\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.18.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
"reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
"shasum": ""
},
"require": {
"php": ">=7.0.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ion Bazan",
"email": "ion.bazan@gmail.com"
},
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.4.32",
@ -2308,9 +1903,8 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.6.0",
"php": ">=5.5.0",
"ext-curl": "*"
},
"platform-dev": [],
"plugin-api-version": "1.1.0"
"platform-dev": []
}

View File

@ -28,6 +28,19 @@ With
DEBUGBAR:
---------
Move
this.options = {
bodyMarginBottom: true,
bodyMarginBottomHeight: parseInt($('body').css('margin-bottom')),
};
few line lower in the
initialize: function() {
ESCPOS:
-------
Replace
@ -162,13 +175,24 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php
- protected $default_monospaced_font = 'courier';
+ protected $default_monospaced_font = 'freemono';
* In tecnickcom/tcpdf/include/tcpdf_static, in function intToRoman, right at the beginning
of the function, replace:
$roman = '';
with:
$roman = '';
if ($number >= 4000) {
// do not represent numbers above 4000 in Roman numerals
return strval($number);
}
TCPDI:
------
Add fpdf_tpl.php 1.2
Add tcpdi.php
Add tcpdi_parser.php and replace:
@ -207,6 +231,8 @@ with
JCROP:
------
* Remove analytics tag into file index.html
@ -306,7 +332,7 @@ SELECT2
Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug: https://github.com/select2/select2/issues/5832
.select2-hidden-accessible {
margin: -1px !important; /* line to restore */
margin: -10000px !important; /* line to restore */
}

View File

@ -87,11 +87,14 @@ if ($idobject > 0)
// Change status to validated
$result=$obj->validate($user);
if ($result > 0) print "OK Object created with id ".$idobject."\n";
else {
else
{
$error++;
dol_print_error($db, $obj->error);
}
} else {
}
else
{
$error++;
dol_print_error($db, $obj->error);
}
@ -103,7 +106,9 @@ if (! $error)
{
$db->commit();
print '--- end ok'."\n";
} else {
}
else
{
print '--- end error code='.$error."\n";
$db->rollback();
}

View File

@ -85,11 +85,14 @@ if ($idobject > 0)
// Change status to validated
$result=$com->valid($user);
if ($result > 0) print "OK Object created with id ".$idobject."\n";
else {
else
{
$error++;
dol_print_error($db, $com->error);
}
} else {
}
else
{
$error++;
dol_print_error($db, $com->error);
}
@ -101,7 +104,9 @@ if (! $error)
{
$db->commit();
print '--- end ok'."\n";
} else {
}
else
{
print '--- end error code='.$error."\n";
$db->rollback();
}

View File

@ -82,7 +82,9 @@ $idobject = $myproduct->create($user);
if ($idobject > 0)
{
print "OK Object created with id ".$idobject."\n";
} else {
}
else
{
$error++;
dol_print_error($db, $myproduct->error);
}
@ -93,7 +95,9 @@ if (! $error)
{
$db->commit();
print '--- end ok'."\n";
} else {
}
else
{
print '--- end error code='.$error."\n";
$db->rollback();
}

View File

@ -74,14 +74,18 @@ if ($idobject > 0)
// Change status to validated
$result=$obj->setStatut(1);
if ($result > 0) print "OK Object created with id ".$idobject."\n";
else {
else
{
$error++;
dol_print_error($db, $obj->error);
}
} elseif ($obj->error == 'ErrorLoginAlreadyExists')
}
elseif ($obj->error == 'ErrorLoginAlreadyExists')
{
print "User with login ".$obj->login." already exists\n";
} else {
}
else
{
$error++;
dol_print_error($db, $obj->error);
}
@ -93,7 +97,9 @@ if (! $error)
{
$db->commit();
print '--- end ok'."\n";
} else {
}
else
{
print '--- end error code='.$error."\n";
$db->rollback();
}

View File

@ -1,89 +0,0 @@
Delivered-To: testldrdev@gmail.com
Received: by 2002:a2e:9b9a:0:0:0:0:0 with SMTP id z26csp1425223lji;
Thu, 20 Aug 2020 08:29:02 -0700 (PDT)
X-Received: by 2002:a05:620a:1292:: with SMTP id w18mr2938234qki.158.1597937342304;
Thu, 20 Aug 2020 08:29:02 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1597937342; cv=none;
d=google.com; s=arc-20160816;
b=FhT/+rJ/zNYgVQ5Nt/rLZJycGd/Ntkhm6LwI16YUfmEmxeGrP/cXXQULrqQ1LhBr9B
oRKweltTdnpyA14gm0kzbs1vUkf5HxLUuGk8IqqJWAPMUZoN8oUPkzq2BuKNQGxPiE+y
Hsg/fnYp8WzcAlZOLsEP2kcFIdA95Dyy5LkM8HgphI1jSS1d6gkx6nDGIMIpDD9D+w4X
ISxRUXp5JlDwFCUMOPoAvHIBUdJ3jpLsjesbMEnU4ssFqhxU21pBq+Fc+csSPeY5DL0M
HR1o+ChEAXIdDOrDqa0ohHfqR216juGCzH8YuEQ88LT0Qbst9IkOYWiAQv4TIh7vHtvQ
TMvA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=to:subject:message-id:date:from:mime-version:dkim-signature;
bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=;
b=CRlrRPfoGkfmz6iXKy4HdxKQ4SeJTiIxjC2jNkgQPSnIDFJgDkJcwASJVpcjTmlVmH
Z9WnHKVUPRIHGDEoMRlx6eUx9QfelWqPYu3BBQGFry9sgth0BR/1s6tmQ+P+bAj23ryo
aL3UkF6KCSx4GhEk3MfHA5Ex81YDFHvHL3BZ2kb3XCVSlPiBq2szw1ETmRAsDdS5Gbu+
ZlzBbl4pRtUWgi1fB5H4Wcv7e90F4Et1SBP8IKSCa23qu2nV9xefgjfMw2ndxCj1zgCL
c3l7Ul6pw32nqf6+vxfZTstwIwgu6dXZXCHDqJqesI2g8RGxeba+LfKZEDpBuSeINS9r
GMvw==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@destailleur.fr header.s=google header.b=IPMz90Yj;
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
Return-Path: <contact@destailleur.fr>
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
by mx.google.com with SMTPS id w14sor2138230qtb.9.2020.08.20.08.29.00
for <testldrdev@gmail.com>
(Google Transport Security);
Thu, 20 Aug 2020 08:29:01 -0700 (PDT)
Received-SPF: pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
Authentication-Results: mx.google.com;
dkim=pass header.i=@destailleur.fr header.s=google header.b=IPMz90Yj;
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=destailleur.fr; s=google;
h=mime-version:from:date:message-id:subject:to;
bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=;
b=IPMz90Yjw1Mf57/rYWUYGtpc+IazEWcy6/bqxf1j0h6rxDH/wjhxsCWzfARgqqlfVj
ACg4IbPpZZlKFIYDSCbfMlWF65rbKfNre56HldfQgy0Tq3LC434zHz2ZZMOVCM52w3J9
VGBpASUlSL1o+YRmzOpRtHVu7I9aNwGxHuA070Yka8XLV76vV3P0vdL8PcoHq0jUUEoi
+dCZ9NCPuAFtGK2IavNoM2qQrLdfYIi+RwgWBtqjTwzyvDEJR+p5fIPK142ynMbHgWYO
RVtMqAgxjvL4sfyKZ5KuzKXkQNM3zyzMinWK89scBl+QLFCcWA4Qqc0dJjqLCBhh8lmq
n67g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=;
b=H0GsrFAi9JmRTKQ2budtDeLBqCaTisHKYCVVziyxmv+/tIcrSZBA4tdKwm+wR80r50
zMJXmyVS2DMDWfnIlOv39wcwQjYN3WK1aRJfV0bVuEWrQuzt5MMWbskf6xbzo201nhr9
ZlqATsEV7v1u5EHmfYwRhR8+AOmENdnm0g9RXPJVrFS58WNEJUSotS5Y5rZPjnT943y0
62Kf4Bd6uWvXhPFXWQoZLtWrPpkbcYPWIBmpftKhD0PD9c6rKaVduV0WhbigYsDoxb3F
iIafGPOyq91hiHR2gTLHiMmTDm+IDQ4n6gSkS7HKpZlLQhHoBMnpqJZYoxMJTxdpAbSy
mY+A==
X-Gm-Message-State: AOAM5325RcN4/ThWbYCO3vWRMFFBrfzJUHC1bd1Z9VB3/2Q3RuF9lmIJ +SjshEErhK68Of2pHDZQ3aPU4rzDfV8ozbvRsgChdfZg8aA=
X-Google-Smtp-Source: ABdhPJxUOUdurKEQfLldtiQGRkgC/h8gKQG1zhS+8k93p6N1SsOn517+GeRyT3E+/Uw536pmReO29la3EIAS6VT33SE=
X-Received: by 2002:aed:3e8e:: with SMTP id n14mr3191190qtf.67.1597937340509; Thu, 20 Aug 2020 08:29:00 -0700 (PDT)
MIME-Version: 1.0
From: John Tester <customer@customercompany.fr>
Date: Thu, 20 Aug 2020 17:28:34 +0200
Message-ID: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
Subject: Support besoin
To: testldrdev@gmail.com
Content-Type: multipart/alternative; boundary="0000000000008e099705ad50c772"
--0000000000008e099705ad50c772
Content-Type: text/plain; charset="UTF-8"
adfsdfsdfds
--
Laurent.
------------------------------------------------------------------------------------
Twitter: https://www.twitter.com/eldy10
--0000000000008e099705ad50c772
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">adfsdfsdfds<br clear=3D"all"><div><br></div>-- <br><div di=
r=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature">Laur=
ent.<br>-------------------------------------------------------------------=
-----------------<br>Twitter: <a href=3D"https://www.twitter.com/eldy10" ta=
rget=3D"_blank">https://www.twitter.com/eldy10</a></div></div>
--0000000000008e099705ad50c772--

View File

@ -1,57 +0,0 @@
Return-Path: <testldrdev@gmail.com>
Received: from smtp.gmail.com ([2a01:e0a:7e:4ae0:329c:23ff:feb8:dc8d])
by smtp.gmail.com with ESMTPSA id 32sm5811196wrh.18.2020.08.20.09.31.37
for <customer@customercompany.fr>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 20 Aug 2020 09:31:37 -0700 (PDT)
From: testldrdev@gmail.com
X-Google-Original-From: <aa@aa.comg>
To: customer@customercompany.fr
Subject: [MyBigCompany - Ticket #TS2008-0040] Nouveau message
Date: Thu, 20 Aug 2020 18:31:37 +0200
Message-ID: <1597941097.SMTPs-dolibarr-tic58@83b5bc91f83a56e458db71e0adac2b62>
References: <1597941097.SMTPs-dolibarr-tic58@83b5bc91f83a56e458db71e0adac2b62>
X-Dolibarr-TRACKID: tic58@83b5bc91f83a56e458db71e0adac2b62
X-RemoteAddr: 127.0.0.1
X-Mailer: Dolibarr version 13.0.0-alpha (using SMTPs Mailer)
X-Dolibarr-Option: MAIN_MAIL_USE_MULTI_PART
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="multipart_x.1597941097.x_boundary"
Content-Transfer-Encoding: 8bit
--multipart_x.1597941097.x_boundary
Content-Type: multipart/alternative; boundary="mul_872cdd6a64216735955664484832b075"
--mul_872cdd6a64216735955664484832b075
Content-Type: text/plain; charset=UTF-8
Bonjour
Une nouvelle réponse a été ajoutée à un ticket que vous suivez. Voici
le message :PredefinedMailContentTicket_send
Vous pouvez voir la progression du ticket en cliquant sur le lien
ci-dessus. : fr5uw2yospypn2rz
Cordialement,
--
--mul_872cdd6a64216735955664484832b075
Content-Type: text/html; charset=UTF-8
<html><head><title></title></head><body>Bonjour<br>
<br>
Une nouvelle réponse a été ajoutée à un ticket que vous suivez. Voici
le message :PredefinedMailContentTicket_send<br>
<br>
<br>
Vous pouvez voir la progression du ticket en cliquant sur le lien
ci-dessus. : <a
href="http://localhostgit/dolibarr_dev/htdocs/public/ticket/view.php?track_id=fr5uw2yospypn2rz">fr5uw2yospypn2rz</a><br>
<br>Cordialement,<br>
<br>
--</body></html>
--mul_872cdd6a64216735955664484832b075--
--multipart_x.1597941097.x_boundary--

View File

@ -1,48 +0,0 @@
MIME-Version: 1.0
Date: Thu, 20 Aug 2020 18:34:01 +0200
References: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
In-Reply-To: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com>
Message-ID: <CAC8+=32ccpEo12RR-juT=FW6+gNV-DcvNjxs_0s6Wn40xmfhug@mail.gmail.com>
Subject: Re: Support besoin
From: John Tester <testldrdev@gmail.com>
To: John Tester <customer@customercompany.fr>
Content-Type: multipart/alternative; boundary="0000000000001620dd05ad51b075"
--0000000000001620dd05ad51b075
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Merci pour votre question.
Voici la rep.
Le jeu. 20 ao=C3=BBt 2020 =C3=A0 17:29, John Tester <laurent@destai=
lleur.fr>
a =C3=A9crit :
> adfsdfsdfds
>
> --
> Laurent.
>
> -------------------------------------------------------------------------=
-----------
> Twitter: https://www.twitter.com/eldy10
>
--0000000000001620dd05ad51b075
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Merci pour votre question.<div>Voici la rep.</div></div><b=
r><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Le=C2=A0=
jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A017:29, John Tester &lt;<a href=
=3D"mailto:customer@customercompany.fr">customer@customercompany.fr</a>&gt; a =C3=A9c=
rit=C2=A0:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div =
dir=3D"ltr">adfsdfsdfds<br clear=3D"all"><div><br></div>-- <br><div dir=3D"=
ltr">Laurent.<br>----------------------------------------------------------=
--------------------------<br>Twitter: <a href=3D"https://www.twitter.com/e=
ldy10" target=3D"_blank">https://www.twitter.com/eldy10</a></div></div>
</blockquote></div>
--0000000000001620dd05ad51b075--

View File

@ -1,134 +0,0 @@
Delivered-To: testldrdev@gmail.com
Received: by 2002:a2e:9b9a:0:0:0:0:0 with SMTP id z26csp1483607lji;
Thu, 20 Aug 2020 09:56:03 -0700 (PDT)
X-Received: by 2002:ac8:3868:: with SMTP id r37mr3301993qtb.95.1597942563252;
Thu, 20 Aug 2020 09:56:03 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1597942563; cv=none;
d=google.com; s=arc-20160816;
b=skUGL+keim3FdNXfKGgQokCfj85gnhYhuLbMM61qY5W6ixSH9s8I6uoNh3gzVy89XM
NGbZiajjDiPMBryl87PhD+ACBjv8WoZAQiojAga0ELPPmVDnhrtWKANLbRrkUI3Xtfoj
b1o2iHP2Q12Vqs6xiAy86yxURlIKGM3tw91WryWiIPiAL7bRZPn49N3XbO2ULE0QKTBq
BI5YnOxt9NfTj0xhKaLLIJ9M1qa4e1QyOHl56WuEv3Gx6uHDAQDYz+C5G0VgdjBvwRzH
pJaiAulc1uW/V9TcRMwvwIWtI7eWygvU2PiuI/c05G1KVKibAubHE55IjOJCn2O2UaH4
WMNQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:dkim-signature;
bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=;
b=Ps5kk+tBGQzMP6ugDCwKf4hzn8fn3DU4AFz1dJvkHdDestLZWN99Qtr6iNMdslsHJm
ov378c+8oCfcV7shyBYjlAFfikFi7o4RM/evh3yqqjAnhyVfcYH7c9cexVvDo/AXUAZ7
N7Mh7EOvyDXXsaHK2l89XiAxZx/hZh/O+/HR2EoVEGre1eYRYwI/aEfPN8d4/fL2VtCD
0wzAwnUrINuXmcaUDT30Twjk9kwGjjTsM6Z531vKM6L3y48a7f3GTE7V+vo2QxHdUT54
fQVue9OO7b4VKTEj/x/dmNr+92sHRAMMS7dj/VXMmzM+WttUCAPNxZ27/bvt4bBc5oBp
QPEA==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@destailleur.fr header.s=google header.b=SEYSmxbT;
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
Return-Path: <contact@destailleur.fr>
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
by mx.google.com with SMTPS id q3sor2285165qtn.34.2020.08.20.09.56.02
for <testldrdev@gmail.com>
(Google Transport Security);
Thu, 20 Aug 2020 09:56:03 -0700 (PDT)
Received-SPF: pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
Authentication-Results: mx.google.com;
dkim=pass header.i=@destailleur.fr header.s=google header.b=SEYSmxbT;
spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=destailleur.fr; s=google;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=;
b=SEYSmxbTKCuc1baQZzjIJwm7WXvgjt/nEGhMLqWxQCU3beM3qhH8wYlSeMyB8Z/9pi
tszZFZhZ3cjnIbbJnjzsMYJgBnYbkf6hz14+BsFwyPU030EkDjJy2i3DSXzYK7A+GbBn
G9I9foG/4+pcx0LnFsjchGsRhLFkTKJIsP2SVfOx0wlim3WHMIqIXvKsxY05PoPyf8Tp
IwQi7iNl/+nTyjNHl2DQh+ty3CRTmUw9uEbY+jRRvIg5i/7cfREekK98d7qi/5HQycr6
aptRDdCVHXpe47q+c7OPiMEEQWs+mFJhBqPXIlU54fwFApEEnLn/jwGbrPsrPYJaswgI
vd/g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=;
b=M6a4k1gKc4e7TwKncuNPy0b3KxutR1FLFJGWxd4NyW84b7f3LfIR94IeInLQIWmY8C
Ddus0upZJI4+NN9XBGvXCdsiiYlwFGBJRWwjv82XFKVAKL5DD94RJNQZJUiE39hgJ2aa
6V9gasiP+nUAX4ZV9bZmw21CgKEZrZVXh5unmW2ABrfcx8lHjp/DUw5XEkym1J92Wo1l
g0H3XrC2FL+aQuj+WpCynMNkY9ljw71oqyv3SP9pjnVNHArAdZiPMHkNxiuPdq7q41fg
eIbdRCQXYZL5O48QsjDdiXwaQzx+NcYtrKAH0RIVD1lG6zc9pxqDJsbGxP9VLs8jGDTT
mSdQ==
X-Gm-Message-State: AOAM532LuATWDKbo1HImMWshHVqb0kC0isehf3owfYUKq5J68o3juKbm kCgUMt25A2C7QoNMDXcjfJyteBNQD7ZhSh3yeYTGoLSvsD4=
X-Google-Smtp-Source: ABdhPJyQYCpCHSwA87x030i8YChySZqcNXxT1qVlZyEA+XM6DTyPZusa8gtbDUVcMyx7Jma/7toh+4EEE2bWg0bG+2E=
X-Received: by 2002:aed:3e8e:: with SMTP id n14mr3547383qtf.67.1597942562373; Thu, 20 Aug 2020 09:56:02 -0700 (PDT)
MIME-Version: 1.0
References: <CALeEO_kij-ogXKzrjV_pTgqVbUB9j=287VkX34iVSWgDHFA8eg@mail.gmail.com> <CAC8+=32ccpEo12RR-juT=FW6+gNV-DcvNjxs_0s6Wn40xmfhug@mail.gmail.com>
In-Reply-To: <CAC8+=32ccpEo12RR-juT=FW6+gNV-DcvNjxs_0s6Wn40xmfhug@mail.gmail.com>
From: John Tester <customer@customercompany.fr>
Date: Thu, 20 Aug 2020 18:55:36 +0200
Message-ID: <CALeEO_nLUY8Tk+o7WoaHtBkxvOy0dhvt+fL0MwPrApGty_AG_g@mail.gmail.com>
Subject: Re: Support besoin
To: John Tester <testldrdev@gmail.com>
Content-Type: multipart/alternative; boundary="000000000000cd54be05ad51fe67"
--000000000000cd54be05ad51fe67
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Merci
Le jeu. 20 ao=C3=BBt 2020 =C3=A0 18:34, John Tester <testldrdev@gma=
il.com> a
=C3=A9crit :
> Merci pour votre question.
> Voici la rep.
>
> Le jeu. 20 ao=C3=BBt 2020 =C3=A0 17:29, John Tester <laurent@dest=
ailleur.fr>
> a =C3=A9crit :
>
>> adfsdfsdfds
>>
>> --
>> Laurent.
>>
>> ------------------------------------------------------------------------=
------------
>> Twitter: https://www.twitter.com/eldy10
>>
>
--=20
Laurent.
---------------------------------------------------------------------------=
---------
Twitter: https://www.twitter.com/eldy10
--000000000000cd54be05ad51fe67
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Merci</div><br><div class=3D"gmail_quote"><div dir=3D"ltr"=
class=3D"gmail_attr">Le=C2=A0jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A018:34, Lau=
rent Destailleur &lt;<a href=3D"mailto:testldrdev@gmail.com">testldrdev@gma=
il.com</a>&gt; a =C3=A9crit=C2=A0:<br></div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex"><div dir=3D"ltr">Merci pour votre question.<div>Voici la=
rep.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"g=
mail_attr">Le=C2=A0jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A017:29, Laurent Destai=
lleur &lt;<a href=3D"mailto:customer@customercompany.fr" target=3D"_blank">laure=
nt@destailleur.fr</a>&gt; a =C3=A9crit=C2=A0:<br></div><blockquote class=3D=
"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(2=
04,204,204);padding-left:1ex"><div dir=3D"ltr">adfsdfsdfds<br clear=3D"all"=
><div><br></div>-- <br><div dir=3D"ltr">Laurent.<br>-----------------------=
-------------------------------------------------------------<br>Twitter: <=
a href=3D"https://www.twitter.com/eldy10" target=3D"_blank">https://www.twi=
tter.com/eldy10</a></div></div>
</blockquote></div>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
class=3D"gmail_signature">Laurent.<br>------------------------------------=
------------------------------------------------<br>Twitter: <a href=3D"htt=
ps://www.twitter.com/eldy10" target=3D"_blank">https://www.twitter.com/eldy=
10</a></div>
--000000000000cd54be05ad51fe67--

View File

@ -1,21 +0,0 @@
# EditorConfig is awesome: https://editorconfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
[*.js]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = false

View File

@ -5,4 +5,3 @@ node_modules
.environment
.env
.zapierapprc
package-lock.json

View File

@ -1,48 +0,0 @@
# HOW TO BUILD
## DEVELOPPER ACCOUNT
At first, you need to have a Zapier developper acoount, create it here [Zapier Platform](https://developer.zapier.com/)
## BUILD INTEGRATION
### Install Node.js
An easy option to get set up with Node.js is to visit [https://nodejs.org/en/download/](https://nodejs.org/en/download/) and download the official installer for your OS. If you're installing with a package manager it's even easier.
After installation, confirm that Node.js is ready to use:
`node --version`
### Install the Zapier CLI
Next let's install the Zapier CLI tools. The CLI will allow you to build your app, deploy it to the Zapier platform, do local testing, manage users and testers, view remote logs, collaborate with your team, and more:
`cd dev/exemples/zapier`
`npm install -g zapier-platform-cli` to install the CLI globally
`zapier --version` to return version of the CLI
### Run Zapier Login
Let's configure authentication between your dev environment and the Zapier platform. You'll use the email address and password you use to log in to the Zapier application.
`zapier --version`
This command will set up a .zapierrc file in your home directory.
### Install the Project
In zapier exemple directory, run:
`npm install`
### Deploying your App
Let's deploy it! When you're ready to try your code out on the Zapier platform use the push command. Only you will be able to see the app until you invite testers.
`zapier push`
### More info
You will find original tutorial here : [https://zapier.com/developer/start/introduction](https://zapier.com/developer/start/introduction)

405
dev/examples/zapier/package-lock.json generated Normal file
View File

@ -0,0 +1,405 @@
{
"name": "Dolibarr",
"version": "1.0.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/node": {
"version": "8.10.20",
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz",
"integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==",
"optional": true
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"bluebird": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz",
"integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"browser-stdout": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
"dev": true
},
"combined-stream": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz",
"integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": {
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
"dev": true
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"content-disposition": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
"integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"diff": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
"dev": true
},
"dotenv": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz",
"integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow=="
},
"encoding": {
"version": "0.1.12",
"resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
"integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
"requires": {
"iconv-lite": "~0.4.13"
}
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"form-data": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz",
"integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "1.0.6",
"mime-types": "^2.1.12"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"growl": {
"version": "1.10.5",
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
"dev": true
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"he": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
"dev": true
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"json-tryparse": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/json-tryparse/-/json-tryparse-1.0.5.tgz",
"integrity": "sha1-Khy6CLTjEjNo+p+2o01GQwBFeyc="
},
"jsonschema": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz",
"integrity": "sha1-PO3o4+QR03eHLu+8n98mODy8Ptk="
},
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
"mime-db": {
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
},
"mime-types": {
"version": "2.1.22",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
"requires": {
"mime-db": "~1.38.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
"minimist": "0.0.8"
}
},
"mocha": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz",
"integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==",
"dev": true,
"requires": {
"browser-stdout": "1.3.1",
"commander": "2.15.1",
"debug": "3.1.0",
"diff": "3.5.0",
"escape-string-regexp": "1.0.5",
"glob": "7.1.2",
"growl": "1.10.5",
"he": "1.1.1",
"minimatch": "3.0.4",
"mkdirp": "0.5.1",
"supports-color": "5.4.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
},
"node-fetch": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz",
"integrity": "sha512-j8XsFGCLw79vWXkZtMSmmLaOk9z5SQ9bV/tkbZVCqvgwzrjAGq66igobLofHtF63NvMTp2WjytpsNTGKa+XRIQ==",
"requires": {
"encoding": "^0.1.11",
"is-stream": "^1.0.1"
}
},
"oauth-sign": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
},
"should": {
"version": "13.2.3",
"resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz",
"integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==",
"dev": true,
"requires": {
"should-equal": "^2.0.0",
"should-format": "^3.0.3",
"should-type": "^1.4.0",
"should-type-adaptors": "^1.0.1",
"should-util": "^1.0.0"
}
},
"should-equal": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz",
"integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==",
"dev": true,
"requires": {
"should-type": "^1.4.0"
}
},
"should-format": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz",
"integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=",
"dev": true,
"requires": {
"should-type": "^1.3.0",
"should-type-adaptors": "^1.0.1"
}
},
"should-type": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz",
"integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=",
"dev": true
},
"should-type-adaptors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz",
"integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==",
"dev": true,
"requires": {
"should-type": "^1.3.0",
"should-util": "^1.0.0"
}
},
"should-util": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.0.tgz",
"integrity": "sha1-yYzaN0qmsZDfi6h8mInCtNtiAGM=",
"dev": true
},
"supports-color": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
"integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
"zapier-platform-core": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/zapier-platform-core/-/zapier-platform-core-8.0.1.tgz",
"integrity": "sha512-vuAe7JkFQ88AeQ//NwwNEh8ZjiZr30GRWtwYo7Wo/nx1cqZwq+CRc9zJU2WRrhJfJOtOOTUF6w+pArBTtMOC5A==",
"requires": {
"@types/node": "8.10.20",
"bluebird": "3.5.0",
"content-disposition": "0.5.2",
"dotenv": "5.0.1",
"form-data": "2.3.2",
"lodash": "4.17.11",
"node-fetch": "1.7.1",
"oauth-sign": "0.9.0",
"semver": "5.6.0",
"zapier-platform-schema": "8.0.1"
}
},
"zapier-platform-schema": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/zapier-platform-schema/-/zapier-platform-schema-8.0.1.tgz",
"integrity": "sha512-97KJ0xVLtpU4BiXVaMTPQpiA0T6CQIEzWfzAWwJAWbu5336+6DMFUzDWN4bANBeD3CIsRHHPcZkP8n/17U05ag==",
"requires": {
"jsonschema": "1.1.1",
"lodash": "4.17.10"
},
"dependencies": {
"lodash": {
"version": "4.17.10",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz",
"integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg=="
}
}
}
}
}

View File

@ -1,9 +1,9 @@
{
"name": "dolibarr",
"name": "Dolibarr",
"version": "1.0.0",
"description": "An app for connecting Dolibarr to the Zapier platform.",
"repository": "Dolibarr/dolibarr",
"homepage": "https://www.dolibarr.org/",
"homepage": "https://www.dolibarr.fr/",
"author": "Frédéric France <frederic.france@netlogic.fr>",
"license": "BSD-3-Clause",
"main": "index.js",

View File

@ -227,7 +227,8 @@ while ($fields = $db->fetch_array($resql)) {
$error++; // $errorrecord will be reset
}
$j++;
} else die("error : $sql");
} else
die("error : $sql");

View File

@ -179,7 +179,8 @@ while ($fields = $db->fetch_array($resql)) {
$object->town = trim($fields['FVILLE']);
if ($fields['FPAYS'])
$object->country_id = dol_getIdFromCode($db, trim(ucwords(strtolower($fields['FPAYS']))), 'c_country', 'label', 'rowid');
else $object->country_id = 1;
else
$object->country_id = 1;
$object->phone = trim($fields['FTEL']) ? trim($fields['FTEL']) : trim($fields['FCONTACT']);
$object->phone = substr($object->phone, 0, 20);
$object->fax = trim($fields['FFAX']) ? trim($fields['FFAX']) : trim($fields['FCONTACT']);
@ -298,7 +299,8 @@ while ($fields = $db->fetch_array($resql)) {
$contact->town = trim($fields['LVILLE']);
if ($fields['FPAYS'])
$contact->country_id = dol_getIdFromCode($db, trim(ucwords(strtolower($fields['LPAYS']))), 'c_country', 'label', 'rowid');
else $contact->country_id = 1;
else
$contact->country_id = 1;
$contact->email = $fields['LMAIL'];
$contact->phone = trim($fields['LTEL']) ? trim($fields['LTEL']) : trim($fields['LCONTACT']);
$contact->fax = trim($fields['LFAX']) ? trim($fields['LFAX']) : trim($fields['LCONTACT']);
@ -338,7 +340,8 @@ while ($fields = $db->fetch_array($resql)) {
$error++; // $errorrecord will be reset
}
$j++;
} else die("error : $sql");
} else
die("error : $sql");
$db->commit();

View File

@ -207,7 +207,8 @@ class DBase
$value = true;
elseif ($value == 'f' || $value == 'n')
$value = false;
else $value = null;
else
$value = null;
}
$record[$i] = $value;
}
@ -294,7 +295,8 @@ class DBase
$i = unpack("S$n", $data);
if ($n == 1)
return (int) $i[1];
else return array_merge($i);
else
return array_merge($i);
}
private static function putInt16($fd, $value)
@ -308,7 +310,8 @@ class DBase
$i = unpack("L$n", $data);
if ($n == 1)
return (int) $i[1];
else return array_merge($i);
else
return array_merge($i);
}
private static function putInt32($fd, $value)

View File

@ -179,10 +179,14 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
if ($result)
{
print " OK with ref ".$object->ref."\n";;
} else {
}
else
{
dol_print_error($db, $object->error);
}
} else {
}
else
{
dol_print_error($db, $object->error);
}
}

View File

@ -124,7 +124,8 @@ if ($resql) {
$row = $db->fetch_row($resql);
$societesid[$i] = $row[0];
}
} else { print "err"; }
}
else { print "err"; }
$commandesid = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande";
@ -137,7 +138,8 @@ if ($resql) {
$row = $db->fetch_row($resql);
$commandesid[$i] = $row[0];
}
} else { print "err"; }
}
else { print "err"; }
$prodids = array();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1";
@ -204,12 +206,16 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++)
{
$db->commit();
print " OK with ref ".$object->ref."\n";
} else {
}
else
{
print " KO\n";
$db->rollback();
dol_print_error($db, $object->error);
}
} else {
}
else
{
print " KO\n";
$db->rollback();
dol_print_error($db, $object->error);

View File

@ -210,12 +210,16 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
{
$db->commit();
print " OK with ref ".$object->ref."\n";
} else {
}
else
{
print " KO\n";
$db->rollback();
dol_print_error($db, $object->error);
}
} else {
}
else
{
dol_print_error($db, $object->error);
}
}

View File

@ -136,7 +136,9 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
}
print "Company ".$s." created nom=".$soc->name."\n";
} else {
}
else
{
print "Error: ".$soc->error."\n";
}
}

View File

@ -163,7 +163,9 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
{
print " - Error in create result code = ".$ret." - ".$produit->errorsToString();
$errorrecord++;
} else {
}
else
{
print " - Creation OK with ref ".$produit->ref." - id = ".$ret;
}
@ -178,7 +180,9 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
{
print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString();
$errorrecord++;
} else {
}
else
{
print " - updatePrice OK";
}
}
@ -196,7 +200,9 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
{
print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString();
$errorrecord++;
} else {
}
else
{
print " - setMultiLangs OK";
}
}
@ -221,7 +227,9 @@ if ($mode != 'confirmforced' && ($error || $mode != 'confirm'))
{
print "Rollback any changes.\n";
$db->rollback();
} else {
}
else
{
print "Commit all changes.\n";
$db->commit();
}

View File

@ -181,7 +181,9 @@ 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;
}
}
@ -210,7 +212,9 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
{
print " - Error in create link with sale representative result code = ".$result." - ".$object->errorsToString();
$errorrecord++;
} else {
}
else
{
print " - create link sale representative OK";
}
}
@ -239,7 +243,9 @@ 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";
}
}
@ -271,7 +277,9 @@ 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";
}
}
@ -297,7 +305,9 @@ if ($mode != 'confirmforced' && ($error || $mode != 'confirm'))
{
print "Rollback any changes.\n";
$db->rollback();
} else {
}
else
{
print "Commit all changes.\n";
$db->commit();
}

View File

@ -142,7 +142,9 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape))
{
print " - Error in create result code = ".$ret." - ".$object->errorsToString();
$errorrecord++;
} else {
}
else
{
print " - Creation OK with login ".$object->login." - id = ".$ret;
}
@ -166,7 +168,9 @@ if ($mode != 'confirmforced' && ($error || $mode != 'confirm'))
{
print "Rollback any changes.\n";
$db->rollback();
} else {
}
else
{
print "Commit all changes.\n";
$db->commit();
}

View File

@ -26,7 +26,7 @@
$sapi_type = php_sapi_name();
$script_file = basename(__FILE__);
$path=__DIR__.'/';
$path=dirname(__FILE__).'/';
// Test si mode batch
if (substr($sapi_type, 0, 3) == 'cgi') {
@ -120,8 +120,8 @@ $sqls=array(
"DELETE FROM ".MAIN_DB_PREFIX."expedition where date_creation < '__DATE__'",
),
'delivery'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."deliverydet WHERE fk_delivery IN (select rowid FROM ".MAIN_DB_PREFIX."delivery where date_creation < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."delivery where date_creation < '__DATE__'",
"DELETE FROM ".MAIN_DB_PREFIX."livraisondet WHERE fk_livraison IN (select rowid FROM ".MAIN_DB_PREFIX."livraison where date_creation < '__DATE__')",
"DELETE FROM ".MAIN_DB_PREFIX."livraison where date_creation < '__DATE__'",
),
'contract'=>array(
"DELETE FROM ".MAIN_DB_PREFIX."contratdet_extrafields WHERE fk_object IN (select rowid FROM ".MAIN_DB_PREFIX."contratdet WHERE fk_contrat IN (select rowid FROM ".MAIN_DB_PREFIX."contrat where datec < '__DATE__'))",
@ -198,7 +198,7 @@ if (empty($option))
if ($option != 'all')
{
$listofoptions=explode(',', $option);
foreach ($listofoptions as $cursoroption)
foreach($listofoptions as $cursoroption)
{
if (! in_array($cursoroption, array_keys($sqls))) {
print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n";
@ -264,7 +264,7 @@ function processfamily($family, $date)
global $db, $sqls;
$error=0;
foreach ($sqls[$family] as $sql)
foreach($sqls[$family] as $sql)
{
if (preg_match('/^@/', $sql))
{
@ -302,10 +302,10 @@ function processfamily($family, $date)
$db->begin();
$listofoptions=explode(',', $option);
foreach ($listofoptions as $cursoroption)
foreach($listofoptions as $cursoroption)
{
$oldfamily='';
foreach ($sqls as $family => $familysql)
foreach($sqls as $family => $familysql)
{
if ($cursoroption && $cursoroption != 'all' && $cursoroption != $family) continue;
@ -325,7 +325,9 @@ if ($error || $mode != 'confirm')
{
print "\nRollback any changes.\n";
$db->rollback();
} else {
}
else
{
print "Commit all changes.\n";
$db->commit();
}

View File

@ -69,7 +69,6 @@ then
255)
exit;;
esac
rm $fichtemp
# ----------------------------- database name
DIALOG=${DIALOG=dialog}
@ -87,7 +86,6 @@ then
255)
exit;;
esac
rm $fichtemp
# ---------------------------- database port
DIALOG=${DIALOG=dialog}
@ -106,7 +104,6 @@ then
255)
exit;;
esac
rm $fichtemp
# ---------------------------- compte admin mysql
DIALOG=${DIALOG=dialog}
@ -125,7 +122,6 @@ then
255)
exit;;
esac
rm $fichtemp
# ---------------------------- mot de passe admin mysql
DIALOG=${DIALOG=dialog}
@ -144,7 +140,6 @@ then
255)
exit;;
esac
rm $fichtemp
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `

View File

@ -1,166 +0,0 @@
#!/bin/sh
#------------------------------------------------------
# Script to reinit admin password.
# Note: "dialog" tool need to be available if no parameter provided.
#
# Laurent Destailleur - eldy@users.sourceforge.net
#------------------------------------------------------
# Usage: initdemopassword.sh confirm
# usage: initdemopassword.sh confirm base port login pass
#------------------------------------------------------
export mydir=`echo "$0" | sed -e 's/initdemopassword.sh//'`;
if [ "x$mydir" = 'x' -o "x$mydir" = 'x./' ]
then
export mydir="."
fi
export id=`id -u`;
# ----------------------------- check if root
if [ "x$id" != "x0" -a "x$id" != "x1001" ]
then
echo "Script must be ran as root"
exit
fi
# ----------------------------- command line params
confirm=$1;
base=$2;
port=$3;
demologin=$4;
demopass=$5;
# ----------------------------- check params
if [ "x$confirm" != "xconfirm" ]
then
echo "----- $0 -----"
echo "Usage: initdemopassword.sh confirm [base port login pass]"
exit
fi
# ----------------------------- if no params on command line
if [ "x$demopass" = "x" ]
then
export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1`
export dumpfile=`basename $dumpfile`
# ----------------------------- database name
DIALOG=${DIALOG=dialog}
DIALOG="$DIALOG --ascii-lines"
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Init Dolibarr with demo values" --clear \
--inputbox "Mysql database name :" 16 55 dolibarrdemo 2> $fichtemp
valret=$?
case $valret in
0)
base=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
rm $fichtemp
# ---------------------------- database port
DIALOG=${DIALOG=dialog}
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Init Dolibarr with demo values" --clear \
--inputbox "Mysql port (ex: 3306):" 16 55 3306 2> $fichtemp
valret=$?
case $valret in
0)
port=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
rm $fichtemp
# ----------------------------- demo login
DIALOG=${DIALOG=dialog}
DIALOG="$DIALOG --ascii-lines"
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Reset login password" --clear \
--inputbox "Login to reset :" 16 55 dolibarrdemologin 2> $fichtemp
valret=$?
case $valret in
0)
demologin=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
rm fichtemp
# ----------------------------- demo pass
DIALOG=${DIALOG=dialog}
DIALOG="$DIALOG --ascii-lines"
fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$
trap "rm -f $fichtemp" 0 1 2 5 15
$DIALOG --title "Reset login password" --clear \
--inputbox "Pass to set :" 16 55 dolibarrdemopass 2> $fichtemp
valret=$?
case $valret in
0)
demopass=`cat $fichtemp`;;
1)
exit;;
255)
exit;;
esac
rm fichtemp
export documentdir=`cat $mydir/../../htdocs/conf/conf.php | grep '^\$dolibarr_main_data_root' | sed -e 's/$dolibarr_main_data_root=//' | sed -e 's/;//' | sed -e "s/'//g" | sed -e 's/"//g' `
# ---------------------------- confirmation
DIALOG=${DIALOG=dialog}
$DIALOG --title "Init demo login with demo values" --clear \
--yesno "Do you confirm ? \n Mysql database : '$base' \n Mysql port : '$port' \n Demo login: '$demologin' \n Demo password : '$demopass'" 15 55
case $? in
0) echo "Ok, start process...";;
1) exit;;
255) exit;;
esac
fi
# ---------------------------- run sql file
if [ "x$passwd" != "x" ]
then
export passwd="-p$passwd"
fi
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
echo "echo \"UPDATE llx_user SET pass_crypted = MD5('$demopass') WHERE login = '$demologin';\" | mysql -P$port $base"
echo "UPDATE llx_user SET pass_crypted = MD5('$demopass') WHERE login = '$demologin';" | mysql -P$port $base
export res=$?
if [ $res -ne 0 ]; then
echo "Error to execute sql with mysql -P$port -u$admin -p***** $base"
exit
fi
if [ "x$res" = "x0" ]
then
echo "Success, file successfully loaded."
else
echo "Error, load failed."
fi
echo

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -95,7 +95,8 @@ if ($connection)
dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password), LOG_ERR);
exit(-5);
}
else {
else
{
//$stream = ssh2_exec($connection, '/usr/bin/php -i');
/*
print "Generate dump ".$filesys1.'.bz2'."\n";
@ -124,13 +125,14 @@ if ($connection)
$return_var=0;
print strftime("%Y%m%d-%H%M%S").' '.$fullcommand."\n";
exec($fullcommand, $output, $return_var);
foreach ($output as $line) print $line."\n";
foreach($output as $line) print $line."\n";
//ssh2_sftp_unlink($sftp, $fileinstalllock);
//print $output;
}
}
else {
else
{
print 'Failed to connect to ssh2 to '.$server;
exit(-6);
}

View File

@ -87,7 +87,7 @@ while ($year <= $currentyear)
if ($delta1)
{
foreach ($tables as $tablekey => $tableval)
foreach($tables as $tablekey => $tableval)
{
print "Correct ".$tablekey." for year ".$year." and move them to current year ".$currentyear." ";
$sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)";
@ -105,7 +105,7 @@ while ($year <= $currentyear)
print ".";
$sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set ";
$j=0;
foreach ($tableval as $field)
foreach($tableval as $field)
{
if ($j) $sql2.=", ";
$sql2.= $field." = ".$db->ifsql("DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR) > NOW()", "DATE_ADD(".$field.", INTERVAL ".$delta2." YEAR)", "DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR)");

View File

@ -17,7 +17,6 @@
<exclude-pattern type="relative">*/nltechno*</exclude-pattern>
<exclude-pattern type="relative">*/htdocs/includes</exclude-pattern>
<exclude-pattern type="relative">*/htdocs/includes</exclude-pattern>
<exclude-pattern type="relative">.git</exclude-pattern>
<!-- List of all tests -->
@ -28,7 +27,7 @@
<!-- Rules from Generic Standard -->
<!-- We want to allow empty statement: It allows to put some code comments into the else for examples -->
<rule ref="Generic.CodeAnalysis.EmptyStatement">
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf"/>
@ -102,7 +101,7 @@
<property name="error" value="false"/>
</properties>
</rule>
-->
-->
<!-- We want to allow 'if () { ...small code... }' on same line for better code compacity and readability -->
<rule ref="Generic.Formatting.DisallowMultipleStatements">
<severity>0</severity>
@ -118,7 +117,7 @@
</properties>
</rule>
-->
<rule ref="Generic.Formatting.SpaceAfterCast" />
<rule ref="Generic.Functions.CallTimePassByReference" />
@ -189,8 +188,8 @@
</rule>
<!-- Check for duplicate class names -->
<!-- Disabled: We need this for dependency injection.
<rule ref="Generic.Classes.DuplicateClassName" />
<!-- Disabled: We need this for dependency injection.
<rule ref="Generic.Classes.DuplicateClassName" />
-->
@ -214,10 +213,6 @@
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen" />
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
<!-- <rule ref="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis" /> -->
<!-- <rule ref="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace" /> -->
<rule ref="Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword" />
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen" />
<rule ref="Squiz.ControlStructures.ForEachLoopDeclaration.SpaceBeforeClose" />
@ -314,16 +309,16 @@
<rule ref="PEAR.Files.IncludingFile.UseInclude">
<severity>0</severity>
</rule>
<!-- We disable this. We must be allowed to use strict require instead of non strict include anywhere -->
<rule ref="PEAR.Files.IncludingFile.UseIncludeOnce">
<severity>0</severity>
</rule>
<rule ref="PEAR.Files.IncludingFile.UseRequire">
<severity>0</severity>
</rule>
<!-- We disable this: We want to allow include_once -->
<rule ref="PEAR.Files.IncludingFile.UseRequireOnce">
<severity>0</severity>
@ -337,7 +332,7 @@
<rule ref="PEAR.Functions.FunctionCallSignature.CloseBracketLine">
<severity>0</severity>
</rule>
<!-- We disable this: We want to allow small function on 1 line -->
<rule ref="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket">
<severity>0</severity>
@ -390,7 +385,7 @@
<!--<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
<severity>0</severity>
</rule>-->
<!-- We disable this: We don't want to have private methods prefixed with an underscore -->
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
<severity>0</severity>
@ -431,5 +426,5 @@
<rule ref="PSR2.Classes.PropertyDeclaration.VarUsed" />
<!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
<rule ref="PSR2.Files.ClosingTag"/>
</ruleset>

View File

@ -76,12 +76,14 @@ function getfieldname($l)
if (preg_match("/`(.*)`/", $l, $regs)) {
if ($regs[1])
return $regs[1];
else return null;
else
return null;
} // if its not in quotes, then it should (we hope!) be the first "word" on the line, up to the first space.
elseif (preg_match("/([^\ ]*)/", trim($l), $regs)) {
if ($regs[1])
return $regs[1];
else return null;
else
return null;
}
}
@ -100,7 +102,8 @@ function formatsize($s)
return sprintf("%.1f", round($s / 1024, 1)) . "K";
elseif ($s < pow(2, 30))
return sprintf("%.1f", round($s / 1024 / 1024, 1)) . "M";
else return sprintf("%.1f", round($s / 1024 / 1024 / 1024, 1)) . "G";
else
return sprintf("%.1f", round($s / 1024 / 1024 / 1024, 1)) . "G";
}
/**
@ -143,7 +146,8 @@ function pg2mysql_large($infilename, $outfilename)
if ($c % 2 != 0) {
if ($inquotes)
$inquotes = false;
else $inquotes = true;
else
$inquotes = true;
}
if ($linenum % 10000 == 0) {
@ -325,7 +329,8 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$num = $regs[1];
if ($num <= 255)
$line = preg_replace("/ character varying\([0-9]*\)/", " varchar($num)", $line);
else $line = preg_replace("/ character varying\([0-9]*\)/", " text", $line);
else
$line = preg_replace("/ character varying\([0-9]*\)/", " text", $line);
}
// character varying with no size, we will default to varchar(255)
if (preg_match("/ character varying/", $line)) {
@ -347,7 +352,8 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$num = $regs[1];
if ($num <= 255)
$line = preg_replace("/ character\([0-9]*\)/", " varchar($num)", $line);
else $line = preg_replace("/ character\([0-9]*\)/", " text", $line);
else
$line = preg_replace("/ character\([0-9]*\)/", " text", $line);
}
// timestamps
$line = str_replace(" timestamp with time zone", " datetime", $line);
@ -357,8 +363,8 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
$line = str_replace(" time with time zone", " time", $line);
$line = str_replace(" time without time zone", " time", $line);
$line = str_replace(" timestamp DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", $line);
$line = str_replace(" timestamp without time zone DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", $line);
$line = str_replace(" timestamp DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP", $line);
$line = str_replace(" timestamp without time zone DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP", $line);
if (strstr($line, "auto_increment") || preg_match('/ rowid int/', $line) || preg_match('/ id int/', $line)) {
$field = getfieldname($line);
@ -459,7 +465,8 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true)
if ($c % 2 != 0) {
if ($inquotes)
$inquotes = false;
else $inquotes = true;
else
$inquotes = true;
// echo "inquotes=$inquotes\n";
}
} while (substr($lines[$linenumber], - 3, - 1) != ");" || $inquotes);

View File

@ -1,21 +0,0 @@
<?php
$a = microtime(true);
$i = 0;
while ($i < 1000000)
{
$key = '1234567890111213141516171819'.$i;
if ($i == 1000) $key = 'MAIN_MODULE_AAAAAiiiiiiiiiiiiiiiiiiiiiiiiiiiii';
//if (preg_match('/^MAIN_MODULE_/', $key)) {
//if (substr($key, 0, 12) == 'MAIN_MODULE_') {
if (strpos($key, 'MAIN_MODULE_') === 0) {
print "Found\n";
}
$i++;
}
$b = microtime(true);
print $b - $a."\n";

View File

@ -77,7 +77,7 @@ class autoTranslator
$files = $this->getTranslationFilesArray($this->_refLang);
$counter = 1;
foreach ($files as $file)
foreach($files as $file)
{
if ($this->_limittofile && $this->_limittofile != $file) continue;
$counter++;
@ -94,7 +94,7 @@ class autoTranslator
// If we must process all languages
$arraytmp=dol_dir_list($this->_langDir, 'directories', 0);
foreach ($arraytmp as $dirtmp)
foreach($arraytmp as $dirtmp)
{
if ($dirtmp['name'] === $this->_refLang) continue; // We discard source language
$tmppart=explode('_', $dirtmp['name']);
@ -112,7 +112,7 @@ class autoTranslator
}
// Process translation of source file for each target languages
foreach ($targetlangs as $my_destlang)
foreach($targetlangs as $my_destlang)
{
$this->_translatedFiles = array();
@ -124,14 +124,15 @@ class autoTranslator
echo "File not found: " . $destPath . ". We generate it.<br>\n";
$this->createTranslationFile($destPath, $my_destlang);
}
else {
else
{
echo "Updating file: " . $destPath . "<br>\n";
}
// Translate lines
$fileContentDest = file($destPath, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
$newlines=0;
foreach ($fileContent as $line){
foreach($fileContent as $line){
$key = $this->getLineKey($line);
$value = $this->getLineValue($line);
if ($key && $value)
@ -166,7 +167,7 @@ class autoTranslator
fwrite($fp, "\n");
fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n");
fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n");
foreach ($this->_translatedFiles[$file] as $line) {
foreach($this->_translatedFiles[$file] as $line) {
fwrite($fp, $line . "\n");
}
fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n");
@ -208,7 +209,7 @@ class autoTranslator
{
//print "key =".$key."\n";
foreach ($content as $line) {
foreach($content as $line) {
$destKey = $this->getLineKey($line);
$destValue = $this->getLineValue($line);
// If translated return
@ -272,8 +273,8 @@ class autoTranslator
private function getTranslationFilesArray($lang)
{
$dir = new DirectoryIterator($this->_langDir.$lang);
while ($dir->valid()) {
if (!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) {
while($dir->valid()) {
if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) {
$files[] = $dir->getFilename();
}
$dir->next();

View File

@ -360,14 +360,16 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
$unused[$value] = $line;
echo $line; // $trad contains the \n
}
else {
else
{
unset($output);
//print 'X'.$output.'Y';
}
}
if (empty($unused)) print "No string not used found.\n";
else {
else
{
$filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang';
print "Strings in en_US that are never used are saved into file ".$filetosave.":\n";
file_put_contents($filetosave, implode("", $unused));

View File

@ -80,8 +80,8 @@ $aEnglish = array();
if ($filesToProcess == 'all')
{
$dir = new DirectoryIterator('htdocs/langs/'.$lPrimary);
while ($dir->valid()) {
if (!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) {
while($dir->valid()) {
if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) {
$files[] = $dir->getFilename();
}
$dir->next();
@ -94,7 +94,7 @@ else $filesToProcess=explode(',', $filesToProcess);
// Loop on each file
foreach ($filesToProcess as $fileToProcess)
foreach($filesToProcess as $fileToProcess)
{
$lPrimaryFile = 'htdocs/langs/'.$lPrimary.'/'.$fileToProcess;
$lSecondaryFile = 'htdocs/langs/'.$lSecondary.'/'.$fileToProcess;
@ -285,7 +285,8 @@ foreach ($filesToProcess as $fileToProcess)
print "Key $key is redundant in file $lPrimaryFile (line: $cnt) - Already found into ".$fileFirstFound[$key]." (line: ".$lineFirstFound[$key].").\n";
continue;
}
else {
else
{
$fileFirstFound[$key] = $fileToProcess;
$lineFirstFound[$key] = $cnt;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

View File

@ -17,8 +17,6 @@ on Internet on web following sites:<br>
<br>
* <a href="https://demo.dolibarr.org">Dolibarr demo (online)</a><br>
<br>
* <a href="https://www.nltechno.com/pages/dolibarrwinbin.php">DoliWamp, the Dolibarr for Windows</a><br>
<br>
* <a href="https://www.dolistore.com">DoliStore (official addons/plugins market place)</a><br>
</body>

View File

@ -19,7 +19,7 @@ Download
Install
--------------------------------
* For a Quick guide, take a look at README file into root directory.
* For a Quick guide, take a look at README.md file into root directory.
* More complete documentations are also available on line on the Dolibarr Wiki:
https://wiki.dolibarr.org

View File

@ -22,7 +22,7 @@ Download / Herunterladen
Installation
--------------------------------
* Für eine kurze Einleitung, schau auf die README Datei im Hauptverzeichnis.
* Für eine kurze Einleitung, schau auf die README.md Datei im Hauptverzeichnis.
* Umfangreiche Dokumentationen sind im Dolibarr Wiki zu finden:
https://wiki.dolibarr.org/index.php/Hauptseite

View File

@ -19,9 +19,7 @@ https://www.dolistore.org
Documentation utilisateur
--------------------------------
* Pour une prise en main et installation rapide, consultez le fichier
README-FR à la racine.
* Pour une prise en main et installation rapide, consultez le fichier README-FR.md à la racine.
* Une documentation utilisateur francophone plus consistante est disponible en
ligne sur le wiki de Dolibarr à l'adresse:
https://wiki.dolibarr.org
* Une documentation utilisateur francophone plus consistante est disponible en ligne sur le wiki de Dolibarr à l'adresse:
https://wiki.dolibarr.org

View File

@ -4,4 +4,5 @@ User guide
--------------------------------
* All Dolibarr guides are available, on line, on the Dolibarr Web site:
https://www.dolibarr.org

View File

@ -3,9 +3,6 @@ README (french)
Documentation utilisateur
--------------------------------
* Pour une prise en main et installation rapide, consultez le fichier
README-FR à la racine.
La documentation utilisateur francophone est disponible en ligne sur le site Web de Dolibarr à l'adresse:
* Une documentation utilisateur francophone plus consistante est disponible en
ligne sur le site Web de Dolibarr à l'adresse:
https://www.dolibarr.fr

View File

@ -54,8 +54,8 @@ if (!$user->rights->accounting->chartofaccount) accessforbidden();
// Load variable for pagination
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
@ -65,12 +65,12 @@ if (!$sortfield) $sortfield = "aa.account_number";
if (!$sortorder) $sortorder = "ASC";
$arrayfields = array(
'aa.account_number'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1),
'aa.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
'aa.account_number'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1),
'aa.label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
'aa.labelshort'=>array('label'=>$langs->trans("LabelToShow"), 'checked'=>1),
'aa.account_parent'=>array('label'=>$langs->trans("Accountparent"), 'checked'=>1),
'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>1, 'help'=>'PcgtypeDesc'),
'aa.reconcilable'=>array('label'=>$langs->trans("Reconcilable"), 'checked'=>1),
'aa.pcg_type'=>array('label'=>$langs->trans("Pcgtype"), 'checked'=>1, 'help'=>'PcgtypeDesc'),
'aa.reconcilable'=>array('label'=>$langs->trans("Reconcilable"), 'checked'=>1),
'aa.active'=>array('label'=>$langs->trans("Activated"), 'checked'=>1)
);
@ -93,24 +93,24 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
if (empty($reshook))
{
if (!empty($cancel)) $action = '';
if (!empty($cancel)) $action = '';
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
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 = "";
$search_label = "";
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 = "";
$search_label = "";
$search_labelshort = "";
$search_accountparent = "";
$search_pcgtype = "";
$search_pcgtype = "";
$search_array_options = array();
}
if ((GETPOST('valid_change_chart', 'alpha') && GETPOST('chartofaccounts', 'int') > 0) // explicit click on button 'Change and load' with js on
|| (GETPOST('chartofaccounts', 'int') > 0 && GETPOST('chartofaccounts', 'int') != $conf->global->CHARTOFACCOUNTS)) // a submit of form is done and chartofaccounts combo has been modified
{
if ($chartofaccounts > 0)
{
}
if ((GETPOST('valid_change_chart', 'alpha') && GETPOST('chartofaccounts', 'int') > 0) // explicit click on button 'Change and load' with js on
|| (GETPOST('chartofaccounts', 'int') > 0 && GETPOST('chartofaccounts', 'int') != $conf->global->CHARTOFACCOUNTS)) // a submit of form is done and chartofaccounts combo has been modified
{
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;
@ -119,7 +119,8 @@ if (empty($reshook))
{
$obj = $db->fetch_object($resql);
$country_code = $obj->code;
} else dol_print_error($db);
}
else dol_print_error($db);
// Try to load sql file
if ($country_code)
@ -142,39 +143,41 @@ if (empty($reshook))
if ($result > 0)
{
setEventMessages($langs->trans("ChartLoaded"), null, 'mesgs');
} else {
}
else
{
setEventMessages($langs->trans("ErrorDuringChartLoad"), null, 'warnings');
}
}
if (!dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) {
$error++;
}
} else {
$error++;
}
}
if (!dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) {
$error++;
}
} else {
$error++;
}
}
if ($action == 'disable') {
if ($accounting->fetch($id)) {
$mode = GETPOST('mode', 'int');
$result = $accounting->accountDeactivate($id, $mode);
}
if ($action == 'disable') {
if ($accounting->fetch($id)) {
$mode = GETPOST('mode', 'int');
$result = $accounting->accountDeactivate($id, $mode);
}
$action = 'update';
if ($result < 0) {
setEventMessages($accounting->error, $accounting->errors, 'errors');
}
} elseif ($action == 'enable') {
if ($accounting->fetch($id)) {
$mode = GETPOST('mode', 'int');
$result = $accounting->account_activate($id, $mode);
}
$action = 'update';
if ($result < 0) {
setEventMessages($accounting->error, $accounting->errors, 'errors');
}
}
$action = 'update';
if ($result < 0) {
setEventMessages($accounting->error, $accounting->errors, 'errors');
}
} elseif ($action == 'enable') {
if ($accounting->fetch($id)) {
$mode = GETPOST('mode', 'int');
$result = $accounting->account_activate($id, $mode);
}
$action = 'update';
if ($result < 0) {
setEventMessages($accounting->error, $accounting->errors, 'errors');
}
}
}
@ -230,9 +233,10 @@ if (strlen(trim($search_account))) {
$search_account_tmp_clean = preg_replace('/^\^/', '', $search_account_tmp);
$search_account_clean = preg_replace('/^\^/', '', $search_account);
}
$sql .= " AND (aa.account_number LIKE '".$db->escape($startchar.$search_account_tmp_clean)."'";
$sql .= " OR aa.account_number LIKE '".$db->escape($startchar.$search_account_clean)."%')";
} else $sql .= natural_search("aa.account_number", $search_account_tmp);
$sql .= " AND (aa.account_number LIKE '".$startchar.$search_account_tmp_clean."'";
$sql .= " OR aa.account_number LIKE '".$startchar.$search_account_clean."%')";
}
else $sql .= natural_search("aa.account_number", $search_account_tmp);
}
}
if (strlen(trim($search_label))) $sql .= natural_search("aa.label", $search_label);
@ -263,19 +267,19 @@ if ($resql)
{
$num = $db->num_rows($resql);
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage;
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_labelshort) $param .= '&search_labelshort='.urlencode($search_labelshort);
if ($search_accountparent > 0 || $search_accountparent == '0') $param .= '&search_accountparent='.urlencode($search_accountparent);
if ($search_pcgtype) $param .= '&search_pcgtype='.urlencode($search_pcgtype);
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
if ($optioncss != '') $param .= '&optioncss='.$optioncss;
if (!empty($conf->use_javascript_ajax))
{
print '<!-- Add javascript to reload page when we click "Change plan" -->
if (!empty($conf->use_javascript_ajax))
{
print '<!-- Add javascript to reload page when we click "Change plan" -->
<script type="text/javascript">
$(document).ready(function () {
$("#change_chart").on("click", function (e) {
@ -285,7 +289,7 @@ if ($resql)
});
});
</script>';
}
}
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
@ -294,62 +298,65 @@ if ($resql)
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.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$newcardbutton .= dolGetButtonTitle($langs->trans("New"), $langs->trans("Addanaccount"), 'fa fa-plus-circle', './card.php?action=create');
$newcardbutton .= dolGetButtonTitle($langs->trans("New"), $langs->trans("Addanaccount"), 'fa fa-plus-circle', './card.php?action=create');
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1);
print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit);
// Box to select active chart of account
print $langs->trans("Selectchartofaccounts")." : ";
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
$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 AND c.active = 1";
$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) {
$obj = $db->fetch_object($resqlchart);
print $langs->trans("Selectchartofaccounts")." : ";
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
$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 AND c.active = 1";
$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) {
$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>';
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="'.(empty($conf->use_javascript_ajax) ? 'submit' : 'button').'" class="button" name="change_chart" id="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
$i++;
}
}
else dol_print_error($db);
print "</select>";
print ajax_combobox("chartofaccounts");
print '<input type="'.(empty($conf->use_javascript_ajax) ? 'submit' : 'button').'" class="button" name="change_chart" id="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
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$moreforfilter = '';
$massactionbutton = '';
$moreforfilter = '';
$massactionbutton = '';
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";
// Line for search fields
print '<tr class="liste_titre_filter">';
if (!empty($arrayfields['aa.account_number']['checked'])) print '<td class="liste_titre"><input type="text" class="flat width100" name="search_account" value="'.$search_account.'"></td>';
if (!empty($arrayfields['aa.label']['checked'])) print '<td class="liste_titre"><input type="text" class="flat width150" name="search_label" value="'.$search_label.'"></td>';
if (!empty($arrayfields['aa.labelshort']['checked'])) print '<td class="liste_titre"><input type="text" class="flat width100" name="search_labelshort" value="'.$search_labelshort.'"></td>';
if (!empty($arrayfields['aa.account_number']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_account" value="'.$search_account.'"></td>';
if (!empty($arrayfields['aa.label']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_label" value="'.$search_label.'"></td>';
if (!empty($arrayfields['aa.labelshort']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_labelshort" value="'.$search_labelshort.'"></td>';
if (!empty($arrayfields['aa.account_parent']['checked'])) {
print '<td class="liste_titre">';
print $formaccounting->select_account($search_accountparent, 'search_accountparent', 2);
print '</td>';
}
if (!empty($arrayfields['aa.pcg_type']['checked'])) print '<td class="liste_titre"><input type="text" class="flat width100" name="search_pcgtype" value="'.$search_pcgtype.'"></td>';
if (!empty($arrayfields['aa.pcg_type']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="6" name="search_pcgtype" value="'.$search_pcgtype.'"></td>';
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (!empty($arrayfields['aa.reconcilable']['checked'])) print '<td class="liste_titre">&nbsp;</td>'; }
if (!empty($arrayfields['aa.active']['checked'])) print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre maxwidthsearch">';
@ -358,7 +365,7 @@ if ($resql)
print '</td>';
print '</tr>';
print '<tr class="liste_titre">';
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.labelshort']['checked'])) print_liste_field_titre($arrayfields['aa.labelshort']['label'], $_SERVER["PHP_SELF"], "aa.labelshort", "", $param, '', $sortfield, $sortorder);
@ -388,7 +395,7 @@ if ($resql)
if (!empty($arrayfields['aa.account_number']['checked']))
{
print "<td>";
print $accountstatic->getNomUrl(1, 0, 0, '', 0, 1, 0, 'accountcard');
print $accountstatic->getNomUrl(1, 0, 0, '', 0, 1);
print "</td>\n";
if (!$i) $totalarray['nbfield']++;
}
@ -414,24 +421,20 @@ if ($resql)
// Account parent
if (!empty($arrayfields['aa.account_parent']['checked']))
{
// Note: obj->account_parent is a foreign key to a rowid. It is field in child table and obj->rowid2 is same, but in parent table.
// So for orphans, obj->account_parent is set but not obj->rowid2
if (!empty($obj->account_parent) && !empty($obj->rowid2))
if (!empty($obj->account_parent))
{
print "<td>";
print '<!-- obj->account_parent = '.$obj->account_parent.' obj->rowid2 = '.$obj->rowid2.' -->';
$accountparent->id = $obj->rowid2;
$accountparent->label = $obj->label2;
$accountparent->account_number = $obj->account_number2; // Sotre an account number for output
$accountparent->account_number = $obj->account_number2;
print "<td>";
print $accountparent->getNomUrl(1);
print "</td>\n";
if (!$i) $totalarray['nbfield']++;
} else {
print '<td>';
if (!empty($obj->account_parent)) {
print '<!-- Bad value for obj->account_parent = '.$obj->account_parent.': is a rowid that does not exists -->';
}
print '</td>';
}
else
{
print '<td>&nbsp;</td>';
if (!$i) $totalarray['nbfield']++;
}
}
@ -485,11 +488,11 @@ if ($resql)
// Action
print '<td class="center">';
if ($user->rights->accounting->chartofaccount) {
print '<a class="editfielda" href="./card.php?action=update&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">';
print '<a class="editfielda" href="./card.php?action=update&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?chartofaccounts='.$object->id).'">';
print img_edit();
print '</a>';
print '&nbsp;';
print '<a class="marginleftonly" href="./card.php?action=delete&token='.newToken().'&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?'.$param).'">';
print '<a class="marginleftonly" href="./card.php?action=delete&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?chartofaccounts='.$object->id).'">';
print img_delete();
print '</a>';
}

View File

@ -228,7 +228,8 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
{
if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU');
} elseif ($value == 'entity') {
}
elseif ($value == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql .= ",";
@ -244,10 +245,13 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
{
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
$_POST = array('id'=>$id); // Clean $_POST array, we keep only
} else {
}
else
{
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
} else {
}
else {
dol_print_error($db);
}
}
@ -256,7 +260,8 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
// Si verif ok et action modify, on modifie la ligne
if ($ok && GETPOST('actionmodify', 'alpha'))
{
if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; }
if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; }
else { $rowidcol = "rowid"; }
// Modify entry
$sql = "UPDATE ".$tabname[$id]." SET ";
@ -271,7 +276,8 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
{
if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU');
} elseif ($field == 'entity') {
}
elseif ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql .= ",";
@ -280,7 +286,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'";
$i++;
}
$sql .= " WHERE ".$rowidcol." = ".((int) $rowid);
$sql .= " WHERE ".$rowidcol." = '".$rowid."'";
dol_syslog("actionmodify", LOG_DEBUG);
//print $sql;
@ -300,9 +306,10 @@ if (GETPOST('actioncancel', 'alpha'))
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." = ".((int) $rowid);
$sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'";
dol_syslog("delete", LOG_DEBUG);
$result = $db->query($sql);
@ -311,7 +318,9 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
{
setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors');
} else {
}
else
{
dol_print_error($db);
}
}
@ -320,12 +329,14 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
// 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." = ".((int) $rowid);
} elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$db->escape($code)."'";
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'";
}
$result = $db->query($sql);
@ -338,12 +349,14 @@ if ($action == $acts[0])
// 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." = ".((int) $rowid);
} elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$db->escape($code)."'";
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'";
}
$result = $db->query($sql);
@ -356,12 +369,14 @@ if ($action == $acts[1])
// favorite
if ($action == 'activate_favorite')
{
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 favorite = 1 WHERE ".$rowidcol." = ".((int) $rowid);
} elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$db->escape($code)."'";
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$code."'";
}
$result = $db->query($sql);
@ -374,12 +389,14 @@ if ($action == 'activate_favorite')
// disable favorite
if ($action == 'disable_favorite')
{
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 favorite = 0 WHERE ".$rowidcol." = ".((int) $rowid);
} elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$db->escape($code)."'";
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$rowid."'";
}
elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$code."'";
}
$result = $db->query($sql);
@ -472,13 +489,13 @@ if ($id)
if ($valuetoshow != '') {
print '<td class="'.$class.'">';
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>';
} elseif (!empty($tabhelp[$id][$value])) {
print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]);
} else {
print $valuetoshow;
}
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>';
} elseif (!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;
@ -564,7 +581,9 @@ if ($id)
print '<td class="liste_titre">';
print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone');
print '</td>';
} else {
}
else
{
print '<td class="liste_titre"></td>';
}
}
@ -610,7 +629,9 @@ if ($id)
print '<td colspan="3" class="right"><a name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'">&nbsp;</a><input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
print '&nbsp;<input type="submit" class="button" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
} else {
}
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
@ -631,20 +652,26 @@ if ($id)
if ($value == 'element')
{
$valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow;
} elseif ($value == 'source')
}
elseif ($value == 'source')
{
$valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow;
} elseif ($valuetoshow == 'all') {
}
elseif ($valuetoshow == 'all') {
$valuetoshow = $langs->trans('All');
} elseif ($fieldlist[$field] == 'country') {
}
elseif ($fieldlist[$field] == 'country') {
if (empty($obj->country_code))
{
$valuetoshow = '-';
} else {
}
else
{
$key = $langs->trans("Country".strtoupper($obj->country_code));
$valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country);
}
} elseif ($fieldlist[$field] == 'country_id') {
}
elseif ($fieldlist[$field] == 'country_id') {
$showfield = 0;
}
@ -669,11 +696,11 @@ if ($id)
print "</td>";
// Modify link
if ($canbemodified) print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit&token='.newToken().'">'.img_edit().'</a></td>';
if ($canbemodified) print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>';
// Delete link
if ($iserasable) print '<td class="center"><a href="'.$url.'action=delete&token='.newToken().'">'.img_delete().'</a></td>';
if ($iserasable) print '<td class="center"><a href="'.$url.'action=delete">'.img_delete().'</a></td>';
else print '<td>&nbsp;</td>';
print "</tr>\n";
@ -681,7 +708,8 @@ if ($id)
$i++;
}
}
} else {
}
else {
dol_print_error($db);
}
@ -733,7 +761,8 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context =
$fieldname = 'country';
print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : '')), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone');
print '</td>';
} elseif ($fieldlist[$field] == 'country_id')
}
elseif ($fieldlist[$field] == 'country_id')
{
if (!in_array('country', $fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate)
{
@ -742,7 +771,8 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context =
print '<input type="hidden" name="'.$fieldlist[$field].'" value="'.$country_id.'">';
print '</td>';
}
} elseif ($fieldlist[$field] == 'type_cdr') {
}
elseif ($fieldlist[$field] == 'type_cdr') {
if ($fieldlist[$field] == 'type_cdr') print '<td class="center">';
else print '<td>';
if ($fieldlist[$field] == 'type_cdr') {
@ -751,9 +781,12 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context =
print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1);
}
print '</td>';
} elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
}
elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
print '<td><input type="text" class="flat" value="'.(!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'').'" size="10" name="'.$fieldlist[$field].'"></td>';
} else {
}
else
{
print '<td>';
$size = ''; $class = '';
if ($fieldlist[$field] == 'code') $size = 'size="8" ';

View File

@ -44,8 +44,6 @@ $cancel = GETPOST('cancel', 'alpha');
$accountingaccount = GETPOST('accountingaccount', 'alpha');
// Security check
if ($user->socid > 0) accessforbidden();
if (!$user->rights->accounting->chartofaccount) accessforbidden();
$object = new AccountingAccount($db);
@ -77,14 +75,18 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
if ($conf->global->ACCOUNTING_MANAGE_ZERO == 1)
{
$account_number = GETPOST('account_number', 'string');
} else {
}
else
{
$account_number = clean_account(GETPOST('account_number', 'string'));
}
if (GETPOST('account_parent', 'int') <= 0)
{
$account_parent = 0;
} else {
}
else
{
$account_parent = GETPOST('account_parent', 'int');
}
@ -102,22 +104,24 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
$error = 1;
$action = "create";
setEventMessages($object->error, $object->errors, 'errors');
} elseif ($res == - 4) {
}
elseif ($res == - 4) {
$error = 2;
$action = "create";
setEventMessages($object->error, $object->errors, 'errors');
} elseif ($res < 0)
}
elseif ($res < 0)
{
$error++;
setEventMessages($object->error, $object->errors, 'errors');
$action = "create";
$error++;
setEventMessages($object->error, $object->errors, 'errors');
$action = "create";
}
if (!$error)
{
setEventMessages("RecordCreatedSuccessfully", null, 'mesgs');
$urltogo = $backtopage ? $backtopage : dol_buildpath('/accountancy/admin/account.php', 1);
header("Location: ".$urltogo);
exit;
setEventMessages("RecordCreatedSuccessfully", null, 'mesgs');
$urltogo = $backtopage ? $backtopage : dol_buildpath('/accountancy/admin/account.php', 1);
header("Location: ".$urltogo);
exit;
}
}
} elseif ($action == 'edit' && $user->rights->accounting->chartofaccount) {
@ -136,14 +140,18 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
if ($conf->global->ACCOUNTING_MANAGE_ZERO == 1)
{
$account_number = GETPOST('account_number', 'string');
} else {
}
else
{
$account_number = clean_account(GETPOST('account_number', 'string'));
}
if (GETPOST('account_parent', 'int') <= 0)
{
$account_parent = 0;
} else {
}
else
{
$account_parent = GETPOST('account_parent', 'int');
}
@ -158,15 +166,15 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount)
$result = $object->update($user);
if ($result > 0) {
$urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"]."?id=".$id);
header("Location: ".$urltogo);
$urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"]."?id=".$id);
header("Location: ".$urltogo);
exit();
} else {
$mesg = $object->error;
}
} else {
$urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"]."?id=".$id);
header("Location: ".$urltogo);
$urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"]."?id=".$id);
header("Location: ".$urltogo);
exit();
}
} elseif ($action == 'delete' && $user->rights->accounting->chartofaccount) {
@ -210,7 +218,7 @@ if ($action == 'create') {
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="add">';
print dol_get_fiche_head();
dol_fiche_head();
print '<table class="border centpercent">';
@ -252,7 +260,7 @@ if ($action == 'create') {
print '</table>';
print dol_get_fiche_end();
dol_fiche_end();
print '<div class="center">';
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
@ -261,7 +269,8 @@ if ($action == 'create') {
print '</div>';
print '</form>';
} elseif ($id > 0 || $ref) {
}
elseif ($id > 0 || $ref) {
$result = $object->fetch($id, $ref, 1);
if ($result > 0) {
@ -272,7 +281,7 @@ if ($action == 'create') {
// Edit mode
if ($action == 'update')
{
print dol_get_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');
print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
print '<input type="hidden" name="token" value="'.newToken().'">';
@ -314,7 +323,7 @@ if ($action == 'create') {
print '</table>';
print dol_get_fiche_end();
dol_fiche_end();
print '<div class="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Save").'">';
@ -327,7 +336,7 @@ if ($action == 'create') {
// View mode
$linkback = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
print dol_get_fiche_head($head, 'card', $langs->trans('AccountAccounting'), -1, 'billr');
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), -1, 'billr');
dol_banner_tab($object, 'ref', $linkback, 1, 'account_number', 'ref');
@ -364,7 +373,7 @@ if ($action == 'create') {
print '</div>';
print dol_get_fiche_end();
dol_fiche_end();
/*
* Actions buttons
@ -372,13 +381,13 @@ if ($action == 'create') {
print '<div class="tabsAction">';
if (!empty($user->rights->accounting->chartofaccount)) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=update&token='.newToken().'&id='.$id.'">'.$langs->trans('Modify').'</a>';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=update&id='.$id.'">'.$langs->trans('Modify').'</a>';
} else {
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Modify').'</a>';
}
if (!empty($user->rights->accounting->chartofaccount)) {
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$id.'">'.$langs->trans('Delete').'</a>';
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&id='.$id.'">'.$langs->trans('Delete').'</a>';
} else {
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Delete').'</a>';
}

View File

@ -102,7 +102,7 @@ print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="display">';
print dol_get_fiche_head();
dol_fiche_head();
print '<table class="border centpercent">';
@ -146,7 +146,7 @@ if (!empty($cat_id))
print '</table>';
print dol_get_fiche_end();
dol_fiche_end();
print '</form>';
@ -170,9 +170,9 @@ if ($action == 'display' || $action == 'delete') {
print '<td>'.length_accountg($cpt->account_number).'</td>';
print '<td>'.$cpt->label.'</td>';
print '<td class="right">';
print '<a href="'.$_SERVER['PHP_SELF'].'?action=delete&token='.newToken().'&account_category='.$cat_id.'&cptid='.$cpt->rowid.'">';
print "<a href= '".$_SERVER['PHP_SELF']."?action=delete&account_category=".$cat_id."&cptid=".$cpt->rowid."'>";
print $langs->trans("DeleteFromCat");
print img_picto($langs->trans("DeleteFromCat"), 'unlink', 'class="paddingleft"');
print img_picto($langs->trans("DeleteFromCat"), 'unlink');
print "</a>";
print "</td>";
print "</tr>\n";

File diff suppressed because it is too large Load Diff

View File

@ -39,8 +39,8 @@ $action = GETPOST('action', 'aZ09');
$list_account_main = array(
'ACCOUNTING_RESULT_PROFIT',
'ACCOUNTING_RESULT_LOSS'
'ACCOUNTING_RESULT_PROFIT',
'ACCOUNTING_RESULT_LOSS'
);
/*
@ -48,17 +48,17 @@ $list_account_main = array(
*/
if ($action == 'update') {
$error = 0;
$error = 0;
$defaultjournal = GETPOST('ACCOUNTING_CLOSURE_DEFAULT_JOURNAL', 'alpha');
$defaultjournal = GETPOST('ACCOUNTING_CLOSURE_DEFAULT_JOURNAL', 'alpha');
if (!empty($defaultjournal)) {
if (!dolibarr_set_const($db, 'ACCOUNTING_CLOSURE_DEFAULT_JOURNAL', $defaultjournal, 'chaine', 0, '', $conf->entity)) {
$error++;
}
} else {
$error++;
}
if (!empty($defaultjournal)) {
if (!dolibarr_set_const($db, 'ACCOUNTING_CLOSURE_DEFAULT_JOURNAL', $defaultjournal, 'chaine', 0, '', $conf->entity)) {
$error++;
}
} else {
$error++;
}
foreach ($list_account_main as $constname) {
$constvalue = GETPOST($constname, 'alpha');
@ -92,27 +92,27 @@ print '<span class="opacitymedium">'.$langs->trans("DefaultClosureDesc").'</span
print '<br>';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="update">';
// Define main accounts for closure
print '<table class="noborder centpercent">';
foreach ($list_account_main as $key) {
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
$keydesc = $key.'_Desc';
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
$keydesc = $key.'_Desc';
$htmltext = $langs->trans($keydesc);
print '<td class="fieldrequired" width="50%">';
print $form->textwithpicto($label, $htmltext);
print '</td>';
// Value
print '<td>'; // Do not force class=right, or it align also the content of the select box
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
print '</td>';
print '</tr>';
$htmltext = $langs->trans($keydesc);
print '<td class="fieldrequired" width="50%">';
print $form->textwithpicto($label, $htmltext);
print '</td>';
// Value
print '<td>'; // Do not force class=right, or it align also the content of the select box
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
print '</td>';
print '</tr>';
}
// Journal

View File

@ -47,9 +47,9 @@ $action = GETPOST('action', 'aZ09');
$list_account_main = array(
'ACCOUNTING_ACCOUNT_CUSTOMER',
'ACCOUNTING_ACCOUNT_SUPPLIER',
'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',
'ACCOUNTING_ACCOUNT_CUSTOMER',
'ACCOUNTING_ACCOUNT_SUPPLIER',
'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT',
);
$list_account = array();
@ -75,7 +75,7 @@ if ($mysoc->isInEEC()) {
$list_account[] = 'ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT';
}
$list_account[] = 'ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT';
$list_account[] = '---Others---';
$list_account[] = '---Other---';
$list_account[] = 'ACCOUNTING_VAT_BUY_ACCOUNT';
$list_account[] = 'ACCOUNTING_VAT_SOLD_ACCOUNT';
$list_account[] = 'ACCOUNTING_VAT_PAY_ACCOUNT';
@ -94,13 +94,26 @@ if ($conf->loan->enabled) {
$list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INTEREST';
$list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INSURANCE';
}
if ($conf->societe->enabled) {
$list_account[] = 'ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT';
}
/*
* Actions
*/
$accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE;
if (GETPOST('change_chart', 'alpha'))
{
$chartofaccounts = GETPOST('chartofaccounts', 'int');
if (!empty($chartofaccounts)) {
if (!dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) {
$error++;
}
} else {
$error++;
}
}
if ($action == 'update') {
$error = 0;
@ -120,9 +133,9 @@ if ($action == 'update') {
$constvalue = GETPOST($constname, 'alpha');
if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error++;
}
if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error++;
}
}
if (!$error) {
@ -159,20 +172,20 @@ print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>'.$langs->trans("ThirdParties").' | '.$langs->trans("Users").'</td><td></td></tr>';
foreach ($list_account_main as $key) {
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
$keydesc = $key.'_Desc';
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
$keydesc = $key.'_Desc';
$htmltext = $langs->trans($keydesc);
print '<td class="fieldrequired" width="50%">';
print $form->textwithpicto($label, $htmltext);
print '</td>';
// Value
print '<td>'; // Do not force class=right, or it align also the content of the select box
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
print '</td>';
print '</tr>';
$htmltext = $langs->trans($keydesc);
print '<td class="fieldrequired" width="50%">';
print $form->textwithpicto($label, $htmltext);
print '</td>';
// Value
print '<td>'; // Do not force class=right, or it align also the content of the select box
print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1);
print '</td>';
print '</tr>';
}
@ -180,7 +193,8 @@ foreach ($list_account as $key) {
$reg = array();
if (preg_match('/---(.*)---/', $key, $reg)) {
print '<tr class="liste_titre"><td>'.$langs->trans($reg[1]).'</td><td></td></tr>';
} else {
}
else {
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);

View File

@ -45,7 +45,7 @@ $action = GETPOST('action', 'aZ09');
// Parameters ACCOUNTING_EXPORT_*
$main_option = array(
'ACCOUNTING_EXPORT_PREFIX_SPEC',
'ACCOUNTING_EXPORT_PREFIX_SPEC',
);
$configuration = AccountancyExport::getTypeConfig();
@ -58,22 +58,22 @@ $listcr = $configuration['cr'];
$model_option = array(
'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' => '',
),
'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' => '',
),
);
@ -105,22 +105,22 @@ if ($action == 'update') {
}
}
foreach ($listparam[$modelcsv] as $key => $value) {
$constante = $key;
foreach ($listparam[$modelcsv] as $key => $value) {
$constante = $key;
if (strpos($constante, 'ACCOUNTING') !== false) {
$constvalue = GETPOST($key, 'alpha');
if (!dolibarr_set_const($db, $constante, $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) {
// reload
$configuration = AccountancyExport::getTypeConfig();
$listparam = $configuration['param'];
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');
}
@ -148,36 +148,36 @@ 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 ' 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";
@ -262,17 +262,17 @@ if ($num2) {
foreach ($model_option as $key) {
print '<tr class="oddeven value">';
// Param
$label = $key['label'];
// Param
$label = $key['label'];
print '<td width="50%">'.$langs->trans($label).'</td>';
// Value
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>';
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>';
}

View File

@ -29,8 +29,8 @@ $action = GETPOST('action', 'aZ09');
// Load variable for pagination
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1
$offset = $limit * $page;
@ -79,7 +79,6 @@ $object = new Fiscalyear($db);
$max = 100;
$form = new Form($db);
$fiscalyearstatic = new Fiscalyear($db);
$title = $langs->trans('AccountingPeriods');
$helpurl = "";
@ -113,7 +112,7 @@ if ($result)
$i = 0;
$addbutton .= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->rights->accounting->fiscalyear->write);
$addbutton .= dolGetButtonTitle($langs->trans('NewFiscalYear'), '', 'fa fa-plus-circle', 'fiscalyear_card.php?action=create', '', $user->rights->accounting->fiscalyear->write);
$title = $langs->trans('AccountingPeriods');
@ -133,15 +132,13 @@ if ($result)
print '</tr>';
if ($num) {
$fiscalyearstatic = new Fiscalyear($db);
while ($i < $num && $i < $max) {
$obj = $db->fetch_object($result);
$fiscalyearstatic->id = $obj->rowid;
print '<tr class="oddeven">';
print '<td>';
print $fiscalyearstatic->getNomUrl(1);
print '</td>';
print '<td><a href="fiscalyear_card.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowFiscalYear"), "technic").' '.$obj->rowid.'</a></td>';
print '<td class="left">'.$obj->label.'</td>';
print '<td class="left">'.dol_print_date($db->jdate($obj->date_start), 'day').'</td>';
print '<td class="left">'.dol_print_date($db->jdate($obj->date_end), 'day').'</td>';

View File

@ -71,7 +71,9 @@ if ($action == 'confirm_delete' && $confirm == "yes") {
} else {
setEventMessages($object->error, $object->errors, 'errors');
}
} elseif ($action == 'add') {
}
elseif ($action == 'add') {
if (!GETPOST('cancel', 'alpha')) {
$error = 0;
@ -159,7 +161,7 @@ if ($action == 'create')
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="add">';
print dol_get_fiche_head();
dol_fiche_head();
print '<table class="border centpercent">';
@ -187,7 +189,7 @@ if ($action == 'create')
print '</table>';
print dol_get_fiche_end();
dol_fiche_end();
print '<div class="center">';
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
@ -202,7 +204,7 @@ if ($action == 'create')
$head = fiscalyear_prepare_head($object);
if ($action == 'edit') {
print dol_get_fiche_head($head, 'card', $langs->trans("Fiscalyear"), 0, 'cron');
dol_fiche_head($head, 'card', $langs->trans("Fiscalyear"), 0, 'cron');
print '<form name="update" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
print '<input type="hidden" name="token" value="'.newToken().'">';
@ -248,7 +250,7 @@ if ($action == 'create')
print '</form>';
print dol_get_fiche_end();
dol_fiche_end();
} else {
/*
* Confirm delete
@ -257,7 +259,7 @@ if ($action == 'create')
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("DeleteFiscalYear"), $langs->trans("ConfirmDeleteFiscalYear"), "confirm_delete");
}
print dol_get_fiche_head($head, 'card', $langs->trans("Fiscalyear"), 0, 'cron');
dol_fiche_head($head, 'card', $langs->trans("Fiscalyear"), 0, 'cron');
print '<table class="border centpercent">';
@ -296,20 +298,20 @@ if ($action == 'create')
print "</table>";
print dol_get_fiche_end();
dol_fiche_end();
if (!empty($user->rights->accounting->fiscalyear->write))
{
/*
/*
* Barre d'actions
*/
print '<div class="tabsAction">';
print '<div class="tabsAction">';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$id.'">'.$langs->trans('Modify').'</a>';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&id='.$id.'">'.$langs->trans('Modify').'</a>';
// print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&token='.newToken().'&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
// print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $id . '">' . $langs->trans('Delete') . '</a>';
print '</div>';
print '</div>';
}
}
} else {

View File

@ -49,7 +49,7 @@ if ($id) {
$head = fiscalyear_prepare_head($object);
print dol_get_fiche_head($head, 'info', $langs->trans("Fiscalyear"), 0, 'cron');
dol_fiche_head($head, 'info', $langs->trans("Fiscalyear"), 0, 'cron');
print '<table width="100%"><tr><td>';
dol_print_object_info($object);

View File

@ -31,10 +31,9 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "other"));
$langs->loadLangs(array("compta", "bills", "admin", "accountancy"));
// Security access
if (empty($user->rights->accounting->chartofaccount))
@ -46,95 +45,78 @@ $action = GETPOST('action', 'aZ09');
// Parameters ACCOUNTING_* and others
$list = array(
'ACCOUNTING_LENGTH_GACCOUNT',
'ACCOUNTING_LENGTH_AACCOUNT',
'ACCOUNTING_LENGTH_GACCOUNT',
'ACCOUNTING_LENGTH_AACCOUNT',
// 'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc
// 'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc
);
$list_binding = array(
'ACCOUNTING_DATE_START_BINDING',
'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER'
);
/*
* Actions
*/
$accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE;
if ($action == 'update') {
$error = 0;
if (!$error)
{
foreach ($list as $constname)
{
$constvalue = GETPOST($constname, 'alpha');
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("Error"), null, 'errors');
}
foreach ($list_binding as $constname)
{
$constvalue = GETPOST($constname, 'alpha');
if ($constname == 'ACCOUNTING_DATE_START_BINDING') {
$constvalue = dol_mktime(12, 0, 0, GETPOST($constname.'month', 'int'), GETPOST($constname.'day', 'int'), GETPOST($constname.'year', 'int'));
}
if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) {
$error++;
}
}
if ($error) {
setEventMessages($langs->trans("Error"), null, 'errors');
}
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("SetupSaved"), null, 'mesgs');
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
}
}
if ($action == 'setlistsorttodo') {
$setlistsorttodo = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
$setlistsorttodo = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setlistsortdone') {
$setlistsortdone = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
$setlistsortdone = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setmanagezero') {
$setmanagezero = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
$setmanagezero = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setdisabledirectinput') {
@ -162,57 +144,20 @@ if ($action == 'setenabledraftexport') {
}
if ($action == 'setenablesubsidiarylist') {
$setenablesubsidiarylist = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setdisablebindingonsales') {
$setdisablebindingonsales = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_SALES", $setdisablebindingonsales, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setdisablebindingonpurchases') {
$setdisablebindingonpurchases = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_PURCHASES", $setdisablebindingonpurchases, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
if ($action == 'setdisablebindingonexpensereports') {
$setdisablebindingonexpensereports = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS", $setdisablebindingonexpensereports, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
$setenablesubsidiarylist = GETPOST('value', 'int');
$res = dolibarr_set_const($db, "ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist, 'yesno', 0, '', $conf->entity);
if (!$res > 0)
$error++;
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'mesgs');
}
}
/*
* View
*/
$form = new Form($db);
$title = $langs->trans('ConfigAccountingExpert');
llxHeader('', $title);
@ -225,187 +170,155 @@ print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="update">';
// Params
// Default mode for calculating turnover (parameter ACCOUNTING_MODE)
/*
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans('Options').'</td>';
print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>';
print "</tr>\n";
print '<tr ' . $bc[false] . '><td width="200"><input type="radio" name="accounting_mode" value="RECETTES-DEPENSES"' . ($accounting_mode != 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeTrue') . '</td>';
print '<td colspan="2">' . nl2br($langs->trans('OptionModeTrueDesc'));
// Write info on way to count VAT
// if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
// {
// // print "<br>\n";
// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
// }
// else
// {
// // print "<br>\n";
// // print nl2br($langs->trans('OptionModeTrueInfoExpert'));
// }
print "</td></tr>\n";
print '<tr ' . $bc[true] . '><td width="200"><input type="radio" name="accounting_mode" value="CREANCES-DETTES"' . ($accounting_mode == 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeVirtual') . '</td>';
print '<td colspan="2">' . nl2br($langs->trans('OptionModeVirtualDesc')) . "</td></tr>\n";
// TO DO Mutualize code for yes/no constants
print "</table>\n";
/* Set this option as a hidden option but keep it for some needs.
print '<tr>';
print '<td>'.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").'</td>';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&enabledraftexport&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&enabledraftexport&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '<br>';
*/
print '<tr class="oddeven">';
print '<td>'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").'</td>';
if (!empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&disabledirectinput&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&disabledirectinput&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
// Others params
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTANCY_COMBO_FOR_AUX").'</td>';
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&enablesubsidiarylist&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&enablesubsidiarylist&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans('OtherOptions').'</td>';
print "</tr>\n";
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTING_MANAGE_ZERO").'</td>';
if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&managezero&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&managezero&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
if (!empty($user->admin))
{
// TO DO Mutualize code for yes/no constants
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO").'</td>';
if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setlistsorttodo&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setlistsorttodo&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '<tr>';
print '<td>'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE").'</td>';
if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setlistsortdone&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setlistsortdone&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
/* Set this option as a hidden option but keep it for some needs.
print '<tr>';
print '<td>'.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").'</td>';
if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setenabledraftexport&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setenabledraftexport&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
*/
print '<tr>';
print '<td>'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").'</td>';
if (!empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setdisabledirectinput&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setdisabledirectinput&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '<tr>';
print '<td>'.$langs->trans("ACCOUNTANCY_COMBO_FOR_AUX").'</td>';
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setenablesubsidiarylist&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setenablesubsidiarylist&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '<tr>';
print '<td>'.$langs->trans("ACCOUNTING_MANAGE_ZERO").'</td>';
if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setmanagezero&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setmanagezero&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
}
print '</tr>';
// Param a user $user->rights->accounting->chartofaccount can access
foreach ($list as $key)
{
print '<tr class="oddeven value">';
print '<tr class="oddeven value">';
if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue;
if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue;
// Param
$label = $langs->trans($key);
print '<td>'.$label.'</td>';
// Value
print '<td class="right">';
print '<input type="text" class="maxwidth100" id="'.$key.'" name="'.$key.'" value="'.$conf->global->$key.'">';
// Param
$label = $langs->trans($key);
print '<td>'.$label.'</td>';
// Value
print '<td class="right">';
print '<input type="text" class="maxwidth100" id="'.$key.'" name="'.$key.'" value="'.$conf->global->$key.'">';
print '</td>';
print '</td>';
print '</tr>';
}
print '</table>';
print '<br>';
// Binding params
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans('BindingOptions').'</td>';
print "</tr>\n";
// TO DO Mutualize code for yes/no constants
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO").'</td>';
if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&listsorttodo&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&listsorttodo&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE").'</td>';
if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&listsortdone&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&listsortdone&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
// Param a user $user->rights->accounting->chartofaccount can access
foreach ($list_binding as $key)
{
print '<tr class="oddeven value">';
// Param
$label = $langs->trans($key);
print '<td>'.$label.'</td>';
// Value
print '<td class="right">';
if ($key == 'ACCOUNTING_DATE_START_BINDING') {
print $form->selectDate(($conf->global->$key ? $db->idate($conf->global->$key) : -1), $key, 0, 0, 1);
} elseif ($key == 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER') {
$array = array(0=>$langs->trans("PreviousMonth"), 1=>$langs->trans("CurrentMonth"), 2=>$langs->trans("Fiscalyear"));
print $form->selectarray($key, $array, (isset($conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER) ? $conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER : 0));
} else {
print '<input type="text" class="maxwidth100" id="'.$key.'" name="'.$key.'" value="'.$conf->global->$key.'">';
}
print '</td>';
print '</tr>';
print '</tr>';
}
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_SALES").'</td>';
if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&disablebindingonsales&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&disablebindingonsales&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_PURCHASES").'</td>';
if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&disablebindingonpurchases&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&disablebindingonpurchases&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS").'</td>';
if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&disablebindingonexpensereports&value=0">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a></td>';
} else {
print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&disablebindingonexpensereports&value=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a></td>';
}
print '</tr>';
print '</table>';
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
print '<br>';
print '<br>';
print '<br>';
print '</form>';
// End of page

View File

@ -22,8 +22,6 @@
* \brief Setup page to configure journals
*/
if (!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
@ -240,10 +238,13 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
{
setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs');
$_POST = array('id'=>$id); // Clean $_POST array, we keep only
} else {
}
else
{
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors');
} else {
}
else {
dol_print_error($db);
}
}
@ -252,7 +253,8 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
// Si verif ok et action modify, on modifie la ligne
if ($ok && GETPOST('actionmodify', 'alpha'))
{
if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; }
if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; }
else { $rowidcol = "rowid"; }
// Modify entry
$sql = "UPDATE ".$tabname[$id]." SET ";
@ -267,7 +269,8 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
{
if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') {
$_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU');
} elseif ($field == 'entity') {
}
elseif ($field == 'entity') {
$_POST[$listfieldvalue[$i]] = $conf->entity;
}
if ($i) $sql .= ",";
@ -276,7 +279,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'";
$i++;
}
$sql .= " WHERE ".$rowidcol." = ".((int) $rowid);
$sql .= " WHERE ".$rowidcol." = '".$rowid."'";
$sql .= " AND entity = ".$conf->entity;
dol_syslog("actionmodify", LOG_DEBUG);
@ -297,9 +300,10 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha'))
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." = ".((int) $rowid);
$sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'";
$sql .= " AND entity = ".$conf->entity;
dol_syslog("delete", LOG_DEBUG);
@ -309,7 +313,9 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
{
setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors');
} else {
}
else
{
dol_print_error($db);
}
}
@ -318,12 +324,14 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
// 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." = ".((int) $rowid);
} elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$db->escape($code)."'";
$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;
@ -337,12 +345,14 @@ if ($action == $acts[0])
// 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." = ".((int) $rowid);
} elseif ($code) {
$sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$db->escape($code)."'";
$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;
@ -420,15 +430,15 @@ if ($id)
$valuetoshow = ucfirst($fieldlist[$field]); // Par defaut
$valuetoshow = $langs->trans($valuetoshow); // try to translate
$class = "left";
if ($fieldlist[$field] == 'code') {
$valuetoshow = $langs->trans("Code");
}
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("NatureOfJournal");
}
if ($fieldlist[$field] == 'nature') {
$valuetoshow = $langs->trans("NatureOfJournal");
}
if ($valuetoshow != '') {
print '<td class="'.$class.'">';
@ -540,14 +550,14 @@ if ($id)
$valuetoshow = ucfirst($fieldlist[$field]); // By defaut
$valuetoshow = $langs->trans($valuetoshow); // try to translate
if ($fieldlist[$field] == 'code') {
$valuetoshow = $langs->trans("Code");
}
$valuetoshow = $langs->trans("Code");
}
if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') {
$valuetoshow = $langs->trans("Label");
}
$valuetoshow = $langs->trans("Label");
}
if ($fieldlist[$field] == 'nature') {
$valuetoshow = $langs->trans("NatureOfJournal");
}
$valuetoshow = $langs->trans("NatureOfJournal");
}
// Affiche nom du champ
if ($showfield) {
@ -585,7 +595,9 @@ if ($id)
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 {
}
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
@ -594,7 +606,7 @@ if ($id)
if (empty($reshook))
{
$langs->load("accountancy");
$langs->load("accountancy");
foreach ($fieldlist as $field => $value)
{
$showfield = 1;
@ -602,12 +614,14 @@ if ($id)
$valuetoshow = $obj->{$fieldlist[$field]};
if ($valuetoshow == 'all') {
$valuetoshow = $langs->trans('All');
} elseif ($fieldlist[$field] == 'nature' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') {
}
elseif ($fieldlist[$field] == 'nature' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') {
$key = $langs->trans("AccountingJournalType".strtoupper($obj->nature));
$valuetoshow = ($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature)) ? $key : $obj->{$fieldlist[$field]});
} elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') {
$valuetoshow = $langs->trans($obj->label);
}
elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') {
$valuetoshow = $langs->trans($obj->label);
}
$class = 'tddict';
// Show value for field
@ -619,15 +633,15 @@ if ($id)
$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;
} elseif ($obj->code == 'RECEP') {
$iserasable = 0;
$canbedisabled = 0;
} elseif ($obj->code == 'EF0') {
$iserasable = 0;
$canbedisabled = 0;
}
$iserasable = 0;
$canbedisabled = 0;
} elseif ($obj->code == 'RECEP') {
$iserasable = 0;
$canbedisabled = 0;
} elseif ($obj->code == 'EF0') {
$iserasable = 0;
$canbedisabled = 0;
}
}
$canbemodified = $iserasable;
@ -638,22 +652,23 @@ if ($id)
// Active
print '<td class="nowrap center">';
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'&token='.newToken().'">'.$actl[$obj->active].'</a>';
if ($canbedisabled) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
else print $langs->trans("AlwaysActive");
print "</td>";
// Modify link
if ($canbemodified) print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit&token='.newToken().'">'.img_edit().'</a></td>';
if ($canbemodified) print '<td class="center"><a class="reposition editfielda" href="'.$url.'action=edit">'.img_edit().'</a></td>';
else print '<td>&nbsp;</td>';
// Delete link
if ($iserasable)
{
print '<td class="center">';
if ($user->admin) print '<a href="'.$url.'action=delete&token='.newToken().'">'.img_delete().'</a>';
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>';
}
else print '<td>&nbsp;</td>';
print '<td></td>';
@ -664,7 +679,8 @@ if ($id)
$i++;
}
}
} else {
}
else {
dol_print_error($db);
}
@ -708,9 +724,12 @@ function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '')
print '<td>';
print $form->selectarray('nature', $sourceList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''));
print '</td>';
} elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) {
}
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>';
} else {
}
else
{
print '<td>';
$size = ''; $class = '';
if ($fieldlist[$field] == 'code') $class = 'maxwidth100';

View File

@ -42,7 +42,7 @@ if (empty($conf->accounting->enabled)) {
accessforbidden();
}
if (!$user->rights->accounting->bind->write)
accessforbidden();
accessforbidden();
// search & action GETPOST
$action = GETPOST('action', 'aZ09');
@ -57,7 +57,6 @@ $changeaccount_sell = GETPOST('changeaccount_sell', 'array');
$search_ref = GETPOST('search_ref', 'alpha');
$search_label = GETPOST('search_label', 'alpha');
$search_desc = GETPOST('search_desc', 'alpha');
$search_vat = GETPOST('search_vat', 'alpha');
$search_current_account = GETPOST('search_current_account', 'alpha');
$search_current_account_valid = GETPOST('search_current_account_valid', 'alpha');
if ($search_current_account_valid == '') $search_current_account_valid = 'withoutvalidaccount';
@ -100,14 +99,13 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
// 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_ref = '';
$search_label = '';
$search_desc = '';
$search_vat = '';
$search_onsell = '';
$search_onpurchase = '';
$search_current_account = '';
$search_current_account_valid = '-1';
$search_ref = '';
$search_label = '';
$search_desc = '';
$search_onsell = '';
$search_onpurchase = '';
$search_current_account = '';
$search_current_account_valid = '-1';
}
// Sales or Purchase mode ?
@ -117,8 +115,8 @@ if ($action == 'update') {
$accounting_product_modes = array(
'ACCOUNTANCY_SELL',
'ACCOUNTANCY_SELL_INTRA',
'ACCOUNTANCY_SELL_EXPORT',
'ACCOUNTANCY_SELL_INTRA',
'ACCOUNTANCY_SELL_EXPORT',
'ACCOUNTANCY_BUY',
'ACCOUNTANCY_BUY_INTRA',
'ACCOUNTANCY_BUY_EXPORT'
@ -138,7 +136,7 @@ if ($action == 'update') {
if (!empty($chk_prod)) {
$accounting = new AccountingAccount($db);
//$msg .= '<div><span class="accountingprocessing">' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '</span></div>';
//$msg .= '<div><span class="accountingprocessing">' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '</span></div>';
$arrayofdifferentselectedvalues = array();
$cpt = 0; $ok = 0; $ko = 0;
@ -154,7 +152,7 @@ if ($action == 'update') {
}
if ($result <= 0) {
// setEventMessages(null, $accounting->errors, 'errors');
$msg .= '<div><span style="color:red">'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'<br/> <pre>'.$sql.'</pre></span></div>';
$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();
@ -172,22 +170,22 @@ if ($action == 'update') {
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
$sql .= " SET accountancy_code_sell = ".$accounting->account_number;
}
if ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
$sql .= " SET accountancy_code_sell_intra = ".$accounting->account_number;
}
if ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
$sql .= " SET accountancy_code_sell_export = ".$accounting->account_number;
}
$sql .= " WHERE rowid = ".((int) $productid);
if ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
$sql .= " SET accountancy_code_sell_intra = ".$accounting->account_number;
}
if ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
$sql .= " SET accountancy_code_sell_export = ".$accounting->account_number;
}
$sql .= " WHERE rowid = ".$productid;
dol_syslog("/accountancy/admin/productaccount.php sql=".$sql, LOG_DEBUG);
if ($db->query($sql))
{
$ok++;
$db->commit();
$ok++;
$db->commit();
} else {
$ko++;
$db->rollback();
$ko++;
$db->rollback();
}
}
@ -245,7 +243,7 @@ $pcgverid = $conf->global->CHARTOFACCOUNTS;
$pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version');
if (empty($pcgvercode)) $pcgvercode = $pcgverid;
$sql = "SELECT p.rowid, p.ref, p.label, p.description, p.tosell, p.tobuy, p.tva_tx,";
$sql = "SELECT p.rowid, p.ref, p.label, p.description, p.tosell, p.tobuy,";
$sql .= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export,";
$sql .= " p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export,";
$sql .= " p.tms, p.fk_product_type as product_type,";
@ -253,27 +251,33 @@ $sql .= " aa.rowid as aaid";
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON";
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
$sql .= " p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA')
$sql .= " p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'";
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA')
{
$sql .= " p.accountancy_code_buy_intra = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT')
$sql .= " p.accountancy_code_buy_intra = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'";
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT')
{
$sql .= " p.accountancy_code_buy_export = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL')
$sql .= " p.accountancy_code_buy_export = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'";
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL')
{
$sql .= " p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA')
$sql .= " p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'";
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA')
{
$sql .= " p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'";
} else {
$sql .= " p.accountancy_code_sell_export = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'";
$sql .= " p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'";
}
else
{
$sql .= " p.accountancy_code_sell_export = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'";
}
$sql .= ' WHERE p.entity IN ('.getEntity('product').')';
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_buy", $search_current_account);
}
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_buy", $search_current_account);
}
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_buy_intra", $search_current_account);
@ -283,17 +287,19 @@ if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
$sql .= natural_search("p.accountancy_code_buy_export", $search_current_account);
}
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_sell", $search_current_account);
}
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_sell_intra", $search_current_account);
}
} else {
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_sell_export", $search_current_account);
}
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_sell", $search_current_account);
}
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_sell_intra", $search_current_account);
}
}
else {
if (strlen(trim($search_current_account))) {
$sql .= natural_search("p.accountancy_code_sell_export", $search_current_account);
}
}
if ($search_current_account_valid == 'withoutvalidaccount')
{
@ -301,7 +307,7 @@ if ($search_current_account_valid == 'withoutvalidaccount')
}
if ($search_current_account_valid == 'withvalidaccount')
{
$sql .= " AND aa.account_number IS NOT NULL";
$sql .= " AND aa.account_number IS NOT NULL";
}
// Add search filter like
if (strlen(trim($search_ref))) {
@ -313,9 +319,6 @@ if (strlen(trim($search_label))) {
if (strlen(trim($search_desc))) {
$sql .= natural_search("p.description", $search_desc);
}
if (strlen(trim($search_vat))) {
$sql .= natural_search("p.tva_tx", price2num($search_vat), 1);
}
if ($search_onsell != '' && $search_onsell != '-1') $sql .= natural_search('p.tosell', $search_onsell, 1);
if ($search_onpurchase != '' && $search_onpurchase != '-1') $sql .= natural_search('p.tobuy', $search_onpurchase, 1);
@ -324,13 +327,13 @@ $sql .= $db->order($sortfield, $sortorder);
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
{
$page = 0;
$offset = 0;
}
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
{
$page = 0;
$offset = 0;
}
}
$sql .= $db->plimit($limit + 1, $offset);
@ -342,32 +345,31 @@ if ($result)
$num = $db->num_rows($result);
$i = 0;
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($search_ref > 0) $param .= "&search_desc=".urlencode($search_ref);
if ($search_label > 0) $param .= "&search_desc=".urlencode($search_label);
if ($search_desc > 0) $param .= "&search_desc=".urlencode($search_desc);
if ($search_vat > 0) $param .= '&search_vat='.urlencode($search_vat);
if ($search_current_account > 0) $param .= "&search_current_account=".urlencode($search_current_account);
if ($search_current_account_valid && $search_current_account_valid != '-1') $param .= "&search_current_account_valid=".urlencode($search_current_account_valid);
if ($accounting_product_mode) $param .= '&accounting_product_mode='.urlencode($accounting_product_mode);
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($search_ref > 0) $param .= "&search_desc=".urlencode($search_ref);
if ($search_label > 0) $param .= "&search_desc=".urlencode($search_label);
if ($search_desc > 0) $param .= "&search_desc=".urlencode($search_desc);
if ($search_current_account > 0) $param .= "&search_current_account=".urlencode($search_current_account);
if ($search_current_account_valid && $search_current_account_valid != '-1') $param .= "&search_current_account_valid=".urlencode($search_current_account_valid);
if ($accounting_product_mode) $param .= '&accounting_product_mode='.urlencode($accounting_product_mode);
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print load_fiche_titre($langs->trans("ProductsBinding"), '', 'title_accountancy');
print load_fiche_titre($langs->trans("ProductsBinding"), '', 'title_accountancy');
print '<br>';
print '<span class="opacitymedium">'.$langs->trans("InitAccountancyDesc").'</span><br>';
print '<br>';
// Select mode
// Select mode
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans('Options').'</td><td>'.$langs->trans('Description').'</td>';
@ -377,13 +379,13 @@ if ($result)
print "</td></tr>\n";
if ($mysoc->isInEEC())
{
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL_INTRA"'.($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' ? ' checked' : '').'> '.$langs->trans('OptionModeProductSellIntra').'</td>';
print '<td>'.$langs->trans('OptionModeProductSellIntraDesc');
print "</td></tr>\n";
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL_INTRA"'.($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' ? ' checked' : '').'> '.$langs->trans('OptionModeProductSellIntra').'</td>';
print '<td>'.$langs->trans('OptionModeProductSellIntraDesc');
print "</td></tr>\n";
}
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL_EXPORT"'.($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT' ? ' checked' : '').'> '.$langs->trans('OptionModeProductSellExport').'</td>';
print '<td>'.$langs->trans('OptionModeProductSellExportDesc');
print "</td></tr>\n";
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_SELL_EXPORT"'.($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT' ? ' checked' : '').'> '.$langs->trans('OptionModeProductSellExport').'</td>';
print '<td>'.$langs->trans('OptionModeProductSellExportDesc');
print "</td></tr>\n";
print '<tr class="oddeven"><td class="titlefield"><input type="radio" name="accounting_product_mode" value="ACCOUNTANCY_BUY"'.($accounting_product_mode == 'ACCOUNTANCY_BUY' ? ' checked' : '').'> '.$langs->trans('OptionModeProductBuy').'</td>';
print '<td>'.$langs->trans('OptionModeProductBuyDesc')."</td></tr>\n";
if ($mysoc->isInEEC())
@ -405,8 +407,8 @@ if ($result)
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$buttonsave = '<input type="submit" class="button" id="changeaccount" name="changeaccount" value="'.$langs->trans("Save").'">';
//print '<br><div class="center">'.$buttonsave.'</div>';
$buttonsave = '<input type="submit" class="button" id="changeaccount" name="changeaccount" value="'.$langs->trans("Save").'">';
//print '<br><div class="center">'.$buttonsave.'</div>';
$texte = $langs->trans("ListOfProductsServices");
print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $buttonsave, $num, $nbtotalofrecords, '', 0, '', '', $limit, 0, 0, 1);
@ -417,8 +419,6 @@ if ($result)
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre"><input type="text" class="flat" size="8" name="search_ref" value="'.dol_escape_htmltag($search_ref).'"></td>';
print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_label" value="'.dol_escape_htmltag($search_label).'"></td>';
print '<td class="liste_titre right"><input type="text" class="flat maxwidth50 right" size="5" name="search_vat" placeholder="%" value="'.dol_escape_htmltag($search_vat).'"></td>';
if (!empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_desc" value="'.dol_escape_htmltag($search_desc).'"></td>';
// On sell
if ($accounting_product_mode == 'ACCOUNTANCY_SELL' || $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
@ -444,22 +444,21 @@ if ($result)
print '<tr class="liste_titre">';
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
if (!empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "p.tva_tx", "", $param, '', $sortfield, $sortorder, 'right ');
// On sell / On purchase
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount = "p.accountancy_code_sell";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount = "p.accountancy_code_sell_intra";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount = "p.accountancy_code_sell_export";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount = "p.accountancy_code_buy";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
if (!empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder);
// On sell / On purchase
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount = "p.accountancy_code_sell";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount = "p.accountancy_code_sell_intra";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount = "p.accountancy_code_sell_export";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount = "p.accountancy_code_buy";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
print_liste_field_titre("OnBuy", $_SERVER["PHP_SELF"], "p.tobuy", "", $param, '', $sortfield, $sortorder, 'center ');
$fieldtosortaccount = "p.accountancy_code_buy_intra";
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
@ -475,8 +474,8 @@ if ($result)
$product_static = new Product($db);
$i = 0;
while ($i < min($num, $limit))
{
while ($i < min($num, $limit))
{
$obj = $db->fetch_object($result);
// Ref produit as link
@ -493,27 +492,34 @@ if ($result)
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
$compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_prodsell;
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
$compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_prodsell_intra;
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
$compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_prodsell_export;
} else {
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
$compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_prodsell_intra;
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
$compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_prodsell_export;
}
else {
$compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_prodsell;
}
} else {
}
else {
if ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
$compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_servsell;
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
$compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_servsell_intra;
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') {
$compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_servsell_export;
} else {
}
else {
$compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodsell_id = $aarowid_servsell;
}
@ -524,27 +530,34 @@ if ($result)
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
$compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodbuy_id = $aarowid_prodbuy;
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
$compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodbuy_id = $aarowid_prodbuy_intra;
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
$compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodbuy_id = $aarowid_prodbuy_export;
} else {
}
else {
$compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodbuy_id = $aarowid_prodbuy;
}
} else {
}
else {
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
$compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodbuy_id = $aarowid_servbuy;
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
$compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodbuy_id = $aarowid_servbuy_intra;
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
}
elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
$compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodbuy_id = $aarowid_servbuy_export;
} else {
}
else {
$compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef"));
$compta_prodbuy_id = $aarowid_servbuy;
}
@ -560,18 +573,13 @@ if ($result)
if (!empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC))
{
// TODO ADJUST DESCRIPTION SIZE
// print '<td class="left">' . $obj->description . '</td>';
// TODO: we should set a user defined value to adjust user square / wide screen size
$trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print '<td>'.nl2br(dol_trunc($obj->description, $trunclength)).'</td>';
// TODO ADJUST DESCRIPTION SIZE
// print '<td class="left">' . $obj->description . '</td>';
// TODO: we shoul set a user defined value to adjust user square / wide screen size
$trunclengh = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION;
print '<td>'.nl2br(dol_trunc($obj->description, $trunclengh)).'</td>';
}
// VAT
print '<td class="right">';
print vatrate($obj->tva_tx);
print '</td>';
if ($accounting_product_mode == 'ACCOUNTANCY_SELL' || $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT')
print '<td class="center">'.$product_static->getLibStatut(3, 0).'</td>';
@ -581,56 +589,56 @@ if ($result)
// Current accounting account
print '<td class="left">';
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
print length_accountg($obj->accountancy_code_buy);
if ($obj->accountancy_code_buy && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
print length_accountg($obj->accountancy_code_buy);
if ($obj->accountancy_code_buy && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
print length_accountg($obj->accountancy_code_buy_intra);
if ($obj->accountancy_code_buy_intra && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
print length_accountg($obj->accountancy_code_buy_export);
if ($obj->accountancy_code_buy_export && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
print length_accountg($obj->accountancy_code_sell);
if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
print length_accountg($obj->accountancy_code_sell_intra);
if ($obj->accountancy_code_sell_intra && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
print length_accountg($obj->accountancy_code_buy_intra);
if ($obj->accountancy_code_buy_intra && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
print length_accountg($obj->accountancy_code_buy_export);
if ($obj->accountancy_code_buy_export && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
print length_accountg($obj->accountancy_code_sell);
if ($obj->accountancy_code_sell && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
print length_accountg($obj->accountancy_code_sell_intra);
if ($obj->accountancy_code_sell_intra && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
} else {
print length_accountg($obj->accountancy_code_sell_export);
if ($obj->accountancy_code_sell_export && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
}
print length_accountg($obj->accountancy_code_sell_export);
if ($obj->accountancy_code_sell_export && empty($obj->aaid)) print ' '.img_warning($langs->trans("ValueNotIntoChartOfAccount"));
}
print '</td>';
// New account to set
$defaultvalue = '';
if ($accounting_product_mode == 'ACCOUNTANCY_BUY') {
// Accounting account buy
// Accounting account buy
print '<td class="left">';
//$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code
if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy;
$codesell = length_accountg($obj->accountancy_code_buy);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '</td>';
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') {
// Accounting account buy intra (In EEC)
print '<td class="left">';
//$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code
if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy;
if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy_intra;
$codesell = length_accountg($obj->accountancy_code_buy_intra);
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '</td>';
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') {
// Accounting account buy export (Out of EEC)
print '<td class="left">';
//$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code
if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy;
if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy_export;
$codesell = length_accountg($obj->accountancy_code_buy_export);
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '</td>';
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') {
// Accounting account sell
@ -640,32 +648,32 @@ if ($result)
$codesell = length_accountg($obj->accountancy_code_sell);
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '</td>';
} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') {
// Accounting account sell intra (In EEC)
print '<td class="left">';
//$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code
if (empty($defaultvalue)) $defaultvalue = $compta_prodsell;
$codesell = length_accountg($obj->accountancy_code_sell_intra);
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
print '</td>';
} else {
// Accounting account sell export (Out of EEC)
print '<td class="left">';
//$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code
if (empty($defaultvalue)) $defaultvalue = $compta_prodsell;
$codesell = length_accountg($obj->accountancy_code_sell_export);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1);
print '</td>';
}
// Accounting account sell intra (In EEC)
print '<td class="left">';
//$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code
if (empty($defaultvalue)) $defaultvalue = $compta_prodsell;
$codesell = length_accountg($obj->accountancy_code_sell_intra);
//var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '</td>';
} else {
// Accounting account sell export (Out of EEC)
print '<td class="left">';
//$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code
if (empty($defaultvalue)) $defaultvalue = $compta_prodsell;
$codesell = length_accountg($obj->accountancy_code_sell_export);
if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid
print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1, 0, 'maxwidth300 maxwidthonsmartphone productforselect');
print '</td>';
}
// Checkbox select
print '<td class="center">';
print '<input type="checkbox" class="checkforselect" name="chk_prod[]" value="'.$obj->rowid.'"/></td>';
print '<input type="checkbox" class="checkforselect productforselectcodeventil_'.$product_static->id.'" name="chk_prod[]" value="'.$obj->rowid.'"/></td>';
print "</tr>";
$i++;
}
@ -689,7 +697,17 @@ if ($result)
if (atleastoneselected) jQuery("#changeaccount").attr(\'class\',\'button\');
else jQuery("#changeaccount").attr(\'class\',\'button\');
}
jQuery(".checkforselect, #checkallactions").click(function() {
jQuery(".checkforselect").change(function() {
init_savebutton();
});
jQuery(".productforselect").change(function() {
console.log($(this).attr("id")+" "+$(this).val());
if ($(this).val() && $(this).val() != -1) {
$(".productforselect"+$(this).attr("id")).prop(\'checked\', true);
} else {
$(".productforselect"+$(this).attr("id")).prop(\'checked\', false);
}
init_savebutton();
});

View File

@ -1,419 +0,0 @@
<?php
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2018 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
* 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 <https://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/accountancy/admin/subaccount.php
* \ingroup Accountancy (Double entries)
* \brief List of accounting sub-account (auxiliary accounts)
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "salaries", "hrm", "errors"));
$mesg = '';
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
$id = GETPOST('id', 'int');
$rowid = GETPOST('rowid', 'int');
$massaction = GETPOST('massaction', 'aZ09');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'accountingsubaccountlist'; // To manage different context of search
$search_subaccount = GETPOST('search_subaccount', 'alpha');
$search_label = GETPOST('search_label', 'alpha');
$search_type = GETPOST('search_type', 'int');
// Security check
if ($user->socid > 0) accessforbidden();
if (!$user->rights->accounting->chartofaccount) accessforbidden();
// Load variable for pagination
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : 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 (!$sortfield) $sortfield = "label";
if (!$sortorder) $sortorder = "ASC";
$arrayfields = array(
'subaccount'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1),
'label'=>array('label'=>$langs->trans("Label"), 'checked'=>1),
'type'=>array('label'=>$langs->trans("Type"), 'checked'=>1),
'reconcilable'=>array('label'=>$langs->trans("Reconcilable"), 'checked'=>1)
);
if ($conf->global->MAIN_FEATURES_LEVEL < 2) unset($arrayfields['reconcilable']);
/*
* Actions
*/
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
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
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_subaccount = "";
$search_label = "";
$search_type = "";
$search_array_options = array();
}
}
/*
* View
*/
$form = new Form($db);
$title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger');
llxHeader('', $title);
// Customer
$sql = "SELECT sa.rowid, sa.nom as label, sa.code_compta as subaccount, '0' as type, sa.entity";
$sql .= " FROM ".MAIN_DB_PREFIX."societe sa";
$sql .= " WHERE sa.entity IN (".getEntity('societe').")";
$sql .= " AND sa.code_compta <> ''";
//print $sql;
if (strlen(trim($search_subaccount))) {
$lengthpaddingaccount = 0;
if ($conf->global->ACCOUNTING_LENGTH_AACCOUNT) {
$lengthpaddingaccount = max($conf->global->ACCOUNTING_LENGTH_AACCOUNT);
}
$search_subaccount_tmp = $search_subaccount;
$weremovedsomezero = 0;
if (strlen($search_subaccount_tmp) <= $lengthpaddingaccount) {
for ($i = 0; $i < $lengthpaddingaccount; $i++) {
if (preg_match('/0$/', $search_subaccount_tmp)) {
$weremovedsomezero++;
$search_subaccount_tmp = preg_replace('/0$/', '', $search_subaccount_tmp);
}
}
}
//var_dump($search_subaccount); exit;
if ($search_subaccount_tmp) {
if ($weremovedsomezero) {
$search_subaccount_tmp_clean = $search_subaccount_tmp;
$search_subaccount_clean = $search_subaccount;
$startchar = '%';
if (strpos($search_subaccount_tmp, '^') === 0)
{
$startchar = '';
$search_subaccount_tmp_clean = preg_replace('/^\^/', '', $search_subaccount_tmp);
$search_subaccount_clean = preg_replace('/^\^/', '', $search_subaccount);
}
$sql .= " AND (sa.code_compta LIKE '".$db->escape($startchar.$search_subaccount_tmp_clean)."'";
$sql .= " OR sa.code_compta LIKE '".$db->escape($startchar.$search_subaccount_clean)."%')";
} else $sql .= natural_search("sa.code_compta", $search_subaccount_tmp);
}
}
if (strlen(trim($search_label))) $sql .= natural_search("sa.nom", $search_label);
if (!empty($search_type) && $search_type >= 0) $sql .= " HAVING type LIKE '".$db->escape($search_type)."'";
// Supplier
$sql .= " UNION ";
$sql .= " SELECT sa.rowid, sa.nom as label, sa.code_compta_fournisseur as subaccount, '1' as type, sa.entity FROM ".MAIN_DB_PREFIX."societe sa";
$sql .= " WHERE sa.entity IN (".getEntity('societe').")";
$sql .= " AND sa.code_compta_fournisseur <> ''";
//print $sql;
if (strlen(trim($search_subaccount))) {
$lengthpaddingaccount = 0;
if ($conf->global->ACCOUNTING_LENGTH_AACCOUNT) {
$lengthpaddingaccount = max($conf->global->ACCOUNTING_LENGTH_AACCOUNT);
}
$search_subaccount_tmp = $search_subaccount;
$weremovedsomezero = 0;
if (strlen($search_subaccount_tmp) <= $lengthpaddingaccount) {
for ($i = 0; $i < $lengthpaddingaccount; $i++) {
if (preg_match('/0$/', $search_subaccount_tmp)) {
$weremovedsomezero++;
$search_subaccount_tmp = preg_replace('/0$/', '', $search_subaccount_tmp);
}
}
}
//var_dump($search_subaccount); exit;
if ($search_subaccount_tmp) {
if ($weremovedsomezero) {
$search_subaccount_tmp_clean = $search_subaccount_tmp;
$search_subaccount_clean = $search_subaccount;
$startchar = '%';
if (strpos($search_subaccount_tmp, '^') === 0)
{
$startchar = '';
$search_subaccount_tmp_clean = preg_replace('/^\^/', '', $search_subaccount_tmp);
$search_subaccount_clean = preg_replace('/^\^/', '', $search_subaccount);
}
$sql .= " AND (sa.code_compta_fournisseur LIKE '".$db->escape($startchar.$search_subaccount_tmp_clean)."'";
$sql .= " OR sa.code_compta_fournisseur LIKE '".$db->escape($startchar.$search_subaccount_clean)."%')";
} else $sql .= natural_search("sa.code_compta_fournisseur", $search_subaccount_tmp);
}
}
if (strlen(trim($search_label))) $sql .= natural_search("sa.nom", $search_label);
if (!empty($search_type) && $search_type >= 0) $sql .= " HAVING type LIKE '".$db->escape($search_type)."'";
// User
$sql .= " UNION ";
$sql .= " SELECT u.rowid, u.lastname as label, u.accountancy_code as subaccount, '2' as type, u.entity FROM ".MAIN_DB_PREFIX."user u";
$sql .= " WHERE u.entity IN (".getEntity('user').")";
$sql .= " AND u.accountancy_code <> ''";
//print $sql;
if (strlen(trim($search_subaccount))) {
$lengthpaddingaccount = 0;
if ($conf->global->ACCOUNTING_LENGTH_AACCOUNT) {
$lengthpaddingaccount = max($conf->global->ACCOUNTING_LENGTH_AACCOUNT);
}
$search_subaccount_tmp = $search_subaccount;
$weremovedsomezero = 0;
if (strlen($search_subaccount_tmp) <= $lengthpaddingaccount) {
for ($i = 0; $i < $lengthpaddingaccount; $i++) {
if (preg_match('/0$/', $search_subaccount_tmp)) {
$weremovedsomezero++;
$search_subaccount_tmp = preg_replace('/0$/', '', $search_subaccount_tmp);
}
}
}
//var_dump($search_subaccount); exit;
if ($search_subaccount_tmp) {
if ($weremovedsomezero) {
$search_subaccount_tmp_clean = $search_subaccount_tmp;
$search_subaccount_clean = $search_subaccount;
$startchar = '%';
if (strpos($search_subaccount_tmp, '^') === 0)
{
$startchar = '';
$search_subaccount_tmp_clean = preg_replace('/^\^/', '', $search_subaccount_tmp);
$search_subaccount_clean = preg_replace('/^\^/', '', $search_subaccount);
}
$sql .= " AND (u.accountancy_code LIKE '".$db->escape($startchar.$search_subaccount_tmp_clean)."'";
$sql .= " OR u.accountancy_code LIKE '".$db->escape($startchar.$search_subaccount_clean)."%')";
} else $sql .= natural_search("u.accountancy_code", $search_subaccount_tmp);
}
}
if (strlen(trim($search_label))) $sql .= natural_search("u.lastname", $search_label);
if (!empty($search_type) && $search_type >= 0) $sql .= " HAVING type LIKE '".$db->escape($search_type)."'";
$sql .= $db->order($sortfield, $sortorder);
// Count total nb of records
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
$resql = $db->query($sql);
$nbtotalofrecords = $db->num_rows($resql);
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
{
$page = 0;
$offset = 0;
}
}
$sql .= $db->plimit($limit + 1, $offset);
dol_syslog('accountancy/admin/subaccount.php:: $sql='.$sql);
$resql = $db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$param = '';
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($search_subaccount) $param .= '&search_subaccount='.urlencode($search_subaccount);
if ($search_label) $param .= '&search_label='.urlencode($search_label);
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
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="'.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="contextpage" value="'.$contextpage.'">';
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 0, 0, 1);
print '<div class="warning">'.$langs->trans("WarningCreateSubAccounts").'</div>';
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$moreforfilter = '';
$massactionbutton = '';
print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
// Line for search fields
print '<tr class="liste_titre_filter">';
if (!empty($arrayfields['subaccount']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="10" name="search_subaccount" value="'.$search_subaccount.'"></td>';
if (!empty($arrayfields['label']['checked'])) print '<td class="liste_titre"><input type="text" class="flat" size="20" name="search_label" value="'.$search_label.'"></td>';
if (!empty($arrayfields['type']['checked'])) print '<td class="liste_titre center">'.$form->selectarray('search_type', array('0'=>$langs->trans('Customer'), '1'=>$langs->trans('Supplier'), '2'=>$langs->trans('Employee')), $search_type, 1).'</td>';
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (!empty($arrayfields['reconcilable']['checked'])) print '<td class="liste_titre">&nbsp;</td>'; }
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
print $searchpicto;
print '</td>';
print '</tr>';
print '<tr class="liste_titre">';
if (!empty($arrayfields['subaccount']['checked'])) print_liste_field_titre($arrayfields['subaccount']['label'], $_SERVER["PHP_SELF"], "subaccount", "", $param, '', $sortfield, $sortorder);
if (!empty($arrayfields['label']['checked'])) print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], "label", "", $param, '', $sortfield, $sortorder);
if (!empty($arrayfields['type']['checked'])) print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'center ');
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (!empty($arrayfields['reconcilable']['checked'])) print_liste_field_titre($arrayfields['reconcilable']['label'], $_SERVER["PHP_SELF"], 'reconcilable', '', $param, '', $sortfield, $sortorder, 'center '); }
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print "</tr>\n";
$totalarray = array();
$i = 0;
while ($i < min($num, $limit))
{
$obj = $db->fetch_object($resql);
print '<tr class="oddeven">';
// Account number
if (!empty($arrayfields['subaccount']['checked']))
{
print "<td>";
print length_accounta($obj->subaccount);
print "</td>\n";
if (!$i) $totalarray['nbfield']++;
}
// Subaccount label
if (!empty($arrayfields['label']['checked']))
{
print "<td>";
print $obj->label;
print "</td>\n";
if (!$i) $totalarray['nbfield']++;
}
// Type
if (!empty($arrayfields['type']['checked']))
{
print '<td class="center">';
$s = '';
// Customer
if ($obj->type == 0)
{
$s .= '<a class="customer-back" style="padding-left: 6px; padding-right: 6px" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$obj->rowid.'">'.$langs->trans("Customer").'</a>';
}
// Supplier
elseif ($obj->type == 1)
{
$s .= '<a class="vendor-back" style="padding-left: 6px; padding-right: 6px" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$obj->rowid.'">'.$langs->trans("Supplier").'</a>';
}
// User
elseif ($obj->type == 2)
{
$s .= '<a class="user-back" style="padding-left: 6px; padding-right: 6px" title="'.$langs->trans("Employee").'" href="'.DOL_URL_ROOT.'/user/card.php?id='.$obj->id.'">'.$langs->trans("Employee").'</a>';
}
print $s;
print '</td>';
if (!$i) $totalarray['nbfield']++;
}
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
// Activated or not reconciliation on accounting account
if (!empty($arrayfields['reconcilable']['checked'])) {
print '<td class="center">';
if (empty($obj->reconcilable)) {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=enable&mode=1">';
print img_picto($langs->trans("Disabled"), 'switch_off');
print '</a>';
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$obj->rowid.'&action=disable&mode=1">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</a>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
}
// Action
print '<td class="center">';
$e = '';
// Customer
if ($obj->type == 0)
{
$e .= '<a class="editfielda" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/societe/card.php?action=edit&socid='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
}
// Supplier
elseif ($obj->type == 1)
{
$e .= '<a class="editfielda" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/societe/card.php?action=edit&socid='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
}
// User
elseif ($obj->type == 2)
{
$e .= '<a class="editfielda" title="'.$langs->trans("Employee").'" href="'.DOL_URL_ROOT.'/user/card.php?action=edit&id='.$obj->rowid.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().'</a>';
}
print $e;
print '</td>'."\n";
if (!$i) $totalarray['nbfield']++;
print '</tr>'."\n";
$i++;
}
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print "</table>";
print "</div>";
print '</form>';
} else {
dol_print_error($db);
}
// End of page
llxFooter();
$db->close();

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-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -31,7 +31,6 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
@ -46,8 +45,8 @@ $action = GETPOST('action', 'aZ09');
// Load variable for pagination
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
$sortorder = GETPOST('sortorder', 'aZ09comma');
$sortfield = GETPOST('sortfield', 'alpha');
$sortorder = GETPOST('sortorder', 'alpha');
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action
$offset = $limit * $page;
@ -56,7 +55,7 @@ $pagenext = $page + 1;
//if (! $sortfield) $sortfield="p.date_fin";
//if (! $sortorder) $sortorder="DESC";
$show_subgroup = GETPOST('show_subgroup', 'alpha');
$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(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int'));
@ -78,7 +77,7 @@ $form = new Form($db);
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 .= " 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) {
@ -88,6 +87,7 @@ if (empty($search_date_start) && !GETPOSTISSET('formfilteraction'))
} 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)
@ -131,11 +131,10 @@ if (!empty($search_accountancy_code_end)) {
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
{
$show_subgroup = '';
$search_date_start = '';
$search_date_end = '';
$search_accountancy_code_start = '';
$search_accountancy_code_end = '';
$search_date_start = '';
$search_date_end = '';
$filter = array();
}
@ -159,11 +158,11 @@ if ($action == 'export_csv')
foreach ($object->lines as $line)
{
print length_accountg($line->numero_compte).$sep;
print $object->get_compte_desc($line->numero_compte).$sep;
print price($line->debit).$sep;
print price($line->credit).$sep;
print price($line->debit - $line->credit).$sep;
print '"'.length_accountg($line->numero_compte).'"'.$sep;
print '"'.$object->get_compte_desc($line->numero_compte).'"'.$sep;
print '"'.price($line->debit).'"'.$sep;
print '"'.price($line->credit).'"'.$sep;
print '"'.price($line->debit - $line->credit).'"'.$sep;
print "\n";
}
@ -225,12 +224,6 @@ if ($action != 'export_csv')
$moreforfilter .= $form->selectDate($search_date_start ? $search_date_start : -1, 'date_start', 0, 0, 1, '', 1, 0);
$moreforfilter .= $langs->trans('DateEnd').': ';
$moreforfilter .= $form->selectDate($search_date_end ? $search_date_end : -1, 'date_end', 0, 0, 1, '', 1, 0);
$moreforfilter .= ' - ';
$moreforfilter .= $langs->trans('ShowSubtotalByGroup').': ';
$moreforfilter .= '<input type="checkbox" name="show_subgroup" value="show_subgroup"'.($show_subgroup == 'show_subgroup' ? ' checked' : '').'>';
$moreforfilter .= '</div>';
if (!empty($moreforfilter)) {
@ -245,15 +238,16 @@ if ($action != 'export_csv')
print '<table class="liste '.($moreforfilter ? "listwithfilterbefore" : "").'">';
print '<tr class="liste_titre_filter">';
print '<td class="liste_titre" colspan="5">';
$colspan = (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE) ? 6 : 5);
print '<td class="liste_titre" colspan="'.$colspan.'">';
print $langs->trans('From');
print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, '');
print ' ';
print $langs->trans('to');
print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, '');
print '</td>';
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons();
print '<td class="liste_titre right">';
$searchpicto = $form->showFilterAndCheckAddButtons(0);
print $searchpicto;
print '</td>';
@ -261,7 +255,8 @@ if ($action != 'export_csv')
print '<tr class="liste_titre">';
print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder);
print_liste_field_titre("OpeningBalance", $_SERVER['PHP_SELF'], "", $param, "", 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder);
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print_liste_field_titre("OpeningBalance", $_SERVER['PHP_SELF'], "", $param, "", 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("Balance", $_SERVER["PHP_SELF"], "", $param, "", 'class="right"', $sortfield, $sortorder);
@ -272,74 +267,84 @@ if ($action != 'export_csv')
$total_credit = 0;
$sous_total_debit = 0;
$sous_total_credit = 0;
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
$total_opening_balance = 0;
$sous_total_opening_balance = 0;
}
$displayed_account = "";
$accountingaccountstatic = new AccountingAccount($db);
// TODO Debug - In French accounting, this functionality is dangerous, it takes all the entries and adds all the accounts
// without time and class limits (Class 6 and 7 accounts ???) and does not take into account the "a-nouveau" journal.
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
$sql = "SELECT t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance";
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping as t";
$sql .= " WHERE t.entity = " . $conf->entity; // Never do sharing into accounting features
$sql .= " AND t.doc_date < '" . $db->idate($search_date_start) . "'";
$sql .= " GROUP BY t.numero_compte";
$sql = "SELECT t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance";
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as t";
$sql .= " WHERE t.entity = ".$conf->entity; // Never do sharing into accounting features
$sql .= " AND t.doc_date < '".$db->idate($search_date_start)."'";
$sql .= " GROUP BY t.numero_compte";
$resql = $db->query($sql);
$nrows = $resql->num_rows;
$opening_balances = array();
for ($i = 0; $i < $nrows; $i++) {
$arr = $resql->fetch_array();
$opening_balances["'".$arr['numero_compte']."'"] = $arr['opening_balance'];
$resql = $db->query($sql);
$nrows = $resql->num_rows;
$opening_balances = array();
for ($i = 0; $i < $nrows; $i++) {
$arr = $resql->fetch_array();
$opening_balances["'" . $arr['numero_compte'] . "'"] = $arr['opening_balance'];
}
}
foreach ($object->lines as $line)
{
$accountingaccountstatic->fetch(null, $line->numero_compte, true);
if (!empty($accountingaccountstatic->account_number)) {
$accounting_account = $accountingaccountstatic->getNomUrl(0, 1);
} else {
$accounting_account = length_accountg($line->numero_compte);
}
$link = '';
$total_debit += $line->debit;
$total_credit += $line->credit;
$description = $object->get_compte_desc($line->numero_compte); // Search description of the account
$root_account_description = $object->get_compte_racine($line->numero_compte);
if (empty($accountingaccountstatic->account_number)) {
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
$opening_balance = isset($opening_balances["'".$line->numero_compte."'"]) ? $opening_balances["'".$line->numero_compte."'"] : 0;
$total_opening_balance += $opening_balance;
}
if (empty($description)) {
$link = '<a href="'.DOL_URL_ROOT.'/accountancy/admin/card.php?action=create&accountingaccount='.length_accountg($line->numero_compte).'">'.img_edit_add().'</a>';
}
print '<tr class="oddeven">';
if (!empty($show_subgroup))
// Display the accounting account
if (empty($displayed_account) || $root_account_description != $displayed_account)
{
// Show accounting account
if (empty($displayed_account) || $root_account_description != $displayed_account) {
// Show subtotal per accounting account
if ($displayed_account != "") {
print '<tr class="liste_total">';
print '<td class="right" colspan="2">'.$langs->trans("SubTotal").':</td>';
print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
print '<td class="nowrap right">'.price(price2num($sous_total_credit - $sous_total_debit)).'</td>';
print "<td></td>\n";
print '</tr>';
}
// Show first line of a break
print '<tr class="trforbreak">';
print '<td colspan="6" style="font-weight:bold; border-bottom: 1pt solid black;">'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'</td>';
// Display a sub-total per account
if ($displayed_account != "") {
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("SubTotal").':</td>';
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowrap right">'.price($sous_total_opening_balance).'</td>';
print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
print '<td class="nowrap right">'.price(price2num($sous_total_credit - $sous_total_debit)).'</td>';
print "<td>&nbsp;</td>\n";
print '</tr>';
$displayed_account = $root_account_description;
$sous_total_debit = 0;
$sous_total_credit = 0;
}
// Show first line of a break
print '<tr class="trforbreak">';
$colspan = (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE) ? 7 : 6);
print '<td colspan="'.$colspan.'" style="font-weight:bold; border-bottom: 1pt solid black;">'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'</td>';
print '</tr>';
$displayed_account = $root_account_description;
$sous_total_debit = 0;
$sous_total_credit = 0;
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) $sous_total_opening_balance = 0;
}
// $object->get_compte_racine($line->numero_compte);
print '<td>'.$accounting_account.'</td>';
print '<td class="nowraponall right">'.price($opening_balances["'".$line->numero_compte."'"]).'</td>';
print '<td>'.length_accountg($line->numero_compte).'</td>';
print '<td>'.$description.'</td>';
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowraponall right">'.price($opening_balance).'</td>';
print '<td class="nowraponall right">'.price($line->debit).'</td>';
print '<td class="nowraponall right">'.price($line->credit).'</td>';
print '<td class="nowraponall right">'.price(price2num($line->debit - $line->credit, 'MT')).'</td>';
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
print '<td class="nowraponall right">'.price($opening_balance + $line->debit - $line->credit).'</td>';
} else {
print '<td class="nowraponall right">'.price($line->debit - $line->credit).'</td>';
}
print '<td class="center">'.$link;
print '</td>';
print "</tr>\n";
@ -347,17 +352,31 @@ if ($action != 'export_csv')
// Records the sub-total
$sous_total_debit += $line->debit;
$sous_total_credit += $line->credit;
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) $sous_total_opening_balance += $opening_balance;
}
if (!empty($show_subgroup))
{
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("SubTotal").':</td><td class="nowrap right">'.price($sous_total_debit).'</td><td class="nowrap right">'.price($sous_total_credit).'</td><td class="nowrap right">'.price(price2num($sous_total_debit - $sous_total_credit)).'</td>';
print "<td></td>\n";
print '</tr>';
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("SubTotal").':</td>';
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowrap right">'.price($sous_total_opening_balance).'</td>';
print '<td class="nowrap right">'.price($sous_total_debit).'</td>';
print '<td class="nowrap right">'.price($sous_total_credit).'</td>';
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
print '<td class="nowrap right">' . price(price2num($sous_total_opening_balance + $sous_total_debit - $sous_total_credit, 'MT')) . '</td>';
} else {
print '<td class="nowrap right">' . price(price2num($sous_total_debit - $sous_total_credit, 'MT')) . '</td>';
}
print "<td>&nbsp;</td>\n";
print '</tr>';
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("AccountBalance").':</td><td class="nowrap right">'.price($total_debit).'</td><td class="nowrap right">'.price($total_credit).'</td><td class="nowrap right">'.price(price2num($total_debit - $total_credit)).'</td>';
print "<td></td>\n";
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("AccountBalance").':</td>';
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) print '<td class="nowrap right">'.price($total_opening_balance).'</td>';
print '<td class="nowrap right">'.price($total_debit).'</td>';
print '<td class="nowrap right">'.price($total_credit).'</td>';
if (!empty($conf->global->ACCOUNTANCY_SHOW_OPENING_BALANCE)) {
print '<td class="nowrap right">' . price(price2num($total_opening_balance + $total_debit - $total_credit, 'MT')) . '</td>';
} else {
print '<td class="nowrap right">' . price(price2num($total_debit - $total_credit, 'MT')) . '</td>';
}
print "<td>&nbsp;</td>\n";
print '</tr>';
print "</table>";

View File

@ -114,13 +114,11 @@ if ($action == "confirm_update") {
$object->credit = $credit;
if (floatval($debit) != 0.0) {
$object->montant = $debit; // deprecated
$object->amount = $debit;
$object->montant = $debit;
$object->sens = 'D';
}
if (floatval($credit) != 0.0) {
$object->montant = $credit; // deprecated
$object->amount = $credit;
$object->montant = $credit;
$object->sens = 'C';
}
@ -140,7 +138,9 @@ if ($action == "confirm_update") {
}
}
}
} elseif ($action == "add") {
}
elseif ($action == "add") {
$error = 0;
if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0))
@ -175,14 +175,12 @@ if ($action == "confirm_update") {
$object->fk_docdet = (int) GETPOST('fk_docdet', 'int');
if (floatval($debit) != 0.0) {
$object->montant = $debit; // deprecated
$object->amount = $debit;
$object->montant = $debit;
$object->sens = 'D';
}
if (floatval($credit) != 0.0) {
$object->montant = $credit; // deprecated
$object->amount = $credit;
$object->montant = $credit;
$object->sens = 'C';
}
@ -201,7 +199,9 @@ if ($action == "confirm_update") {
$action = '';
}
}
} elseif ($action == "confirm_delete") {
}
elseif ($action == "confirm_delete") {
$object = new BookKeeping($db);
$result = $object->fetch($id, null, $mode);
@ -216,7 +216,9 @@ if ($action == "confirm_update") {
}
}
$action = '';
} elseif ($action == "confirm_create") {
}
elseif ($action == "confirm_create") {
$error = 0;
$object = new BookKeeping($db);
@ -245,8 +247,7 @@ if ($action == "confirm_update") {
$object->journal_label = $journal_label;
$object->fk_doc = 0;
$object->fk_docdet = 0;
$object->montant = 0; // deprecated
$object->amount = 0;
$object->montant = 0;
$result = $object->createStd($user, 0, $mode);
if ($result < 0) {
@ -292,7 +293,7 @@ if ($action == 'setjournal') {
}
if ($action == 'setdocref') {
$refdoc = GETPOST('doc_ref', 'alpha');
$refdoc = trim(GETPOST('doc_ref', 'alpha'));
$result = $object->updateByMvt($piece_num, 'doc_ref', $refdoc, $mode);
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
@ -328,7 +329,7 @@ llxHeader('', $langs->trans("CreateMvts"));
// Confirmation to delete the command
if ($action == 'delete') {
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"].'?id='.$id.'&mode='.$mode, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt', $langs->transnoentitiesnoconv("RegistrationInAccounting")), 'confirm_delete', '', 0, 1);
$formconfirm = $html->formconfirm($_SERVER["PHP_SELF"].'?id='.$id.'&mode='.$mode, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1);
print $formconfirm;
}
@ -351,7 +352,7 @@ if ($action == 'create')
print '<input type="hidden" name="next_num_mvt" value="'.$next_num_mvt.'">'."\n";
print '<input type="hidden" name="mode" value="_tmp">'."\n";
print dol_get_fiche_head();
dol_fiche_head();
print '<table class="border centpercent">';
@ -386,7 +387,7 @@ if ($action == 'create')
print '</table>';
print dol_get_fiche_end();
dol_fiche_end();
print '<div class="center">';
print '<input type="submit" class="button" value="'.$langs->trans("Create").'">';
@ -415,7 +416,7 @@ if ($action == 'create')
$head[$h][2] = 'transaction';
$h++;
print dol_get_fiche_head($head, 'transaction', '', -1);
dol_fiche_head($head, 'transaction', '', -1);
//dol_banner_tab($object, '', $backlink);
@ -573,7 +574,7 @@ if ($action == 'create')
print '</div></div><!-ee-->';
print dol_get_fiche_end();
dol_fiche_end();
print '<div style="clear:both"></div>';
@ -627,7 +628,9 @@ if ($action == 'create')
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount((GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account), 'subledger_account', 1);
} else {
}
else
{
print '<input type="text" class="maxwidth150" name="subledger_account" value="'.(GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account).'">';
}
print '</td>';
@ -682,7 +685,9 @@ if ($action == 'create')
if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX))
{
print $formaccounting->select_auxaccount('', 'subledger_account', 1);
} else {
}
else
{
print '<input type="text" class="maxwidth150" name="subledger_account" value="">';
}
print '</td>';
@ -702,7 +707,9 @@ if ($action == 'create')
if ($total_debit == $total_credit)
{
print '<a class="button" href="'.$_SERVER["PHP_SELF"].'?piece_num='.$object->piece_num.'&action=valid">'.$langs->trans("ValidTransaction").'</a>';
} else {
}
else
{
print '<input type="submit" class="button" disabled="disabled" href="#" title="'.dol_escape_htmltag($langs->trans("MvtNotCorrectlyBalanced", $debit, $credit)).'" value="'.dol_escape_htmltag($langs->trans("ValidTransaction")).'">';
}
@ -719,7 +726,7 @@ if ($action == 'create')
}
}
print dol_get_fiche_end();
dol_fiche_end();
// End of page
llxFooter();

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