Compare commits

...

466 Commits
13.0.1 ... 12.0

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
Frédéric FRANCE
71a2c20d4b
massaction validate invoice do not regenerate pdf 2021-02-09 14:32:04 +01:00
177 changed files with 1598 additions and 1098 deletions

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

@ -24,7 +24,7 @@
"vendor-dir" : "htdocs/includes"
},
"require" : {
"php" : ">=5.5.0",
"php" : ">=5.6.0",
"ext-curl" : "*",
"ckeditor/ckeditor" : "4.12.1",
"mike42/escpos-php" : "2.2",

View File

@ -175,6 +175,18 @@ 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);
}

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

@ -158,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";
}

View File

@ -45,14 +45,14 @@ $search_mvt_num = GETPOST('search_mvt_num', 'int');
$search_doc_type = GETPOST("search_doc_type", 'alpha');
$search_doc_ref = GETPOST("search_doc_ref", 'alpha');
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
$search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmonth', 'int'), GETPOST('date_creation_startday', 'int'), GETPOST('date_creation_startyear', 'int'));
$search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
$search_date_creation_end = dol_mktime(23, 59, 59, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int'));
$search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int'));
$search_date_modification_end = dol_mktime(0, 0, 0, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
$search_date_modification_end = dol_mktime(23, 59, 59, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int'));
$search_date_export_start = dol_mktime(0, 0, 0, GETPOST('date_export_startmonth', 'int'), GETPOST('date_export_startday', 'int'), GETPOST('date_export_startyear', 'int'));
$search_date_export_end = dol_mktime(0, 0, 0, GETPOST('date_export_endmonth', 'int'), GETPOST('date_export_endday', 'int'), GETPOST('date_export_endyear', 'int'));
$search_date_export_end = dol_mktime(23, 59, 59, GETPOST('date_export_endmonth', 'int'), GETPOST('date_export_endday', 'int'), GETPOST('date_export_endyear', 'int'));
//var_dump($search_date_start);exit;
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {

View File

@ -40,7 +40,7 @@ $langs->loadLangs(array("accountancy"));
$action = GETPOST('action', 'alpha');
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
$search_accountancy_code = GETPOST("search_accountancy_code");

View File

@ -5,7 +5,7 @@
* Copyright (C) 2015 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2016 Pierre-Henry Favre <phf@atm-consulting.fr>
* Copyright (C) 2016-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2017 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2017 Elarifr. Ari Elbaz <github@accedinfo.com>
* Copyright (C) 2017-2019 Frédéric France <frederic.france@netlogic.fr>
@ -439,33 +439,43 @@ class AccountancyExport
}
/**
* Export format : CIEL
* Export format : CIEL (Format XIMPORT)
* Format since 2003 compatible CIEL version > 2002 / Sage50
* Last review for this format : 2021/07/28 Alexandre Spangaro (aspangaro@open-dsi.fr)
*
* Help : https://sage50c.online-help.sage.fr/aide-technique/
* In sage software | Use menu : "Exchange" > "Importing entries..."
*
* If you want to force filename to "XIMPORT.TXT" for automatically import file present in a directory :
* use constant ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME
*
* @param array $TData data
* @return void
*/
public function exportCiel(&$TData)
{
global $conf;
$end_line = "\r\n";
$i = 1;
$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd
foreach ($TData as $data) {
$code_compta = $data->numero_compte;
if (!empty($data->subledger_account))
$code_compta = $data->subledger_account;
$code_compta = length_accountg($data->numero_compte);
if (!empty($data->subledger_account)) {
$code_compta = length_accounta($data->subledger_account);
}
$date_document = dol_print_date($data->doc_date, '%Y%m%d');
$date_echeance = dol_print_date($data->date_lim_reglement, '%Y%m%d');
$Tab = array();
$Tab['num_ecriture'] = str_pad($i, 5);
$Tab['num_ecriture'] = str_pad($data->piece_num, 5);
$Tab['code_journal'] = str_pad($data->code_journal, 2);
$Tab['date_ecriture'] = $date_ecriture;
$Tab['date_ope'] = dol_print_date($data->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE);
$Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 12), 12);
$Tab['date_ecriture'] = str_pad($date_document, 8, ' ', STR_PAD_LEFT);
$Tab['date_echeance'] = str_pad($date_echeance, 8, ' ', STR_PAD_LEFT);
$Tab['num_piece'] = str_pad(self::trunc($data->doc_ref, 12), 12);
$Tab['num_compte'] = str_pad(self::trunc($code_compta, 11), 11);
$Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).dol_string_unaccent($data->label_operation), 25), 25);
$Tab['montant'] = str_pad(abs($data->montant), 13, ' ', STR_PAD_LEFT);
$Tab['montant'] = str_pad(price2fec(abs($data->montant)), 13, ' ', STR_PAD_LEFT);
$Tab['type_montant'] = str_pad($data->sens, 1);
$Tab['vide'] = str_repeat(' ', 18);
$Tab['intitule_compte'] = str_pad(self::trunc(dol_string_unaccent($data->label_operation), 34), 34);
@ -519,9 +529,8 @@ class AccountancyExport
$Tab['contrepartie'] = str_repeat(' ', 8);
// elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting
if (!empty($data->date_echeance))
//$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%y'); // elarifr: format must be ddmmyy
if (!empty($data->date_lim_reglement))
$Tab['date_echeance'] = dol_print_date($data->date_lim_reglement, '%d%m%y'); // elarifr: format must be ddmmyy
else
$Tab['date_echeance'] = '000000';
@ -617,9 +626,8 @@ class AccountancyExport
$Tab['code_stat'] = str_repeat(' ', 4);
if (!empty($data->date_echeance))
//$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
$Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%Y');
if (!empty($data->date_lim_reglement))
$Tab['date_echeance'] = dol_print_date($data->date_lim_reglement, '%d%m%Y');
else
$Tab['date_echeance'] = dol_print_date($data->doc_date, '%d%m%Y');

View File

@ -121,9 +121,9 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
{
$db->begin();
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet as l";
$sql1 .= " SET l.fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE l.rowid IN ('.implode(',', $changeaccount).')';
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet";
$sql1 .= " SET fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE rowid IN ('.implode(',', $changeaccount).')';
dol_syslog('accountancy/customer/lines.php::changeaccount sql= '.$sql1);
$resql1 = $db->query($sql1);

View File

@ -93,87 +93,88 @@ if ($conf->accounting->enabled)
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
print "<br>\n";
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
print "<br>\n"; print "<br>\n";
if (!empty($user->rights->accounting->chartofaccount)){
print "<br>\n"; print "<br>\n";
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
print '<hr>';
print "<br>\n";
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
print '<hr>';
print "<br>\n";
// STEPS
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").'</strong></a>');
print "<br>\n";
// STEPS
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").'</strong></a>');
print "<br>\n";
print "<br>\n";
print $langs->trans("AccountancyAreaDescActionOnceBis");
print "<br>\n";
print "<br>\n";
print "<br>\n";
print $langs->trans("AccountancyAreaDescActionOnceBis");
print "<br>\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong></a>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong></a>')."\n";
print "<br>\n";
$step++;
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong></a>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
print "<br>\n";
if (!empty($conf->tax->enabled))
{
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong></a>';
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
print "<br>\n";
$step++;
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong></a>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
print "<br>\n";
if (!empty($conf->tax->enabled))
{
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong></a>';
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
print "<br>\n";
}
/*if (! empty($conf->salaries->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
// htdocs/admin/salaries.php
print "<br>\n";
print "<br>\n";
}*/
if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong></a>');
print "<br>\n";
}
/*
if (! empty($conf->loan->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").' - '.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}
if (! empty($conf->don->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}
if (! empty($conf->adherents->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}*/
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").'</strong></a>');
print "<br>\n";
print '<br>';
}
/*if (! empty($conf->salaries->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
// htdocs/admin/salaries.php
print "<br>\n";
print "<br>\n";
}*/
if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong></a>');
print "<br>\n";
}
/*
if (! empty($conf->loan->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").' - '.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}
if (! empty($conf->don->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}
if (! empty($conf->adherents->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}*/
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").'</strong></a>');
print "<br>\n";
print '<br>';
// Step A - E

View File

@ -3,7 +3,7 @@
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
@ -608,7 +608,7 @@ if (empty($action) || $action == 'view') {
print "<td>".$expensereportstatic->getNomUrl(1)."</td>";
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT);
$accountoshow = length_accountg($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT);
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForUsersNotDefined").'</span>';

View File

