Compare commits

..

170 Commits
3.4.1 ... 3.4.2

Author SHA1 Message Date
Laurent Destailleur
f1120b8749 Merge pull request #1363 from atm-alexis/3.4
New standard VAT rate for France on january, 1st, 2014
2014-01-04 09:59:59 -08:00
Laurent Destailleur
2ee5076970 Problem of key of language into auguria menu 2014-01-04 18:57:57 +01:00
Laurent Destailleur
8d66497384 Update doc for 3.4.2 2014-01-03 18:23:07 +01:00
Laurent Destailleur
d992d5cb22 Fix: Bad SQL request when using filter on category. 2014-01-03 18:16:21 +01:00
Alexis Algoud
68893b205c New standard VAT rate for France on january, 1st, 2014 2014-01-03 09:58:01 +01:00
Laurent Destailleur
4a4084e096 Fix: doxygen 2014-01-03 00:13:16 +01:00
Laurent Destailleur
76f890b72f Fix: Call Image on this instead of pdf.
Fix: Missing parameter for photo.

Conflicts:
	htdocs/core/modules/member/doc/pdf_standard.class.php
	htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
2014-01-02 20:51:39 +01:00
Laurent Destailleur
808abb6b4e Restore correct date 2013-12-31 16:03:58 +01:00
Laurent Destailleur
b1ea05e0d1 Merge remote-tracking branch 'origin/3.3' into 3.4
Conflicts:
	ChangeLog
	build/debian/changelog
	build/exe/doliwamp/doliwamp.iss
	build/makepack-dolibarr.pl
	build/pad/pad_dolibarr.xml
	build/pad/pad_doliwamp.xml
	build/rpm/dolibarr_fedora.spec
	build/rpm/dolibarr_generic.spec
	build/rpm/dolibarr_mandriva.spec
	build/rpm/dolibarr_opensuse.spec
	htdocs/filefunc.inc.php
2013-12-31 15:55:10 +01:00
Laurent Destailleur
0e54780377 Fix: Update doc and packager for doliwamp
Conflicts:
	build/exe/doliwamp/doliwamp.iss

Conflicts:
	build/exe/doliwamp/doliwamp.iss

Conflicts:
	build/exe/doliwamp/doliwamp.iss
2013-12-31 15:41:25 +01:00
Laurent Destailleur
7fc052ce19 More prerequisites to check to run makepack-dolibarr to build debian
package (check on dpatch too).
2013-12-31 15:27:15 +01:00
Laurent Destailleur
50df4e1ff1 Fix: Update doc and packager for doliwamp
Conflicts:
	build/exe/doliwamp/doliwamp.iss

Conflicts:
	build/exe/doliwamp/doliwamp.iss