@ -3,7 +3,7 @@
* Copyright (C) 2007-2010 Jean Heimburger <jean@tiaris.info>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
@ -92,7 +92,7 @@ if (!GETPOSTISSET('date_startmonth') && (empty($date_start) || empty($date_end))
$date_end = dol_get_last_day($pastmonthyear, $pastmonth, false);
}
$sql = "SELECT f.rowid, f.ref as ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlf, f.close_code,";
$sql = "SELECT f.rowid, f.ref as ref, f.type, f.datef as df, f.libelle,f.ref_supplier, f.date_lim_reglement as dlr, f.close_code,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.tva as total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.vat_src_code,";
$sql .= " s.rowid as socid, s.nom as name, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
$sql .= " p.accountancy_code_buy , aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
@ -628,7 +628,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
print '"'.$val["refsologest"].'"'.$sep;
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
print '"'.$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER.'"'.$sep;
print '"'.length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER).'"'.$sep;
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
print '"'.$langs->trans("Thirdparty").'"'.$sep;
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$val["refsuppliersologest"].' - '.$langs->trans("Thirdparty").'"'.$sep;
@ -694,9 +694,9 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
print '"'.$date.'"'.$sep;
print '"'.$val["refsologest"].'"'.$sep;
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
print '"'.length_accountg(html_entity_decode($k)).'"'.$sep;
print '"'.$langs->trans("Thirdparty").'"'.$sep;
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$val["refsuppliersologest"].' - '.$langs->trans("VAT").' NPR"'.$sep;
print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep;
@ -867,7 +867,7 @@ if (empty($action) || $action == 'view') {
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
$accountoshow = length_accountg($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER);
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForSuppliersNotDefined").'</span>';

View File

@ -4,7 +4,7 @@
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2013-2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
@ -586,7 +586,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 !
print '"'.$val["ref"].'"'.$sep;
print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep;
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
print '"'.$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER.'"'.$sep;
print '"'.length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER).'"'.$sep;
print '"'.length_accounta(html_entity_decode($k)).'"'.$sep;
print '"'.$langs->trans("Thirdparty").'"'.$sep;
print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$invoicestatic->ref.' - '.$langs->trans("Thirdparty").'"'.$sep;
@ -803,7 +803,7 @@ if (empty($action) || $action == 'view') {
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
// Account
print "<td>";
$accountoshow = length_accounta($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
$accountoshow = length_accountg($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER);
if (($accountoshow == "") || $accountoshow == 'NotDefined')
{
print '<span class="error">'.$langs->trans("MainAccountForCustomersNotDefined").'</span>';

View File

@ -123,9 +123,9 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
{
$db->begin();
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det as l";
$sql1 .= " SET l.fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE l.rowid IN ('.implode(',', $changeaccount).')';
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det";
$sql1 .= " SET fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE rowid IN ('.implode(',', $changeaccount).')';
dol_syslog('accountancy/supplier/lines.php::changeaccount sql= '.$sql1);
$resql1 = $db->query($sql1);

View File

@ -58,9 +58,9 @@ if ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$
$endaccountingperiod = dol_print_date(dol_get_last_day($tmparray['year'], $tmparray['mon']), 'dayxcard');
$completefilename = $siren."FEC".$endaccountingperiod.".txt";
}
else
{
} elseif ($accountancyexport->getFormatCode($formatexportset) == $accountancyexport::$EXPORT_TYPE_CIEL && $type_export == "general_ledger" && !empty($conf->global->ACCOUNTING_EXPORT_XIMPORT_FORCE_FILENAME)) {
$completefilename = "XIMPORT.TXT";
} else {
$completefilename = ($code ? $code."_" : "").($prefix ? $prefix."_" : "").$filename.($nodateexport ? "" : $date_export).".".$format;
}

View File

@ -326,7 +326,7 @@ if (empty($reshook))
$object->public = GETPOST("public", 'alpha');
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
if ($ret < 0) $error++;
// Check if we need to also synchronize user information

View File

@ -1380,7 +1380,7 @@ class Adherent extends CommonObject
$this->first_subscription_amount = $obj->subscription;
}
$this->last_subscription_date = $this->db->jdate($obj->datec);
$this->last_subscription_date_start = $this->db->jdate($obj->datef);
$this->last_subscription_date_start = $this->db->jdate($obj->dateh);
$this->last_subscription_date_end = $this->db->jdate($obj->datef);
$this->last_subscription_amount = $obj->subscription;

View File

@ -865,7 +865,7 @@ while ($i < min($num, $limit))
else
{
print '<td class="nowrap left">';
if ($obj->subscription == 'yes')
if (!empty($obj->subscription))
{
print $langs->trans("SubscriptionNotReceived");
if ($obj->statut > 0) print " ".img_warning();

View File

@ -175,7 +175,7 @@ if ($action == 'update' && $user->rights->adherent->configurer)
$object->vote = (boolean) trim($vote);
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
if ($ret < 0) $error++;
$ret = $object->update($user);
@ -510,7 +510,7 @@ if ($rowid > 0)
$sql .= " AND t.rowid = ".$object->id;
if ($sall)
{
$sql .= natural_search(array("f.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall);
$sql .= natural_search(array("d.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall);
}
if ($status != '')
{
@ -709,7 +709,7 @@ if ($rowid > 0)
else
{
print '<td class="nowrap left">';
if ($objp->subscription == 'yes')
if (!empty($objp->subscription))
{
print $langs->trans("SubscriptionNotReceived");
if ($objp->statut > 0) print " ".img_warning();

View File

@ -781,7 +781,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) {
$sql .= (int) GETPOST($keycode, 'int');
}
else {
else {
$sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'";
}
@ -1048,6 +1048,7 @@ if ($id)
elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code);
elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code);
elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code);
elseif ($search_code != '' && $id == 10) $sql .= natural_search("t.code", $search_code);
elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code);
if ($sortfield)

View File

@ -257,7 +257,7 @@ if (empty($reshook))
$sql = "INSERT INTO ".$tabname[$id]." (";
// List of fields
$sql .= $tabfieldinsert[$id];
$sql .= ",active)";
$sql .= ",active,enabled)";
$sql .= " VALUES(";
// List of values
@ -289,7 +289,7 @@ if (empty($reshook))
$i++;
}
$sql .= ", 1)";
$sql .= ", 1, 1)";
dol_syslog("actionadd", LOG_DEBUG);
$result = $db->query($sql);

View File

@ -197,7 +197,7 @@ if ($action == 'delete')
$form = new Form($db);
$formadmin = new FormAdmin($db);
$wikihelp = 'EN:Setup Translation|FR:Paramétrage traduction|ES:Configuración';
$wikihelp = 'EN:Setup_Translation|FR:Paramétrage_Traduction|ES:Configuración_Traducción';
llxHeader('', $langs->trans("Setup"), $wikihelp);
$param = '&mode='.$mode;

View File

@ -154,7 +154,7 @@ if ($action == 'update' && $user->rights->asset->write)
$object->note = trim($comment);
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
if ($ret < 0) $error++;
$ret = $object->update($user);

View File

@ -53,7 +53,7 @@ function printDropdownBookmarksList()
{
foreach ($_POST as $key => $val)
{
if (preg_match('/^search_/', $key) && $val != '') $tmpurl .= ($tmpurl ? '&' : '').$key.'='.$val;
if (preg_match('/^search_/', $key) && $val != '') $tmpurl .= ($tmpurl ? '&' : '').http_build_query(array($key => $val));
}
}
$url .= ($tmpurl ? '?'.$tmpurl : '');

View File

@ -102,7 +102,7 @@ if ($action == 'update' && $user->rights->categorie->creer)
}
if (!$error && empty($object->error))
{
$ret = $extrafields->setOptionalsFromPost(null, $object);
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
if ($ret < 0) $error++;
if (!$error && $object->update($user) > 0)

View File

@ -529,7 +529,7 @@ if (empty($reshook) && $action == 'update')
}
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
if ($ret < 0) $error++;
if (!$error) {

View File

@ -763,6 +763,7 @@ class ActionComm extends CommonObject
$this->elementid = $obj->elementid;
$this->elementtype = $obj->elementtype;
$this->fetch_optionals();
$this->fetchResources();
}
$this->db->free($resql);

View File

@ -66,7 +66,7 @@ class AgendaEvents extends DolibarrApi
if (!DolibarrApiAccess::$user->rights->agenda->myactions->read) {
throw new RestException(401, "Insufficient rights to read an event");
}
if ($id == 0) {
if ($id === 0) {
$result = $this->actioncomm->initAsSpecimen();
} else {
$result = $this->actioncomm->fetch($id);

View File

@ -839,7 +839,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
{
$langs->load("orders");
$sql = "SELECT s.nom as name, s.rowid, c.rowid as commandeid, c.total_ttc, c.total_ht, c.tva as total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed";
$sql = "SELECT s.nom as name, s.rowid, c.rowid as commandeid, c.fk_statut, c.total_ttc, c.total_ht, c.tva as total_tva, c.ref, c.ref_client, c.fk_statut, c.date_valid as dv, c.facture as billed";
$sql .= ", s.code_client";
$sql .= ", s.entity";
$sql .= ", s.email";
@ -877,6 +877,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire)
$orderstatic->id = $obj->commandeid;
$orderstatic->ref = $obj->ref;
$orderstatic->statut = $obj->fk_statut;
$orderstatic->ref_client = $obj->ref_client;
$orderstatic->total_ht = $obj->total_ht;
$orderstatic->total_tva = $obj->total_tva;

View File

@ -66,6 +66,8 @@ $modulesdir = dolGetModulesDirs('/mailings');
$object = new Mailing($db);
$result = $object->fetch($id);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('ciblescard', 'globalcard'));
/*
* Actions
@ -471,6 +473,10 @@ if ($object->fetch($id) >= 0)
}
} // End foreach dir
$parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</div>';
print '<br><br>';

View File

@ -595,6 +595,10 @@ class AdvanceTargetingMailing extends CommonObject
if ($arrayquery['options_'.$key] != '') {
$sqlwhere[] = " (te.".$key." = ".$arrayquery['options_'.$key].")";
}
} elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'link') {
if ($arrayquery['options_'.$key] > 0) {
$sqlwhere[]= " (te.".$key." = ".((int) $arrayquery['options_'.$key]).")";
}
} else {
if (is_array($arrayquery['options_'.$key])) {
$sqlwhere[] = " (te.".$key." IN ('".implode("','", $arrayquery['options_'.$key])."'))";
@ -621,7 +625,6 @@ class AdvanceTargetingMailing extends CommonObject
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
$this->thirdparty_lines[$i] = $obj->rowid;
$i++;

View File

@ -424,11 +424,16 @@ class Mailing extends CommonObject
/**
* Delete emailing
*
* @param int $rowid id du mailing a supprimer
* @return int 1 en cas de succes
* @param int $rowid Id if emailing to delete
* @param int $notrigger Disable triggers
* @return int >0 if OK, <0 if KO
*/
public function delete($rowid)
public function delete($rowid, $notrigger = 0)
{
global $user;
$this->db->begin();
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing";
$sql .= " WHERE rowid = ".$rowid;
@ -436,13 +441,31 @@ class Mailing extends CommonObject
$resql = $this->db->query($sql);
if ($resql)
{
return $this->delete_targets();
$res = $this->delete_targets();
if(empty($res)){
$this->db->rollback();
$this->error = $this->db->lasterror();
return -1;
}
}
else
{
$this->db->rollback();
$this->error = $this->db->lasterror();
return -1;
}
if(!$notrigger){
$result = $this->call_trigger('MAILING_DELETE', $user);
if ($result < 0)
{
$this->db->rollback();
return -1;
}
}
$this->db->commit();
return 1;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps

View File

@ -327,7 +327,7 @@ if (empty($reshook))
$duration = GETPOST('duree_validite', 'int');
if (empty($datep)) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors');
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DatePropal")), null, 'errors');
$action = 'create';
$error++;
}
@ -1622,7 +1622,7 @@ if ($action == 'create')
}
// Date
print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>';
print '<tr><td class="fieldrequired">'.$langs->trans('DatePropal').'</td><td>';
print $form->selectDate('', '', '', '', '', "addprop", 1, 1);
print '</td></tr>';
@ -2051,7 +2051,7 @@ if ($action == 'create')
print '<tr>';
print '<td>';
print '<table class="nobordernopadding" width="100%"><tr><td>';
print $langs->trans('Date');
print $langs->trans('DatePropal');
print '</td>';
if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate)
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdate&amp;id='.$object->id.'">'.img_edit($langs->trans('SetDate'), 1).'</a></td>';

View File

@ -162,7 +162,7 @@ $arrayfields = array(
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
'p.date'=>array('label'=>"Date", 'checked'=>1),
'p.date'=>array('label'=>"DatePropal", 'checked'=>1),
'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1),
'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0),
'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0),

View File

@ -216,6 +216,8 @@ if (empty($reshook))
$result = $object->deleteline($user, $lineid);
if ($result > 0)
{
// reorder lines
$object->line_order(true);
// Define output language
$outputlangs = $langs;
$newlang = '';

View File

@ -2271,6 +2271,7 @@ class Commande extends CommonOrder
$sql .= ' FROM '.MAIN_DB_PREFIX.'expedition as e';
$sql .= ', '.MAIN_DB_PREFIX.'element_element as el';
$sql .= ' WHERE el.fk_source = '.$this->id;
$sql .= " AND el.sourcetype = 'commande'";
$sql .= " AND el.fk_target = e.rowid";
$sql .= " AND el.targettype = 'shipping'";
@ -4053,7 +4054,7 @@ class Commande extends CommonOrder
$now = dol_now();
return max($this->date_commande, $this->date_livraison) < ($now - $conf->commande->client->warning_delay);
return max($this->date, $this->date_livraison) < ($now - $conf->commande->client->warning_delay);
}
/**

View File

@ -78,6 +78,7 @@ class CommandeStats extends Stats
$this->field = 'total_ht';
$this->field_line = 'total_ht';
$this->where .= " c.fk_statut > 0"; // Not draft and not cancelled
$this->categ_link=MAIN_DB_PREFIX.'categorie_societe';
}
elseif ($mode == 'supplier')
{
@ -87,6 +88,7 @@ class CommandeStats extends Stats
$this->field = 'total_ht';
$this->field_line = 'total_ht';
$this->where .= " c.fk_statut > 2"; // Only approved & ordered
$this->categ_link=MAIN_DB_PREFIX.'categorie_fournisseur';
}
//$this->where.= " AND c.fk_soc = s.rowid AND c.entity = ".$conf->entity;
$this->where .= ' AND c.entity IN ('.getEntity('commande').')';
@ -106,7 +108,7 @@ class CommandeStats extends Stats
if ($categid)
{
$this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cats ON cats.fk_soc = c.fk_soc';
$this->join .= ' LEFT JOIN '.$this->categ_link.' as cats ON cats.fk_soc = c.fk_soc';
$this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cat.rowid = cats.fk_categorie';
$this->where .= ' AND cat.rowid = '.$categid;
}

View File

@ -246,7 +246,7 @@ if ($action == 'update')
if (!$error)
{
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
}
if (!$error)

View File

@ -243,6 +243,8 @@ if (empty($reshook))
$result = $object->deleteline(GETPOST('lineid'));
if ($result > 0) {
// reorder lines
$object->line_order(true);
// Define output language
$outputlangs = $langs;
$newlang = '';
@ -318,8 +320,8 @@ if (empty($reshook))
//var_dump($array_of_total_ht_per_vat_rate);exit;
foreach ($array_of_total_ht_per_vat_rate as $vatrate => $tmpvalue)
{
$tmp_total_ht = $array_of_total_ht_per_vat_rate[$vatrate];
$tmp_total_ht_devise = $array_of_total_ht_devise_per_vat_rate[$vatrate];
$tmp_total_ht = price2num($array_of_total_ht_per_vat_rate[$vatrate]);
$tmp_total_ht_devise = price2num($array_of_total_ht_devise_per_vat_rate[$vatrate]);
if (($tmp_total_ht < 0 || $tmp_total_ht_devise < 0) && empty($conf->global->FACTURE_ENABLE_NEGATIVE_LINES))
{
@ -1668,6 +1670,11 @@ if (empty($reshook))
$discount->tva_tx = $lines[$i]->tva_tx;
$discount->fk_user = $user->id;
$discount->description = $desc;
$discount->multicurrency_subprice = abs($lines[$i]->multicurrency_subprice);
$discount->multicurrency_amount_ht = abs($lines[$i]->multicurrency_total_ht);
$discount->multicurrency_amount_tva = abs($lines[$i]->multicurrency_total_tva);
$discount->multicurrency_amount_ttc = abs($lines[$i]->multicurrency_total_ttc);
$discountid = $discount->create($user);
if ($discountid > 0) {
$result = $object->insert_discount($discountid); // This include link_to_invoice
@ -2822,6 +2829,7 @@ if (empty($reshook))
* View
*/
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
@ -3749,6 +3757,15 @@ if ($action == 'create')
}
elseif ($id > 0 || !empty($ref))
{
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound");
echo ' <a href="javascript:history.go(-1)">'.$langs->trans('GoBack').'</div>';
llxFooter();
exit;
}
/*
* Show object in view mode
*/
@ -5206,7 +5223,8 @@ elseif ($id > 0 || !empty($ref))
// Reopen a standard paid invoice
if ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT)
|| ($object->type == Facture::TYPE_CREDIT_NOTE && empty($discount->id))
|| ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id)))
|| ($object->type == Facture::TYPE_DEPOSIT && empty($discount->id))
|| ($object->type == Facture::TYPE_SITUATION && empty($discount->id)))
&& ($object->statut == Facture::STATUS_CLOSED || $object->statut == Facture::STATUS_ABANDONED || ($object->statut == 1 && $object->paye == 1)) // Condition ($object->statut == 1 && $object->paye == 1) should not happened but can be found due to corrupted data
&& ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $usercancreate) || $usercanreopen)) // A paid invoice (partially or completely)
{
@ -5353,7 +5371,7 @@ elseif ($id > 0 || !empty($ref))
}
// Create a credit note
if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
if (($object->type == Facture::TYPE_STANDARD || ($object->type == Facture::TYPE_DEPOSIT && empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS) ) || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate)
{
if (!$objectidnext)
{

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
/* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.net>
* Copyright (C) 2020 Thibault FOUCART <support@ptibogxiv.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

View File

@ -86,6 +86,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
* View
*/
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);

View File

@ -43,6 +43,14 @@ $ref = GETPOST("ref", 'alpha');
* View
*/
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$form = new Form($db);
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info');

View File

@ -13,7 +13,7 @@
* Copyright (C) 2015-2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2019-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -105,12 +105,30 @@ $search_country = GETPOST("search_country", 'int');
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
$search_user = GETPOST('search_user', 'int');
$search_sale = GETPOST('search_sale', 'int');
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
$search_date_valid_start = dol_mktime(0, 0, 0, GETPOST('search_date_valid_startmonth', 'int'), GETPOST('search_date_valid_startday', 'int'), GETPOST('search_date_valid_startyear', 'int'));
$search_date_valid_end = dol_mktime(23, 59, 59, GETPOST('search_date_valid_endmonth', 'int'), GETPOST('search_date_valid_endday', 'int'), GETPOST('search_date_valid_endyear', 'int'));
$search_datelimit_start = dol_mktime(0, 0, 0, GETPOST('search_datelimit_startmonth', 'int'), GETPOST('search_datelimit_startday', 'int'), GETPOST('search_datelimit_startyear', 'int'));
$search_datelimit_end = dol_mktime(23, 59, 59, GETPOST('search_datelimit_endmonth', 'int'), GETPOST('search_datelimit_endday', 'int'), GETPOST('search_datelimit_endyear', 'int'));
$search_date_startday = GETPOST('search_date_startday', 'int');
$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
$search_date_startyear = GETPOST('search_date_startyear', 'int');
$search_date_endday = GETPOST('search_date_endday', 'int');
$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
$search_date_endyear = GETPOST('search_date_endyear', 'int');
$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
$search_date_valid_startday = GETPOST('search_date_valid_startday', 'int');
$search_date_valid_startmonth = GETPOST('search_date_valid_startmonth', 'int');
$search_date_valid_startyear = GETPOST('search_date_valid_startyear', 'int');
$search_date_valid_endday = GETPOST('search_date_valid_endday', 'int');
$search_date_valid_endmonth = GETPOST('search_date_valid_endmonth', 'int');
$search_date_valid_endyear = GETPOST('search_date_valid_endyear', 'int');
$search_date_valid_start = dol_mktime(0, 0, 0, $search_date_valid_startmonth, $search_date_valid_startday, $search_date_valid_startyear);
$search_date_valid_end = dol_mktime(23, 59, 59, $search_date_valid_endmonth, $search_date_valid_endday, $search_date_valid_endyear);
$search_datelimit_startday = GETPOST('search_datelimit_startday', 'int');
$search_datelimit_startmonth = GETPOST('search_datelimit_startmonth', 'int');
$search_datelimit_startyear = GETPOST('search_datelimit_startyear', 'int');
$search_datelimit_endday = GETPOST('search_datelimit_endday', 'int');
$search_datelimit_endmonth = GETPOST('search_datelimit_endmonth', 'int');
$search_datelimit_endyear = GETPOST('search_datelimit_endyear', 'int');
$search_datelimit_start = dol_mktime(0, 0, 0, $search_datelimit_startmonth, $search_datelimit_startday, $search_datelimit_startyear);
$search_datelimit_end = dol_mktime(23, 59, 59, $search_datelimit_endmonth, $search_datelimit_endday, $search_datelimit_endyear);
$search_categ_cus = trim(GETPOST("search_categ_cus", 'int'));
$search_btn = GETPOST('button_search', 'alpha');
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
@ -273,10 +291,28 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
$search_type = '';
$search_country = '';
$search_type_thirdparty = '';
$search_date_startday = '';
$search_date_startmonth = '';
$search_date_startyear = '';
$search_date_endday = '';
$search_date_endmonth = '';
$search_date_endyear = '';
$search_date_start = '';
$search_date_end = '';
$search_date_valid_startday = '';
$search_date_valid_startmonth = '';
$search_date_valid_startyear = '';
$search_date_valid_endday = '';
$search_date_valid_endmonth = '';
$search_date_valid_endyear = '';
$search_date_valid_start = '';
$search_date_valid_end = '';
$search_datelimit_startday = '';
$search_datelimit_startmonth = '';
$search_datelimit_startyear = '';
$search_datelimit_endday = '';
$search_datelimit_endmonth = '';
$search_datelimit_endyear = '';
$search_datelimit_start = '';
$search_datelimit_end = '';
$option = '';
@ -494,7 +530,6 @@ if ($search_zip) $sql .= natural_search("s.zip", $search_zip);
if ($search_state) $sql .= natural_search("state.nom", $search_state);
if ($search_country) $sql .= " AND s.fk_pays IN (".$db->escape($search_country).')';
if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search_type_thirdparty).')';
if ($search_company) $sql .= natural_search('s.nom', $search_company);
if ($search_montant_ht != '') $sql .= natural_search('f.total', $search_montant_ht, 1);
if ($search_montant_vat != '') $sql .= natural_search('f.tva', $search_montant_vat, 1);
if ($search_montant_localtax1 != '') $sql .= natural_search('f.localtax1', $search_montant_localtax1, 1);
@ -623,12 +658,24 @@ if ($resql)
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
if ($sall) $param .= '&sall='.urlencode($sall);
if ($search_date_start) $param .= '&search_date_start='.urlencode($search_date_start);
if ($search_date_end) $param .= '&search_date_end='.urlencode($search_date_end);
if ($search_date_valid_start) $param .= '&search_date_valid_start='.urlencode($search_date_valid_start);
if ($search_date_valid_end) $param .= '&search_date_valid_end='.urlencode($search_date_valid_end);
if ($search_datelimit_start) $param .= '&search_datelimit_start='.urlencode($search_datelimit_start);
if ($search_datelimit_end) $param .= '&search_datelimit_end='.urlencode($search_datelimit_end);
if ($search_date_startday) $param .= '&search_date_startday='.urlencode($search_date_startday);
if ($search_date_startmonth) $param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
if ($search_date_startyear) $param .= '&search_date_startyear='.urlencode($search_date_startyear);
if ($search_date_endday) $param .= '&search_date_endday='.urlencode($search_date_endday);
if ($search_date_endmonth) $param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
if ($search_date_endyear) $param .= '&search_date_endyear='.urlencode($search_date_endyear);
if ($search_date_valid_startday) $param .= '&search_date_valid_startday='.urlencode($search_date_valid_startday);
if ($search_date_valid_startmonth) $param .= '&search_date_valid_startmonth='.urlencode($search_date_valid_startmonth);
if ($search_date_valid_startyear) $param .= '&search_date_valid_startyear='.urlencode($search_date_valid_startyear);
if ($search_date_valid_endday) $param .= '&search_date_valid_endday='.urlencode($search_date_valid_endday);
if ($search_date_valid_endmonth) $param .= '&search_date_valid_endmonth='.urlencode($search_date_valid_endmonth);
if ($search_date_valid_endyear) $param .= '&search_date_valid_endyear='.urlencode($search_date_valid_endyear);
if ($search_datelimit_startday) $param .= '&search_datelimit_startday='.urlencode($search_datelimit_startday);
if ($search_datelimit_startmonth) $param .= '&search_datelimit_startmonth='.urlencode($search_datelimit_startmonth);
if ($search_datelimit_startyear) $param .= '&search_datelimit_startyear='.urlencode($search_datelimit_startyear);
if ($search_datelimit_endday) $param .= '&search_datelimit_endday='.urlencode($search_datelimit_endday);
if ($search_datelimit_endmonth) $param .= '&search_datelimit_endmonth='.urlencode($search_datelimit_endmonth);
if ($search_datelimit_endyear) $param .= '&search_datelimit_endyear='.urlencode($search_datelimit_endyear);
if ($search_ref) $param .= '&search_ref='.urlencode($search_ref);
if ($search_refcustomer) $param .= '&search_refcustomer='.urlencode($search_refcustomer);
if ($search_project_ref) $param .= '&search_project_ref='.urlencode($search_project_ref);

View File

@ -64,6 +64,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
* View
*/
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Notes');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);

View File

@ -92,17 +92,23 @@ print load_fiche_titre($title, '', $picto);
dol_mkdir($dir);
$stats = new FactureStats($db, $socid, $mode, ($userid > 0 ? $userid : 0), ($typent_id > 0 ? $typent_id : 0), ($categ_id > 0 ? $categ_id : 0));
if ($mode == 'customer')
{
if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
if ($mode == 'customer') {
if ($object_status != '' && $object_status >= 0) {
$stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
}
if (is_array($custcats) && !empty($custcats)) {
$stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cat ON (f.fk_soc = cat.fk_soc)';
$stats->where .= ' AND cat.fk_categorie IN ('.implode(',', $custcats).')';
}
}
if ($mode == 'supplier')
{
if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
if ($mode == 'supplier') {
if ($object_status != '' && $object_status >= 0) {
$stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')';
}
if (is_array($custcats) && !empty($custcats)) {
$stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_fournisseur as cat ON (f.fk_soc = cat.fk_soc)';
$stats->where .= ' AND cat.fk_categorie IN ('.implode(',', $custcats).')';
}
}
// Build graphic number of object
@ -283,7 +289,7 @@ if (! empty($conf->category->enabled)) {
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier"));
}
print '<tr><td>'.$cat_label.'</td><td>';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1);
$cate_arbo = $form->select_all_categories($cat_type, null, 'parent', null, null, 1);
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%");
//print $formother->select_categories($cat_type, $categ_id, 'categ_id', true);
print '</td></tr>';

View File

@ -85,7 +85,14 @@ foreach ($linkedObjectBlock as $key => $objectlink)
}
}
print '</td>';
print '<td class="linkedcol-statut right">'.$objectlink->getLibStatut(3).'</td>';
print '<td class="linkedcol-statut right">';
if (method_exists($objectlink, 'getSommePaiement')) {
print $objectlink->getLibStatut(3, $objectlink->getSommePaiement());
}
else {
print $objectlink->getLibStatut(3);
}
print '</td>';
print '<td class="linkedcol-action right"><a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=dellink&dellinkid='.$key.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a></td>';
print "</tr>\n";
}