2013-12-31 15:23:16 +01:00
Laurent Destailleur
13eff7d629 More prerequisites to check to run makepack-dolibarr to build debian
package (check on dpatch too).
2013-12-31 15:19:39 +01:00
Laurent Destailleur
f0bda47d96 Merge remote-tracking branch 'origin/3.3' into 3.4 2013-12-30 12:39:30 +01:00
Laurent Destailleur
a59a0151fb Fix: Removed analytics tags 2013-12-30 12:35:32 +01:00
Laurent Destailleur
3e39cd279d Fix: avoid to include not desired directory 2013-12-29 00:42:53 +01:00
Laurent Destailleur
a7d0a7d663 Merge remote-tracking branch 'origin/3.3' into 3.4 2013-12-26 19:40:56 +01:00
Laurent Destailleur
fce34301f9 More test to avoid errors when env is not complete. 2013-12-26 19:39:29 +01:00
Laurent Destailleur
ec1aef0191 Fix: Can import contacts not linked to any thirdparties. 2013-12-24 16:11:23 +01:00
Laurent Destailleur
81f1098d41 Merge branch '3.4' of git@github.com:Dolibarr/dolibarr.git into 3.4 2013-12-23 12:06:07 +01:00
Laurent Destailleur
331341bf5a Fix: Bad picto 2013-12-23 12:05:32 +01:00
Laurent Destailleur
39e2c3262a Merge pull request #1355 from FHenry/3.4
Fix [ bug #1202 ] Wrong amount in deposit % invoice from proposal
2013-12-23 02:21:23 -08:00
Florian Henry
e971e4dfff Fix [ bug #1202 ] Wrong amount in deposit % invoice from proposal 2013-12-23 11:05:14 +01:00
Laurent Destailleur
47b1a2c082 Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4 2013-12-20 13:55:10 +01:00
Laurent Destailleur
2bc579324d Fix: Opening agenda for a specific day
Fix: No picto of thirdparty of contact if link is broken
2013-12-20 13:51:59 +01:00
Laurent Destailleur
8036151778 Merge pull request #1352 from marcosgdf/bug-1196
Corrected Copyright info for PR #1350
2013-12-18 08:49:51 -08:00
Laurent Destailleur
11e0fb8f7a Fix: Missing ref field into export. 2013-12-17 09:11:36 +01:00
Marcos García
49ea174d06 Added to the COPYRIGHT file too 2013-12-16 22:59:17 +01:00
Marcos García
9c6df4faf4 Corrected Copyright info for PR #1350 2013-12-16 22:56:59 +01:00
Laurent Destailleur
6bfc0d14b2 Merge pull request #1350 from marcosgdf/bug-1196
Fixed bug #1196: Product barcode search does not expect 13th digit on EAN13 type
2013-12-16 05:26:10 -08:00
Laurent Destailleur
6e9b8dc77a Fix: Missing special code 2013-12-15 21:10:39 +01:00
Marcos García
290b810bb8 Little refactor in product/liste.php 2013-12-15 18:49:55 +01:00
Marcos García
d65374bb02 Fixed bug #1196: Product barcode search does not expect 13th digit on EAN13 type
Some code written by "hipnosapo" forum user in http://www.dolibarr.es/index.php/foro/7-bugs-versiones-estables/3891-ean13-buscador-codigo-barras-13-digitos#3891
2013-12-15 18:44:53 +01:00
Laurent Destailleur
db9ef992eb Fix: Clean var 2013-12-14 17:25:57 +01:00
Laurent Destailleur
648bf73bac Fix: [ bug #1179 ] Wrong warnings on commande/liste.php / delivery date
should be checked

Conflicts:
	htdocs/commande/liste.php
2013-12-14 15:49:08 +01:00
Laurent Destailleur
8cd538cce4 Merge branch '3.4' of git@github.com:Dolibarr/dolibarr.git into 3.4 2013-12-14 15:26:58 +01:00
Laurent Destailleur
7ecb313798 Fix: [ bug #1175 ] lien incorrect dans l'onglet Note d'un tiers 2013-12-14 15:26:22 +01:00
Laurent Destailleur
6cc20cb731 Fix: Filter on third parties were wrong for external users. 2013-12-14 15:21:15 +01:00
Laurent Destailleur
ad0d79a831 Merge pull request #1346 from marcosgdf/translation
Corrected translation
2013-12-13 18:51:04 -08:00
Laurent Destailleur
4d84fc46a4 Merge remote-tracking branch 'origin/3.3' into 3.4
Conflicts:
	build/makepack-dolibarr.pl
2013-12-14 02:56:23 +01:00
Laurent Destailleur
1f3f6cc7b8 Fix: Avoid to have external package into standard distribution 2013-12-14 02:55:12 +01:00
Laurent Destailleur
b83f664ced Merge branch '3.4' of git@github.com:Dolibarr/dolibarr.git into 3.4 2013-12-14 01:29:24 +01:00
Laurent Destailleur
88aa0ad4da Fix: Doxygen problems 2013-12-14 01:28:59 +01:00
Regis Houssin
0247241277 Fix: wrong path with multicompany module 2013-12-11 12:23:36 +01:00
Marcos García de La Fuente
d226abcdfc Corrected translation 2013-12-10 14:30:40 +01:00
Laurent Destailleur
a89a4ee81a Fix: Delete vat entry when bank line was already deleted. 2013-12-09 22:39:41 +01:00
Laurent Destailleur
705192215a Merge pull request #1341 from marcosgdf/bug-1182
Resolved bug #1182: ODT company_country tag is htmlencoded
2013-12-08 16:49:50 -08:00
Laurent Destailleur
565fb615bc Update gitignore 2013-12-09 01:41:48 +01:00
Laurent Destailleur
825640d645 Fix: Missing special code into export 2013-12-08 21:24:59 +01:00
Marcos García de La Fuente
beb93e9245 Resolved bug #1182: ODT company_country tag is htmlencoded 2013-12-08 20:23:44 +02:00
Laurent Destailleur
d8cd7571ec Merge branch '3.4' of git@github.com:Dolibarr/dolibarr.git into 3.4 2013-12-07 18:48:31 +01:00
Laurent Destailleur
b637b28c8b Update ignore files 2013-12-07 18:47:58 +01:00
Laurent Destailleur
73e60e0629 Fix: Mass update of vat must work also for supplier prices
Conflicts:
	htdocs/product/admin/product_tools.php
2013-12-07 12:06:41 +01:00
Laurent Destailleur
d4c007a909 Merge pull request #1335 from FHenry/3.4
[ bug #1174 ] Product translated description not good into PDF  Country
2013-12-04 09:39:18 -08:00
Florian Henry
c2a8967b52 Much better fix for translated product description into PDF 2013-12-03 17:06:19 +01:00
Florian Henry
bc4cfd66db Fix: fix unsubscribe URL into mailing when sending manually (not by
script)
2013-12-02 15:07:34 +01:00
Florian Henry
3e712c9c8c Finnaly make it works 2013-12-02 11:11:08 +01:00
Florian Henry
0907d81fcb Avoid strpos bug if string is empty or null 2013-12-02 11:05:07 +01:00
Florian Henry
1ad1b25f6e remove useless space 2013-12-02 10:29:58 +01:00
Florian Henry
1b38d36f28 Better Fix 2013-12-02 10:27:41 +01:00
Florian Henry
c0ef63fd74 Bteer fix 2013-12-02 00:22:49 +01:00
Florian Henry
ff9c84fd0e Better test for HTMLentities desc translation 2013-12-02 00:20:50 +01:00
Florian Henry
11efc20755 Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4
Conflicts:
	ChangeLog

Change-Id: I90f7ee62c65ef449c8ca43857d9743d0d953cf4b
2013-12-01 22:50:18 +01:00
Florian Henry
c6991f97d4 [ bug #1174 ] Product translated description not good into PDF
Country
2013-12-01 22:47:22 +01:00
Laurent Destailleur
4aea74d6fd Fix: [ bug #1171 ] Documents lost in interventions after validating 2013-12-01 21:05:22 +01:00
Laurent Destailleur
c54c06e8d3 Fix: [ bug #1171 ] Documents lost in interventions after validating 2013-12-01 21:04:52 +01:00
Laurent Destailleur
131bbce6f3 Update changelog 2013-12-01 20:17:22 +01:00
Laurent Destailleur
2f88406677 Fix: [ bug #1075 ] POS module doesn't decrement stock of products in
Delayed payment mode.
2013-12-01 20:15:08 +01:00
Laurent Destailleur
fdc1209986 Fix: [ bug #1163 ] SQL Error when searching for supplier orders
Conflicts:
	ChangeLog
2013-12-01 18:12:15 +01:00
Laurent Destailleur
eaa6d987b6 Fix: When database is not synchronized with dir, we clean database. 2013-12-01 17:32:05 +01:00
Laurent Destailleur
84e3457023 Fix: [ bug #1161 ] Search on product label 2013-12-01 16:30:35 +01:00
Laurent Destailleur
8f1a553395 Fix: [ bug #1162 ] Traduction des mi-journées 2013-12-01 16:22:06 +01:00
Laurent Destailleur
395066519b Fix: [ bug #1163 ] SQL Error when searching for supplier orders 2013-12-01 16:18:18 +01:00
Laurent Destailleur
8d1e10cd76 Merge remote-tracking branch 'origin/3.3' into 3.4 2013-12-01 16:02:19 +01:00
Laurent Destailleur
71a85464d5 Check parameters of script 2013-12-01 15:22:29 +01:00
Laurent Destailleur
a7c246cec1 Check parameters of script 2013-12-01 15:21:58 +01:00
Laurent Destailleur
e4860679de Merge pull request #1327 from FHenry/3.4
[ bug #1159 ] Commercial search "other" give p.note do not exists
2013-11-29 03:18:13 -08:00
Florian Henry
b9d37fd6f7 [ bug #1159 ] Commercial search "other" give p.note do not exists 2013-11-28 14:28:03 +01:00
Laurent Destailleur
894e6a296f Merge pull request #1324 from FHenry/3.4
Fix [ bug #1156 ] Update TVA mass update tools do not work
2013-11-27 16:09:35 -08:00
Florian Henry
2178ab6007 Fix [ bug #1156 ] Update TVA mass update tools do not work 2013-11-27 22:05:29 +01:00
Laurent Destailleur
216e9b390d Merge pull request #1321 from FHenry/3.4
Fix [ bug #1145 ] Agenda button list type do not display
2013-11-24 12:16:27 -08:00
Laurent Destailleur
1ddf9f6ac5 Fix: Not coherent filename 2013-11-24 19:34:25 +01:00
Laurent Destailleur
baebc7e91d Fix: Not coherent filename 2013-11-24 19:33:22 +01:00
Florian Henry
f1d0879419 Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4 2013-11-24 18:07:47 +01:00
Florian Henry
8f9143cef7 revert param_ihm 2013-11-24 18:07:40 +01:00
Laurent Destailleur
65b6dca554 Fix: business rule to protect button and action was not synchronized 2013-11-24 13:46:40 +01:00
Florian Henry
6615ee7e6f [ bug #1148 ] Product consomation : supplier order bad status 2013-11-23 14:59:28 +01:00
Florian Henry
cca303cee6 Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4 2013-11-22 15:07:16 +01:00
Florian Henry
f852c9a5bb Fix [ bug #1145 ] Agenda button list type do not display 2013-11-22 14:43:15 +01:00
Laurent Destailleur
6f5e78d27e Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4 2013-11-21 18:42:14 +01:00
Laurent Destailleur
29e029161f Fix: Restore translation lost because entry was not set into en_US lang. 2013-11-21 18:41:06 +01:00
Florian Henry
ea0bbb5896 Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4 2013-11-21 12:29:03 +01:00
Florian Henry
7f950d8b45 Fix user pram_ihm, display tab and allow modify button only is user
right allow it is OK
2013-11-21 12:28:51 +01:00
Laurent Destailleur
0d853cf73d Fix: [ bug #1118 ] Minor problem on print page link 2013-11-21 02:49:22 +01:00
Laurent Destailleur
e63dcc5343 Fix: [ bug #1119 ] If no country is selected for a warehouse or thids
card,
broken IMG is shown
2013-11-21 02:14:25 +01:00
Laurent Destailleur
23f7de0873 Fix: [ bug #1094 ] Invoice Text Reminder
Conflicts:
	htdocs/compta/facture.php
2013-11-21 02:07:13 +01:00
Laurent Destailleur
35596acf40 Merge remote-tracking branch 'origin/3.3' into 3.4
Conflicts:
	htdocs/product/fiche.php
2013-11-20 23:46:33 +01:00
Laurent Destailleur
4adf5fc1b9 Merge pull request #1314 from FHenry/3.4
Remove useless code (the tag replacement into footer and header is already done by SetVar method)
2013-11-20 14:42:11 -08:00
Laurent Destailleur
a9d5363799 Merge pull request #1313 from altairis-fr/3.3
[Task 1144 ] Fix wrong max-length of produt ref
2013-11-20 14:33:57 -08:00
Florian Henry
f88e9425ec Remove useless code (the tag replacement into footer and header is
already done by SetVar method)
2013-11-20 14:01:43 +01:00
Florian Henry
361d34f7db Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4 2013-11-20 13:58:26 +01:00
Florian Henry
306a51f6bd remove useless code (the tag replacement into footer and header is
already done by SetVar method)
2013-11-20 13:54:53 +01:00
Christophe Battarel
e654dac578 [Task 1144 ] Fix wrong max-length of produt ref 2013-11-20 10:33:06 +01:00
Laurent Destailleur
583a3dadb1 Merge pull request #1308 from FHenry/3.4
[ bug #1142 ] Set paiement on invoice
2013-11-19 11:43:21 -08:00
Florian Henry
68718c6100 Update changelog 2013-11-19 10:42:29 +01:00
Florian Henry
870b78fc19 [ bug #1142 ] Set paiement on invoice 2013-11-19 10:41:00 +01:00
Laurent Destailleur
3884c33535 Merge pull request #1304 from altairis-fr/3.4
Fix bad translation on margin config
2013-11-17 16:15:23 -08:00
Christophe Battarel
89a5638908 Fix bad translation on margin config 2013-11-17 12:59:33 +01:00
Laurent Destailleur
52b66a839b Merge pull request #1296 from FHenry/3.4
Better nl_NL translation
2013-11-15 05:06:44 -08:00
Laurent Destailleur
ef9db84a88 Merge pull request #1297 from GPCsolutions/3.4-dbupgradefix
Sync db upgrade with db install to avoid silly upgrade errors
2013-11-15 05:05:01 -08:00
Laurent Destailleur
a92aa14459 Merge pull request #1299 from altairis-fr/3.4
fix wrong buy price update (confusion between entity and npr !)
2013-11-15 05:04:07 -08:00
Laurent Destailleur
4099038083 Merge pull request #1301 from aspangaro/3.4
Fix 3.4
2013-11-15 05:00:20 -08:00
aspangaro
200553c001 Update ChangeLog 2013-11-15 04:58:59 +01:00
aspangaro
8050f8e9fe Fix problem field 2013-11-14 21:40:30 +01:00
aspangaro
e8c7bb9c62 Fix for language 2013-11-14 21:02:33 +01:00
aspangaro
4acb9f8cba Merge branch 'upstream/3.4' 2013-11-14 20:59:53 +01:00
Christophe Battarel
d23130739b update ChangeLog 2013-11-13 18:43:31 +01:00
Christophe Battarel
7dbe2bcf2c fix wrong buy price update 2013-11-13 18:41:31 +01:00
Raphaël Doursenaud
4ad5413163 Sync db upgrade with db install to avoid silly upgrade errors 2013-11-12 15:36:51 +01:00
Florian Henry
5b7f2e0c53 Better nl_NL translation 2013-11-11 17:35:36 +01:00
Laurent Destailleur
0dfbfbc19a Merge pull request #1293 from aspangaro/3.4
Fix for document cerfa into module Don
2013-11-10 14:58:39 -08:00
aspangaro
6b6855dff5 Fix for document cerfa into module Don 2013-11-10 06:37:08 +01:00
Laurent Destailleur
4b3778d116 Merge pull request #1292 from aspangaro/3.4
fix for language
2013-11-09 16:08:19 -08:00
Laurent Destailleur
4b26d8441b Fix: Entry lost 2013-11-09 12:52:06 +01:00
aspangaro
9170259351 fix for language 2013-11-09 06:51:10 +01:00
Laurent Destailleur
b82cbf1385 Fix: current balance was visible when it should not
Conflicts:
	htdocs/compta/bank/account.php
2013-11-06 15:35:10 +01:00
Laurent Destailleur
c7be0ee9e2 Merge pull request #1277 from grandoc/3.4
3.4
2013-11-04 10:41:30 -08:00
Laurent Destailleur
c41ac34356 Merge remote-tracking branch 'origin/3.3' into 3.4 2013-11-04 15:01:31 +01:00
Laurent Destailleur
8653f3f026 Add missing Country UK. 2013-11-04 12:38:21 +01:00
Grand Philippe
59085d7331 Merge branch '3.4' of https://github.com/Dolibarr/dolibarr into 3.4 2013-11-04 10:41:32 +01:00
Grand Philippe
aaf1dd1b27 fix some language error 2013-11-04 10:41:02 +01:00
Laurent Destailleur
b2df689669 Merge pull request #1274 from FHenry/3.4
USe good status icon for thirdparty ActivityCeased
2013-11-03 13:18:37 -08:00
Laurent Destailleur
8105021cfd Merge pull request #1275 from grandoc/3.4
missing trad and fix language
2013-11-03 13:17:56 -08:00
Grand Philippe
c5f29e14a4 missing trad and fix language 2013-11-02 17:50:24 +01:00
Florian Henry
6aea0bf7a1 Fix [ bug #1105 ] Searching Boxes other search option 2013-11-02 12:49:37 +01:00
Florian Henry
a4ce2d5f72 Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4 2013-11-02 02:25:33 +01:00
Florian Henry
662f48ddc2 Use good icons 2013-11-02 02:21:45 +01:00
Laurent Destailleur
e8a80e2365 Now comments in changelog are concatenated 2013-11-01 17:46:57 +01:00
Laurent Destailleur
84b36d1230 Prepare for 3.4.2 2013-11-01 17:24:09 +01:00
Laurent Destailleur
ecb1f490ae Fix: Option drop tables was broken 2013-11-01 17:20:36 +01:00
Florian Henry
987c09b882 Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4 2013-11-01 14:21:25 +01:00
Florian Henry
399093f501 USe good status icon for thirdparty ActivityCeased 2013-11-01 13:48:22 +01:00
Laurent Destailleur
4d10540600 Merge pull request #1272 from altairis-fr/rounding
fix bad rounding on margin calculation and display
2013-10-31 04:40:41 -07:00
Laurent Destailleur
e6ed902c63 Merge pull request #1267 from FHenry/3.4
Add nl_NL margin translation
2013-10-31 04:38:15 -07:00
Christophe Battarel
ba0273ccc4 fix bad rounding on margin calculation and display 2013-10-30 18:17:37 +01:00
Florian Henry
55046e2caf Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4 2013-10-30 09:07:14 +01:00
Laurent Destailleur
d6b2d44350 Merge remote-tracking branch 'origin/3.3' into 3.4 2013-10-29 23:51:46 +01:00
Laurent Destailleur
5fbb967941 Fix: restart of mysql for opensuse 2013-10-29 22:57:51 +01:00
Florian Henry
ad2a8d39c5 Add nl_NL margin translation 2013-10-27 13:30:35 +01:00
Laurent Destailleur
686babd0dc Merge pull request #1265 from FHenry/3.4
Fix bad display IE for checkbox extrafield readonly
2013-10-26 17:15:00 -07:00
Florian Henry
17df92c654 Fix [ bug #1116 ] Silent Warning when validating a customer invoice
[PostgreSQL]
2013-10-26 16:01:02 +02:00
Florian Henry
6985a4fe3b Fix web service_contact.php civilite_id vs civility_id 2013-10-26 10:59:31 +02:00
Florian Henry
ec8cee4d41 Add link to contact webservice that is already available 2013-10-25 11:39:14 +02:00
Florian Henry
fc9752964f Merge branch '3.4' of https://github.com/Dolibarr/dolibarr.git into 3.4 2013-10-25 10:02:05 +02:00
Florian Henry
c2def3d0b6 Fix bad display IE for checkbox extrafield readonly 2013-10-25 10:01:41 +02:00
Laurent Destailleur
d5d252dada Fix: [ bug #1077 ] Project card does not update vinculated third when
modified upon refresh
2013-10-23 18:35:18 +02:00
Laurent Destailleur
8203971614 Try to fix bug [ bug #1072 ] Wrong DOL_URL_ROOT value calculated
Conflicts:
	htdocs/filefunc.inc.php
2013-10-23 18:33:56 +02:00
Laurent Destailleur
3050facb96 Fix: [ bug #1070 ] Accountancy code not displayed just after set
Conflicts:
	htdocs/product/fiche.php
2013-10-23 18:29:34 +02:00
Laurent Destailleur
cd085b3ecc Merge pull request #1256 from jfefe/cron
Fix : use GETPOST function into CRON module
2013-10-20 05:06:12 -07:00
Laurent Destailleur
8373982837 Merge pull request #1260 from FHenry/3.4
restrict acces to commercial update if user can only see his own
2013-10-20 04:14:01 -07:00
Laurent Destailleur
96658999f5 Merge pull request #1258 from grandoc/3.4
fix wrong call name
2013-10-20 04:10:09 -07:00
Florian Henry
e1dbee651e restrict acces to commercialupdate if user can only see his own
thirdparty
2013-10-19 22:08:42 +02:00
Laurent Destailleur
24cd2d2b85 Merge branch '3.4' of git@github.com:Dolibarr/dolibarr.git into 3.4 2013-10-19 14:59:46 +02:00
Laurent Destailleur
8e42a6fd15 Avoid email when travis is ok 2013-10-19 14:11:56 +02:00
Grand Philippe
c773f21c2c fix wrong call name 2013-10-19 12:50:18 +02:00
Laurent Destailleur
4e637d3121 Fix: Sanitizing PHP_SELF 2013-10-18 17:27:17 +02:00
Laurent Destailleur
5e35731693 Add debug info to find a bug 2013-10-18 11:41:37 +02:00
Laurent Destailleur
d9106b6e85 Add debug info to find a bug 2013-10-18 11:19:32 +02:00
jfefe
ef4d3e4666 Fix : use GETPOST function into CRON module 2013-10-15 21:07:11 +02:00
Laurent Destailleur
9bc0f54ae8 Fix: set of country 2013-10-15 20:51:44 +02:00
140 changed files with 2281 additions and 1873 deletions

View File

@@ -3,6 +3,11 @@
# Command run is phpunit
# For syntax, see http://about.travis-ci.org/docs/user/languages/php/
notifications:
email:
on_success: never # [always|never|change] default: change
on_failure: always # [always|never|change] default: always
services:
- memcached # will start memcached

View File

@@ -60,6 +60,7 @@ Copyright (C) 2013
- Regis Houssin <regis.houssin@capnetworks.com>
- Maxime Kohlhaas <mko@atm-consulting.fr>
- Juanjo Menent <jmenent@2byte.es>
- Adolfo Segura <adolfo.segura@gmail.com>
Copyright (C) 2012
- Christophe Battarel <christophe.battarel@altairis.fr>

104
ChangeLog
View File

@@ -2,35 +2,61 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
***** ChangeLog for 3.4.1 compared to 3.4.0 *****
Fix: Display buying price on line edit when no supplier price is defined
Fix: Retrieving of margin info when invoice created automatically from order
Fix: Reordering supplier products in list by supplier or supplier ref was crashing
Fix: [ bug #1029 ] Tulip numbering mask
Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card
Fix: [ bug #1033 ] SUPPLIER REF disappeared
Fix: update extrafield do not display immediatly after update
Fix: Fix bug with canvas thirdparty
Fix: [ bug #1037 ] Consumption> Supplier invoices related
Fix: User group name do not display in card (view or edit mode)
Fix: Link "Show all supplier invoice" on suplier card not working
Fix: [ bug #1039 ] Pre-defined invoices conversion
Fix: If only service module is activated, it's impossible to delete service
Fix: [ bug #1043 ] Bad interventions ref numbering
Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted
Fix: Localtaxes balance not showing
Fix: Intervention box links to contracts id
Fix: Compatiblity with multicompany module
Fix: Edit propal line was losing product supplier price id
Fix: Delete linked element to supplier invoice when deleted
Fix: [ bug #1061 ] Bad info shipped products
Fix: [ bug #1062 ] Documents lost in propals and contracts validating
Fix: Supplier price displayed on document lines and margin infos didnt take discount
Fix: sorting on qty did not work in supplier product list
Fix: there was no escaping on filter fields in supplier product list
Fix: bugs on margin reports and better margin calculation on credit notes
Qual: Add travis-ci integration
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
Fix: field's problem into company's page (RIB).
Fix: Document cerfa doesn't contained firstname & lastname from donator.
Fix: Bad rounding on margin calculations and display.
Fix: Option drop table into backup was broken.
Fix: [ bug #1105 ] Searching Boxes other search option.
Fix: wrong buy price update.
Fix: [ bug #1142 ] Set paiement on invoice (PGSql).
Fix: [ bug #1145 ] Agenda button list type do not display.
Fix: [ bug #1148 ] Product consomation : supplier order bad status.
Fix: [ bug #1159 ] Commercial search "other" give p.note do not exists.
Fix: [ bug #1174 ] Product translated description not good into PDF.
Fix: [ bug #1163 ] SQL Error when searching for supplier orders.
Fix: [ bug #1162 ] Translaction for morning and afternoon.
Fix: [ bug #1161 ] Search on product label.
Fix: [ bug #1075 ] POS module doesn't decrement stock of products in delayed payment mode.
Fix: [ bug #1171 ] Documents lost in interventions after validating.
Fix: fix unsubscribe URL into mailing when sending manually (not by script).
Fix: [ bug #1182 ] ODT company_country tag is htmlencoded.
Fix: [ bug #1196 ] Product barcode search does not expect 13th digit on EAN13 type.
Fix: [ bug #1202 ] Wrong amount in deposit % invoice from proposal.
Fix: Removed analytics tags into doc page.
Fix: Call Image on this instead of pdf.
Fix: Missing parameter for photo.
Fix: Bad SQL request for turnover report.
***** ChangeLog for 3.4.1 compared to 3.4.0 *****
Fix: Display buying price on line edit when no supplier price is defined.
Fix: Retrieving of margin info when invoice created automatically from order.
Fix: Reordering supplier products in list by supplier or supplier ref was crashing.
Fix: [ bug #1029 ] Tulip numbering mask.
Fix: Supplier invoice and supplier order are not displayed into object link into agenda event card.
Fix: [ bug #1033 ] SUPPLIER REF disappeared.
Fix: update extrafield do not display immediatly after update.
Fix: Fix bug with canvas thirdparty.
Fix: [ bug #1037 ] Consumption> Supplier invoices related.
Fix: User group name do not display in card (view or edit mode).
Fix: Link "Show all supplier invoice" on suplier card not working.
Fix: [ bug #1039 ] Pre-defined invoices conversion.
Fix: If only service module is activated, it's impossible to delete service.
Fix: [ bug #1043 ] Bad interventions ref numbering.
Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted.
Fix: Localtaxes balance not showing.
Fix: Intervention box links to contracts id.
Fix: Compatiblity with multicompany module.
Fix: Edit propal line was losing product supplier price id.
Fix: Delete linked element to supplier invoice when deleted.
Fix: [ bug #1061 ] Bad info shipped products.
Fix: [ bug #1062 ] Documents lost in propals and contracts validating.
Fix: Supplier price displayed on document lines and margin infos didnt take discount.
Fix: sorting on qty did not work in supplier product list.
Fix: there was no escaping on filter fields in supplier product list.
Fix: bugs on margin reports and better margin calculation on credit notes.
Qual: Add travis-ci integration.
***** ChangeLog for 3.4 compared to 3.3.* *****
For users:
@@ -128,6 +154,12 @@ backport commit 384e3812eb73a15adafb472cacfb93397a54459b to fix W3C/edit contrac
***** ChangeLog for 3.3.5 compared to 3.3.4 *****
- Fix: jcrop file to match debian rules
- Fix: Add missing country UK.
- Fix: Minor fix into package.
- Fix: Add missing label on project field.
***** ChangeLog for 3.3.4 compared to 3.3.3 *****
- Fix: [ bug #1001 ] Social Contribution : State not correct
- Fix: Better management of pdf generation when tcpdf is not available.
@@ -298,7 +330,6 @@ Dolibarr license has also been updated from GPLv2+ to GPLv3+.
***** ChangeLog for 3.2.3 compared to 3.2.2 *****
- Fix: Some permission into agenda module.
- Fix: Generation of PDF was not using correct font for some languages.
- Fix some translations.
@@ -452,7 +483,6 @@ WARNING: To reduce technic debt, all functions dolibarr_xxx were renamed int dol
***** ChangeLog for 3.1.3 compared to 3.1.2 *****
Fix: PgSQL - property must be set if success
Fix: Provide a solution for backup when mysqldump is not available
Fix: Bug #460 - Wrong entity assignment when creating a warehouse
@@ -461,7 +491,6 @@ Fix: bug #405 - Late icon always displayed on comm/propal.php
***** ChangeLog for 3.1.2 compared to 3.1.1 *****
- Fix: Can clone a proposal
- Fix: Add member ID in substitution method
- Fix: Duplicate end tag and missing form parts
@@ -474,7 +503,6 @@ Fix: bug #405 - Late icon always displayed on comm/propal.php
***** ChangeLog for 3.1.1 compared to 3.1.0 *****
- New: Add option FACTURE_DEPOSITS_ARE_JUST_PAYMENTS. With this option added,
credit notes are not removed from total amount of invoice but are just
payments used to reducs remain to pay.
@@ -596,7 +624,6 @@ For translators:
***** ChangeLog for 3.0 compared to 2.9.* *****
For users:
- New: Can edit date of cheque receipts.
- New: Add Sales journal and Purchase journal report.
@@ -692,7 +719,6 @@ For developers:
***** ChangeLog for 2.9 compared to 2.8.* *****
For users:
- New: POS module allow to choose which warehouse to use.
- New: Support "Department/State" field on company setup, contact,
@@ -810,7 +836,6 @@ For users:
***** ChangeLog for 2.8 compared to 2.7.* *****
For users:
- New: Support note on trips module
- New: Can link contacts to projects
@@ -861,7 +886,6 @@ For developers:
***** ChangeLog for 2.7.1 compared to 2.7 *****
For users:
- Fix: Bad decimal management for it_IT and fr_BE languages.
- Fix: A third party created from a member is created as a
@@ -874,7 +898,6 @@ For users:
***** ChangeLog for 2.7 compared to 2.6.* *****
For users:
- New: Add a print icon to show a page to print without menus.
- New: Can add a free text on bank cheque receipts.
@@ -973,7 +996,6 @@ For developers:
***** ChangeLog for 2.6 compared to 2.5.* *****
For users:
- New: Add filter on status in emailing selector for Dolibarr users.
- New: Can add bookmarks on all pages.
@@ -1056,7 +1078,6 @@ For developers:
***** ChangeLog for 2.5 compared to 2.4.* *****
For users:
- Sessions timeout can be configured to overwrite PHP setup.
- Can filter on date in services list.
@@ -1120,7 +1141,6 @@ For developers:
***** ChangeLog for 2.4 compared to 2.2.* *****
For users:
- Add a calendar module (module agenda) with ical/vcal/rss export.
- Look enhancement in graphics (thanks artichow).
@@ -1175,7 +1195,6 @@ For developers:
***** ChangeLog for 2.2 compared to 2.1.* *****
- Add more statistics on main page.
- Add option to add message on login page.
- Management of categories for third parties.
@@ -1209,7 +1228,6 @@ For developers:
***** ChangeLog for 2.1 compared to 2.0.* *****
- Added a better installer.
- Support user and groups permissions.
- Translation in english and support for several languages.
@@ -1274,12 +1292,10 @@ For developers:
***** ChangeLog for 2.0.1 compared to 2.0 *****
Minor bug fixes
***** ChangeLog for 2.0 compared to 1.0.* *****
ChangeLog file size is so important, that it is not included inside Dolibarr
package. You can find it at www.dolibarr.org

View File

@@ -7,10 +7,27 @@ All sub-directories of "build" directory contains files required to build
automatically Dolibarr packages.
There are several tools:
- To build full Dolibarr packages, launch the script
> Edit version in makepack-dolibarr.pl file.
> Launch command perl makepack-dolibarr.pl
Note: Prerequisites to build tgz, debian, rpm package
> apt-get install tar dpkg dpatch p7zip-full rpm zip
Note: Prerequisites to build autoexe DoliWamp package:
> Install InnoSetup
For example by running isetup-5.3.9.exe (http://www.jrsoftware.org)
> Install WampServer into "C:\Program Files\Wamp"
For example by running wampserver2.2e-php5.4.3-httpd-2.4.2-mysql5.5.24-x64.exe (http://www.wampserver.com)
> Install WampServer addon to have versions: Apache2.2.11, Mysql5.0.45, Php5.3.0
For example by running WampServer2-APACHE2211.exe (http://www.wampserver.com)
For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com)
For example by running WampServer2-PHP530.exe (http://www.wampserver.com)
> To build from Windows (running from makepack-dolibarr.pl script is however
recommanded), open file build/exe/doliwamp.iss and click on button "Compile".
The .exe file will be build into directory build.
- To build a translaction package, launch the script
> perl makepack-dolibarrlang.pl
@@ -20,17 +37,6 @@ There are several tools:
- To build a package for a module, launch the script
> perl makepack-dolibarrmodule.pl
- To build an autoexe DoliWamp package:
> Install InnoSetup (http://www.jrsoftware.org)
> Install WampServer into "C:\Program Files\Wamp" (http://www.wampserver.com)
> Install WampServer addon to have versions:
Apache2.2.6, Mysql5.0.45, Php5.2.5
> Modify file build/exe/doliwamp.iss to change variable SourceDir
with value of Dolibarr repository.
> Modify AppVerName and OutputBaseFilename.
> Launch innosetup, open file build/exe/doliwamp.iss and click on
button "Compile". The .exe file will be build into directory build.
- To build developper documentation, launch the script
> perl dolybarr-doxygen-build.pl
@@ -43,24 +49,33 @@ generated packages will not contains this "build" directory.
We can find in "build", following sub-directories:
* deb:
* aps:
To build APS package.
* debian:
To build Debian package.
* rpm:
To build Redhat or Mandrake package.
* dmg:
To build Mac OS package (not ready yet).
* tgz:
To build a tgz package.
* doap:
To build Doap descriptor to promote/describe Dolibarr releases.
* doxygen:
Dir with config file to build doxygen documentation.
* exe:
To build exe package for Windows that distribute Dolibarr sources or
to build the complete DoliWamp package.
* tgz:
To build a zip package.
* launchpad:
Doc file to explain how to use launchpad.
* doap:
To build Doap descriptor to promote/describe Dolibarr releases.
* live:
Doc file to explain how to create a demo live CD.
* obs:
Doc file to explain how to push release onto OBS.
* pad:
To build a PAD file descriptor to promote/describe Dolibarr releases.
@@ -68,5 +83,14 @@ To build a PAD file descriptor to promote/describe Dolibarr releases.
* patch:
Script file to generate a patch file to distribute a Dolibarr mod.
* dmg:
To build dmg DoliMamp package for Mac OS X
* perl:
Tool to install dolibarr when using virtualmin pro
* rpm:
To build Redhat, Opensuse or Mandriva package.
* tgz:
To build a tgz package.
* zip:
To build a zip package.

View File

@@ -1,6 +1,20 @@
dolibarr (3.4.2) unstable; urgency=low
[ Laurent Destailleur (eldy) ]
* Maintenance release.
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 30 Dec 2013 12:00:00 +0100
dolibarr (3.4.1) unstable; urgency=low
[ Laurent Destailleur (eldy) ]
* Maintenance release.
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 22 Apr 2013 12:00:00 +0100
dolibarr (3.4.0) unstable; urgency=low
[ Laurent Destailleur (eldy) ]
* New upstream release.
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 22 Apr 2013 12:00:00 +0100
-- Laurent Destailleur (eldy) <eldy@users.sourceforge.net> Mon, 22 Apr 2013 12:00:00 +0100

View File

@@ -22,7 +22,7 @@ File added into doxygen generated documentation
<hr class="footer" />
<address class="footer"><small>Generated on $datetime
for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen </a> $doxygenversion </small></address>
for <a href="http://www.dolibarr.org">$projectname</a> by Doxygen $doxygenversion </small></address>
<!-- Google AdSense -->
@@ -40,5 +40,6 @@ google_ad_height = 60;
<!-- End google adsense -->
<br>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -10,7 +10,7 @@ use Cwd;
$PROJECT="dolibarr";
$MAJOR="3";
$MINOR="4";
$BUILD="1"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
$BUILD="2"; # Mettre x pour release, x-dev pour dev, x-beta pour beta, x-rc pour release candidate
$RPMSUBVERSION="auto"; # auto use value found into BUILD
@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","APS","EXEDOLIWAMP","SNAPSHOT"); # Possible packages
@@ -23,7 +23,7 @@ $RPMSUBVERSION="auto"; # auto use value found into BUILD
"RPM_FEDORA"=>"rpmbuild",
"RPM_MANDRIVA"=>"rpmbuild",
"RPM_OPENSUSE"=>"rpmbuild",
"DEB"=>"dpkg",
"DEB"=>"dpkg dpatch",
"APS"=>"zip",
"EXEDOLIWAMP"=>"ISCC.exe"
);
@@ -59,6 +59,23 @@ $DIR||='.'; $DIR =~ s/([^\/\\])[\\\/]+$/$1/;
$SOURCE="$DIR/..";
$DESTI="$SOURCE/build";
if (! $ENV{"DESTIBETARC"} || ! $ENV{"DESTISTABLE"})
{
print "Error: Missing environment variables.\n";
print "You must define the environment variable DESTIBETARC and DESTISTABLE to point to the\ndirectories where you want to save the generated packages.\n";
print "Example: DESTIBETARC='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/lastbuild'\n";
print "Example: DESTISTABLE='/media/HDDATA1_LD/Mes Sites/Web/Dolibarr/dolibarr.org/files/stable'\n";
print "$PROG.$Extension aborted.\n";
sleep 2;
exit 1;
}
if (! -d $ENV{"DESTIBETARC"} || ! -d $ENV{"DESTISTABLE"})
{
print "Error: Directory of environment variable DESTIBETARC or DESTISTABLE does not exist.\n";
print "$PROG.$Extension aborted.\n";
sleep 2;
exit 1;
}
# Detect OS type
# --------------
@@ -66,7 +83,7 @@ if ("$^O" =~ /linux/i || (-d "/etc" && -d "/var" && "$^O" !~ /cygwin/i)) { $OS='
elsif (-d "/etc" && -d "/Users") { $OS='macosx'; $CR=''; }
elsif ("$^O" =~ /cygwin/i || "$^O" =~ /win32/i) { $OS='windows'; $CR="\r"; }
if (! $OS) {
print "$PROG.$Extension was not able to detect your OS.\n";
print "Error: Can't detect your OS.\n";
print "Can't continue.\n";
print "$PROG.$Extension aborted.\n";
sleep 2;
@@ -105,8 +122,8 @@ for (0..@ARGV-1) {
$FILENAMESNAPSHOT.="-".$PREFIX;
}
}
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTI is defined
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTI is defined
if ($ENV{"DESTIBETARC"} && $BUILD =~ /[a-z]/i) { $DESTI = $ENV{"DESTIBETARC"}; } # Force output dir if env DESTI is defined
if ($ENV{"DESTISTABLE"} && $BUILD =~ /^[0-9]+$/) { $DESTI = $ENV{"DESTISTABLE"}; } # Force output dir if env DESTI is defined
print "Makepack version $VERSION\n";
@@ -200,7 +217,7 @@ foreach my $target (keys %CHOOSEDTARGET) {
last;
} else {
# Pas erreur ou erreur autre que programme absent
print " Found ".$REQUIREMENTTARGET{$target}."\n";
print " Found ".$req."\n";
}
}
}
@@ -327,6 +344,7 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/bootstrap*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/multicompany*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/nltechno*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/pos*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`;
@@ -384,6 +402,7 @@ if ($nboftargetok) {
if ($target eq 'TGZ')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
print "Remove target $FILENAMETGZ.tgz...\n";
@@ -410,6 +429,7 @@ if ($nboftargetok) {
if ($target eq 'XZ')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
print "Remove target $FILENAMEXZ.xz...\n";
@@ -440,6 +460,7 @@ if ($nboftargetok) {
if ($target eq 'ZIP')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/standard');
if (-d $DESTI.'/standard') { $NEWDESTI=$DESTI.'/standard'; }
print "Remove target $FILENAMEZIP.zip...\n";
@@ -474,6 +495,7 @@ if ($nboftargetok) {
if ($target =~ /FEDO/i) { $subdir="package_rpm_redhat-fedora"; }
if ($target =~ /MAND/i) { $subdir="package_rpm_mandriva"; }
if ($target =~ /OPEN/i) { $subdir="package_rpm_opensuse"; }
mkdir($DESTI.'/'.$subdir);
if (-d $DESTI.'/'.$subdir) { $NEWDESTI=$DESTI.'/'.$subdir; }
$ARCH='noarch';
@@ -483,11 +505,12 @@ if ($nboftargetok) {
$newbuild =~ s/(dev|alpha)/0.1.a/gi; # dev
$newbuild =~ s/beta/0.2.beta1/gi; # beta
$newbuild =~ s/rc./0.3.rc1/gi; # rc
if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
if ($newbuild !~ /-/) { $newbuild.='-0.3'; } # finale
#$newbuild =~ s/(dev|alpha)/0/gi; # dev
#$newbuild =~ s/beta/1/gi; # beta
#$newbuild =~ s/rc./2/gi; # rc
#if ($newbuild !~ /-/) { $newbuild.='-3'; } # finale
#print "newbuild=".$newbuild."\n";exit;
$REL1 = $newbuild; $REL1 =~ s/-.*$//gi;
if ($RPMSUBVERSION eq 'auto') { $RPMSUBVERSION = $newbuild; $RPMSUBVERSION =~ s/^.*-//gi; }
print "Version is $MAJOR.$MINOR.$REL1-$RPMSUBVERSION\n";
@@ -569,6 +592,7 @@ if ($nboftargetok) {
if ($target eq 'DEB')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/package_debian-ubuntu');
if (-d $DESTI.'/package_debian-ubuntu') { $NEWDESTI=$DESTI.'/package_debian-ubuntu'; }
$olddir=getcwd();
@@ -723,6 +747,7 @@ if ($nboftargetok) {
if ($target eq 'APS')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/package_aps');
if (-d $DESTI.'/package_aps') { $NEWDESTI=$DESTI.'/package_aps'; }
$newbuild = $BUILD;
@@ -807,6 +832,7 @@ if ($nboftargetok) {
if ($target eq 'EXEDOLIWAMP')
{
$NEWDESTI=$DESTI;
mkdir($DESTI.'/package_windows');
if (-d $DESTI.'/package_windows') { $NEWDESTI=$DESTI.'/package_windows'; }
print "Remove target $FILENAMEEXEDOLIWAMP.exe...\n";

View File

@@ -35,9 +35,9 @@
<Program_Info>
<Program_Name>Dolibarr</Program_Name>
<Program_Version>3.4</Program_Version>
<Program_Release_Month>07</Program_Release_Month>
<Program_Release_Day>07</Program_Release_Day>
<Program_Release_Year>2013</Program_Release_Year>
<Program_Release_Month>01</Program_Release_Month>
<Program_Release_Day>01</Program_Release_Day>
<Program_Release_Year>2014</Program_Release_Year>
<Program_Cost_Dollars />
<Program_Cost_Other_Code />
<Program_Cost_Other />

View File

@@ -35,9 +35,9 @@
<Program_Info>
<Program_Name>DoliWamp</Program_Name>
<Program_Version>3.4</Program_Version>
<Program_Release_Month>07</Program_Release_Month>
<Program_Release_Day>07</Program_Release_Day>
<Program_Release_Year>2013</Program_Release_Year>
<Program_Release_Month>01</Program_Release_Month>
<Program_Release_Day>01</Program_Release_Day>
<Program_Release_Year>2014</Program_Release_Year>
<Program_Cost_Dollars />
<Program_Cost_Other_Code />
<Program_Cost_Other />

View File

@@ -330,5 +330,5 @@ fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Sun Feb 17 2013 Laurent Destailleur 3.4.1-0.3
* Mon Dec 30 2013 Laurent Destailleur 3.4.2-0.3
- Initial version (#723326)

View File

@@ -464,7 +464,11 @@ echo Restart mysql server
/sbin/service mysqld restart
%else
%if 0%{?suse_version}
if [ -f /etc/init.d/mysqld ]; then
/etc/init.d/mysqld restart
else
/sbin/service mysql restart
fi
%else
if [ -f /etc/init.d/mysqld ]; then
/etc/init.d/mysqld restart
@@ -554,5 +558,5 @@ fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Sun Feb 17 2013 Laurent Destailleur 3.4.1-0.3
* Mon Dec 30 2013 Laurent Destailleur 3.4.2-0.3
- Initial version (#723326)

View File

@@ -335,5 +335,5 @@ fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Sun Feb 17 2013 Laurent Destailleur 3.4.1-0.3
* Mon Dec 30 2013 Laurent Destailleur 3.4.2-0.3
- Initial version (#723326)

View File

@@ -288,7 +288,11 @@ fi
# Restart mysql
echo Restart mysql
/sbin/service mysql restart
if [ -f /etc/init.d/mysqld ]; then
/etc/init.d/mysqld restart
else
/sbin/service mysql restart
fi
# Show result
echo
@@ -341,5 +345,5 @@ fi
# version x.y.z-0.1.a for alpha, x.y.z-0.2.b for beta, x.y.z-0.3 for release
%changelog
* Sun Feb 17 2013 Laurent Destailleur 3.4.1-0.3
* Mon Dec 30 2013 Laurent Destailleur 3.4.2-0.3
- Initial version (#723326)

View File

@@ -48,3 +48,8 @@ with
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
window.location.href=pRef
* Replace hard coded string with i18n["String"];
JCROP:
------
* Remove analytics tag into file index.html

14
htdocs/.gitignore vendored
View File

@@ -1,9 +1,11 @@
/test.php
/custom*
/bootstrap
/multicompany
/ovh
/numberingpack
/google
/skincoloreditor
/extensions*
/nltechno*
/bootstrap*
/google*
/multicompany*
/numberingpack*
/ovh*
/pos
/ultimatepdf*

View File

@@ -265,7 +265,7 @@ print '<br>';
/*
* Edition des variables globales non rattache a un theme specifique
* Editing global variables not related to a specific theme
*/
$constantes=array(
'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT',

View File

@@ -18,7 +18,7 @@
*/
/**
* \file htdocs/admin/agenda.php
* \file htdocs/admin/agenda_other.php
* \ingroup agenda
* \brief Autocreate actions for agenda module setup page
*/

View File

@@ -219,7 +219,7 @@ print $langs->trans("BackupDescY").'<br><br>';
<fieldset><legend> <input type="checkbox" name="sql_structure"
value="structure" id="checkbox_sql_structure" checked="checked" /> <label
for="checkbox_sql_structure"> <?php echo $langs->trans('ExportStructure') ?></label> </legend> <input
type="checkbox" name="drop" value="1" id="checkbox_dump_drop" /> <label
type="checkbox" name="drop"<?php echo ((! isset($_GET["drop"]) && ! isset($_POST["drop"])) || GETPOST('drop'))?' checked="checked"':''; ?> id="checkbox_dump_drop" /> <label
for="checkbox_dump_drop"><?php echo $langs->trans("AddDropTable"); ?></label><br>
</fieldset>
@@ -274,7 +274,7 @@ print $langs->trans("BackupDescY").'<br><br>';
<br>
<fieldset><legend><?php echo $langs->trans('ExportStructure') ?></legend> <input
type="checkbox" name="nobin_drop" value="1" id="checkbox_dump_drop" /> <label
type="checkbox" name="nobin_drop"<?php echo ((! isset($_GET["nobin_drop"]) && ! isset($_POST["nobin_drop"])) || GETPOST('nobin_drop'))?' checked="checked"':''; ?> id="checkbox_dump_drop" /> <label
for="checkbox_dump_drop"><?php echo $langs->trans("AddDropTable"); ?></label><br>
</fieldset>
@@ -433,4 +433,4 @@ print '<br>';
llxFooter();
$db->close();
?>
?>

View File

@@ -134,7 +134,8 @@ if ($what == 'mysql')
if (GETPOST("drop_database")) $param.=" --add-drop-database";
if (GETPOST("sql_structure"))
{
if (GETPOST("drop")) $param.=" --add-drop-table";
if (GETPOST("drop")) $param.=" --add-drop-table=TRUE";
else $param.=" --add-drop-table=FALSE";
}
else
{

View File

@@ -15,6 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/cashdesk/deconnexion.php
* \ingroup cashdesk
* \brief Manage deconnexion for point of sale module
*/
//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Uncomment creates pb to relogon after a disconnect
if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1');
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1');

View File

@@ -2,6 +2,8 @@
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2008-2011 Laurent Destailleur <eldy@uers.sourceforge.net>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2013 Adolfo Segura <adolfo.segura@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -37,7 +39,20 @@ if ( GETPOST('filtre') ) {
$sql.= " AND p.tosell = 1";
if(!$conf->global->CASHDESK_SERVICES) $sql.= " AND p.fk_product_type = 0";
$sql.= " AND (p.ref LIKE '%".$db->escape(GETPOST('filtre'))."%' OR p.label LIKE '%".$db->escape(GETPOST('filtre'))."%'";
if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '%".$db->escape(GETPOST('filtre'))."%')";
if (! empty($conf->barcode->enabled)) {
$filtre = GETPOST('filtre');
//If the barcode looks like an EAN13 format and the last digit is included in it,
//then whe look for the 12-digit too
//As the twelve-digit string will also hit the 13-digit code, we only look for this one
if (strlen($filtre) == 13) {
$crit_12digit = substr($filtre, 0, 12);
$sql .= " OR p.barcode LIKE '%".$db->escape($crit_12digit)."%')";
} else {
$sql.= " OR p.barcode LIKE '%".$db->escape($filtre)."%')";
}
}
else $sql.= ")";
$sql.= " ORDER BY label";

View File

@@ -17,8 +17,9 @@
*/
/**
* This page is called each time we press a key in the code
* search form to show product combo list.
* \file htdocs/cashdesk/facturation_dhtml.php
* \ingroup cashdesk
* \brief This page is called each time we press a key in the code search form to show product combo list.
*/

View File

@@ -16,6 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/cashdesk/facturation_verif.php
* \ingroup cashdesk
* \brief facturation_verif.php
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';

View File

@@ -20,6 +20,12 @@
* We set here login choices into session.
*/
/**
* \file htdocs/cashdesk/index_verif.php
* \ingroup cashdesk
* \brief index_verif.php
*/
include '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Auth.class.php';

View File

@@ -15,6 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/cashdesk/validation.php
* \ingroup cashdesk
* \brief validation.php
*/
// Affichage des templates
require ('tpl/validation1.tpl.php');

View File

@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2007-2008 J<EFBFBD>r<EFBFBD>mie Ollivier <jeremie.o@laposte.net>
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.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
@@ -15,7 +15,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Affichage des templates
require ('tpl/validation2.tpl.php');
/**
* \file htdocs/cashdesk/validation_ok.php
* \ingroup cashdesk
* \brief validation_ok.php
*/
// Affichage des templates
require ('tpl/validation2.tpl.php');
?>

View File

@@ -15,6 +15,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/cashdesk/validation_ticket.php
* \ingroup cashdesk
* \brief validation_ticket.php
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';

View File

@@ -17,6 +17,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/cashdesk/validation_verif.php
* \ingroup cashdesk
* \brief validation_verif.php
*/
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php';
@@ -212,7 +218,7 @@ switch ($action)
$resultcreate=$invoice->create($user,0,dol_stringtotime($obj_facturation->paiementLe()));
if ($resultcreate > 0)
{
$resultvalid=$invoice->validate($user,$obj_facturation->numInvoice());
$resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), (isset($_SESSION["CASHDESK_ID_WAREHOUSE"])?$_SESSION["CASHDESK_ID_WAREHOUSE"]:0));
}
else
{

View File

@@ -73,8 +73,10 @@ $hookmanager->initHooks(array('actioncard'));
/*
* Action creation de l'action
* Actions
*/
// Add action
if ($action == 'add_action')
{
$error=0;

View File

@@ -78,7 +78,7 @@ $type=GETPOST("type");
$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=="0"?'':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':''));
if (GETPOST('viewcal')) {
if (GETPOST('viewcal') && $action != 'show_day' && $action != 'show_week') {
$action='show_month'; $day='';
} // View by month
if (GETPOST('viewweek')) {
@@ -1134,7 +1134,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$cachethirdparties[$event->societe->id]=$thirdparty;
}
else $thirdparty=$cachethirdparties[$event->societe->id];
$linerelatedto.=$thirdparty->getNomUrl(1,'',$length);
if (! empty($thirdparty->id)) $linerelatedto.=$thirdparty->getNomUrl(1,'',$length);
}
if (! empty($event->contact->id) && $event->contact->id > 0)
{
@@ -1146,7 +1146,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
}
else $contact=$cachecontacts[$event->contact->id];
if ($linerelatedto) $linerelatedto.=' / ';
$linerelatedto.=$contact->getNomUrl(1,'',$length);
if (! empty($contact->id)) $linerelatedto.=$contact->getNomUrl(1,'',$length);
}
if ($linerelatedto) print '<br>'.$linerelatedto;
}

View File

@@ -19,8 +19,8 @@
*/
/**
* \file htdocs/societe/admin/societe_extrafields.php
* \ingroup societe
* \file htdocs/comm/admin/propal_extrafields.php
* \ingroup propal
* \brief Page to setup extra fields of third party
*/

View File

@@ -56,6 +56,8 @@ $search_compta=GETPOST("search_compta");
$search_sale = GETPOST("search_sale");
$search_categ = GETPOST("search_categ",'int');
$catid = GETPOST("catid",'int');
// If the internal user must only see his customers, force searching by him
if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('customerlist'));
@@ -98,17 +100,15 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url);
$sql = "SELECT s.rowid, s.nom as name, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,";
$sql.= " s.datec, s.datea, s.canvas";
// We'll need these fields in order to filter by sale (including the case where the user can only see his prospects)
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user";
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; // We need this table joined to the select in order to filter by categ
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
$sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st";
// We'll need this table joined to the select in order to filter by sale
if ($search_sale || !$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE s.fk_stcomm = st.id";
$sql.= " AND s.client IN (1, 3)";
$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')';
if (!$user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= " AND s.rowid = sc.fk_soc";
if ($socid) $sql.= " AND s.rowid = ".$socid;
if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale
if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
@@ -137,8 +137,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($conf->liste_limit +1, $offset);
dol_syslog('comm:list.php: sql='.$sql,LOG_DEBUG);
dol_syslog('comm/list.php: sql='.$sql,LOG_DEBUG);
$result = $db->query($sql);
if ($result)
{

View File

@@ -221,8 +221,8 @@ if ($action == 'sendallconfirmed' && $confirm == 'yes')
$substitutionarray=array(
'__ID__' => $obj->source_id,
'__EMAIL__' => $obj->email,
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$obj->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
'__UNSUBSCRIBE__' => '<a href="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-unsubscribe.php?tag='.$obj->tag.'&unsuscrib=1&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" target="_blank">'.$langs->trans("MailUnsubcribe").'</a>',
'__MAILTOEMAIL__' => '<a href="mailto:'.$obj->email.'">'.$obj->email.'</a>',
'__LASTNAME__' => $obj->lastname,
'__FIRSTNAME__' => $obj->firstname,

View File

@@ -786,7 +786,7 @@ else if ($action == "addline" && $user->rights->propal->creer)
$info_bits=0;
if ($tva_npr) $info_bits |= 0x01;
if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min)))
{
$mesg = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').$langs->getCurrencySymbol($conf->currency));
@@ -920,7 +920,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa
$error++;
}
}
if (! $error)
{
$result = $object->updateline(

View File

@@ -407,7 +407,7 @@ class Propal extends CommonObject
$this->line->date_start=$date_start;
$this->line->date_end=$date_end;
// infos marge
$this->line->fk_fournprice = $fk_fournprice;
$this->line->pa_ht = $pa_ht;
@@ -1320,17 +1320,17 @@ class Propal extends CommonObject
if (file_exists($dirsource))
{
dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest);
if (@rename($dirsource, $dirdest))
{
dol_syslog("Rename ok");
// Deleting old PDF in new rep
dol_delete_file($conf->propal->dir_output.'/'.$snumfa.'/'.$facref.'*.*');
}
}
}
$this->brouillon=0;
$this->statut = 1;
$this->user_valid_id=$user->id;
@@ -1664,7 +1664,7 @@ class Propal extends CommonObject
{
if ($statut == 2)
{
// Classe la societe rattachee comme client
// The connected company is classified as a client
$soc=new Societe($this->db);
$soc->id = $this->socid;
$result=$soc->set_as_client();
@@ -2943,7 +2943,8 @@ class PropaleLigne
if (empty($this->total_localtax2)) $this->total_localtax2=0;
if (empty($this->marque_tx)) $this->marque_tx=0;
if (empty($this->marge_tx)) $this->marge_tx=0;
if (empty($this->remise)) $this->remise=0;
if (empty($this->price)) $this->price=0; // TODO A virer
if (empty($this->remise)) $this->remise=0; // TODO A virer
if (empty($this->remise_percent)) $this->remise_percent=0;
if (empty($this->info_bits)) $this->info_bits=0;
if (empty($this->special_code)) $this->special_code=0;

View File

@@ -20,8 +20,8 @@
/**
* \file htdocs/comm/propal/document.php
* \ingroup propale
* \brief Page de gestion des documents attaches a une proposition commerciale
* \ingroup propal
* \brief Management page of documents attached to a business proposal
*/
require '../../main.inc.php';

View File

@@ -19,7 +19,7 @@
/**
* \file htdocs/comm/propal/info.php
* \ingroup propale
* \ingroup propal
* \brief Page d'affichage des infos d'une proposition commerciale
*/

View File

@@ -24,8 +24,8 @@
*/
/**
* \file htdocs/comm/propal.php
* \ingroup propale
* \file htdocs/comm/propal/list.php
* \ingroup propal
* \brief Page of commercial proposals card and list
*/
@@ -167,7 +167,7 @@ if ($search_montant_ht)
{
$sql.= " AND p.total_ht='".$db->escape(price2num(trim($search_montant_ht)))."'";
}
if ($sall) $sql.= " AND (s.nom LIKE '%".$db->escape($sall)."%' OR p.note LIKE '%".$db->escape($sall)."%' OR pd.description LIKE '%".$db->escape($sall)."%')";
if ($sall) $sql.= " AND (s.nom LIKE '%".$db->escape($sall)."%' OR p.note_private LIKE '%".$db->escape($sall)."%' OR p.note_public LIKE '%".$db->escape($sall)."%' OR pd.description LIKE '%".$db->escape($sall)."%')";
if ($socid) $sql.= ' AND s.rowid = '.$socid;
if ($viewstatut <> '')
{

View File

@@ -21,7 +21,7 @@
/**
* \file htdocs/comm/propal/note.php
* \ingroup propale
* \ingroup propal
* \brief Fiche d'information sur une proposition commerciale
*/

View File

@@ -14,7 +14,12 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/**
* \file htdocs/comm/propal/tpl/linkedobjectblock.tpl.php
* \ingroup propal
* \brief Template to show objects linked to proposals
*/
?>

View File

@@ -141,7 +141,7 @@ else dol_print_error($db);
// Load sale and categ filters
$search_sale = GETPOST('search_sale');
$search_categ = GETPOST('search_categ');
// If the user must only see his prospect, force searching by him
// If the internal user must only see his prospect, force searching by him
if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id;
// List of avaible states; we'll need that for each lines (quick changing prospect states) and for search bar (filter by prospect state)
@@ -176,18 +176,17 @@ $formother=new FormOther($db);
$sql = "SELECT s.rowid, s.nom, s.zip, s.town, s.datec, s.datea, s.status as status,";
$sql.= " st.libelle as stcomm, s.prefix_comm, s.fk_stcomm, s.fk_prospectlevel,";
$sql.= " d.nom as departement";
// Updated by Matelli
if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects)
$sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st";
if ($search_sale || !$user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d on (d.rowid = s.fk_departement)";
if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe"; // We need this table joined to the select in order to filter by categ
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale
$sql.= " WHERE s.fk_stcomm = st.id";
$sql.= " AND s.client IN (2, 3)";
$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')';
if ($user->societe_id) $sql.= " AND s.rowid = " .$user->societe_id;
if ($search_sale) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale
if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= " AND s.rowid = sc.fk_soc";
if ($socid) $sql.= " AND s.rowid = " .$socid;
if (isset($stcomm) && $stcomm != '') $sql.= " AND s.fk_stcomm=".$stcomm;
if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid;
if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL";
@@ -214,7 +213,6 @@ if ($socname)
$sortfield = "s.nom";
$sortorder = "ASC";
}
// Count total nb of records
$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
@@ -222,10 +220,10 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
}
$sql.= " ORDER BY $sortfield $sortorder, s.nom ASC";
$sql.= $db->plimit($conf->liste_limit+1, $offset);
dol_syslog('comm/propsect/list.php: sql='.$sql,LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -266,7 +266,7 @@ class Commande extends CommonOrder
if (preg_match('/^[\(]?PROV/i', $this->ref))
{
// On renomme repertoire ($this->ref = ancienne ref, $numfa = nouvelle ref)
// afin de ne pas perdre les fichiers attaches
// in order not to lose the attachments
$comref = dol_sanitizeFileName($this->ref);
$snum = dol_sanitizeFileName($num);
$dirsource = $conf->commande->dir_output.'/'.$comref;
@@ -1339,7 +1339,7 @@ class Commande extends CommonOrder
$this->lines = array();
if ($this->statut == 0) $this->brouillon = 1;
// Retreive all extrafield for invoice
// fetch optionals attributes and labels
if(!class_exists('Extrafields'))
@@ -2420,7 +2420,7 @@ class Commande extends CommonOrder
// Delete linked contacts
$res = $this->delete_linked_contact();
if ($res < 0) $error++;
// Remove extrafields
if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used
{
@@ -2458,8 +2458,8 @@ class Commande extends CommonOrder
}
}
}
}
if (! $error)
@@ -3055,6 +3055,7 @@ class OrderLine
$this->fk_product = $objp->fk_product;
$this->product_type = $objp->product_type;
$this->info_bits = $objp->info_bits;
$this->special_code = $objp->special_code;
$this->total_ht = $objp->total_ht;
$this->total_tva = $objp->total_tva;
$this->total_localtax1 = $objp->total_localtax1;

View File

@@ -21,7 +21,7 @@
/**
* \file htdocs/commande/document.php
* \ingroup order
* \brief Page de gestion des documents attachees a une commande
* \brief Management page of documents attached to an order
*/
require '../main.inc.php';

View File

@@ -316,7 +316,8 @@ if ($resql)
print '</td>';
print '<td width="20" class="nobordernopadding nowrap">';
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning");
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && max($db->jdate($objp->date_valid),$db->jdate($objp->date_livraison)) < ($now - $conf->commande->client->warning_delay))
print img_picto($langs->trans("Late"),"warning");
print '</td>';
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';

View File

@@ -486,7 +486,7 @@ if ($id > 0 || ! empty($ref))
$var=true;
$num = $db->num_rows($result);
$i = 0; $total = 0; $sep = 0;
$i = 0; $total = 0; $sep = -1;
while ($i < $num)
{
@@ -499,13 +499,14 @@ if ($id > 0 || ! empty($ref))
// Is it a transaction in future ?
$dos=dol_print_date($db->jdate($objp->do),'%Y%m%d');
//print "dos=".$dos." nows=".$nows;
if ($dos > $nows && !$sep) // Yes, we show a subtotal
if ($dos < $nows) $sep=0; // 0 means there was at least one line before current date
if ($dos > $nows && ! $sep) // We have found a line in future and we already found on line before current date
{
$sep = 1 ;
print '<tr class="liste_total"><td colspan="8">';
print $langs->trans("CurrentBalance");
print '</td>';
print '<td align="right" nowrap><b>'.price($total - $objp->amount).'</b></td>';
print '<td align="right" class="nowrap"><b>'.price($total - $objp->amount).'</b></td>';
print "<td>&nbsp;</td>";
print '</tr>';
}
@@ -581,7 +582,7 @@ if ($id > 0 || ! empty($ref))
$banklinestatic->fetch($links[$key]['url_id']);
$bankstatic->id=$banklinestatic->fk_account;
$bankstatic->label=$banklinestatic->bank_account_label;
print ' ('.$langs->trans("From ");
print ' ('.$langs->trans("TransferFrom").' ';
print $bankstatic->getNomUrl(1,'transactions');
print ' '.$langs->trans("toward").' ';
$bankstatic->id=$objp->bankid;
@@ -593,7 +594,7 @@ if ($id > 0 || ! empty($ref))
{
$bankstatic->id=$objp->bankid;
$bankstatic->label=$objp->bankref;
print ' ('.$langs->trans("From ");
print ' ('.$langs->trans("TransferFrom").' ';
print $bankstatic->getNomUrl(1,'');
print ' '.$langs->trans("toward").' ';
$banklinestatic->fetch($links[$key]['url_id']);
@@ -747,10 +748,10 @@ if ($id > 0 || ! empty($ref))
if ($page == 0 && ! $mode_search)
{
print '<tr class="liste_total"><td align="left" colspan="8">';
if ($sep) print '&nbsp;';
if ($sep > 0) print '&nbsp;'; // If we had at least one line in future
else print $langs->trans("CurrentBalance");
print '</td>';
print '<td align="right" nowrap>'.price($total).'</td>';
print '<td align="right" nowrap><b>'.price($total).'</b></td>';
print '<td>&nbsp;</td>';
print '</tr>';
}

View File

@@ -900,7 +900,7 @@ else if ($action == 'add' && $user->rights->facture->creer)
$numlines=count($lines);
for ($i=0; $i<$numlines; $i++)
{
$totalamount += $lines[$i]->subprice;
$totalamount += $lines[$i]->total_ht;
}
if ($totalamount!=0)
@@ -3674,16 +3674,16 @@ else if ($id > 0 || ! empty($ref))
// By default if $action=='presend'
$titreform='SendBillByMail';
$topicmail='SendBillRef';
$action='send';
$modelmail='facture_send';
if ($action == 'prerelance') // For backward compatibility
{
$titrefrom='SendReminderBillByMail';
$topicmail='SendReminderBillRef';
$action='relance';
$modelmail='facture_relance';
$action='relance';
}
else $action='send';
$ref = dol_sanitizeFileName($object->ref);
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';

View File

@@ -1736,8 +1736,8 @@ class Facture extends CommonInvoice
$sql.= " SET facnumber='".$num."', fk_statut = 1, fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'";
if (! empty($conf->global->FAC_FORCE_DATE_VALIDATION)) // If option enabled, we force invoice date
{
$sql.= ', datef='.$this->db->idate($this->date);
$sql.= ', date_lim_reglement='.$this->db->idate($this->date_lim_reglement);
$sql.= ", datef='".$this->db->idate($this->date)."'";
$sql.= ", date_lim_reglement='".$this->db->idate($this->date_lim_reglement)."'";
}
$sql.= ' WHERE rowid = '.$this->id;
@@ -1793,7 +1793,7 @@ class Facture extends CommonInvoice
if (preg_match('/^[\(]?PROV/i', $this->ref))
{
// On renomme repertoire facture ($this->ref = ancienne ref, $num = nouvelle ref)
// afin de ne pas perdre les fichiers attaches
// in order not to lose the attachments
$facref = dol_sanitizeFileName($this->ref);
$snumfa = dol_sanitizeFileName($num);
$dirsource = $conf->facture->dir_output.'/'.$facref;
@@ -3364,7 +3364,7 @@ class FactureLigne
$sql = 'SELECT fd.rowid, fd.fk_facture, fd.fk_parent_line, fd.fk_product, fd.product_type, fd.label as custom_label, fd.description, fd.price, fd.qty, fd.tva_tx,';
$sql.= ' fd.localtax1_tx, fd. localtax2_tx, fd.remise, fd.remise_percent, fd.fk_remise_except, fd.subprice,';
$sql.= ' fd.date_start as date_start, fd.date_end as date_end, fd.fk_product_fournisseur_price as fk_fournprice, fd.buy_price_ht as pa_ht,';
$sql.= ' fd.info_bits, fd.total_ht, fd.total_tva, fd.total_ttc, fd.total_localtax1, fd.total_localtax2, fd.rang,';
$sql.= ' fd.info_bits, fd.special_code, fd.total_ht, fd.total_tva, fd.total_ttc, fd.total_localtax1, fd.total_localtax2, fd.rang,';
$sql.= ' fd.fk_code_ventilation,';
$sql.= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facturedet as fd';
@@ -3393,6 +3393,7 @@ class FactureLigne
$this->date_start = $this->db->jdate($objp->date_start);
$this->date_end = $this->db->jdate($objp->date_end);
$this->info_bits = $objp->info_bits;
$this->special_code = $objp->special_code;
$this->total_ht = $objp->total_ht;
$this->total_tva = $objp->total_tva;
$this->total_localtax1 = $objp->total_localtax1;

View File

@@ -216,7 +216,7 @@ if (! $sall)
}
else
{
$sql.= ' AND (s.nom LIKE \'%'.$db->escape($sall).'%\' OR f.facnumber LIKE \'%'.$db->escape($sall).'%\' OR f.note LIKE \'%'.$db->escape($sall).'%\' OR fd.description LIKE \'%'.$db->escape($sall).'%\')';
$sql.= ' AND (s.nom LIKE \'%'.$db->escape($sall).'%\' OR f.facnumber LIKE \'%'.$db->escape($sall).'%\' OR f.note_private LIKE \'%'.$db->escape($sall).'%\' OR f.note_public LIKE \'%'.$db->escape($sall).'%\' OR fd.description LIKE \'%'.$db->escape($sall).'%\')';
}
$sql.= ' ORDER BY ';
$listfield=explode(',',$sortfield);

View File

@@ -79,7 +79,7 @@ if ($result)
print '<table class="liste" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("WithdrawalReceipt"),"bons.php","p.ref",'','','class="liste_titre"');
print_liste_field_titre($langs->trans("WithdrawalReceipts"),"bons.php","p.ref",'','','class="liste_titre"');
print_liste_field_titre($langs->trans("Date"),"bons.php","p.datec","","",'class="liste_titre" align="center"');
print '<td class="liste_titre" align="right">'.$langs->trans("Amount").'</td>';
print '</tr>';

View File

@@ -47,7 +47,7 @@ $page = GETPOST('page','int');
$sortorder = ((GETPOST('sortorder','alpha')=="")) ? "DESC" : GETPOST('sortorder','alpha');
$sortfield = ((GETPOST('sortfield','alpha')=="")) ? "p.ref" : GETPOST('sortfield','alpha');
llxHeader('',$langs->trans("WithdrawalReceipt"));
llxHeader('',$langs->trans("WithdrawalReceipts"));
if ($prev_id)
{
@@ -56,7 +56,7 @@ if ($prev_id)
if ($bon->fetch($prev_id) == 0)
{
$head = prelevement_prepare_head($bon);
dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipt"), '', 'payment');
dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalReceipts"), '', 'payment');
print '<table class="border" width="100%">';

View File

@@ -46,7 +46,7 @@ $page = GETPOST('page','int');
/*
* View
*/
llxHeader('',$langs->trans("WithdrawalReceipt"));
llxHeader('',$langs->trans("WithdrawalReceipts"));
if ($prev_id)
{
@@ -55,7 +55,7 @@ if ($prev_id)
if ($bon->fetch($prev_id) == 0)
{
$head = prelevement_prepare_head($bon);
dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipt"), '', 'payment');
dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalReceipts"), '', 'payment');
print '<table class="border" width="100%">';

View File

@@ -44,7 +44,7 @@ $page = GETPOST('page','int');
* View
*/
llxHeader('',$langs->trans("WithdrawalReceipt"));
llxHeader('',$langs->trans("WithdrawalReceipts"));
if ($prev_id)
{
@@ -53,7 +53,7 @@ if ($prev_id)
if ($bon->fetch($prev_id) == 0)
{
$head = prelevement_prepare_head($bon);
dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalReceipt"), '', 'payment');
dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalReceipts"), '', 'payment');
print '<table class="border" width="100%">';

View File

@@ -133,7 +133,7 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
$bon = new BonPrelevement($db,"");
$form = new Form($db);
llxHeader('',$langs->trans("WithdrawalReceipt"));
llxHeader('',$langs->trans("WithdrawalReceipts"));
if ($id > 0)
@@ -141,7 +141,7 @@ if ($id > 0)
$bon->fetch($id);
$head = prelevement_prepare_head($bon);
dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipt"), '', 'payment');
dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipts"), '', 'payment');
if (GETPOST('error','alpha')!='')
{

View File

@@ -130,7 +130,7 @@ if ($id)
print '<table class="border" width="100%">';
print '<tr><td width="20%">'.$langs->trans("WithdrawalReceipt").'</td><td>';
print '<tr><td width="20%">'.$langs->trans("WithdrawalReceipts").'</td><td>';
print '<a href="fiche.php?id='.$lipre->bon_rowid.'">'.$lipre->bon_ref.'</a></td></tr>';
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($lipre->amount).'</td></tr>';

View File

@@ -54,7 +54,7 @@ $sortfield = ((GETPOST('sortfield','alpha')=="")) ? "pl.fk_soc" : GETPOST('sortf
* View
*/
llxHeader('',$langs->trans("WithdrawalReceipt"));
llxHeader('',$langs->trans("WithdrawalReceipts"));
if ($prev_id)
{
@@ -63,7 +63,7 @@ if ($prev_id)
if ($bon->fetch($prev_id) == 0)
{
$head = prelevement_prepare_head($bon);
dol_fiche_head($head, 'lines', $langs->trans("WithdrawalReceipt"), '', 'payment');
dol_fiche_head($head, 'lines', $langs->trans("WithdrawalReceipts"), '', 'payment');
print '<table class="border" width="100%">';

View File

@@ -111,7 +111,7 @@ if ($result)
print '<tr class="liste_titre">';
print '<td class="liste_titre">'.$langs->trans("Line").'</td>';
print_liste_field_titre($langs->trans("WithdrawalReceipt"),$_SERVER["PHP_SELF"],"p.ref");
print_liste_field_titre($langs->trans("WithdrawalReceipts"),$_SERVER["PHP_SELF"],"p.ref");
print_liste_field_titre($langs->trans("Bill"),$_SERVER["PHP_SELF"],"f.facnumber",'',$urladd);
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom");
print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client",'','','align="center"');

View File

@@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
/* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -171,23 +172,21 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl
// SQL request
$catotal=0;
if ($modecompta == 'CREANCES-DETTES') {
if ($modecompta == 'CREANCES-DETTES')
{
$sql = "SELECT DISTINCT p.rowid as rowid, p.ref as ref, p.label as label,";
$sql.= " sum(DISTINCT l.total_ht) as amount, sum(DISTINCT l.total_ttc) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
$sql.= " JOIN ".MAIN_DB_PREFIX."facturedet as l";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON l.fk_facture = f.rowid";
if ($selected_cat === -2) {
$sql.=" LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product";
}
if ($selected_cat && $selected_cat !== -2) {
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = " . $selected_cat;
if ($subcat) {
$sql.=" OR c.fk_parent = " . $selected_cat;
$sql.= " sum(l.total_ht) as amount, sum(l.total_ttc) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as l, ".MAIN_DB_PREFIX."product as p";
if ($selected_cat === -2) // Without any category
{
$sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product";
}
else if ($selected_cat) // Into a specific category
{
$sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp";
}
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_categorie = c.rowid";
}
$sql.= " WHERE l.fk_product = p.rowid";
$sql.= " AND l.fk_facture = f.rowid";
$sql.= " AND f.fk_statut in (1,2)";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
$sql.= " AND f.type IN (0,1,2)";
@@ -197,16 +196,21 @@ if ($modecompta == 'CREANCES-DETTES') {
if ($date_start && $date_end) {
$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
}
if ($selected_cat === -2) {
$sql.=" AND cp.fk_product is null";
}
if ($selected_cat && $selected_cat !== -2) {
$sql.= " AND cp.fk_product = p.rowid";
}
if ($selected_cat === -2) // Without any category
{
$sql.=" AND cp.fk_product is null";
}
else if ($selected_cat) { // Into a specific category
$sql.= " AND (c.rowid = ".$selected_cat;
if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat;
$sql.= ")";
$sql.= " AND cp.fk_categorie = c.rowid AND cp.fk_product = p.rowid";
}
$sql.= " AND f.entity = ".$conf->entity;
$sql.= " GROUP BY p.rowid ";
$sql.= "ORDER BY p.ref ";
$sql.= " GROUP BY p.rowid";
$sql.= " ORDER BY p.ref";
dol_syslog("cabyprodserv sql=".$sql);
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
@@ -381,7 +385,10 @@ if ($modecompta == 'CREANCES-DETTES') {
print '</form>';
} else {
// $modecompta != 'CREANCES-DETTES'
// TODO: better message
// TODO: better message, for example:
// "Calculation of part of each product for accountancy in this mode is not possible. When a partial payment (for example 5 euros) is done on an
// invoice with 2 product (product A for 10 euros and product B for 20 euros), what is part of paiment for product A and part of paiment for product B ?
// Because there is no way to know this, this report is not relevant.
print '<div class="warning">' . $langs->trans("WarningNotRelevant") . '</div>';
}

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2013 Antoine Iauch <aiauch@gpcsolutions.fr>
@@ -177,18 +177,15 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl
$catotal=0;
if ($modecompta == 'CREANCES-DETTES') {
$sql = "SELECT DISTINCT s.rowid as socid, s.nom as name,";
$sql.= " sum(DISTINCT f.total) as amount, sum(DISTINCT f.total_ttc) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= " JOIN ".MAIN_DB_PREFIX."facture as f";
if ($selected_cat === -2) {
$sql.= " sum(f.total) as amount, sum(f.total_ttc) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
if ($selected_cat === -2) // Without any category
{
$sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe";
}
if ($selected_cat && $selected_cat !== -2) {
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON c.rowid = ".$selected_cat;
if ($subcat) {
$sql.=" OR c.fk_parent = " . $selected_cat;
}
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON cs.fk_categorie = c.rowid";
else if ($selected_cat) // Into a specific category
{
$sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs";
}
$sql.= " WHERE f.fk_statut in (1,2)";
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
@@ -200,34 +197,57 @@ if ($modecompta == 'CREANCES-DETTES') {
if ($date_start && $date_end) {
$sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'";
}
if ($selected_cat === -2) {
if ($selected_cat === -2) // Without any category
{
$sql.=" AND cs.fk_societe is null";
}
if ($selected_cat && $selected_cat !== -2) {
$sql.= " AND cs.fk_societe = s.rowid";
else if ($selected_cat) { // Into a specific category
$sql.= " AND (c.rowid = ".$selected_cat;
if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat;
$sql.= ")";
$sql.= " AND cs.fk_categorie = c.rowid AND cs.fk_societe = s.rowid";
}
} else {
} else {
/*
* Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les
* vieilles versions, ils n'etaient pas lies via paiement_facture. On les ajoute plus loin)
*/
$sql = "SELECT s.rowid as socid, s.nom as name, sum(pf.amount) as amount_ttc";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."facture as f";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= ", ".MAIN_DB_PREFIX."paiement_facture as pf";
$sql.= ", ".MAIN_DB_PREFIX."paiement as p";
$sql .= " WHERE p.rowid = pf.fk_paiement";
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
if ($selected_cat === -2) // Without any category
{
$sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_societe";
}
else if ($selected_cat) // Into a specific category
{
$sql.= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs";
}
$sql.= " WHERE p.rowid = pf.fk_paiement";
$sql.= " AND pf.fk_facture = f.rowid";
$sql.= " AND f.fk_soc = s.rowid";
if ($date_start && $date_end) {
$sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'";
}
if ($selected_cat === -2) // Without any category
{
$sql.=" AND cs.fk_societe is null";
}
else if ($selected_cat) { // Into a specific category
$sql.= " AND (c.rowid = ".$selected_cat;
if ($subcat) $sql.=" OR c.fk_parent = " . $selected_cat;
$sql.= ")";
$sql.= " AND cs.fk_categorie = c.rowid AND cs.fk_societe = s.rowid";
}
}
$sql.= " AND f.entity = ".$conf->entity;
if ($socid) $sql.= " AND f.fk_soc = ".$socid;
$sql.= " GROUP BY s.rowid, s.nom";
$sql.= " ORDER BY s.rowid";
dol_syslog("casoc sql=".$sql);
$result = $db->query($sql);
if ($result) {
$num = $db->num_rows($result);
@@ -248,7 +268,7 @@ if ($result) {
// On ajoute les paiements anciennes version, non lies par paiement_facture
if ($modecompta != 'CREANCES-DETTES') {
$sql = "SELECT '0' as socid, 'Autres' as name, sum(DISTINCT p.amount) as amount_ttc";
$sql = "SELECT '0' as socid, 'Autres' as name, sum(p.amount) as amount_ttc";
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
$sql.= ", ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= ", ".MAIN_DB_PREFIX."paiement as p";

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -31,7 +31,7 @@ $langs->load("compta");
$langs->load("banks");
$langs->load("bills");
$id=GETPOST("id");
$id=GETPOST("id",'int');
$action=GETPOST('action');
$mesg = '';
@@ -89,7 +89,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
if ($action == 'delete')
{
$result=$tva->fetch($_GET['id']);
$result=$tva->fetch($id);
if ($tva->rappro == 0)
{
@@ -102,10 +102,10 @@ if ($action == 'delete')
{
$accountline=new AccountLine($db);
$result=$accountline->fetch($tva->fk_bank);
$result=$accountline->delete($user);
if ($result > 0) $result=$accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing)
}
if ($result > 0)
if ($result >= 0)
{
$db->commit();
header("Location: ".DOL_URL_ROOT.'/compta/tva/reglement.php');

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
*
@@ -3175,14 +3175,14 @@ abstract class CommonObject
}
}
if ($marginInfos['pa_products'] > 0)
$marginInfos['margin_rate_products'] = 100 * round($marginInfos['margin_on_products'] / $marginInfos['pa_products'],5);
$marginInfos['margin_rate_products'] = 100 * $marginInfos['margin_on_products'] / $marginInfos['pa_products'];
if ($marginInfos['pv_products'] > 0)
$marginInfos['mark_rate_products'] = 100 * round($marginInfos['margin_on_products'] / $marginInfos['pv_products'],5);
$marginInfos['mark_rate_products'] = 100 * $marginInfos['margin_on_products'] / $marginInfos['pv_products'];
if ($marginInfos['pa_services'] > 0)
$marginInfos['margin_rate_services'] = 100 * round($marginInfos['margin_on_services'] / $marginInfos['pa_services'],5);
$marginInfos['margin_rate_services'] = 100 * $marginInfos['margin_on_services'] / $marginInfos['pa_services'];
if ($marginInfos['pv_services'] > 0)
$marginInfos['mark_rate_services'] = 100 * round($marginInfos['margin_on_services'] / $marginInfos['pv_services'],5);
$marginInfos['mark_rate_services'] = 100 * $marginInfos['margin_on_services'] / $marginInfos['pv_services'];
// if credit note, margin = -1 * (abs(selling_price) - buying_price)
if ($marginInfos['pv_total'] < 0)
@@ -3190,9 +3190,9 @@ abstract class CommonObject
else
$marginInfos['total_margin'] = $marginInfos['pv_total'] - $marginInfos['pa_total'];
if ($marginInfos['pa_total'] > 0)
$marginInfos['total_margin_rate'] = 100 * round($marginInfos['total_margin'] / $marginInfos['pa_total'],5);
$marginInfos['total_margin_rate'] = 100 * $marginInfos['total_margin'] / $marginInfos['pa_total'];
if ($marginInfos['pv_total'] > 0)
$marginInfos['total_mark_rate'] = 100 * round($marginInfos['total_margin'] / $marginInfos['pv_total'],5);
$marginInfos['total_mark_rate'] = 100 * $marginInfos['total_margin'] / $marginInfos['pv_total'];
return $marginInfos;
}
@@ -3209,6 +3209,8 @@ abstract class CommonObject
if (! empty($user->societe_id)) return;
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT);
$marginInfo = $this->getMarginInfos($force_price);
print '<table class="noborder" width="100%">';
@@ -3228,34 +3230,34 @@ abstract class CommonObject
//if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) {
print '<tr class="impair">';
print '<td>'.$langs->trans('MarginOnProducts').'</td>';
print '<td align="right">'.price($marginInfo['pv_products']).'</td>';
print '<td align="right">'.price($marginInfo['pa_products']).'</td>';
print '<td align="right">'.price($marginInfo['margin_on_products']).'</td>';
print '<td align="right">'.price($marginInfo['pv_products'], null, null, null, null, $rounding).'</td>';
print '<td align="right">'.price($marginInfo['pa_products'], null, null, null, null, $rounding).'</td>';
print '<td align="right">'.price($marginInfo['margin_on_products'], null, null, null, null, $rounding).'</td>';
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
print '<td align="right">'.(($marginInfo['margin_rate_products'] == '')?'n/a':price($marginInfo['margin_rate_products']).'%').'</td>';
print '<td align="right">'.(($marginInfo['margin_rate_products'] == '')?'n/a':price($marginInfo['margin_rate_products'], null, null, null, null, $rounding).'%').'</td>';
if (! empty($conf->global->DISPLAY_MARK_RATES))
print '<td align="right">'.(($marginInfo['mark_rate_products'] == '')?'n/a':price($marginInfo['mark_rate_products']).'%').'</td>';
print '<td align="right">'.(($marginInfo['mark_rate_products'] == '')?'n/a':price($marginInfo['mark_rate_products'], null, null, null, null, $rounding).'%').'</td>';
print '</tr>';
print '<tr class="pair">';
print '<td>'.$langs->trans('MarginOnServices').'</td>';
print '<td align="right">'.price($marginInfo['pv_services']).'</td>';
print '<td align="right">'.price($marginInfo['pa_services']).'</td>';
print '<td align="right">'.price($marginInfo['margin_on_services']).'</td>';
print '<td align="right">'.price($marginInfo['pv_services'], null, null, null, null, $rounding).'</td>';
print '<td align="right">'.price($marginInfo['pa_services'], null, null, null, null, $rounding).'</td>';
print '<td align="right">'.price($marginInfo['margin_on_services'], null, null, null, null, $rounding).'</td>';
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
print '<td align="right">'.(($marginInfo['margin_rate_services'] == '')?'n/a':price($marginInfo['margin_rate_services']).'%').'</td>';
print '<td align="right">'.(($marginInfo['margin_rate_services'] == '')?'n/a':price($marginInfo['margin_rate_services'], null, null, null, null, $rounding).'%').'</td>';
if (! empty($conf->global->DISPLAY_MARK_RATES))
print '<td align="right">'.(($marginInfo['mark_rate_services'] == '')?'n/a':price($marginInfo['mark_rate_services']).'%').'</td>';
print '<td align="right">'.(($marginInfo['mark_rate_services'] == '')?'n/a':price($marginInfo['mark_rate_services'], null, null, null, null, $rounding).'%').'</td>';
print '</tr>';
//}
print '<tr class="impair">';
print '<td>'.$langs->trans('TotalMargin').'</td>';
print '<td align="right">'.price($marginInfo['pv_total']).'</td>';
print '<td align="right">'.price($marginInfo['pa_total']).'</td>';
print '<td align="right">'.price($marginInfo['total_margin']).'</td>';
print '<td align="right">'.price($marginInfo['pv_total'], null, null, null, null, $rounding).'</td>';
print '<td align="right">'.price($marginInfo['pa_total'], null, null, null, null, $rounding).'</td>';
print '<td align="right">'.price($marginInfo['total_margin'], null, null, null, null, $rounding).'</td>';
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
print '<td align="right">'.(($marginInfo['total_margin_rate'] == '')?'n/a':price($marginInfo['total_margin_rate']).'%').'</td>';
print '<td align="right">'.(($marginInfo['total_margin_rate'] == '')?'n/a':price($marginInfo['total_margin_rate'], null, null, null, null, $rounding).'%').'</td>';
if (! empty($conf->global->DISPLAY_MARK_RATES))
print '<td align="right">'.(($marginInfo['total_mark_rate'] == '')?'n/a':price($marginInfo['total_mark_rate']).'%').'</td>';
print '<td align="right">'.(($marginInfo['total_mark_rate'] == '')?'n/a':price($marginInfo['total_mark_rate'], null, null, null, null, $rounding).'%').'</td>';
print '</tr>';
print '</table>';
}

View File

@@ -806,7 +806,7 @@ class ExtraFields
if (!empty($value)) {
$checked=' checked="checked" ';
}
$value='<input type="checkbox" '.$checked.' '.($moreparam?$moreparam:'').' readonly="readonly">';
$value='<input type="checkbox" '.$checked.' '.($moreparam?$moreparam:'').' readonly="readonly" disabled="disabled">';
}
elseif ($type == 'mail')
{

View File

@@ -35,6 +35,7 @@ $uri=preg_replace('/^http(s?):\/\//i','',$dolibarr_main_url_root);
$pos = strstr($uri, '/'); // $pos contient alors url sans nom domaine
if ($pos == '/') $pos = ''; // si $pos vaut /, on le met a ''
define('DOL_URL_ROOT', $pos);
$entity = ((!empty($_SESSION['dol_entity']) && $_SESSION['dol_entity'] > 1) ? $_SESSION['dol_entity'] : null);
// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
@@ -49,7 +50,7 @@ $Config['UserFilesPath'] = DOL_URL_ROOT.'/viewimage.php?modulepart=fckeditor&fil
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root.'/fckeditor/';
$Config['UserFilesAbsolutePath'] = $dolibarr_main_data_root . (!empty($entity) ? '/' . $entity : '') . '/fckeditor/';
// Due to security issues with Apache modules, it is recommended to leave the
// following setting enabled.

View File

@@ -43,126 +43,116 @@
* @param string $actioncode Preselected value of actioncode for filter on type
* @return void
*/
function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,$filtera,$filtert,$filterd,$pid,$socid,$showextcals=array(),$actioncode='')
{
global $conf,$user,$langs,$db;
function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $showextcals = array(), $actioncode = '') {
global $conf, $user, $langs, $db;
// Filters
if ($canedit || ! empty($conf->projet->enabled))
{
print '<form name="listactionsfilter" class="listactionsfilter" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="status" value="'.$status.'">';
print '<input type="hidden" name="year" value="'.$year.'">';
print '<input type="hidden" name="month" value="'.$month.'">';
print '<input type="hidden" name="day" value="'.$day.'">';
print '<input type="hidden" name="showbirthday" value="'.$showbirthday.'">';
print '<table class="nobordernopadding" width="100%">';
if ($canedit || ! empty($conf->projet->enabled))
{
print '<tr><td class="nowrap">';
print '<table class="nobordernopadding">';
if ($canedit)
{
print '<tr>';
print '<td class="nowrap">';
print $langs->trans("ActionsAskedBy");
print ' &nbsp;</td><td class="nowrap">';
print $form->select_dolusers($filtera,'userasked',1,'',!$canedit);
print '</td>';
print '</tr>';
print '<tr>';
print '<td class="nowrap">';
print $langs->trans("or").' '.$langs->trans("ActionsToDoBy");
print ' &nbsp;</td><td class="nowrap">';
print $form->select_dolusers($filtert,'usertodo',1,'',!$canedit);
print '</td></tr>';
print '<tr>';
print '<td class="nowrap">';
print $langs->trans("or").' '.$langs->trans("ActionsDoneBy");
print ' &nbsp;</td><td class="nowrap">';
print $form->select_dolusers($filterd,'userdone',1,'',!$canedit);
print '</td></tr>';
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
print '<tr>';
print '<td class="nowrap">';
print $langs->trans("Type");
print ' &nbsp;</td><td class="nowrap">';
print $formactions->select_type_actions($actioncode, "actioncode", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:0));
print '</td></tr>';
}
if (! empty($conf->projet->enabled) && $user->rights->projet->lire)
{
print '<tr>';
print '<td class="nowrap">';
print $langs->trans("Project").' &nbsp; ';
print '</td><td class="nowrap">';
select_projects($socid?$socid:-1, $pid, 'projectid', 64);
print '</td></tr>';
}
print '</table>';
print '</td>';
// Buttons
print '<td align="center" valign="middle" class="nowrap">';
print img_picto($langs->trans("ViewCal"),'object_calendar','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewcal" value="'.$langs->trans("ViewCal").'">';
print '<br>';
print img_picto($langs->trans("ViewWeek"),'object_calendarweek','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewweek" value="'.$langs->trans("ViewWeek").'">';
print '<br>';
print img_picto($langs->trans("ViewDay"),'object_calendarday','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewday" value="'.$langs->trans("ViewDay").'">';
print '<br>';
print img_picto($langs->trans("ViewList"),'object_list','class="hideonsmartphone"').' <input type="submit" class="button" style="min-width:120px" name="viewlist" value="'.$langs->trans("ViewList").'">';
print '</td>';
// Legend
if ($conf->use_javascript_ajax && is_array($showextcals))
{
print '<td align="center" valign="middle" class="nowrap">';
print '<script type="text/javascript">'."\n";
print 'jQuery(document).ready(function () {'."\n";
print 'jQuery("#check_mytasks").click(function() { jQuery(".family_mytasks").toggle(); jQuery(".family_other").toggle(); });'."\n";
print 'jQuery("#check_birthday").click(function() { jQuery(".family_birthday").toggle(); });'."\n";
print 'jQuery(".family_birthday").toggle();'."\n";
print '});'."\n";
print '</script>'."\n";
print '<table>';
if (! empty($conf->global->MAIN_JS_SWITCH_AGENDA))
{
if (count($showextcals) > 0)
{
print '<tr><td><input type="checkbox" id="check_mytasks" name="check_mytasks" checked="true" disabled="disabled"> '.$langs->trans("LocalAgenda").'</td></tr>';
foreach($showextcals as $val)
{
$htmlname=dol_string_nospecial($val['name']);
print '<script type="text/javascript">'."\n";
print 'jQuery(document).ready(function () {'."\n";
print 'jQuery("#check_'.$htmlname.'").click(function() { jQuery(".family_'.$htmlname.'").toggle(); });'."\n";
print '});'."\n";
print '</script>'."\n";
print '<tr><td><input type="checkbox" id="check_'.$htmlname.'" name="check_'.$htmlname.'" checked="true"> '.$val['name'].'</td></tr>';
}
}
}
print '<tr><td><input type="checkbox" id="check_birthday" name="check_birthday checked="false"> '.$langs->trans("AgendaShowBirthdayEvents").'</td></tr>';
print '</table>';
print '</td>';
}
print '</tr>';
}
print '</table>';
print '</form>';
print '<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER ["PHP_SELF"] . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="status" value="' . $status . '">';
print '<input type="hidden" name="year" value="' . $year . '">';
print '<input type="hidden" name="month" value="' . $month . '">';
print '<input type="hidden" name="day" value="' . $day . '">';
print '<input type="hidden" name="showbirthday" value="' . $showbirthday . '">';
print '<table class="nobordernopadding" width="100%">';
print '<tr><td class="nowrap">';
print '<table class="nobordernopadding">';
if ($canedit) {
print '<tr>';
print '<td class="nowrap">';
print $langs->trans ( "ActionsAskedBy" );
print ' &nbsp;</td><td class="nowrap">';
print $form->select_dolusers ( $filtera, 'userasked', 1, '', ! $canedit );
print '</td>';
print '</tr>';
print '<tr>';
print '<td class="nowrap">';
print $langs->trans ( "or" ) . ' ' . $langs->trans ( "ActionsToDoBy" );
print ' &nbsp;</td><td class="nowrap">';
print $form->select_dolusers ( $filtert, 'usertodo', 1, '', ! $canedit );
print '</td></tr>';
print '<tr>';
print '<td class="nowrap">';
print $langs->trans ( "or" ) . ' ' . $langs->trans ( "ActionsDoneBy" );
print ' &nbsp;</td><td class="nowrap">';
print $form->select_dolusers ( $filterd, 'userdone', 1, '', ! $canedit );
print '</td></tr>';
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions = new FormActions ( $db );
print '<tr>';
print '<td class="nowrap">';
print $langs->trans ( "Type" );
print ' &nbsp;</td><td class="nowrap">';
print $formactions->select_type_actions ( $actioncode, "actioncode", '', (empty ( $conf->global->AGENDA_USE_EVENT_TYPE ) ? 1 : 0) );
print '</td></tr>';
}
if (! empty ( $conf->projet->enabled ) && $user->rights->projet->lire) {
print '<tr>';
print '<td class="nowrap">';
print $langs->trans ( "Project" ) . ' &nbsp; ';
print '</td><td class="nowrap">';
select_projects ( $socid ? $socid : - 1, $pid, 'projectid', 64 );
print '</td></tr>';
}
print '</table>';
print '</td>';
// Buttons
print '<td align="center" valign="middle" class="nowrap">';
print img_picto ( $langs->trans ( "ViewCal" ), 'object_calendar', 'class="hideonsmartphone"' ) . ' <input type="submit" class="button" style="min-width:120px" name="viewcal" value="' . $langs->trans ( "ViewCal" ) . '">';
print '<br>';
print img_picto ( $langs->trans ( "ViewWeek" ), 'object_calendarweek', 'class="hideonsmartphone"' ) . ' <input type="submit" class="button" style="min-width:120px" name="viewweek" value="' . $langs->trans ( "ViewWeek" ) . '">';
print '<br>';
print img_picto ( $langs->trans ( "ViewDay" ), 'object_calendarday', 'class="hideonsmartphone"' ) . ' <input type="submit" class="button" style="min-width:120px" name="viewday" value="' . $langs->trans ( "ViewDay" ) . '">';
print '<br>';
print img_picto ( $langs->trans ( "ViewList" ), 'object_list', 'class="hideonsmartphone"' ) . ' <input type="submit" class="button" style="min-width:120px" name="viewlist" value="' . $langs->trans ( "ViewList" ) . '">';
print '</td>';
// Legend
if ($conf->use_javascript_ajax && is_array ( $showextcals )) {
print '<td align="center" valign="middle" class="nowrap">';
print '<script type="text/javascript">' . "\n";
print 'jQuery(document).ready(function () {' . "\n";
print 'jQuery("#check_mytasks").click(function() { jQuery(".family_mytasks").toggle(); jQuery(".family_other").toggle(); });' . "\n";
print 'jQuery("#check_birthday").click(function() { jQuery(".family_birthday").toggle(); });' . "\n";
print 'jQuery(".family_birthday").toggle();' . "\n";
print '});' . "\n";
print '</script>' . "\n";
print '<table>';
if (! empty ( $conf->global->MAIN_JS_SWITCH_AGENDA )) {
if (count ( $showextcals ) > 0) {
print '<tr><td><input type="checkbox" id="check_mytasks" name="check_mytasks" checked="true" disabled="disabled"> ' . $langs->trans ( "LocalAgenda" ) . '</td></tr>';
foreach ( $showextcals as $val ) {
$htmlname = dol_string_nospecial ( $val ['name'] );
print '<script type="text/javascript">' . "\n";
print 'jQuery(document).ready(function () {' . "\n";
print 'jQuery("#check_' . $htmlname . '").click(function() { jQuery(".family_' . $htmlname . '").toggle(); });' . "\n";
print '});' . "\n";
print '</script>' . "\n";
print '<tr><td><input type="checkbox" id="check_' . $htmlname . '" name="check_' . $htmlname . '" checked="true"> ' . $val ['name'] . '</td></tr>';
}
}
}
print '<tr><td><input type="checkbox" id="check_birthday" name="check_birthday checked="false"> ' . $langs->trans ( "AgendaShowBirthdayEvents" ) . '</td></tr>';
print '</table>';
print '</td>';
}
print '</tr>';
print '</table>';
print '</form>';
}

View File

@@ -278,7 +278,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS))
{
// Tel
if ($sourcecompany->tel) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($sourcecompany->tel);
if ($sourcecompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($sourcecompany->phone);
// Fax
if ($sourcecompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($sourcecompany->fax);
// EMail
@@ -311,7 +311,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
{
// Tel
if ($targetcontact->tel) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->tel);
if ($targetcontact->phone_pro) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->phone_pro);
// Fax
if ($targetcontact->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax);
// EMail
@@ -329,7 +329,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
{
// Tel
if ($targetcompany->tel) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcompany->tel);
if ($targetcompany->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcompany->phone);
// Fax
if ($targetcompany->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcompany->fax);
// EMail
@@ -923,7 +923,17 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
if (! empty($conf->global->MAIN_MULTILANGS) && ($outputlangs->defaultlang != $langs->defaultlang))
{
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["label"]) && $label == $prodser->label) $label=$prodser->multilangs[$outputlangs->defaultlang]["label"];
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && $desc == $prodser->description) $desc=$prodser->multilangs[$outputlangs->defaultlang]["description"];
//Manage HTML entities description test
//Cause $prodser->description is store with htmlentities but $desc no
$needdesctranslation=false;
if (!empty($desc) && dol_textishtml($desc) && !empty($prodser->description) && dol_textishtml($prodser->description)) {
$needdesctranslation=(strpos(dol_html_entity_decode($desc,ENT_QUOTES | ENT_HTML401),dol_html_entity_decode($prodser->description,ENT_QUOTES | ENT_HTML401))!==false);
} else {
$needdesctranslation=($desc == $prodser->description);
}
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["description"]) && ($needdesctranslation)) $desc=$prodser->multilangs[$outputlangs->defaultlang]["description"];
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && $note == $prodser->note) $note=$prodser->multilangs[$outputlangs->defaultlang]["note"];
}
}

View File

@@ -70,9 +70,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
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', 600__+MAX_llx_menu__, 'companies', 'contacts', 2__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'ContactsAddresses', 0, 'companies', '$user->rights->societe->lire', '', 2, 1, __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', 601__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/fiche.php?leftmenu=contacts&amp;action=create', 'NewContactAddress', 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', 602__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 1, __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', 604__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=p', 'Prospects', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 1, __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', 605__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=c', 'Customers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 2, __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 && $conf->fournisseur->enabled', __HANDLER__, 'left', 606__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=f', 'Suppliers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 3, __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', 604__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=p', 'ThirdPartyProspects', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 1, __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', 605__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=c', 'ThirdPartyCustomers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 2, __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 && $conf->fournisseur->enabled', __HANDLER__, 'left', 606__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=f', 'ThirdPartySuppliers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 3, __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', 607__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts&amp;type=o', 'Others', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 4, __ENTITY__);
-- Third parties - Category customer
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 && $conf->categorie->enabled', __HANDLER__, 'left', 650__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&amp;type=1', 'SuppliersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__);

View File

@@ -98,7 +98,7 @@
<tr>
<td>
<b>__Name__ :</b><br>
__DONATOR_NAME__<br>
__DONATOR_FIRSTNAME__ __DONATOR_LASTNAME__<br>
<b>__Address__ :</b><br>
__DONATOR_ADDRESS__<br>
<b>__Zip__ :</b> __DONATOR_ZIP__<br>

View File

@@ -143,7 +143,8 @@ class html_cerfafr extends ModeleDon
$form = str_replace('__MAIN_INFO_SOCIETE_ADDRESS__',$mysoc->address,$form);
$form = str_replace('__MAIN_INFO_SOCIETE_ZIP__',$mysoc->zip,$form);
$form = str_replace('__MAIN_INFO_SOCIETE_TOWN__',$mysoc->town,$form);
$form = str_replace('__DONATOR_NAME__',$don->nom,$form);
$form = str_replace('__DONATOR_FIRSTNAME__',$don->firstname,$form);
$form = str_replace('__DONATOR_LASTNAME__',$don->lastname,$form);
$form = str_replace('__DONATOR_ADDRESS__',$don->address,$form);
$form = str_replace('__DONATOR_ZIP__',$don->zip,$form);
$form = str_replace('__DONATOR_TOWN__',$don->town,$form);

View File

@@ -404,7 +404,7 @@ class ImportCsv extends ModeleImports
//print 'Must convert '.$newval.' with rule '.join(',',$objimport->array_import_convertvalue[0][$val]).'. ';
if ($objimport->array_import_convertvalue[0][$val]['rule']=='fetchidfromcodeid' || $objimport->array_import_convertvalue[0][$val]['rule']=='fetchidfromref')
{
if (! is_numeric($newval)) // If value into input import file is not a numeric, we apply the function defined into descriptor
if (! is_numeric($newval) && $newval != '') // If value into input import file is not a numeric, we apply the function defined into descriptor
{
$file=$objimport->array_import_convertvalue[0][$val]['classfile'];
$class=$objimport->array_import_convertvalue[0][$val]['class'];

View File

@@ -195,8 +195,8 @@ class pdf_standard
// Center
if ($textright=='') // Only a left part
{
if ($textleft == '%LOGO%' && $logo) $this->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
else if ($textleft == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
else
{
$pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height);
@@ -230,8 +230,8 @@ class pdf_standard
}
else // Only a right part
{
if ($textright == '%LOGO%' && $logo) $this->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20);
else if ($textright == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20);
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20);
else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20);
else
{
$pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height);

View File

@@ -174,10 +174,10 @@ class modFacture extends DolibarrModules
$this->export_label[$r]='CustomersInvoicesAndInvoiceLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("facture","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.date_lim_reglement'=>"DateDue",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_private'=>"NotePrivate",'f.note_public'=>"NotePublic",'fd.rowid'=>'LineId','fd.label'=>"Label",'fd.description'=>"LineDescription",'fd.price'=>"LineUnitPrice",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineTotalHT",'fd.total_tva'=>"LineTotalVAT",'fd.total_ttc'=>"LineTotalTTC",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd",'fd.special_code'=>'SpecialCode','fd.product_type'=>"TypeOfLineServiceOrProduct",'fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:nom",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.code_compta'=>'Text','s.code_compta_fournisseur'=>'Text','s.tva_intra'=>'Text','f.facnumber'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.date_lim_reglement'=>"Date",'f.total'=>"Numeric",'f.total_ttc'=>"Numeric",'f.tva'=>"Numeric",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_private'=>"Text",'f.note_public'=>"Text",'fd.description'=>"Text",'fd.price'=>"Numeric",'fd.tva_tx'=>"Numeric",'fd.qty'=>"Numeric",'fd.total_ht'=>"Numeric",'fd.total_tva'=>"Numeric",'fd.total_ttc'=>"Numeric",'fd.date_start'=>"Date",'fd.date_end'=>"Date",'fd.special_code'=>'Numeric','fd.product_type'=>"Numeric",'fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.date_lim_reglement'=>"invoice",'f.total'=>"invoice",'f.total_ttc'=>"invoice",'f.tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_private'=>"invoice",'f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.label'=>"invoice_line",'fd.description'=>"invoice_line",'fd.price'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_tva'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.date_start'=>"invoice_line",'fd.date_end'=>"invoice_line",'fd.special_code'=>'invoice_line','fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product');
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
$this->export_sql_start[$r]='SELECT DISTINCT ';

View File

@@ -256,10 +256,10 @@ class modFournisseur extends DolibarrModules
$this->export_label[$r]='Factures fournisseurs et lignes de facture';
$this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("fournisseur","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_public'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.ref_supplier'=>"RefSupplier",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_public'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Text",'fd.qty'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.tva'=>"Number",'fd.product_type'=>'Boolean','fd.fk_product'=>'List:Product:label','p.ref'=>'Text','p.label'=>'Text');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.ref_supplier'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_tx'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.remise_percent'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line",'fd.product_type'=>'invoice_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product');
$this->export_dependencies_array[$r]=array('invoice_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
$this->export_sql_start[$r]='SELECT DISTINCT ';
@@ -275,10 +275,10 @@ class modFournisseur extends DolibarrModules
$this->export_label[$r]='Factures fournisseurs et reglements';
$this->export_icon[$r]='bill';
$this->export_permission[$r]=array(array("fournisseur","facture","export"));
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_public'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber');
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"InvoiceId",'f.ref'=>"InvoiceRef",'f.ref_supplier'=>"RefSupplier",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePaid",'f.fk_statut'=>'InvoiceStatus','f.note_public'=>"InvoiceNote",'p.rowid'=>'PaymentId','pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber');
//$this->export_TypeFields_array[$r]=array('s.rowid'=>"List:societe:CompanyName",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment');
$this->export_TypeFields_array[$r]=array('s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','c.code'=>'Text','s.phone'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.datec'=>"Date",'f.datef'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.total_tva'=>"Number",'f.paye'=>"Boolean",'f.fk_statut'=>'Status','f.note_public'=>"Text",'pf.amount'=>'Number','p.datep'=>'Date','p.num_paiement'=>'Number');
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"invoice",'f.ref'=>"invoice",'f.ref_supplier'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note_public'=>"invoice",'p.rowid'=>'payment','pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment');
$this->export_dependencies_array[$r]=array('payment'=>'p.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
$this->export_sql_start[$r]='SELECT DISTINCT ';

View File

@@ -400,7 +400,7 @@ class modSociete extends DolibarrModules
$this->import_icon[$r]='contact';
$this->import_entities_array[$r]=array('s.fk_soc'=>'company'); // We define here only fields that use another icon that the one defined into import_icon
$this->import_tables_array[$r]=array('s'=>MAIN_DB_PREFIX.'socpeople','extra'=>MAIN_DB_PREFIX.'socpeople_extrafields'); // List of tables to insert into (insert done in same order)
$this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName*','s.civilite'=>'UserTitle','s.lastname'=>"Name*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note_private'=>"Note",'s.note_public'=>"Note",'s.datec'=>"DateCreation");
$this->import_fields_array[$r]=array('s.fk_soc'=>'ThirdPartyName','s.civilite'=>'UserTitle','s.lastname'=>"Lastname*",'s.firstname'=>"Firstname",'s.address'=>"Address",'s.zip'=>"Zip",'s.town'=>"Town",'s.fk_pays'=>"CountryCode",'s.birthday'=>"BirthdayDate",'s.poste'=>"Role",'s.phone'=>"Phone",'s.phone_perso'=>"PhonePerso",'s.phone_mobile'=>"PhoneMobile",'s.fax'=>"Fax",'s.email'=>"Email",'s.note_private'=>"Note",'s.note_public'=>"Note",'s.datec'=>"DateCreation");
// Add extra fields
$sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'socpeople' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
@@ -421,7 +421,7 @@ class modSociete extends DolibarrModules
);
//$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t');
$this->import_regex_array[$r]=array('s.birthday'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$','s.datec'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
$this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.name'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.zip'=>'75000','s.town'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note_private'=>"My private note",'s.note_public'=>"My public note");
$this->import_examplevalues_array[$r]=array('s.fk_soc'=>'MyBigCompany','s.civilite'=>"MR",'s.lastname'=>"Smith",'s.firstname'=>'John','s.address'=>'61 jump street','s.zip'=>'75000','s.town'=>'Bigtown','s.fk_pays'=>'US, FR, DE...','s.datec'=>'1972-10-10','s.poste'=>"Director",'s.phone'=>"5551122",'s.phone_perso'=>"5551133",'s.phone_mobile'=>"5551144",'s.fax'=>"5551155",'s.email'=>"johnsmith@email.com",'s.note_private'=>"My private note",'s.note_public'=>"My public note");
// Import Bank Accounts
$r++;

View File

@@ -120,9 +120,10 @@ class pdf_standardlabel
* @param string $footer Footer
* @param Translate $outputlangs Output langs
* @param string $textright Text right
* @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text)
* @return void
*/
function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='')
function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$photo='')
{
global $mysoc,$conf,$langs;
@@ -148,8 +149,6 @@ class pdf_standardlabel
$logo=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo;
}
}
// Define photo
$photo='';
// Define background image
$backgroundimage='';
@@ -184,8 +183,8 @@ class pdf_standardlabel
// Middle
if ($textright=='') // Only a left part
{
if ($textleft == '%LOGO%' && $logo) $this->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
else if ($textleft == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
else if ($textleft == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+2,$_PosY+3+$this->_Line_Height,20);
else
{
$pdf->SetXY($_PosX+3, $_PosY+3+$this->_Line_Height);
@@ -218,8 +217,8 @@ class pdf_standardlabel
}
else // Only a right part
{
if ($textright == '%LOGO%' && $logo) $this->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20);
else if ($textright == '%PHOTO%' && $photo) $this->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20);
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo,$_PosX+$this->_Width-21,$_PosY+1,20);
else if ($textright == '%PHOTO%' && $photo) $pdf->Image($photo,$_PosX+$this->_Width-21,$_PosY+1,20);
else
{
$pdf->SetXY($_PosX+2, $_PosY+3+$this->_Line_Height);
@@ -394,13 +393,13 @@ class pdf_standardlabel
/**
* Function to build PDF on disk, then output on HTTP strem.
*
* @param array $arrayofmembers Array of members informations
* @param array $arrayofrecords Array of record informations (array('textleft'=>,'textheader'=>, ..., 'id'=>,'photo'=>)
* @param Translate $outputlangs Lang object for output language
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @param string $outputdir Output directory
* @return int 1=OK, 0=KO
*/
function write_file($arrayofmembers,$outputlangs,$srctemplatepath,$outputdir='')
function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='')
{
global $user,$conf,$langs,$mysoc,$_Avery_Labels;
@@ -468,10 +467,10 @@ class pdf_standardlabel
// Add each record
foreach($arrayofmembers as $val)
foreach($arrayofrecords as $val)
{
// imprime le texte specifique sur la carte
$this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['id'],$val['photo']);
$this->Add_PDF_card($pdf,$val['textleft'],$val['textheader'],$val['textfooter'],$langs,$val['textright'],$val['photo']);
}
//$pdf->SetXY(10, 295);

View File

@@ -63,25 +63,25 @@ class ModelePDFLabels
* Create a document onto disk accordign to template module
*
* @param DoliDB $db Database handler
* @param array $arrayofmembers Array of members
* @param array $arrayofrecords Array of records
* @param string $modele Force le modele a utiliser ('' to not force)
* @param Translate $outputlangs Objet lang a utiliser pour traduction
* @param string $outputdir Output directory
* @return int <0 if KO, >0 if OK
*/
function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir='')
function members_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir='')
{
global $conf,$langs;
$langs->load("members");
$error=0;
// Increase limit for PDF build
$err=error_reporting();
error_reporting(0);
@set_time_limit(120);
error_reporting($err);
$code='';
$srctemplatepath='';
@@ -99,7 +99,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $
}
else $code=$modele;
$modele='standardlabel';
// If selected modele is a filename template (then $modele="modelname:filename")
$tmp=explode(':',$modele,2);
if (! empty($tmp[1]))
@@ -108,7 +108,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $
$srctemplatepath=$tmp[1];
}
else $srctemplatepath=$code;
// Search template files
$file=''; $classname=''; $filefound=0;
$dirmodels=array('/');
@@ -118,7 +118,7 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $
foreach(array('doc','pdf') as $prefix)
{
$file = $prefix."_".$modele.".class.php";
// On verifie l'emplacement du modele
$file=dol_buildpath($reldir."core/modules/printsheet/doc/".$file,0);
if (file_exists($file))
@@ -130,18 +130,18 @@ function members_label_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $
}
if ($filefound) break;
}
// Charge le modele
if ($filefound)
{
require_once $file;
$obj = new $classname($db);
// We save charset_output to restore it because write_file can change it if needed for
// output format that does not support UTF8.
$sav_charset_output=$outputlangs->charset_output;
if ($obj->write_file($arrayofmembers, $outputlangs, $srctemplatepath, $outputdir) > 0)
if ($obj->write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir) > 0)
{
$outputlangs->charset_output=$sav_charset_output;
return 1;

View File

@@ -522,7 +522,6 @@ class doc_generic_project_odt extends ModelePDFProjects
else // Text
{
$odfHandler->setVars($key, $value, true, 'UTF-8');
$odfHandler->setVarsHeadFooter($key, $value, true, 'UTF-8');
}
}
catch(OdfException $e)

View File

@@ -33,6 +33,7 @@
<input type="hidden" name="usenewupdatelineform" value="1" />
<input type="hidden" name="id" value="<?php echo $this->id; ?>">
<input type="hidden" name="lineid" value="<?php echo $line->id; ?>">
<input type="hidden" name="special_code" value="<?php echo $line->special_code; ?>">
<input type="hidden" id="product_type" name="type" value="<?php echo $line->product_type; ?>">
<input type="hidden" id="product_id" name="productid" value="<?php echo (! empty($line->fk_product)?$line->fk_product:0); ?>" />

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2010-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.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
@@ -120,14 +120,15 @@
<?php }
if (! empty($conf->margin->enabled) && empty($user->societe_id)) {
$rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT,$conf->global->MAIN_MAX_DECIMALS_TOT);
?>
<td align="right" class="nowrap"><?php echo price($line->pa_ht); ?></td>
<?php if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {?>
<td align="right" class="nowrap"><?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx).'%'); ?></td>
<td align="right" class="nowrap"><?php echo (($line->pa_ht == 0)?'n/a':price($line->marge_tx, null, null, null, null, $rounding).'%'); ?></td>
<?php
}
if (! empty($conf->global->DISPLAY_MARK_RATES)) {?>
<td align="right" class="nowrap"><?php echo price($line->marque_tx).'%'; ?></td>
<td align="right" class="nowrap"><?php echo price($line->marque_tx, null, null, null, null, $rounding).'%'; ?></td>
<?php } } ?>
<?php if ($line->special_code == 3) { ?>

View File

@@ -108,7 +108,7 @@ if ($action=='add') {
$object->unitfrequency=GETPOST('unitfrequency','int');
$object->frequency=$object->unitfrequency * GETPOST('nbfrequency','int');
//Ajout de la tache cron
//Adding cron task
$result = $object->create($user);
// test du Resultat de la requete
@@ -141,7 +141,7 @@ if ($action=='update') {
$object->unitfrequency=GETPOST('unitfrequency','int');
$object->frequency=$object->unitfrequency * GETPOST('nbfrequency','int');
//Ajout de la tache cron
//Adding cron task
$result = $object->update($user);
// test du Resultat de la requete
@@ -158,7 +158,7 @@ if ($action=='update') {
if ($action=='activate') {
$object->status=1;
//Ajout de la tache cron
//Adding cron task
$result = $object->update($user);
// test du Resultat de la requete
@@ -174,7 +174,7 @@ if ($action=='activate') {
if ($action=='inactive') {
$object->status=0;
//Ajout de la tache cron
//Adding cron task
$result = $object->update($user);
// test du Resultat de la requete

View File

@@ -77,7 +77,7 @@ if (!empty($search_label)) {
// Delete jobs
if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->delete){
//Delete de la tache cron
//Delete cron task
$object = new Cronjob($db);
$object->id=$id;
$result = $object->delete($user);

View File

@@ -51,7 +51,9 @@ if (isset($action) && ! empty($action))
require DOL_DOCUMENT_ROOT . '/ecm/class/ecmdirectory.class.php';
$ecmdirstatic = new EcmDirectory($db);
$ecmdirtmp = new EcmDirectory($db);
// This part of code is same than into file index.php for action refreshmanual TODO Remove duplicate
clearstatcache();
$diroutputslash=str_replace('\\', '/', $conf->$element->dir_output);
@@ -129,7 +131,6 @@ if (isset($action) && ! empty($action))
if ($fk_parent >= 0)
{
$ecmdirtmp=new EcmDirectory($db);
$ecmdirtmp->ref = 'NOTUSEDYET';
$ecmdirtmp->label = dol_basename($dirdesc['fullname']);
$ecmdirtmp->description = '';
@@ -163,7 +164,21 @@ if (isset($action) && ! empty($action))
}
}
// Loop now on each sql tree to check if dir exists
foreach($sqltree as $dirdesc) // Loop on each sqltree to check dir is on disk
{
$dirtotest=$conf->$element->dir_output.'/'.$dirdesc['fullrelativename'];
if (! dol_is_dir($dirtotest))
{
$mesg.=$dirtotest." not found onto disk. We delete from database dir with id=".$dirdesc['id']."<br>\n";
$ecmdirtmp->id=$dirdesc['id'];
$ecmdirtmp->delete($user,'databaseonly');
//exit;
}
}
$sql="UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cahce counting, we set to value -1 = "unknown"
dol_syslog("sql = ".$sql);
$db->query($sql);
}
}

View File

@@ -143,7 +143,7 @@ class EcmDirectory // extends CommonObject
$dir=$conf->ecm->dir_output.'/'.$this->getRelativePath();
$result=dol_mkdir($dir);
if ($result < 0) { $error++; $this->error="ErrorFailedToCreateDir"; }
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($this->db);
@@ -317,21 +317,23 @@ class EcmDirectory // extends CommonObject
/**
* Delete object on database and on disk
* Delete object on database and/or on disk
*
* @param User $user User that delete
* @param int $mode 'all'=delete all, 'databaseonly'=only database entry, 'fileonly' (not implemented)
* @return int <0 if KO, >0 if OK
*/
function delete($user)
function delete($user, $mode='all')
{
global $conf, $langs;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$error=0;
$result=0;
$relativepath=$this->getRelativePath(1); // Ex: dir1/dir2/dir3
if ($mode != 'databaseonly') $relativepath=$this->getRelativePath(1); // Ex: dir1/dir2/dir3
dol_syslog(get_class($this)."::delete remove directory ".$relativepath);
dol_syslog(get_class($this)."::delete remove directory id=".$this->id." mode=".$mode.(($mode == 'databaseonly')?'':' relativepath='.$relativepath));
$this->db->begin();
@@ -348,8 +350,11 @@ class EcmDirectory // extends CommonObject
return -2;
}
$file = $conf->ecm->dir_output . "/" . $relativepath;
$result=@dol_delete_dir($file);
if ($mode != 'databaseonly')
{
$file = $conf->ecm->dir_output . "/" . $relativepath;
$result=@dol_delete_dir($file);
}
if ($result || ! @is_dir(dol_osencode($file)))
{

View File

@@ -201,7 +201,10 @@ if ($action == 'confirm_deletesection' && GETPOST('confirm') == 'yes')
// Refresh directory view
if ($action == 'refreshmanual')
{
clearstatcache();
$ecmdirtmp = new EcmDirectory($db);
// This part of code is same than into file ecm/ajax/ecmdatabase.php TODO Remove duplicate
clearstatcache();
$diroutputslash=str_replace('\\','/',$conf->ecm->dir_output);
$diroutputslash.='/';
@@ -264,7 +267,7 @@ if ($action == 'refreshmanual')
//break; // We found parent, we can stop the while loop
}
else
{
{
dol_syslog("No");
//print "No<br>\n";
}
@@ -277,7 +280,6 @@ if ($action == 'refreshmanual')
if ($fk_parent >= 0)
{
$ecmdirtmp=new EcmDirectory($db);
$ecmdirtmp->ref = 'NOTUSEDYET';
$ecmdirtmp->label = dol_basename($dirdesc['fullname']);
$ecmdirtmp->description = '';
@@ -311,6 +313,19 @@ if ($action == 'refreshmanual')
}
}
// Loop now on each sql tree to check if dir exists
foreach($sqltree as $dirdesc) // Loop on each sqltree to check dir is on disk
{
$dirtotest=$conf->ecm->dir_output.'/'.$dirdesc['fullrelativename'];
if (! dol_is_dir($dirtotest))
{
$mesg.=$dirtotest." not found onto disk. We delete from database dir with id=".$dirdesc['id']."<br>\n";
$ecmdirtmp->id=$dirdesc['id'];
$ecmdirtmp->delete($user,'databaseonly');
//exit;
}
}
$sql="UPDATE ".MAIN_DB_PREFIX."ecm_directories set cachenbofdoc = -1 WHERE cachenbofdoc < 0"; // If pb into cahce counting, we set to value -1 = "unknown"
dol_syslog("sql = ".$sql);
$db->query($sql);

View File

@@ -39,7 +39,15 @@ $(document).ready( function() {
);
$('#refreshbutton').click( function() {
ecmBuildDatabase();
$.pleaseBePatient("<?php echo $langs->trans('PleaseBePatient'); ?>");
$.getJSON( "<?php echo DOL_URL_ROOT . '/ecm/ajax/ecmdatabase.php'; ?>", {
action: "build",
element: "ecm"
},
function(response) {
$.unblockUI();
location.href="<?php echo $_SERVER['PHP_SELF']; ?>";
});
});
});
@@ -67,16 +75,5 @@ function loadandshowpreview(filedirname,section)
});
}
ecmBuildDatabase = function() {
$.pleaseBePatient("<?php echo $langs->trans('PleaseBePatient'); ?>");
$.getJSON( "<?php echo DOL_URL_ROOT . '/ecm/ajax/ecmdatabase.php'; ?>", {
action: "build",
element: "ecm"
},
function(response) {
$.unblockUI();
location.href="<?php echo $_SERVER['PHP_SELF']; ?>";
});
};
</script>
<!-- END PHP TEMPLATE FOR JQUERY -->

View File

@@ -569,7 +569,7 @@ class Expedition extends CommonObject
if (preg_match('/^[\(]?PROV/i', $this->ref))
{
// On renomme repertoire ($this->ref = ancienne ref, $numfa = nouvelle ref)
// afin de ne pas perdre les fichiers attaches
// In order not to loose attached files
$oldref = dol_sanitizeFileName($this->ref);
$newref = dol_sanitizeFileName($numref);
$dirsource = $conf->expedition->dir_output.'/sending/'.$oldref;

View File

@@ -368,6 +368,7 @@ class Fichinter extends CommonObject
function setValid($user)
{
global $langs, $conf;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$error=0;
@@ -390,7 +391,7 @@ class Fichinter extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."fichinter";
$sql.= " SET fk_statut = 1";
$sql.= ", ref = '".$num."'";
$sql.= ", date_valid = ".$this->db->idate($now);
$sql.= ", date_valid = '".$this->db->idate($now)."'";
$sql.= ", fk_user_valid = ".$user->id;
$sql.= " WHERE rowid = ".$this->id;
$sql.= " AND entity = ".$conf->entity;
@@ -398,7 +399,52 @@ class Fichinter extends CommonObject
dol_syslog(get_class($this)."::setValid sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)
if (! $resql)
{
dol_syslog(get_class($this)."::setValid Echec update - 10 - sql=".$sql, LOG_ERR);
dol_print_error($this->db);
$error++;
}
if (! $error)
{
$this->oldref = '';
// Rename directory if dir was a temporary ref
if (preg_match('/^[\(]?PROV/i', $this->ref))
{
// Rename of object directory ($this->ref = old ref, $num = new ref)
// to not lose the linked files
$oldref = dol_sanitizeFileName($this->ref);
$snum = dol_sanitizeFileName($num);
$dirsource = $conf->ficheinter->dir_output.'/'.$oldref;
$dirdest = $conf->ficheinter->dir_output.'/'.$snum;
if (file_exists($dirsource))
{
dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest);
if (@rename($dirsource, $dirdest))
{
$this->oldref = $oldref;
dol_syslog("Rename ok");
// Suppression ancien fichier PDF dans nouveau rep
dol_delete_file($conf->ficheinter->dir_output.'/'.$snum.'/'.$oldref.'*.*');
}
}
}
}
// Set new ref and define current statut
if (! $error)
{
$this->ref = $num;
$this->statut=1;
$this->brouillon=0;
$this->date_validation=$now;
}
if (! $error)
{
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
@@ -408,24 +454,16 @@ class Fichinter extends CommonObject
$error++; $this->errors=$interface->errors;
}
// Fin appel triggers
}
if (! $error)
{
$this->db->commit();
return 1;
}
else
{
$this->db->rollback();
$this->error=join(',',$this->errors);
dol_syslog(get_class($this)."::setValid ".$this->error,LOG_ERR);
return -1;
}
if (! $error)
{
$this->db->commit();
return 1;
}
else
{
$this->db->rollback();
$this->error=$this->db->lasterror();
dol_syslog(get_class($this)."::setValid ".$this->error,LOG_ERR);
return -1;
}

21
htdocs/filefunc.inc.php Normal file → Executable file
View File

@@ -29,7 +29,7 @@
* \brief File that include conf.php file and commons lib like functions.lib.php
*/
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.4.1');
if (! defined('DOL_VERSION')) define('DOL_VERSION','3.4.2');
if (! defined('EURO')) define('EURO',chr(128));
// Define syslog constants
@@ -152,26 +152,29 @@ if (! empty($dolibarr_main_document_root_alt))
// Define DOL_MAIN_URL_ROOT and DOL_URL_ROOT
$tmp='';
$found=0;
$real_dolibarr_main_document_root=str_replace('\\','/',realpath($dolibarr_main_document_root)); // A) Ex: C:/xxx/dolibarr/htdocs
$pathroot=$_SERVER["DOCUMENT_ROOT"]; // B) Ex: C:/Program Files/wamp/www/
$paths=explode('/',str_replace('\\','/',$_SERVER["SCRIPT_NAME"])); // C) Ex: /dolibarr/htdocs/admin/system/phpinfo.php
$real_dolibarr_main_document_root=str_replace('\\','/',realpath($dolibarr_main_document_root)); // A) Value found into config file, to say where are store htdocs files. Ex: C:/xxx/dolibarr, C:/xxx/dolibarr/htdocs
$pathroot=$_SERVER["DOCUMENT_ROOT"]; // B) Value reported by web server setup, to say where is root of web server instance. Ex: C:/xxx/dolibarr, C:/xxx/dolibarr/htdocs
$paths=explode('/',str_replace('\\','/',$_SERVER["SCRIPT_NAME"])); // C) Value reported by web server, to say full path on filesystem of a file. Ex: /dolibarr/htdocs/admin/system/phpinfo.php
// Try to detect if $_SERVER["DOCUMENT_ROOT"]+start of $_SERVER["SCRIPT_NAME"] is $dolibarr_main_document_root. If yes, relative url to add before dol files is this start part.
$concatpath='';
foreach($paths as $tmppath) // We check to find (B+start of C)=A
{
if ($tmppath) $concatpath.='/'.$tmppath;
if (empty($tmppath)) continue;
$concatpath.='/'.$tmppath;
//if ($tmppath) $concatpath.='/'.$tmppath;
//print $_SERVER["SCRIPT_NAME"].'-'.$pathroot.'-'.$concatpath.'-'.$real_dolibarr_main_document_root.'-'.realpath($pathroot.$concatpath).'<br>';
if ($real_dolibarr_main_document_root == @realpath($pathroot.$concatpath)) // @ avoid warning when safe_mode is on.
{
$tmp3=$concatpath;
//print "Found relative url = ".$tmp3;
//print "Found relative url = ".$concatpath;
$tmp3=$concatpath;
$found=1;
break;
}
//else print "Not found yet for concatpath=".$concatpath."<br>\n";
}
if (! $found) $tmp=$dolibarr_main_url_root; // If autodetect fails (Ie: when using apache alias that point outside default DOCUMENT_ROOT.
if (! $found) $tmp=$dolibarr_main_url_root; // If autodetect fails (Ie: when using apache alias that point outside default DOCUMENT_ROOT).
else $tmp='http'.(((empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != 'on') && (empty($_SERVER["SERVER_PORT"])||$_SERVER["SERVER_PORT"]!=443))?'':'s').'://'.$_SERVER["SERVER_NAME"].((empty($_SERVER["SERVER_PORT"])||$_SERVER["SERVER_PORT"]==80||$_SERVER["SERVER_PORT"]==443)?'':':'.$_SERVER["SERVER_PORT"]).($tmp3?(preg_match('/^\//',$tmp3)?'':'/').$tmp3:'');
//print "tmp1=".$tmp1." tmp2=".$tmp2." tmp3=".$tmp3." tmp=".$tmp;
//print "tmp1=".$tmp1." tmp2=".$tmp2." tmp3=".$tmp3." tmp=".$tmp."\n";
if (! empty($dolibarr_main_force_https)) $tmp=preg_replace('/^http:/i','https:',$tmp);
define('DOL_MAIN_URL_ROOT', $tmp); // URL absolute root (https://sss/dolibarr, ...)
$uri=preg_replace('/^http(s?):\/\//i','',constant('DOL_MAIN_URL_ROOT')); // $uri contains url without http*

View File

@@ -354,7 +354,7 @@ class CommandeFournisseur extends CommonOrder
if (preg_match('/^[\(]?PROV/i', $this->ref))
{
// On renomme repertoire ($this->ref = ancienne ref, $num = nouvelle ref)
// afin de ne pas perdre les fichiers attaches
// In order not to loose attached files
$oldref = dol_sanitizeFileName($this->ref);
$newref = dol_sanitizeFileName($num);
$dirsource = $conf->fournisseur->dir_output.'/commande/'.$oldref;

View File

@@ -870,7 +870,7 @@ class FactureFournisseur extends CommonInvoice
if (preg_match('/^[\(]?PROV/i', $this->ref))
{
// On renomme repertoire facture ($this->ref = ancienne ref, $num = nouvelle ref)
// afin de ne pas perdre les fichiers attaches
// In order not to loose attached files
$facref = dol_sanitizeFileName($this->ref);
$snumfa = dol_sanitizeFileName($num);

View File

@@ -222,7 +222,7 @@ class ProductFournisseur extends Product
{
// Add price for this quantity to supplier
$sql = "INSERT INTO ".MAIN_DB_PREFIX."product_fournisseur_price(";
$sql.= "datec, fk_product, fk_soc, ref_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, unitcharges, fk_availability, entity, info_bits)";
$sql.= "datec, fk_product, fk_soc, ref_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, unitcharges, fk_availability, info_bits, entity)";
$sql.= " values('".$this->db->idate($now)."',";
$sql.= " ".$this->id.",";
$sql.= " ".$fourn->id.",";

View File

@@ -22,7 +22,7 @@
/**
* \file htdocs/fourn/commande/document.php
* \ingroup supplier
* \brief Page de gestion des documents attachees a une commande fournisseur
* \brief Management page of attached documents to a supplier order
*/
require '../../main.inc.php';

View File

@@ -105,16 +105,17 @@ if ($sttc)
}
if ($sall)
{
$sql.= " AND (cf.ref LIKE '%".$db->escape($sall)."%' OR cf.note LIKE '%".$db->escape($sall)."%')";
$sql.= " AND (cf.ref LIKE '%".$db->escape($sall)."%' OR cf.note_private LIKE '%".$db->escape($sall)."%' OR cf.note_public LIKE '%".$db->escape($sall)."%')";
}
if ($socid) $sql.= " AND s.rowid = ".$socid;
if (GETPOST('statut'))
{
$sql .= " AND fk_statut =".GETPOST('statut');
$sql .= " AND fk_statut =".GETPOST('statut','int');
}
$sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
$sql.= " ORDER BY $sortfield $sortorder ";
$sql.= $db->plimit($conf->liste_limit+1, $offset);
$resql = $db->query($sql);
if ($resql)

View File

@@ -265,7 +265,7 @@ if ($action == 'create' || $action == 'add_paiement')
$sql.= ' AND f.fk_soc = '.$object->socid;
$sql.= ' AND f.paye = 0';
$sql.= ' AND f.fk_statut = 1'; // Statut=0 => non validee, Statut=2 => annulee
$sql.= ' GROUP BY f.rowid, f.ref_supplier, f.total_ht, f.total_ttc, f.datef';
$sql.= ' GROUP BY f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc, f.datef';
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -86,7 +86,7 @@ $sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st";
if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql.= " WHERE s.fk_stcomm = st.id AND s.fournisseur = 1";
$sql.= " AND s.entity IN (".getEntity('societe', 1).")";
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc";
if ($socid) $sql .= " AND s.rowid = ".$socid;
if ($socname)
{
@@ -114,6 +114,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($conf->liste_limit+1, $offset);
dol_syslog('fourn/liste.php: sql='.$sql,LOG_DEBUG);
$resql = $db->query($sql);
if ($resql)
{

View File

@@ -46,20 +46,5 @@
</div>
<!-- Below here for internal analysis {{{ -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-5176876-1");
pageTracker._trackPageview();
</script>
<!-- }}} -->
</body>
</html>

View File

@@ -128,33 +128,6 @@ class Odf
return $this;
}
/**
* Assing a template variable
*
* @param string $key name of the variable within the template
* @param string $value replacement value
* @param bool $encode if true, special XML characters are encoded
* @throws OdfException
* @return odf
*/
public function setVarsHeadFooter($key, $value, $encode = true, $charset = 'ISO-8859')
{
$tag = $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT'];
// TODO Warning string may be:
// <text:span text:style-name="T13">{</text:span><text:span text:style-name="T12">aaa</text:span><text:span text:style-name="T13">}</text:span>
// instead of {aaa} so we should enhance this function.
//print $key.'-'.$value.'-'.strpos($this->contentXml, $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']).'<br>';
if (strpos($this->stylesXml, $tag) === false && strpos($this->stylesXml , $tag) === false) {
//if (strpos($this->contentXml, '">'. $key . '</text;span>') === false) {
throw new OdfException("var $key not found in the document");
//}
}
$value = $encode ? htmlspecialchars($value) : $value;
$value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value;
$this->vars[$tag] = str_replace("\n", "<text:line-break/>", $value);
return $this;
}
/**
* Evaluating php codes inside the ODT and output the buffer (print, echo) inplace of the code
*

View File

@@ -88,13 +88,13 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (80
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (802,80, '0','0','VAT Rate 0',1);
-- FRANCE (id country=1)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11, 1,'19.6','0','VAT standard rate (France hors DOM-TOM)',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 11, 1,'20','0','VAT standard rate (France hors DOM-TOM)',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 12, 1, '8.5','0','VAT standard rate (DOM sauf Guyane et Saint-Martin)',0);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 13, 1, '8.5','1','VAT standard rate (DOM sauf Guyane et Saint-Martin), non perçu par le vendeur mais récupérable par acheteur',0);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 14, 1, '5.5','0','VAT reduced rate (France hors DOM-TOM)',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 15, 1, '0','0','VAT Rate 0 ou non applicable',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 16, 1, '2.1','0','VAT super-reduced rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 17, 1, '7','0','VAT reduced rate',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 17, 1, '10','0','VAT reduced rate',1);
-- GERMANY (id country=5)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 51, 5, '19.0','0','allgemeine Ust.',1);

View File

@@ -58,7 +58,7 @@ ALTER TABLE llx_facture_fourn DROP INDEX uk_facture_fourn;
ALTER TABLE llx_facture_fourn DROP INDEX uk_facture_fourn_ref;
UPDATE llx_facture_fourn set ref = NULL where ref = '';
ALTER TABLE llx_facture_fourn ADD UNIQUE INDEX uk_facture_fourn_ref (ref, entity);
ALTER TABLE llx_facture_fourn CHANGE COLUMN facnumber ref_supplier varchar(30);
ALTER TABLE llx_facture_fourn CHANGE COLUMN facnumber ref_supplier varchar(50);
ALTER TABLE llx_facture_fourn ADD UNIQUE INDEX uk_facture_fourn_ref_supplier (ref_supplier, fk_soc, entity);
@@ -161,22 +161,22 @@ CREATE TABLE llx_c_revenuestamp
insert into llx_c_revenuestamp(rowid,fk_pays,taux,note,active) values (101, 10, '0.4', 'Timbre fiscal', 1);
ALTER TABLE llx_c_tva MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_c_tva MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_commandedet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_commandedet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_contratdet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_contratdet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_facturedet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_facturedet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_propaldet MODIFY COLUMN localtax1_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_propaldet MODIFY COLUMN localtax2_type varchar(10) NOT NULL DEFAULT '0';
ALTER TABLE llx_c_tva MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_c_tva MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_commande_fournisseurdet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_commandedet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_commandedet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_contratdet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_contratdet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_facture_fourn_det MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_facturedet_rec MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_facturedet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_facturedet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_propaldet MODIFY COLUMN localtax1_type varchar(10) DEFAULT NULL;
ALTER TABLE llx_propaldet MODIFY COLUMN localtax2_type varchar(10) DEFAULT NULL;
-- No more use type 7, use revenuse stamp instead
UPDATE llx_c_tva set localtax1=0, localtax1_type='0' where localtax1_type = '7';
UPDATE llx_c_tva set localtax2=0, localtax2_type='0' where localtax2_type = '7';

View File

@@ -409,5 +409,5 @@ PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (Tem
# oursin PDF Model
PDFOursinDescription=Invoice PDF template Oursin. A complete invoice template (Template alternative)
# NumRef Modules
TerreNumRefModelDesc1=Return numero with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
TerreNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0
TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module.

View File

@@ -7,6 +7,7 @@ CountryES=Spain
CountryDE=Germany
CountryCH=Switzerland
CountryGB=Great Britain
CountryUK=United Kingdom
CountryIE=Ireland
CountryCN=China
CountryTN=Tunisia

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