View File

@ -109,28 +109,70 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture->
$object->fetch($id);
if ($object->valide($user) > 0)
{
$db->commit();
// Loop on each invoice linked to this payment to rebuild PDF
$factures = array();
foreach ($factures as $id)
{
$fac = new Facture($db);
$fac->fetch($id);
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
$outputlangs = $langs;
if (!empty($_REQUEST['lang_id']))
{
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
$outputlangs = $langs;
if (!empty($_REQUEST['lang_id']))
{
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
}
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
$fac->generateDocument($fac->modelpdf, $outputlangs);
}
$hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0;
$hidedesc = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0;
$hideref = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0;
$sql = 'SELECT f.rowid as facid';
$sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf,'.MAIN_DB_PREFIX.'facture as f,'.MAIN_DB_PREFIX.'societe as s';
$sql .= ' WHERE pf.fk_facture = f.rowid';
$sql .= ' AND f.fk_soc = s.rowid';
$sql .= ' AND f.entity IN ('.getEntity('invoice').')';
$sql .= ' AND pf.fk_paiement = '.$object->id;
$resql = $db->query($sql);
if ($resql)
{
$i = 0;
$num = $db->num_rows($resql);
if ($num > 0)
{
while ($i < $num)
{
$objp = $db->fetch_object($resql);
$invoice = new Facture($db);
if ($invoice->fetch($objp->facid) <= 0) {
$errors++;
setEventMessage($invoice->error, $invoice->errors, 'errors');
break;
}
if ($invoice->generateDocument($invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref) < 0) {
$errors++;
setEventMessage($invoice->error, $invoice->errors, 'errors');
break;
}
$i++;
}
}
$db->free($resql);
}
else
{
$errors++;
setEventMessage($db->error, $db->errors, 'errors');
}
}
header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id);
exit;
if (! $errors) {
$db->commit();
header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id);
exit;
}
}
else
{
@ -401,11 +443,13 @@ if ($resql)
print '<td class="right">'.$invoice->getLibStatut(5, $alreadypayed).'</td>';
print "</tr>\n";
if ($objp->paye == 1) // If at least one invoice is paid, disable delete
{
// If at least one invoice is paid, disable delete. INVOICE_CAN_DELETE_PAYMENT_EVEN_IF_INVOICE_CLOSED Can be use for maintenance purpose. Never use this in production
if ($objp->paye == 1 && empty($conf->global->INVOICE_CAN_DELETE_PAYMENT_EVEN_IF_INVOICE_CLOSED)) {
$disable_delete = 1;
$title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemovePaymentWithOneInvoicePaid"));
}
$total = $total + $objp->amount;
$i++;
}

View File

@ -426,8 +426,13 @@ class Paiement extends CommonObject
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
}
$hidedetails = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0;
$hidedesc = ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0;
$hideref = !empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0;
$ret = $invoice->fetch($facid); // Reload to get new records
$result = $invoice->generateDocument($invoice->modelpdf, $outputlangs);
$result = $invoice->generateDocument($invoice->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result < 0) {
setEventMessages($invoice->error, $invoice->errors, 'errors');
$error++;

View File

@ -248,7 +248,7 @@ if ($action == 'create')
print '<tr>';
print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>';
print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'">'.GETPOST('note', 'alphanohtml').'</textarea></td>';
print '</tr>';
print '</table>';
@ -296,6 +296,7 @@ if ($action == 'create')
print '<td class="right">'.price($objp->amount - $sumpaid)."</td>";
print '<td class="center">';
if ($sumpaid < $objp->amount)
{
$namef = "amount_".$objp->id;
@ -304,7 +305,7 @@ if ($action == 'create')
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmount' data-rowid='".$namef."' data-value='".($objp->amount - $sumpaid)."'");
$remaintopay = $objp->amount - $sumpaid;
print '<input type=hidden class="sum_remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
print '<input type="text" size="8" name="'.$namef.'" id="'.$namef.'">';
print '<input type="text" size="8" name="'.$namef.'" id="'.$namef.'" value="'.GETPOST('amount_'.$objp->id, 'alpha').'">';
}
else
{

View File

@ -45,7 +45,7 @@ $langs->loadLangs(array('compta', 'bills', 'banks'));
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm');
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
$fk_project = (GETPOST('fk_project') ? GETPOST('fk_project', 'int') : 0);
$dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), GETPOST('echmonth'), GETPOST('echday'), GETPOST('echyear'));
$dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear'));
@ -91,7 +91,7 @@ if ($action == 'reopen' && $user->rights->tax->charges->creer) {
if ($action == 'classin' && $user->rights->tax->charges->creer)
{
$object->fetch($id);
$object->setProject(GETPOST('projectid'));
$object->setProject(GETPOST('fk_project'));
}
if ($action == 'setlib' && $user->rights->tax->charges->creer)
@ -343,7 +343,7 @@ if ($action == 'create')
print $langs->trans("Date");
print '</td>';
print '<td>';
print $form->selectDate(!empty($dateech) ? $dateech : '-1', 'ech', 0, 0, 0, 'charge', 1);
print $form->selectDate(!empty($dateech) ? $dateech : '-1', 'ech', 0, 0, 0, 'charge', 1, 1);
print '</td>';
print "</tr>\n";
@ -375,21 +375,21 @@ if ($action == 'create')
print '<tr><td>'.$langs->trans("Project").'</td><td>';
$numproject = $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1);
$numproject = $formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, 1, 1);
print '</td></tr>';
}
// Payment Mode
print '<tr><td>'.$langs->trans('PaymentMode').'</td><td colspan="2">';
$form->select_types_paiements($mode_reglement_id, 'mode_reglement_id');
$form->select_types_paiements(GETPOST('mode_reglement_id', 'int'), 'mode_reglement_id');
print '</td></tr>';
// Bank Account
if (!empty($conf->banque->enabled))
{
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
$form->select_comptes(GETPOST('fk_account', 'int'), 'fk_account', 0, '', 1);
print '</td></tr>';
}
@ -482,7 +482,7 @@ if ($id > 0)
$morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
$morehtmlref .= '<input type="hidden" name="action" value="classin">';
$morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
$morehtmlref .= $formproject->select_projects(0, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
$morehtmlref .= $formproject->select_projects(0, $object->fk_project, 'fk_project', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
$morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
$morehtmlref .= '</form>';
} else {
@ -546,11 +546,11 @@ if ($id > 0)
if ($action == 'edit')
{
print '<tr><td>'.$langs->trans("AmountTTC")."</td><td>";
print '<input type="text" name="amount" size="12" class="flat" value="'.$object->amount.'">';
print '<input type="text" name="amount" size="12" class="flat" value="'.price($object->amount).'">';
print "</td></tr>";
}
else {
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td>'.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).'</td></tr>';
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td>'.price($object->amount).'</td></tr>';
}
// Mode of payment

View File

@ -375,7 +375,7 @@ if ($modecompta == 'CREANCES-DETTES')
$_SERVER["PHP_SELF"],
"amount",
"",
$classslink,
$paramslink,
'class="right"',
$sortfield,
$sortorder

View File

@ -421,7 +421,7 @@ if (empty($reshook))
$object->roles = GETPOST("roles", 'array');
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
if ($ret < 0) $error++;
if (!$error)
@ -843,7 +843,7 @@ else
print '<tr><td>'.$langs->trans("ContactByDefaultFor").'</td>';
print '<td colspan="3">';
$contactType = $object->listeTypeContacts('external', '', 1);
print $form->multiselectarray('roles', $contactType);
print $form->multiselectarray('roles', $contactType, array(), 0, 0, 'minwidth500');
print '</td></tr>';
}

View File

@ -744,38 +744,32 @@ class Contact extends CommonObject
$this->error = $this->db->lasterror();
}
// Mis a jour alerte birthday
if ($this->birthday_alert)
{
//check existing
$sql_check = "SELECT rowid FROM ".MAIN_DB_PREFIX."user_alert WHERE type=1 AND fk_contact=".$this->db->escape($id)." AND fk_user=".$user->id;
$result_check = $this->db->query($sql_check);
if (!$result_check || ($this->db->num_rows($result_check) < 1))
{
//insert
$sql = "INSERT INTO ".MAIN_DB_PREFIX."user_alert(type,fk_contact,fk_user) ";
$sql .= "VALUES (1,".$this->db->escape($id).",".$user->id.")";
$result = $this->db->query($sql);
if (!$result)
{
$error++;
$this->error = $this->db->lasterror();
if ($user) {
// Mis a jour alerte birthday
if ($this->birthday_alert) {
//check existing
$sql_check = "SELECT rowid FROM " . MAIN_DB_PREFIX . "user_alert WHERE type=1 AND fk_contact=" . $this->db->escape($id) . " AND fk_user=" . $user->id;
$result_check = $this->db->query($sql_check);
if (!$result_check || ($this->db->num_rows($result_check) < 1)) {
//insert
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "user_alert(type,fk_contact,fk_user) ";
$sql .= "VALUES (1," . $this->db->escape($id) . "," . $user->id . ")";
$result = $this->db->query($sql);
if (!$result) {
$error++;
$this->error = $this->db->lasterror();
}
} else {
$result = true;
}
} else {
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "user_alert ";
$sql .= "WHERE type=1 AND fk_contact=" . $this->db->escape($id) . " AND fk_user=" . $user->id;
$result = $this->db->query($sql);
if (!$result) {
$error++;
$this->error = $this->db->lasterror();
}
}
else
{
$result = true;
}
}
else
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."user_alert ";
$sql .= "WHERE type=1 AND fk_contact=".$this->db->escape($id)." AND fk_user=".$user->id;
$result = $this->db->query($sql);
if (!$result)
{
$error++;
$this->error = $this->db->lasterror();
}
}
@ -1700,7 +1694,7 @@ class Contact extends CommonObject
$this->db->begin();
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_soc=".$this->socid." AND fk_socpeople=".$this->id; ;
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_contacts WHERE fk_soc=".((int) $this->socid)." AND fk_socpeople=".$this->id;
dol_syslog(__METHOD__, LOG_DEBUG);
$result = $this->db->query($sql);
@ -1718,11 +1712,10 @@ class Contact extends CommonObject
$sql .= "fk_socpeople) ";
$sql .= " VALUES (".$conf->entity.",";
$sql .= "'".$this->db->idate(dol_now())."',";
$sql .= $this->socid.", ";
$sql .= ((int) $this->socid).", ";
$sql .= $valRoles." , ";
$sql .= $this->id;
$sql .= ")";
dol_syslog(__METHOD__, LOG_DEBUG);
$result = $this->db->query($sql);
if (!$result)

View File

@ -175,7 +175,7 @@ $arrayfields = array(
'p.phone_mobile'=>array('label'=>"PhoneMobile", 'position'=>32, 'checked'=>1),
'p.fax'=>array('label'=>"Fax", 'position'=>33, 'checked'=>0),
'p.email'=>array('label'=>"EMail", 'position'=>40, 'checked'=>1),
'p.no_email'=>array('label'=>"No_Email", 'position'=>41, 'checked'=>0, 'enabled'=>(!empty($conf->mailing->enabled))),
'unsubscribed'=>array('label'=>"No_Email", 'position'=>41, 'checked'=>0, 'enabled'=>(!empty($conf->mailing->enabled))),
'p.thirdparty'=>array('label'=>"ThirdParty", 'position'=>50, 'checked'=>1, 'enabled'=>empty($conf->global->SOCIETE_DISABLE_CONTACTS)),
'p.priv'=>array('label'=>"ContactVisibility", 'checked'=>1, 'position'=>200),
'p.datec'=>array('label'=>"DateCreationShort", 'checked'=>0, 'position'=>500),
@ -298,7 +298,7 @@ $contactstatic = new Contact($db);
$title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses"));
$sql = "SELECT s.rowid as socid, s.nom as name,";
$sql .= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.zip, p.town, p.poste, p.email, p.no_email,";
$sql .= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.zip, p.town, p.poste, p.email,";
$sql .= " p.socialnetworks, p.photo,";
$sql .= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_update,";
$sql .= " co.label as country, co.code as country_code";
@ -306,6 +306,9 @@ $sql .= " co.label as country, co.code as country_code";
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
}
if(!empty($conf->mailing->enabled)) {
$sql .= ", (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) as unsubscribed";
}
// Add fields from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
@ -374,8 +377,8 @@ if (strlen($search_town)) $sql .= natural_search("p.town", $search_town);
if (count($search_roles) > 0) {
$sql .= " AND p.rowid IN (SELECT sc.fk_socpeople FROM ".MAIN_DB_PREFIX."societe_contacts as sc WHERE sc.fk_c_type_contact IN (".implode(',', $search_roles)."))";
}
if ($search_no_email != '' && $search_no_email >= 0) $sql .= " AND p.no_email = ".$db->escape($search_no_email);
if ($search_no_email != -1 && $search_no_email > 0) $sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) > 0";
if ($search_no_email != -1 && $search_no_email == 0) $sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = p.email) = 0";
if ($search_status != '' && $search_status >= 0) $sql .= " AND p.statut = ".$db->escape($search_status);
if ($search_import_key) $sql .= natural_search("p.import_key", $search_import_key);
if ($type == "o") // filtre sur type
@ -662,7 +665,7 @@ if (!empty($arrayfields['p.email']['checked']))
print '<input class="flat" type="text" name="search_email" size="6" value="'.dol_escape_htmltag($search_email).'">';
print '</td>';
}
if (!empty($arrayfields['p.no_email']['checked']))
if (!empty($arrayfields['unsubscribed']['checked']))
{
print '<td class="liste_titre center">';
print $form->selectarray('search_no_email', array('-1'=>'', '0'=>$langs->trans('No'), '1'=>$langs->trans('Yes')), $search_no_email);
@ -751,7 +754,7 @@ if (!empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_
if (!empty($arrayfields['p.phone_mobile']['checked'])) print_liste_field_titre($arrayfields['p.phone_mobile']['label'], $_SERVER["PHP_SELF"], "p.phone_mobile", $begin, $param, '', $sortfield, $sortorder);
if (!empty($arrayfields['p.fax']['checked'])) print_liste_field_titre($arrayfields['p.fax']['label'], $_SERVER["PHP_SELF"], "p.fax", $begin, $param, '', $sortfield, $sortorder);
if (!empty($arrayfields['p.email']['checked'])) print_liste_field_titre($arrayfields['p.email']['label'], $_SERVER["PHP_SELF"], "p.email", $begin, $param, '', $sortfield, $sortorder);
if (!empty($arrayfields['p.no_email']['checked'])) print_liste_field_titre($arrayfields['p.no_email']['label'], $_SERVER["PHP_SELF"], "p.no_email", $begin, $param, '', $sortfield, $sortorder, 'center ');
if (!empty($arrayfields['unsubscribed']['checked'])) print_liste_field_titre($arrayfields['unsubscribed']['label'], $_SERVER["PHP_SELF"], "unsubscribed", $begin, $param, '', $sortfield, $sortorder, 'center ');
if (!empty($conf->socialnetworks->enabled)) {
foreach ($socialnetworks as $key => $value) {
if ($value['active'] && !empty($arrayfields['p.'.$key]['checked'])) {
@ -905,9 +908,9 @@ while ($i < min($num, $limit))
if (!$i) $totalarray['nbfield']++;
}
// No EMail
if (!empty($arrayfields['p.no_email']['checked']))
if (!empty($arrayfields['unsubscribed']['checked']))
{
print '<td class="center">'.yn($obj->no_email).'</td>';
print '<td class="center">'.yn(($obj->unsubscribed > 0) ? 1 : 0).'</td>';
if (!$i) $totalarray['nbfield']++;
}
if (!empty($conf->socialnetworks->enabled)) {

View File

@ -250,6 +250,8 @@ if ($search_email) $sql .= natural_search('s.email', $search_email);
if ($search_contract) $sql .= natural_search(array('c.rowid', 'c.ref'), $search_contract);
if (!empty($search_ref_customer)) $sql .= natural_search(array('c.ref_customer'), $search_ref_customer);
if (!empty($search_ref_supplier)) $sql .= natural_search(array('c.ref_supplier'), $search_ref_supplier);
if ($search_zip) $sql .= natural_search(array('s.zip'), $search_zip);
if ($search_town) $sql .= natural_search(array('s.town'), $search_town);
if ($search_sale > 0)
{
$sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$search_sale;

View File

@ -262,7 +262,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete))
// Remove a line
if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissiontoadd))
{
if (method_exists('deleteline', $object)) {
if (method_exists($object, 'deleteline')) {
$result = $object->deleteline($user, $lineid); // For backward compatibility
} else {
$result = $object->deleteLine($user, $lineid);

View File

@ -3,7 +3,7 @@
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -1167,7 +1167,38 @@ if (!$error && $massaction == 'validate' && $permissiontoadd)
$error++;
break;
}
else $nbok++;
else {
// validate() rename pdf but do not regenerate
// Define output language
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
$outputlangs = $langs;
$newlang = '';
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
$newlang = GETPOST('lang_id', 'aZ09');
}
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) {
$newlang = $objecttmp->thirdparty->default_lang;
}
if (!empty($newlang)) {
$outputlangs = new Translate("", $conf);
$outputlangs->setDefaultLang($newlang);
$outputlangs->load('products');
}
$model = $objecttmp->model_pdf;
$ret = $objecttmp->fetch($objecttmp->id); // Reload to get new records
// To be sure vars is defined
$hidedetails = !empty($hidedetails) ? $hidedetails : 0;
$hidedesc = !empty($hidedesc) ? $hidedesc : 0;
$hideref = !empty($hideref) ? $hideref : 0;
$moreparams = !empty($moreparams) ? $moreparams : null;
$result = $objecttmp->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
if ($result < 0) {
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
}
}
$nbok++;
}
}
else
{
@ -1249,6 +1280,12 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == '
continue;
}
if ($objectclass == 'Holiday' && ! in_array($objecttmp->statut, array(Holiday::STATUS_DRAFT, Holiday::STATUS_CANCELED, Holiday::STATUS_REFUSED))) {
$nbignored++;
setEventMessage($langs->trans('ErrorLeaveRequestMustBeDraftCanceledOrRefusedToBeDeleted', $objecttmp->ref));
continue;
}
if ($objectclass == "Task" && $objecttmp->hasChildren() > 0)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".$objecttmp->id;
@ -1283,7 +1320,8 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == '
if (!$error)
{
if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs');
else setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs');
elseif ($nbok > 0) setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs');
else setEventMessages($langs->trans("NoRecordDeleted"), null, 'mesgs');
$db->commit();
}
else

View File

@ -80,5 +80,9 @@ if (($action == 'set') && !empty($id)) {
$format = 'int';
$object->table_element = $tablename;
$object->id = $id;
$object->fields[$field] = array('type' => $format, 'enabled' => 1);
$object->setValueFrom($field, $value, $tablename, $id, $format, '', $user, $triggerkey);
}

View File

@ -203,7 +203,7 @@ class box_produits_alerte_stock extends ModeleBoxes
$this->info_box_contents[$line][] = array(
'td' => 'class="center"',
'text' => $objp->total_stock.' / '.$objp->seuil_stock_alerte,
'text' => price2num($objp->total_stock, 'MS').' / '.$objp->seuil_stock_alerte,
'text2'=>img_warning($langs->transnoentitiesnoconv("StockLowerThanLimit", $objp->seuil_stock_alerte)),
);

View File

@ -80,7 +80,7 @@ class CSMSFile
return -1;
}
dol_syslog("CSMSFile::CSMSFile: MAIN_SMS_SENDMODE=".$conf->global->MAIN_SMS_SENDMODE." charset=".$conf->file->character_set_client." from=".$from.", to=".$to.", msg length=".count($msg), LOG_DEBUG);
dol_syslog("CSMSFile::CSMSFile: MAIN_SMS_SENDMODE=".$conf->global->MAIN_SMS_SENDMODE." charset=".$conf->file->character_set_client." from=".$from.", to=".$to.", msg length=".strlen($msg), LOG_DEBUG);
dol_syslog("CSMSFile::CSMSFile: deferred=".$deferred." priority=".$priority." class=".$class, LOG_DEBUG);
// Action according to choosed sending method

View File

@ -450,8 +450,8 @@ abstract class CommonObject
/**
* @var array List of child tables. To know object to delete on cascade.
* If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will
* call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object
* If name is like '@ClassName:FilePathClass:ParentFkFieldName', it will
* call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object.
*/
protected $childtablesoncascade = array();
@ -1356,6 +1356,8 @@ abstract class CommonObject
if ($resql) {
$num = $this->db->num_rows($resql);
if ($num > 0) {
$langs->loadLangs(array("propal", "orders", "bills", "suppliers", "contracts", "supplier_proposal"));
while ($obj = $this->db->fetch_object($resql)) {
$modulename = $obj->element;
if (strpos($obj->element, 'project') !== false) {
@ -1371,11 +1373,15 @@ abstract class CommonObject
}
if ($conf->{$modulename}->enabled) {
$libelle_element = $langs->trans('ContactDefault_'.$obj->element);
$transkey = "TypeContact_".$obj->element."_".$source."_".$obj->code;
$tmpelement = $obj->element;
$transkey = "TypeContact_".$tmpelement."_".$source."_".$obj->code;
$libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle);
if (empty($option))
if (empty($option)) {
$tab[$obj->rowid] = $libelle_element.' - '.$libelle_type;
else $tab[$obj->rowid] = $libelle_element.' - '.$libelle_type;
}
else {
$tab[$obj->rowid] = $libelle_element.' - '.$libelle_type;
}
}
}
}
@ -2184,14 +2190,16 @@ abstract class CommonObject
$this->updateline(
$line->id, ($line->description ? $line->description : $line->desc), $line->subprice, $line->qty, $line->remise_percent,
$line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, false,
$line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice
$line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice,
$line->ref_supplier
);
break;
case 'invoice_supplier':
$this->updateline(
$line->id, ($line->description ? $line->description : $line->desc), $line->subprice, $line->tva_tx, $line->localtax1_tx,
$line->localtax2_tx, $line->qty, 0, 'HT', $line->info_bits, $line->product_type, $line->remise_percent, false,
$line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice
$line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice,
$line->ref_supplier
);
break;
default:

View File

@ -603,6 +603,8 @@ class ExtraFields
*/
public function update($attrname, $label, $type, $length, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0)
{
global $hookmanager;
if ($elementtype == 'thirdparty') $elementtype = 'societe';
if ($elementtype == 'contact') $elementtype = 'socpeople';
@ -643,6 +645,18 @@ class ExtraFields
}
$field_desc = array('type'=>$typedb, 'value'=>$lengthdb, 'null'=>($required ? 'NOT NULL' : 'NULL'), 'default'=>$default);
if (is_object($hookmanager))
{
$hookmanager->initHooks(array('extrafieldsdao'));
$parameters = array('field_desc'=>&$field_desc, 'table'=>$table, 'attr_name'=>$attrname, 'label'=>$label, 'type'=>$type, 'length'=>$length, 'unique'=>$unique, 'required'=>$required, 'pos'=>$pos, 'param'=>$param, 'alwayseditable'=>$alwayseditable, 'perms'=>$perms, 'list'=>$list, 'help'=>$help, 'default'=>$default, 'computed'=>$computed, 'entity'=>$entity, 'langfile'=>$langfile, 'enabled'=>$enabled, 'totalizable'=>$totalizable, 'printable'=>$printable);
$reshook = $hookmanager->executeHooks('updateExtrafields', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
$this->error = $this->db->lasterror();
return -1;
}
}
if ($type != 'separate') // No table update when separate type
{
$result = $this->db->DDLUpdateField(MAIN_DB_PREFIX.$table, $attrname, $field_desc);
@ -1330,7 +1344,10 @@ class ExtraFields
}
elseif ($type == 'checkbox')
{
$value_arr = explode(',', $value);
$value_arr = $value;
if (!is_array($value)) {
$value_arr = explode(',', $value);
}
$out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, '', 0, '100%');
}
elseif ($type == 'radio')
@ -2038,7 +2055,8 @@ class ExtraFields
foreach ($extralabels as $key => $value)
{
if (!empty($onlykey) && $onlykey != '@GETPOSTISSET' && $key != $onlykey) continue;
if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && ! GETPOSTISSET('options_'.$key)) continue;
//when unticking boolean field, it's not set in POST
if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && ! GETPOSTISSET('options_'.$key) && $this->attributes[$object->table_element]['type'][$key] != 'boolean') continue;
$key_type = $this->attributes[$object->table_element]['type'][$key];
if ($key_type == 'separate') continue;

View File

@ -16,7 +16,7 @@
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Christophe Battarel <christophe@altairis.fr>
@ -1182,7 +1182,7 @@ class Form
// mode 1
$urloption = 'htmlname='.urlencode($htmlname).'&outjson=1&filter='.urlencode($filter).($showtype ? '&showtype='.urlencode($showtype) : '');
$out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
$out .= '<style type="text/css">.ui-autocomplete { z-index: 250; }</style>';
$out .= '<style type="text/css">.ui-autocomplete { z-index: 1003; }</style>';
if (empty($hidelabel)) print $langs->trans("RefOrLabel").' : ';
elseif ($hidelabel > 1) {
$placeholder = ' placeholder="'.$langs->trans("RefOrLabel").'"';
@ -6052,7 +6052,7 @@ class Form
$urloption = 'htmlname='.$htmlname.'&outjson=1&objectdesc='.$objectdesc.'&filter='.urlencode($objecttmp->filter);
// Activate the auto complete using ajax call.
$out .= ajax_autocompleter($preselectedvalue, $htmlname, $urlforajaxcall, $urloption, $conf->global->$confkeyforautocompletemode, 0, array());
$out .= '<style type="text/css">.ui-autocomplete { z-index: 250; }</style>';
$out .= '<style type="text/css">.ui-autocomplete { z-index: 1003; }</style>';
if ($placeholder) $placeholder = ' placeholder="'.$placeholder.'"';
$out .= '<input type="text" class="'.$morecss.'"'.($disabled ? ' disabled="disabled"' : '').' name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' />';
}
@ -6160,7 +6160,7 @@ class Form
$tmparray = explode('@', $objecttmp->ismultientitymanaged);
$sql .= ' INNER JOIN '.MAIN_DB_PREFIX.$tmparray[1].' as parenttable ON parenttable.rowid = t.'.$tmparray[0];
}
if ($objecttmp->ismultientitymanaged == 'fk_soc@societe')
if ($objecttmp->ismultientitymanaged === 'fk_soc@societe')
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= " WHERE 1=1";
if (isset($objecttmp->ismultientitymanaged) && $objecttmp->ismultientitymanaged == 1) $sql .= " AND t.entity IN (".getEntity($objecttmp->table_element).")";
@ -6172,7 +6172,7 @@ class Form
else $sql .= " AND t.fk_soc = ".$user->socid;
}
if ($searchkey != '') $sql .= natural_search(explode(',', $fieldstoshow), $searchkey);
if ($objecttmp->ismultientitymanaged == 'fk_soc@societe') {
if ($objecttmp->ismultientitymanaged === 'fk_soc@societe') {
if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND t.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
}
if ($objecttmp->filter) { // Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
@ -7132,7 +7132,7 @@ class Form
print '<input type="radio" name="idtolinkto" value='.$objp->rowid.'>';
print '</td>';
print '<td class="center">'.$objp->ref.'</td>';
print '<td>'.$objp->ref_client.'</td>';
print '<td>'.(!empty($objp->ref_client)?$objp->ref_client:$objp->ref_supplier).'</td>';
print '<td class="right">'.price($objp->total_ht).'</td>';
print '<td>'.$objp->name.'</td>';
print '</tr>';

View File

@ -268,7 +268,7 @@ class FormFile
$out .= "\n</div><!-- End form link new url -->\n";
}
$parameters = array('socid'=>(isset($GLOBALS['socid']) ? $GLOBALS['socid'] : ''), 'id'=>(isset($GLOBALS['id']) ? $GLOBALS['id'] : ''), 'url'=>$url, 'perm'=>$perm);
$parameters = array('socid'=>(isset($GLOBALS['socid']) ? $GLOBALS['socid'] : ''), 'id'=>(isset($GLOBALS['id']) ? $GLOBALS['id'] : ''), 'url'=>$url, 'perm'=>$perm, 'options'=>$options);
$res = $hookmanager->executeHooks('formattachOptions', $parameters, $object);
if (empty($res))
{
@ -1382,7 +1382,7 @@ class FormFile
// $section is inside $param
$newparam.=preg_replace('/&file=.*$/', '', $param); // We don't need param file=
$backtopage = DOL_URL_ROOT.'/ecm/index.php?&section_dir='.urlencode($relativepath).$newparam;
print '<a class="editfielda" href="'.DOL_URL_ROOT.'/ecm/file_card.php?urlfile='.urlencode($file['name']).$param.'&backtopage='.urlencode($backtopage).'" class="editfilelink" rel="'.urlencode($file['name']).'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>';
print '<a class="editfielda editfilelink" href="'.DOL_URL_ROOT.'/ecm/file_card.php?urlfile='.urlencode($file['name']).$param.'&backtopage='.urlencode($backtopage).'" rel="'.urlencode($file['name']).'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>';
}
if (empty($useinecm) || $useinecm == 2 || $useinecm == 6) // 6=Media file manager
@ -1408,7 +1408,7 @@ class FormFile
if ($permtoeditline)
{
$paramsectiondir = (in_array($modulepart, array('medias', 'ecm')) ? '&section_dir='.urlencode($relativepath) : '');
print '<a class="editfielda reposition" href="'.(($useinecm == 1 || $useinecm == 5) ? '#' : ($url.'?action=editfile&urlfile='.urlencode($filepath).$paramsectiondir.$param)).'" class="editfilelink" rel="'.$filepath.'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>';
print '<a class="editfielda reposition editfilelink" href="'.(($useinecm == 1 || $useinecm == 5) ? '#' : ($url.'?action=editfile&urlfile='.urlencode($filepath).$paramsectiondir.$param)).'" rel="'.$filepath.'">'.img_edit('default', 0, 'class="paddingrightonly"').'</a>';
}
}
if ($permonobject)

View File

@ -325,7 +325,7 @@ class FormMail extends Form
$langs->loadLangs(array('other', 'mails'));
// Clear temp files. Must be done at beginning, before call of triggers
if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1'))
if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelselected') && GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1'))
{
$this->clear_attached_files();
}

View File

@ -98,7 +98,8 @@ class FormMargin
$pv = $line->total_ht;
$pa_ht = ($pv < 0 ? -$line->pa_ht : $line->pa_ht); // We choosed to have line->pa_ht always positive in database, so we guess the correct sign
if ($object->element == 'facture' && $object->type == $object::TYPE_SITUATION) {
if (($object->element == 'facture' && $object->type == $object::TYPE_SITUATION)
|| ($object->element == 'facture' && $object->type == $object::TYPE_CREDIT_NOTE && $conf->global->INVOICE_USE_SITUATION_CREDIT_NOTE && $object->situation_counter > 0)) {
$pa = $line->qty * $pa_ht * ($line->situation_percent / 100);
} else {
$pa = $line->qty * $pa_ht;

View File

@ -1,16 +1,17 @@
<?php
/* Copyright (C) 2013-2015 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
/* Copyright (C) 2013-2015 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* 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
* 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
@ -351,12 +352,13 @@ class FormTicket
}
}
if (!empty($conf->projet->enabled) && !$this->ispublic)
{
$formproject = new FormProjets($this->db);
print '<tr><td><label for="project"><span class="">'.$langs->trans("Project").'</span></label></td><td>';
print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
print '</td></tr>';
if($subelement != 'project') {
if (!empty($conf->projet->enabled) && !$this->ispublic) {
$formproject = new FormProjets($this->db);
print '<tr><td><label for="project"><span class="">' . $langs->trans("Project") . '</span></label></td><td>';
print $formproject->select_projects(-1, GETPOST('projectid', 'int'), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
print '</td></tr>';
}
}
// Attached files

View File

@ -346,17 +346,19 @@ class Utils
{
$handlein = popen($fullcommandclear, 'r');
$i = 0;
while (!feof($handlein))
{
$i++; // output line number
$read = fgets($handlein);
// Exclude warning line we don't want
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
fwrite($handle, $read);
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok = 1;
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok = 1;
if ($handlein) {
while (!feof($handlein))
{
$i++; // output line number
$read = fgets($handlein);
// Exclude warning line we don't want
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
fwrite($handle, $read);
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok = 1;
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok = 1;
}
pclose($handlein);
}
pclose($handlein);
}

View File

@ -308,16 +308,20 @@ abstract class DoliDB implements Database
* Note : This method executes a given SQL query and retrieves the first row of results as an object. It should only be used with SELECT queries
* Dont add LIMIT to your query, it will be added by this method
* @param string $sql the sql query string
* @return bool| object
* @return bool|int|object false on failure, 0 on empty, object on success
*/
public function getRow($sql)
{
$sql .= ' LIMIT 1;';
$sql .= ' LIMIT 1';
$res = $this->query($sql);
if ($res)
{
return $this->fetch_object($res);
if ($res) {
$obj = $this->fetch_object($res);
if ($obj) {
return $obj;
} else {
return 0;
}
}
return false;

View File

@ -907,11 +907,11 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
't.email',
);
//Social media
foreach ($socialnetworks as $key => $value) {
if ($value['active']) {
$searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'";
}
}
// foreach ($socialnetworks as $key => $value) {
// if ($value['active']) {
// $searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'";
// }
// }
if (!$sortorder) $sortorder = "ASC";
if (!$sortfield) $sortfield = "t.lastname";

View File

@ -40,6 +40,30 @@
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
/**
* Return dolibarr global constant string value
* @param string $key key to return value, return '' if not set
* @return string
*/
function getDolGlobalString($key)
{
global $conf;
// return $conf->global->$key ?? '';
return (string) (empty($conf->global->$key) ? '' : $conf->global->$key);
}
/**
* Return dolibarr global constant int value
* @param string $key key to return value, return 0 if not set
* @return int
*/
function getDolGlobalInt($key)
{
global $conf;
// return $conf->global->$key ?? 0;
return (int) (empty($conf->global->$key) ? 0 : $conf->global->$key);
}
/**
* Return a DoliDB instance (database handler).
*
@ -4760,7 +4784,7 @@ function price2num($amount, $rounding = '', $option = 0)
$nbofdectoround = '';
if ($rounding == 'MU') $nbofdectoround = $conf->global->MAIN_MAX_DECIMALS_UNIT;
elseif ($rounding == 'MT') $nbofdectoround = $conf->global->MAIN_MAX_DECIMALS_TOT;
elseif ($rounding == 'MS') $nbofdectoround = empty($conf->global->MAIN_MAX_DECIMALS_STOCK) ? 5 : $conf->global->MAIN_MAX_DECIMALS_STOCK;
elseif ($rounding == 'MS') $nbofdectoround = !isset($conf->global->MAIN_MAX_DECIMALS_STOCK) ? 5 : $conf->global->MAIN_MAX_DECIMALS_STOCK;
elseif ($rounding == 'CR') $nbofdectoround = 8;
elseif (is_numeric($rounding)) $nbofdectoround = $rounding;
//print "RR".$amount.' - '.$nbofdectoround.'<br>';
@ -6453,11 +6477,11 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
if ($onlykey != 2 || $mysoc->useLocalTax(1)) $substitutionarray['__AMOUNT_TAX2__'] = is_object($object) ? $object->total_localtax1 : '';
if ($onlykey != 2 || $mysoc->useLocalTax(2)) $substitutionarray['__AMOUNT_TAX3__'] = is_object($object) ? $object->total_localtax2 : '';
$substitutionarray['__AMOUNT_FORMATED__'] = is_object($object) ? ($object->total_ttc ? price($object->total_ttc, 0, $outputlangs, 0, 0, -1, $conf->currency) : null) : '';
$substitutionarray['__AMOUNT_EXCL_TAX_FORMATED__'] = is_object($object) ? ($object->total_ht ? price($object->total_ht, 0, $outputlangs, 0, 0, -1, $conf->currency) : null) : '';
$substitutionarray['__AMOUNT_VAT_FORMATED__'] = is_object($object) ? ($object->total_vat ? price($object->total_vat, 0, $outputlangs, 0, 0, -1, $conf->currency) : ($object->total_tva ? price($object->total_tva, 0, $outputlangs, 0, 0, -1, $conf->currency) : null)) : '';
if ($onlykey != 2 || $mysoc->useLocalTax(1)) $substitutionarray['__AMOUNT_TAX2_FORMATED__'] = is_object($object) ? ($object->total_localtax1 ? price($object->total_localtax1, 0, $outputlangs, 0, 0, -1, $conf->currency) : null) : '';
if ($onlykey != 2 || $mysoc->useLocalTax(2)) $substitutionarray['__AMOUNT_TAX3_FORMATED__'] = is_object($object) ? ($object->total_localtax2 ? price($object->total_localtax2, 0, $outputlangs, 0, 0, -1, $conf->currency) : null) : '';
$substitutionarray['__AMOUNT_FORMATED__'] = is_object($object) ? ($object->total_ttc ? price($object->total_ttc, 0, $outputlangs, 0, -1, -1, $conf->currency) : null) : '';
$substitutionarray['__AMOUNT_EXCL_TAX_FORMATED__'] = is_object($object) ? ($object->total_ht ? price($object->total_ht, 0, $outputlangs, 0, -1, -1, $conf->currency) : null) : '';
$substitutionarray['__AMOUNT_VAT_FORMATED__'] = is_object($object) ? ($object->total_vat ? price($object->total_vat, 0, $outputlangs, 0, -1, -1, $conf->currency) : ($object->total_tva ? price($object->total_tva, 0, $outputlangs, 0, 0, -1, $conf->currency) : null)) : '';
if ($onlykey != 2 || $mysoc->useLocalTax(1)) $substitutionarray['__AMOUNT_TAX2_FORMATED__'] = is_object($object) ? ($object->total_localtax1 ? price($object->total_localtax1, 0, $outputlangs, 0, -1, -1, $conf->currency) : null) : '';
if ($onlykey != 2 || $mysoc->useLocalTax(2)) $substitutionarray['__AMOUNT_TAX3_FORMATED__'] = is_object($object) ? ($object->total_localtax2 ? price($object->total_localtax2, 0, $outputlangs, 0, -1, -1, $conf->currency) : null) : '';
// TODO Add keys for foreign multicurrency
@ -8306,7 +8330,7 @@ function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield
if (!isset($dictvalues[$tablename]))
{
$dictvalues[$tablename] = array();
$sql = 'SELECT * FROM '.$tablename.' WHERE 1'; // Here select * is allowed as it is generic code and we don't have list of fields
$sql = 'SELECT * FROM '.$tablename.' WHERE 1 = 1'; // Here select * is allowed as it is generic code and we don't have list of fields
if ($checkentity) $sql .= ' AND entity IN (0,'.getEntity($tablename).')';
$resql = $db->query($sql);

View File

@ -51,7 +51,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
}
// Check parameters
if (count($addfieldentry) > 0)
if (is_array($addfieldentry) && count($addfieldentry) > 0)
{
if (empty($addfieldentry['name']))
{

View File

@ -623,8 +623,8 @@ function pdf_pagehead(&$pdf, $outputlangs, $page_height)
{
global $conf;
// Add a background image on document
if (!empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF)) // Warning, this option make TCPDF generation being crazy and some content disappeared behind the image
// Add a background image on document only if good setup of const
if (!empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF) && ($conf->global->MAIN_USE_BACKGROUND_ON_PDF != '-1')) // Warning, this option make TCPDF generation being crazy and some content disappeared behind the image
{
$pdf->SetAutoPageBreak(0, 0); // Disable auto pagebreak before adding image
$pdf->Image($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_USE_BACKGROUND_ON_PDF, (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_X) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_X : 0), (isset($conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y) ? $conf->global->MAIN_USE_BACKGROUND_ON_PDF_Y : 0), 0, $page_height);
@ -1937,7 +1937,7 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm
if ($conf->global->SITUATION_DISPLAY_DIFF_ON_PDF)
{
$prev_progress = 0;
if (method_exists($object, 'get_prev_progress'))
if (method_exists($object->lines[$i], 'get_prev_progress'))
{
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
}

View File

@ -76,8 +76,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
-- Third parties
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 500__+MAX_llx_menu__, 'companies', 'thirdparties', 2__+MAX_llx_menu__, '/societe/index.php?mainmenu=companies&amp;leftmenu=thirdparties', 'ThirdParty', 0, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&amp;action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 502__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&amp;action=create', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&amp;action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 502__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&amp;leftmenu=thirdparties', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&amp;type=f&leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 504__+MAX_llx_menu__, 'companies', '', 503__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&amp;leftmenu=supplier&amp;action=create&amp;type=f', 'NewSupplier', 2, 'suppliers', '$user->rights->societe->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 506__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&amp;type=p&leftmenu=prospects', 'ListProspectsShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 3, __ENTITY__);

View File

@ -362,11 +362,12 @@ class pdf_espadon extends ModelePdfExpedition
{
$tab_top = 88 + $height_incoterms;
$tab_top_alt = $tab_top;
$pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->writeHTMLCell(60, 4, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber")." : ".$object->tracking_number, 0, 1, false, true, 'L');
if(!empty($object->tracking_number)) {
$pdf->writeHTMLCell(60, 4, $this->posxdesc - 1, $tab_top - 1, $outputlangs->transnoentities("TrackingNumber")." : ".$object->tracking_number, 0, 1, false, true, 'L');
}
$tab_top_alt = $pdf->GetY();
if(!empty($object->tracking_number)) $tab_top_alt = $pdf->GetY();
//$tab_top_alt += 1;
// Tracking number

View File

@ -79,8 +79,8 @@ class mailing_contacts1 extends MailingTargets
$statssql[0] .= " count(distinct(c.email)) as nb";
$statssql[0] .= " FROM ".MAIN_DB_PREFIX."socpeople as c";
$statssql[0] .= " WHERE c.entity IN (".getEntity('socpeople').")";
$statssql[0] .= " AND c.email != ''"; // Note that null != '' is false
$statssql[0] .= " AND c.no_email = 0";
$statssql[0] .= " AND c.email <> ''"; // Note that null != '' is false
$statssql[0] .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = c.email) = 0";
$statssql[0] .= " AND c.statut = 1";
return $statssql;
@ -103,8 +103,7 @@ class mailing_contacts1 extends MailingTargets
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as c";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = c.fk_soc";
$sql .= " WHERE c.entity IN (".getEntity('socpeople').")";
$sql .= " AND c.email != ''"; // Note that null != '' is false
$sql .= " AND c.no_email = 0";
$sql .= " AND c.email <> ''"; // Note that null != '' is false
$sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = c.email) = 0";
// exclude unsubscribed users
$sql .= " AND c.statut = 1";
@ -132,10 +131,9 @@ class mailing_contacts1 extends MailingTargets
$sql = "SELECT sp.poste, count(distinct(sp.email)) AS nb";
$sql .= " FROM ".MAIN_DB_PREFIX."socpeople as sp";
$sql .= " WHERE sp.entity IN (".getEntity('socpeople').")";
/*$sql.= " AND sp.email != ''"; // Note that null != '' is false
$sql.= " AND sp.no_email = 0";
$sql.= " AND sp.statut = 1";*/
$sql .= " AND (sp.poste IS NOT NULL AND sp.poste != '')";
$sql .= " AND sp.email <> ''"; // Note that null != '' is false
$sql .= " AND sp.statut = 1";
$sql .= " AND (sp.poste IS NOT NULL AND sp.poste <> '')";
$sql .= " GROUP BY sp.poste";
$sql .= " ORDER BY sp.poste";
$resql = $this->db->query($sql);
@ -166,10 +164,9 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ".MAIN_DB_PREFIX."socpeople as sp,";
$sql .= " ".MAIN_DB_PREFIX."categorie as c,";
$sql .= " ".MAIN_DB_PREFIX."categorie_contact as cs";
$sql .= " WHERE sp.statut = 1"; // Note that null != '' is false
//$sql.= " AND sp.no_email = 0";
//$sql.= " AND sp.email != ''";
//$sql.= " AND sp.entity IN (".getEntity('socpeople').")";
$sql .= " WHERE sp.entity IN (".getEntity('socpeople').")";
$sql .= " AND sp.email <> ''"; // Note that null != '' is false
$sql .= " AND sp.statut = 1";
$sql .= " AND cs.fk_categorie = c.rowid";
$sql .= " AND cs.fk_socpeople = sp.rowid";
$sql .= " GROUP BY c.label";
@ -241,10 +238,9 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ".MAIN_DB_PREFIX."socpeople as sp,";
$sql .= " ".MAIN_DB_PREFIX."categorie as c,";
$sql .= " ".MAIN_DB_PREFIX."categorie_societe as cs";
$sql .= " WHERE sp.statut = 1"; // Note that null != '' is false
//$sql.= " AND sp.no_email = 0";
//$sql.= " AND sp.email != ''";
//$sql.= " AND sp.entity IN (".getEntity('socpeople').")";
$sql .= " WHERE sp.entity IN (".getEntity('socpeople').")";
$sql .= " AND sp.email <> ''"; // Note that null != '' is false
$sql .= " AND sp.statut = 1";
$sql .= " AND cs.fk_categorie = c.rowid";
$sql .= " AND cs.fk_soc = sp.fk_soc";
$sql .= " GROUP BY c.label";
@ -283,10 +279,9 @@ class mailing_contacts1 extends MailingTargets
$sql .= " ".MAIN_DB_PREFIX."socpeople as sp,";
$sql .= " ".MAIN_DB_PREFIX."categorie as c,";
$sql .= " ".MAIN_DB_PREFIX."categorie_fournisseur as cs";
$sql .= " WHERE sp.statut = 1"; // Note that null != '' is false
//$sql.= " AND sp.no_email = 0";
//$sql.= " AND sp.email != ''";
//$sql.= " AND sp.entity IN (".getEntity('socpeople').")";
$sql .= " WHERE sp.entity IN (".getEntity('socpeople').")";
$sql .= " AND sp.email <> ''"; // Note that null != '' is false
$sql .= " AND sp.statut = 1";
$sql .= " AND cs.fk_categorie = c.rowid";
$sql .= " AND cs.fk_soc = sp.fk_soc";
$sql .= " GROUP BY c.label";
@ -385,7 +380,6 @@ class mailing_contacts1 extends MailingTargets
if ($filter_category_supplier <> 'all') $sql .= ", ".MAIN_DB_PREFIX."categorie_fournisseur as c3s";
$sql .= " WHERE sp.entity IN (".getEntity('socpeople').")";
$sql .= " AND sp.email <> ''";
$sql .= " AND sp.no_email = 0";
$sql .= " AND (SELECT count(*) FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = sp.email) = 0";
// Exclude unsubscribed email adresses
$sql .= " AND sp.statut = 1";

View File

@ -209,24 +209,6 @@ class MailingTargets // This can't be abstract as it is used for some method
dol_syslog(__METHOD__.": mailing ".$j." targets added");
/*
//Update the status to show thirdparty mail that don't want to be contacted anymore'
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
$sql .= " SET statut=3";
$sql .= " WHERE fk_mailing=".$mailing_id." AND email in (SELECT email FROM ".MAIN_DB_PREFIX."societe where fk_stcomm=-1)";
$sql .= " AND source_type='thirdparty'";
dol_syslog(__METHOD__.": mailing update status to display thirdparty mail that do not want to be contacted");
$result=$this->db->query($sql);
//Update the status to show contact mail that don't want to be contacted anymore'
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
$sql .= " SET statut=3";
$sql .= " WHERE fk_mailing=".$mailing_id." AND source_type='contact' AND (email in (SELECT sc.email FROM ".MAIN_DB_PREFIX."socpeople AS sc ";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid=sc.fk_soc WHERE s.fk_stcomm=-1 OR no_email=1))";
dol_syslog(__METHOD__.": mailing update status to display contact mail that do not want to be contacted",LOG_DEBUG);
$result=$this->db->query($sql);
*/
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
$sql .= " SET statut=3";
$sql .= " WHERE fk_mailing=".$mailing_id." AND email IN (SELECT mu.email FROM ".MAIN_DB_PREFIX."mailing_unsubscribe AS mu WHERE mu.entity IN ('".getEntity('mailing')."'))";

View File

@ -285,9 +285,9 @@ class modAccounting extends DolibarrModules
//'b.doc_type'=>'Doctype',
'b.doc_ref'=>'Piece',
'b.code_journal'=>'Codejournal',
//'b.journal_label'=>'JournalLabel',
'b.journal_label'=>'JournalLabel',
'b.numero_compte'=>'AccountAccounting',
//'b.label_compte'=>'LabelAccount',
'b.label_compte'=>'LabelAccount',
'b.subledger_account'=>'SubledgerAccount',
'b.subledger_label'=>'SubledgerAccountLabel',
'b.label_operation'=>'LabelOperation',
@ -302,9 +302,9 @@ class modAccounting extends DolibarrModules
//'b.doc_type'=>'import',
'b.doc_ref'=>'My document ABC',
'b.code_journal'=>"VTE",
//'b.journal_label'=>"Sale journal",
'b.journal_label'=>"Sale journal",
'b.numero_compte'=>"707",
//'b.label_compte'=>'Product account 707',
'b.label_compte'=>'Product account 707',
'b.subledger_account'=>'',
'b.subledger_label'=>'',
'b.label_operation'=>"Sale of ABC",

View File

@ -329,7 +329,7 @@ class modAdherent extends DolibarrModules
'a.datec'=>'DateCreation', 'a.datefin'=>'DateEndSubscription'
);
// Add extra fields
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity IN (0,".$conf->entity.")";
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'adherent' AND entity IN (0,".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{

View File

@ -491,7 +491,7 @@ class modProduct extends DolibarrModules
if (!empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit';
// Add extra fields
$import_extrafield_sample = array();
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0, ".$conf->entity.")";
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'product' AND entity IN (0, ".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{

View File

@ -293,7 +293,7 @@ class modProjet extends DolibarrModules
$this->import_tables_array[$r] = array('t'=>MAIN_DB_PREFIX.'projet_task', 'extra'=>MAIN_DB_PREFIX.'projet_task_extrafields'); // List of tables to insert into (insert done in same order)
$this->import_fields_array[$r] = array('t.fk_projet'=>'ProjectRef*', 't.ref'=>'RefTask*', 't.label'=>'LabelTask*', 't.dateo'=>"DateStart", 't.datee'=>"DateEnd", 't.planned_workload'=>"PlannedWorkload", 't.progress'=>"Progress", 't.note_private'=>"NotePrivate", 't.note_public'=>"NotePublic", 't.datec'=>"DateCreation");
// Add extra fields
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'projet_task' AND entity IN (0,".$conf->entity.")";
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'projet_task' AND entity IN (0,".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{

View File

@ -156,7 +156,8 @@ class modPropale extends DolibarrModules
$this->rights[$r][1] = 'Close commercial proposals'; // libelle de la permission
$this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour)
$this->rights[$r][3] = 0; // La permission est-elle une permission par defaut
$this->rights[$r][4] = 'cloturer';
$this->rights[$r][4] = 'propal_advance';
$this->rights[$r][5] = 'close';
$r++;
$this->rights[$r][0] = 27; // id de la permission

View File

@ -265,7 +265,7 @@ class modResource extends DolibarrModules
$this->import_tables_array[$r] = array('r'=>MAIN_DB_PREFIX.'resource', 'extra'=>MAIN_DB_PREFIX.'resource_extrafields'); // List of tables to insert into (insert done in same order)
$this->import_fields_array[$r] = array('r.ref'=>"ResourceFormLabel_ref*", 'r.fk_code_type_resource'=>'ResourceTypeCode', 'r.description'=>'ResourceFormLabel_description', 'r.note_private'=>"NotePrivate", 'r.note_public'=>"NotePublic", 'r.asset_number'=>'AssetNumber', 'r.datec'=>'DateCreation');
// Add extra fields
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'resource' AND entity IN (0,".$conf->entity.")";
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'resource' AND entity IN (0,".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{

View File

@ -459,7 +459,7 @@ class modService extends DolibarrModules
if (!empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit';
// Add extra fields
$import_extrafield_sample = array();
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0,".$conf->entity.")";
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'product' AND entity IN (0,".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{

View File

@ -453,7 +453,7 @@ class modSociete extends DolibarrModules
);
if (!empty($conf->global->PRODUIT_MULTIPRICES)) $this->import_fields_array[$r]['s.price_level'] = 'PriceLevel';
// Add extra fields
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'societe' AND entity IN (0, ".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
@ -602,7 +602,7 @@ class modSociete extends DolibarrModules
's.note_public' => "NotePublic"
);
// Add extra fields
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")";
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'socpeople' AND entity IN (0, ".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on an old database (during a migration for example)
{

View File

@ -291,7 +291,7 @@ class modUser extends DolibarrModules
'u.statut'=>'Status'
);
// Add extra fields
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'user' AND entity IN (0,".$conf->entity.")";
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'user' AND entity IN (0,".$conf->entity.")";
$resql = $this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{

View File

@ -1560,7 +1560,7 @@ class pdf_azur extends ModelePDFPropales
$posy += 4;
$pdf->SetXY($posx, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DatePropal")." : ".dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
$posy += 4;
$pdf->SetXY($posx, $posy);

View File

@ -243,6 +243,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
if (!empty($conf->global->MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME))
{
$newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)).'-'.$newfiletmp;
$newfiletmp = preg_replace('/__+/', '_', $newfiletmp); // Replace repeated _ into one _ (to avoid string with substitution syntax)
}
if (!empty($conf->global->MAIN_DOC_USE_TIMING))
{

View File

@ -303,6 +303,11 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
{
$this->error = $result;
return -6;
} else {
$is_dispo = $this->verif_dispo($db, $code, $soc, $type);
if ($is_dispo <> 0) {
$result = -3;
}
}
}

View File

@ -206,7 +206,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
global $user, $langs, $conf, $mysoc, $hookmanager, $nblines;
// Get source company
if (!is_object($object->thirdparty)) $object->fetch_thirdparty();
$object->fetch_thirdparty();
if (!is_object($object->thirdparty)) $object->thirdparty = $mysoc; // If fetch_thirdparty fails, object has no socid (specimen)
$this->emetteur = $object->thirdparty;
if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined
@ -220,10 +220,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$nblines = count($object->lines);
if ($conf->fournisseur->facture->dir_output)
{
$object->fetch_thirdparty();
if ($conf->fournisseur->facture->dir_output) {
$deja_regle = $object->getSommePaiement(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
$amount_credit_notes_included = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
$amount_deposits_included = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
@ -275,7 +272,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetAutoPageBreak(1, 0);
$heightforinfotot = 50 + (4 * $nbpayments); // Height reserved to output the info and total part and payment part
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
if($heightforinfotot > 220) $heightforinfotot = 220;
$heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS > 0) $heightforfooter += 6;

View File

@ -1235,26 +1235,30 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetXY($this->marge_gauche, $posy);
// Logo
$logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
if ($this->emetteur->logo)
{
if (is_readable($logo))
{
$height = pdf_getHeightForLogo($logo);
$pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto)
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) {
if ($this->emetteur->logo) {
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo)) {
$height = pdf_getHeightForLogo($logo);
$pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto)
} else {
$pdf->SetTextColor(200, 0, 0);
$pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToModuleSetup"), 0, 'L');
}
} else {
$text = $this->emetteur->name;
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
}
else
{
$pdf->SetTextColor(200, 0, 0);
$pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToModuleSetup"), 0, 'L');
}
}
else
{
$text = $this->emetteur->name;
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
}
$pdf->SetFont('', 'B', $default_font_size + 3);

View File

@ -1151,26 +1151,28 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetXY($this->marge_gauche, $posy);
// Logo
$logo = $conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
if ($this->emetteur->logo)
{
if (is_readable($logo))
{
$height = pdf_getHeightForLogo($logo);
$pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto)
if (empty($conf->global->PDF_DISABLE_MYCOMPANY_LOGO)) {
if ($this->emetteur->logo) {
$logodir = $conf->mycompany->dir_output;
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir . '/logos/thumbs/' . $this->emetteur->logo_small;
} else {
$logo = $logodir . '/logos/' . $this->emetteur->logo;
}
if (is_readable($logo)) {
$height = pdf_getHeightForLogo($logo);
$pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto)
} else {
$pdf->SetTextColor(200, 0, 0);
$pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToModuleSetup"), 0, 'L');
}
} else {
$text = $this->emetteur->name;
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
}
else
{
$pdf->SetTextColor(200, 0, 0);
$pdf->SetFont('', 'B', $default_font_size - 2);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToModuleSetup"), 0, 'L');
}
}
else
{
$text = $this->emetteur->name;
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
}
$pdf->SetFont('', 'B', $default_font_size + 3);

View File

@ -120,7 +120,7 @@ if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafiel
}
else
{
$colspan = 13;
$colspan = 14;
if (!empty($conf->multicompany->enabled)) $colspan++;
print '<tr class="oddeven">';

View File

@ -42,7 +42,7 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
if (in_array($typ, array('chkbxlst', 'checkbox'))) $mode_search = 4; // Search on a multiselect field with sql type = text
if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string
elseif ($typ === 'select' and is_string($crit) and strpos($crit, ' ') === false) {
$sql .= ' AND ('.$extrafieldsobjectprefix.$tmpkey.' = "'.$db->escape($crit).'")';
$sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." = '".$db->escape($crit)."')";
continue;
}
$sql .= natural_search($extrafieldsobjectprefix.$tmpkey, $crit, $mode_search);

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