Compare commits

...
Sign in to create a new pull request.

511 commits

Author SHA1 Message Date
Hillel Coren
90cb83be90 Update version 2021-06-10 10:30:28 +03:00
Hillel Coren
1d2cfb2bd7 Update version 2021-06-10 10:24:59 +03:00
David Bomba
9b00ca926a
Merge pull request #5987 from turbo124/master
Fixes for quote status on migration
2021-06-10 08:13:05 +10:00
David Bomba
c389fa7026 Merge branch 'master' of https://github.com/turbo124/invoiceninja 2021-06-08 07:31:47 +10:00
David Bomba
515756f08a Minor fixes for invoice status 2021-06-08 07:30:55 +10:00
David Bomba
50e79da171
Merge pull request #5925 from turbo124/master
Adjustments for migration
2021-06-05 15:04:57 +10:00
David Bomba
b0d6a9ce5b Adjustments for migration 2021-06-05 13:38:00 +10:00
David Bomba
480d18d5ba
Merge pull request #5740 from fpellet/patch-1
Fix issue on Safari 14
2021-06-04 17:28:32 +10:00
David Bomba
9c8d0ba3cd
Merge pull request #5816 from turbo124/master
Fixes for migration
2021-05-26 07:30:35 +10:00
David Bomba
cf62014bc5 Merge branch 'master' of https://github.com/turbo124/invoiceninja 2021-05-26 07:30:05 +10:00
David Bomba
30c302d1b6 Add timestamps to company gateways migration 2021-05-26 07:29:53 +10:00
Hillel Coren
fef994b99e Adjust check data order 2021-05-23 09:09:57 +03:00
David Bomba
32bddeca44 Add client and contacts to ninja migration 2021-05-20 14:13:07 +10:00
Florent Pellet
d61a3d89b7
Fix issue on Safari 14
Safari 14 freeze if the preview is enable

https://github.com/invoiceninja/invoiceninja/issues/4305
2021-05-18 15:30:01 +02:00
Hillel Coren
54a9e63851 Update version 2021-05-18 00:36:26 +03:00
David Bomba
94140c173a
Merge pull request #5730 from turbo124/master
Fixes for product migration
2021-05-18 07:31:34 +10:00
David Bomba
71d047dd53 Fixes for product migration 2021-05-18 07:31:09 +10:00
=
f721cdbe64 Fixes for migration resources 2021-05-16 20:04:01 +10:00
David Bomba
60e21cc1be
Merge pull request #5705 from turbo124/master
Update migration output.
2021-05-15 11:12:55 +10:00
David Bomba
b41249eda6 export ninja tokens 2021-05-12 20:46:35 +10:00
David Bomba
51e111f973 migration hosted tokens 2021-05-12 20:44:22 +10:00
David Bomba
897c134ee3
Merge pull request #5687 from turbo124/master
Fixes for migration
2021-05-12 17:28:51 +10:00
David Bomba
77700a6a0d Merge branch 'master' of https://github.com/turbo124/invoiceninja 2021-05-12 17:28:19 +10:00
David Bomba
136e8bf98b Fixes for migration designs 2021-05-12 17:28:17 +10:00
David Bomba
36c5d915f6 migrations 2021-05-11 16:12:38 +10:00
David Bomba
e63b3cb76a Return early from try block 2021-05-10 14:11:26 +10:00
David Bomba
a5b0348da3
Merge pull request #5605 from turbo124/master
Fixes for wrong designs
2021-05-04 23:35:57 +10:00
David Bomba
a272956df2 Fixes for wrong designs 2021-05-04 12:40:14 +10:00
David Bomba
d619522e2a
Merge pull request #5590 from turbo124/master
Code of conduct
2021-05-03 21:25:56 +10:00
David Bomba
22178f9476 Code of Conduct 2021-05-03 21:25:14 +10:00
David Bomba
64ac8299e4 minor fixes 2021-05-03 13:57:33 +10:00
David Bomba
ff888e8cf2 fixes for migration 2021-05-03 13:53:57 +10:00
David Bomba
b65c501f02
Merge pull request #5558 from turbo124/master
Fixes for migration
2021-04-29 17:31:15 +10:00
David Bomba
f78443e6d9 check decryption 2021-04-29 14:44:44 +10:00
David Bomba
5159288bb8 fixes for hosted migration 2021-04-29 12:48:54 +10:00
David Bomba
4e04e2af28
Merge pull request #5556 from turbo124/master
Hosted migration
2021-04-29 12:36:19 +10:00
David Bomba
d3e44b779c Fixes for hosted migration 2021-04-29 12:35:56 +10:00
David Bomba
1d49f1fe21 Fixes for lang conflict 2021-04-29 12:31:49 +10:00
David Bomba
f395434f2a Improve migration flow for hosted users 2021-04-29 12:31:09 +10:00
David Bomba
c975045c35 updated texts 2021-04-28 09:56:55 +10:00
David Bomba
ec70871181
Merge pull request #5542 from turbo124/master
Updated texts
2021-04-28 09:44:23 +10:00
David Bomba
c90eac806f Texts 2021-04-28 09:43:35 +10:00
Hillel Coren
0ef5eb24d8 Enable migration for hosted 2021-04-25 10:44:51 +03:00
Hillel Coren
b645356122 Hide migration on hosted 2021-04-25 08:43:49 +03:00
David Bomba
f3927861bc Merge branch 'master' of https://github.com/turbo124/invoiceninja 2021-04-19 13:36:06 +10:00
David Bomba
20f8c7e1e3 minor fixes for migration 2021-04-19 13:36:00 +10:00
Hillel Coren
2bdb26dd06 Update version 2021-04-18 09:39:21 +03:00
David Bomba
191b4f3f5d
Merge pull request #5459 from turbo124/master
Migration fixes.
2021-04-18 07:02:19 +10:00
David Bomba
7dc1929430 Merge branch 'master' of https://github.com/turbo124/invoiceninja 2021-04-18 07:01:20 +10:00
David Bomba
71acb1189e Fixes for recurring status 2021-04-18 07:01:11 +10:00
David Bomba
5630193dfe Fixes for credit card meta data 2021-04-16 12:05:14 +10:00
David Bomba
2f7e91b46d textsg 2021-04-14 07:29:35 +10:00
David Bomba
7fdc8e0d00
Merge pull request #5427 from turbo124/master
Update translations
2021-04-14 07:26:39 +10:00
David Bomba
3fed6b7771
Merge branch 'master' into master 2021-04-14 07:25:37 +10:00
David Bomba
dd2d10a54f Update translations 2021-04-14 07:22:57 +10:00
Hillel Coren
ba0260cff5 Update lang files 2021-04-12 20:07:07 +03:00
David Bomba
2d08738ae6
Merge pull request #5357 from turbo124/master
Migrate client task rate.
2021-04-07 07:53:10 +10:00
David Bomba
7184f0bcdc migrate client task rate 2021-04-07 07:52:49 +10:00
David Bomba
a553bb8dff migrate client task rate 2021-04-07 07:52:13 +10:00
Hillel Coren
cbac71435e Update version 2021-04-02 11:22:43 +03:00
David Bomba
98d62fa340
Merge pull request #5320 from turbo124/master
disable 2fa on migration
2021-04-02 10:18:59 +11:00
David Bomba
49ec098b11 disable 2fa on migration 2021-04-02 10:18:39 +11:00
Hillel Coren
79179b923e Update version 2021-04-01 12:10:25 +03:00
Benjamin Beganović
64e7b1d4df
Update bug_report.md 2021-04-01 11:06:31 +02:00
David Bomba
b4e1067b15
Merge pull request #5306 from turbo124/master
Remove has_tasks
2021-04-01 10:17:38 +11:00
David Bomba
d659d6dd90 remove has_tasks 2021-04-01 10:17:15 +11:00
David Bomba
fb294a7f7e
Merge pull request #5302 from turbo124/master
Add has_tasks and has_expenses to migration transformer
2021-03-31 21:31:57 +11:00
David Bomba
eaaf954244 Add has_tasks and has_expenses to migration transformer 2021-03-31 21:31:25 +11:00
David Bomba
be4f184d97
Merge pull request #5301 from turbo124/master
minor fix for datetime
2021-03-31 19:39:14 +11:00
David Bomba
10f1ac93ac minor fix for datetime 2021-03-31 19:38:57 +11:00
David Bomba
e6915f36a5
Merge pull request #5283 from turbo124/master
Minor fixes for migration
2021-03-30 20:29:42 +11:00
David Bomba
ce18449cc7 Minor fixes for migration 2021-03-30 20:29:20 +11:00
Benjamin Beganović
cd421c4558
Merge pull request #5282 from beganovich/v4-3003-migration-improvements
(v4) Migration improvements & bug fixes
2021-03-30 10:50:18 +02:00
Benjamin Beganović
25dca51b5e - Show message if migration didn't start properly
- Update completed.blade.php with errors message
- Better status checking in CompleteService.php
2021-03-30 10:49:29 +02:00
Benjamin Beganović
3d69498c6e
Merge pull request #5261 from beganovich/v4-2603-improve-authentication-process
(v4) Improve authentication workflow
2021-03-26 14:14:40 +01:00
Benjamin Beganović
2aa850439c Improve authentication workflow 2021-03-26 14:14:08 +01:00
Benjamin Beganović
4756dd58f9
Merge pull request #5217 from beganovich/v4-2203-translations-sync
Sync translations
2021-03-22 11:41:24 +01:00
Benjamin Beganović
6d4d639c65 update translations 2021-03-22 11:40:37 +01:00
David Bomba
d08b6e874f
Merge pull request #5212 from turbo124/master
Add missing defaults
2021-03-22 21:05:25 +11:00
David Bomba
65cf2752a6 Add missing defaults 2021-03-22 21:05:00 +11:00
David Bomba
d911c24421 Update texts 2021-03-20 13:47:35 +11:00
David Bomba
3afc70bfec
Update README.md 2021-03-20 09:02:13 +11:00
Hillel Coren
e3637197d7 Update version 2021-03-17 13:07:19 +02:00
David Bomba
3542d7fffb
Merge pull request #5161 from turbo124/master
Migration fixes
2021-03-17 22:05:24 +11:00
David Bomba
7fce31e82e
Merge branch 'master' into master 2021-03-17 22:05:19 +11:00
David Bomba
59a1596732 Fixes for migration 2021-03-17 20:42:17 +11:00
Hillel Coren
63eeb28bc4 Update languages 2021-03-17 08:39:34 +02:00
David Bomba
60e0154ac6 Adjust counter frequency in migration 2021-03-16 10:32:12 +11:00
David Bomba
b94e4c602e rtrim trailing slash 2021-03-16 09:04:27 +11:00
David Bomba
c608336c04 Fixes for missing translations 2021-03-16 09:01:41 +11:00
Benjamin Beganović
2e90506a5e
Update bug_report.md 2021-03-09 18:06:28 +01:00
David Bomba
94624e6719
Merge pull request #5061 from turbo124/master
Add Russian language
2021-03-09 08:07:43 +11:00
David Bomba
84774d208c Add Russian language 2021-03-09 08:06:33 +11:00
David Bomba
1cba176139
Merge pull request #5039 from turbo124/master
Add translations
2021-03-05 20:31:10 +11:00
David Bomba
6c759a8844
Merge branch 'master' into master 2021-03-05 20:31:05 +11:00
David Bomba
a631681f73 Add translations 2021-03-05 20:27:45 +11:00
Hillel Coren
e1f15277d6 Update version 2021-02-28 08:00:34 +02:00
David Bomba
7e4593cd89
Merge pull request #5004 from turbo124/master
Fixes for custom value nullables
2021-02-28 12:25:36 +11:00
David Bomba
d32ac5327c Fixes for custom value nullables 2021-02-28 12:25:15 +11:00
Hillel Coren
e72d8ecfa2 Update PHP min version to 7.1 2021-02-19 10:20:45 +02:00
Hillel Coren
9a5e429942 Update docs 2021-02-17 13:29:34 +02:00
Hillel Coren
20ecad0774 Update version 2021-02-17 12:47:47 +02:00
Hillel Coren
044220d570 Merge branch 'master' of github.com:invoiceninja/invoiceninja 2021-02-17 12:46:33 +02:00
Hillel Coren
ac13be9e01 Update lang files 2021-02-17 12:46:24 +02:00
Benjamin Beganović
66117cd456
Update texts.php 2021-02-17 11:42:17 +01:00
Hillel Coren
87eb98ca20 Update lang files 2021-02-16 18:39:53 +02:00
Hillel Coren
3b67e2a8c8 Merge branch 'master' of github.com:invoiceninja/invoiceninja 2021-02-16 18:34:12 +02:00
Hillel Coren
99237898de Update lang file 2021-02-16 18:33:57 +02:00
Benjamin Beganović
d5d917e3f8
Update texts.php 2021-02-16 13:33:16 +01:00
David Bomba
14b67a2053
Merge pull request #4903 from turbo124/master
Update texts
2021-02-15 07:54:07 +11:00
David Bomba
6546b41e26 Update texts 2021-02-15 07:52:34 +11:00
David Bomba
b31fa80b5a Update texts 2021-02-15 07:51:21 +11:00
David Bomba
e42964ffaf
Merge pull request #4900 from myles1729/patch-1
Update README.md
2021-02-14 17:18:56 +11:00
myles1729
4c2a4fd142
Update README.md
Link to v5 self-host instructions broken - I think this is the correct one
2021-02-14 13:31:44 +13:00
David Bomba
8aa44f6607 Merge branch 'master' of https://github.com/turbo124/invoiceninja 2021-02-10 09:42:24 +11:00
David Bomba
3efb8cf252 Fixes for frequenceis 2021-02-10 09:40:55 +11:00
David Bomba
aca292b737
Merge pull request #4849 from turbo124/master
Minor fixes for migration
2021-02-09 08:09:40 +11:00
David Bomba
7d268604b7 Fixes for quote status 2021-02-09 07:59:40 +11:00
David Bomba
c488602b74 Add more properties for migration 2021-02-08 08:43:23 +11:00
David Bomba
65795b1271
Merge pull request #4844 from turbo124/master
add start migration texts
2021-02-08 08:25:48 +11:00
David Bomba
5baef3f69a add start migration texts 2021-02-04 11:08:56 +11:00
Hillel Coren
0ff600fde7 Update languages 2021-02-03 23:30:59 +02:00
Hillel Coren
67b2758d3f Update version 2021-02-03 23:26:51 +02:00
David Bomba
4e67b8b4cd
Merge pull request #4829 from turbo124/master
Fixes for custom values in  migration
2021-02-04 07:16:29 +11:00
David Bomba
5a1cdf8dfa Fixes for custom values in migration 2021-02-04 07:16:09 +11:00
David Bomba
5eb3f89650
Merge pull request #4826 from turbo124/master
Fixes for migrations
2021-02-03 23:30:56 +11:00
David Bomba
8770f0d289 fixes for migrations 2021-02-03 23:30:05 +11:00
David Bomba
905da88348
Merge pull request #4821 from turbo124/master
Additional logging when generating migration data inside V4.
2021-02-03 09:27:05 +11:00
David Bomba
e5716ae6c0 Fixes for migrations where the gateway is no longer supported in V5 2021-02-03 07:28:24 +11:00
David Bomba
df32d61552
Merge pull request #4811 from turbo124/master
Fixes for lang file
2021-02-01 20:43:53 +11:00
David Bomba
2abc7f570b Fixes for lang file 2021-02-01 20:43:16 +11:00
=
4bc41fbf8e Fixes for lang file 2021-02-01 18:37:18 +11:00
David Bomba
f594eea8e8
Merge pull request #4806 from turbo124/master
Update  lang files
2021-02-01 09:05:06 +11:00
David Bomba
239c3e5d8d
Merge branch 'master' into master 2021-02-01 09:04:57 +11:00
David Bomba
350de90af0 Merge branch 'master' of https://github.com/turbo124/invoiceninja 2021-02-01 09:02:44 +11:00
David Bomba
b99c40714f Update lang files 2021-02-01 09:02:33 +11:00
David Bomba
9197973eb4
Merge pull request #4804 from Akjo4712/patch-2
Update feature_request.md
2021-01-31 21:54:17 +11:00
Akjo4712
79edec14c8
Update feature_request.md 2021-01-31 11:21:47 +01:00
Hillel Coren
9962cc731b Merge branch 'master' of github.com:invoiceninja/invoiceninja 2021-01-31 08:41:49 +02:00
Hillel Coren
a3abff8766 Update lang file 2021-01-31 08:41:36 +02:00
David Bomba
825eb85d1c
Merge pull request #4801 from turbo124/master
Minor fix for fees and limits
2021-01-30 11:12:51 +11:00
Benjamin Beganović
e50766f471
Merge pull request #4789 from Akjo4712/patch-1
Fix Bold Text in Issue Template
2021-01-28 14:31:03 +01:00
Akjo4712
738bd0427e
Fix Bold Text in Issue Template 2021-01-28 14:29:41 +01:00
David Bomba
71146c9c94 Merge branch 'master' of https://github.com/turbo124/invoiceninja 2021-01-28 16:07:09 +11:00
David Bomba
d77e7622f7 Minor fixes 2021-01-28 16:06:57 +11:00
David Bomba
3afeed6868
Merge pull request #4762 from turbo124/master
Refactor client and vendor numbers
2021-01-26 16:20:33 +11:00
David Bomba
57185f1917 Refactor client and vendor numbers 2021-01-26 16:20:04 +11:00
David Bomba
360f47754b
Merge pull request #4760 from turbo124/master
Fixes for client / vendor numbering
2021-01-25 23:29:27 +11:00
David Bomba
cde03d132b Fixes for client / vendor numbering 2021-01-25 21:32:29 +11:00
=
fc4cbf335a Typo 2021-01-23 22:15:08 +11:00
David Bomba
623dd69182
Merge pull request #4749 from turbo124/master
Fixes for migration
2021-01-23 20:19:24 +11:00
David Bomba
248f95b295 Fixes for migration 2021-01-23 20:18:29 +11:00
David Bomba
a941cb387e
Merge pull request #4748 from turbo124/master
fixes for travis
2021-01-23 19:56:32 +11:00
David Bomba
b245147844 fixes for travos 2021-01-23 19:52:48 +11:00
David Bomba
53e3b9a940
Merge pull request #4746 from turbo124/master
Update Framework Dependencies
2021-01-22 21:54:25 +11:00
David Bomba
ee92e15668 Update framework dependencies 2021-01-22 21:51:59 +11:00
David Bomba
fa5281f5e5 Security fixes + remove Cybersource gateway 2021-01-22 21:18:05 +11:00
David Bomba
15020e201b Fixes for composer.lock and .json 2021-01-22 15:20:35 +11:00
David Bomba
5c48a83705 Security updates 2021-01-22 08:43:12 +11:00
Hillel Coren
3cc3548f69 Correct typo 2021-01-21 07:59:30 +02:00
Hillel Coren
f7d1d95e3a Update lang file 2021-01-20 20:49:30 +02:00
Hillel Coren
8b7b4b138e Update version 2021-01-20 10:54:49 +02:00
David Bomba
d994994ac5
Merge pull request #4731 from turbo124/master
Fixes for contact imports
2021-01-20 18:42:50 +11:00
David Bomba
309cb5f1f7 Fixes for contact imports 2021-01-20 09:35:19 +11:00
Hillel Coren
692594fe64 Update version 2021-01-18 09:16:22 +02:00
David Bomba
68295d6bcc
Merge pull request #4696 from turbo124/master
Fixes for contacts migration
2021-01-15 22:37:06 +11:00
David Bomba
d84af6be3a Fixes for contacts migration 2021-01-15 22:34:04 +11:00
Hillel Coren
39adbf3367 Update version 2021-01-14 09:05:09 +02:00
David Bomba
251043137d
Merge pull request #4676 from turbo124/master
Remove logo from company migration
2021-01-13 20:14:58 +11:00
David Bomba
2f9749ce03 remove logo from company migration 2021-01-13 20:13:48 +11:00
Hillel Coren
fdc9d6b4ff Update version 2021-01-10 12:33:51 +02:00
David Bomba
bcab38b364
Merge pull request #4662 from turbo124/master
Document migration:
2021-01-10 21:20:00 +11:00
David Bomba
c9bf7131b5 Document migration: 2021-01-10 21:16:40 +11:00
Hillel Coren
dbbd84b222 Update lang files 2021-01-06 08:36:44 +02:00
Hillel Coren
4234e50408 Update version 2021-01-06 08:32:09 +02:00
David Bomba
67a7778ce5
Merge pull request #4635 from turbo124/master
change properties for task and task_status in migration
2021-01-06 10:37:36 +11:00
David Bomba
b7eb94548f change properties for task and task_status in migration 2021-01-06 10:36:37 +11:00
David Bomba
ab2063ab2f Update issue templates 2021-01-05 13:27:51 +11:00
=
20de4ede89 Merge branch 'master' of https://github.com/invoiceninja/invoiceninja 2021-01-01 20:10:55 +11:00
=
f4714e6603 fixes for payment type 2021-01-01 20:10:40 +11:00
Hillel Coren
f24c270139 Update version 2021-01-01 08:23:50 +02:00
David Bomba
18cde4bc5f
Merge pull request #4589 from beganovich/v4-toggle-parent-when-force
(v4) Toggle parent company when clicking on force checkbox (migration)
2020-12-30 10:20:57 +11:00
=
95989143f9 Fixes for import 2020-12-30 08:59:01 +11:00
=
02ef83213a Merge branch 'master' of https://github.com/invoiceninja/invoiceninja 2020-12-30 08:32:33 +11:00
=
12c885a377 fixes for recurring import 2020-12-30 08:32:19 +11:00
Benjamin Beganović
c469ef6671 force toggle parent company 2020-12-29 12:37:40 +01:00
Hillel Coren
b26399713d Update version 2020-12-29 08:07:24 +02:00
=
14f8150546 Migrate invitations 2020-12-29 10:48:13 +11:00
=
b4b28385e5 Fixes for company gateways 2020-12-28 17:04:44 +11:00
=
e83eb6d657 Improve migration for gateways and fees and limits 2020-12-28 10:14:58 +11:00
David Bomba
0a793d898a Update issue templates 2020-12-26 08:35:12 +11:00
=
de40281e22 Fixes for migrating online payment gateways 2020-12-25 14:15:43 +11:00
Hillel Coren
00718d15df Update version 2020-12-17 08:12:55 +02:00
David Bomba
38ee8352d8
Merge pull request #4494 from turbo124/master
Add account variables into migration
2020-12-15 08:53:05 +11:00
David Bomba
def4d1aa9f Add account variables into migration 2020-12-15 08:52:29 +11:00
Benjamin Beganović
d35b5f66ad
Merge pull request #4466 from beganovich/v4-support-for-api-key
(v4) Add support for X-Api-Token in migration
2020-12-14 10:12:34 +01:00
Benjamin Beganović
40bb6ad9ab
Merge branch 'master' into v4-support-for-api-key 2020-12-14 10:12:01 +01:00
Hillel Coren
39a58f909e Update lang files 2020-12-10 21:33:43 +02:00
Benjamin Beganović
aa9af574b6 Add support for X-Api-Token: 2020-12-10 15:04:59 +01:00
Hillel Coren
b541e56071 Update version 2020-11-28 20:30:49 +02:00
David Bomba
c1ec590782
Merge pull request #4367 from mlq/fix/migration-ksort
Call ksort correctly for migration files
2020-11-27 06:56:02 +11:00
Moritz Lipp
f3dcd2924c Call ksort correctly for migration files 2020-11-26 15:53:45 +01:00
Hillel Coren
61d3737816 Update version 2020-11-25 12:31:45 +02:00
David Bomba
40005f3f25
Merge pull request #4359 from turbo124/master
Fixes for migrations
2020-11-25 20:07:08 +11:00
David Bomba
7968b2bb5f Fixes for migrations 2020-11-25 20:06:37 +11:00
David Bomba
ae52ea5971 Random migration datasets 2020-11-25 11:23:51 +11:00
David Bomba
fdaf513267 sort alphabetically 2020-11-24 14:20:44 +11:00
David Bomba
715998e67a Reorder migrations 2020-11-23 23:55:17 +11:00
David Bomba
033bb5c957
Merge pull request #4353 from turbo124/master
Fixes for docs
2020-11-23 22:16:24 +11:00
David Bomba
f9df879a3e Fixes for docs 2020-11-23 22:15:59 +11:00
David Bomba
1a1865045d
Merge pull request #4352 from turbo124/master
Fixes for docs
2020-11-23 22:15:14 +11:00
David Bomba
6188b4d9cb Fixes for docs 2020-11-23 22:14:56 +11:00
David Bomba
fc35c00603
Merge pull request #4351 from turbo124/master
Fixes for docs
2020-11-23 22:14:13 +11:00
David Bomba
7aad5ae124 Fixes for docs 2020-11-23 22:13:53 +11:00
David Bomba
6f15447c5f
Merge pull request #4350 from turbo124/master
Fixes for docs
2020-11-23 22:12:13 +11:00
David Bomba
9017ff4344 Fixes for docs 2020-11-23 22:11:55 +11:00
David Bomba
86993ba456
Merge pull request #4349 from turbo124/master
Improve docs for v4 / v5
2020-11-23 22:09:30 +11:00
David Bomba
9ccfc96055 Fixes for documentation 2020-11-23 22:04:58 +11:00
David Bomba
53e40a4e6a Fixes for purging existing company 2020-11-23 13:07:32 +11:00
David Bomba
72d8c567bd
Merge pull request #4348 from turbo124/master
Migration fixes
2020-11-23 09:52:36 +11:00
David Bomba
587c3fd2e9 remove carbon array from migration resources and transform to date string 2020-11-23 08:25:49 +11:00
David Bomba
52d15bc388 Fixes for carbon types 2020-11-22 16:42:12 +11:00
Benjamin Beganović
ec6b3a00cc
Merge pull request #4331 from beganovich/v4-fix-issue-with-getting-companies-for-migration
(v4) Fix issue with getting companies for migration
2020-11-19 12:32:21 +01:00
Benjamin Beganović
716b818a41 Fix issue with listing companies in v4
- Endpoint typo fix
2020-11-19 12:29:49 +01:00
David Bomba
eb6cddeb08 minor fixes for export transformers 2020-11-17 07:32:36 +11:00
David Bomba
12c928c5a0 Merge branch 'master' of https://github.com/turbo124/invoiceninja 2020-11-17 07:31:24 +11:00
David Bomba
a94808cf65 minor fixes for migration 2020-11-16 21:32:58 +11:00
David Bomba
1254ba0ee0
Merge pull request #4289 from beganovich/v4-migration-fixes
(v4) (wip) (no-merge) Migration fixes & improvements
2020-11-14 17:03:07 +11:00
David Bomba
8351d5a9fb
Merge branch 'master' into v4-migration-fixes 2020-11-14 17:02:58 +11:00
Hillel Coren
a42597098f Update lang file 2020-11-12 20:26:17 +02:00
Benjamin Beganović
666a9398d3 Fix the way we process migration 2020-11-12 11:04:50 +01:00
Benjamin Beganović
4019ff08d6 Final touch on CompleteService 2020-11-11 18:26:33 +01:00
David Bomba
31d8ecc2d0
Merge pull request #4288 from beganovich/v4-fix-for-migration-start
(v4) Fix absolute route /migration/start
2020-11-11 04:25:46 +11:00
Benjamin Beganović
d24d2e4b93 Support multiple migrations at once 2020-11-10 16:20:02 +01:00
Benjamin Beganović
c4b147d7c8 Fix absolute route /migration/start 2020-11-10 14:29:38 +01:00
=
cdc054a10f Fixes for migration 2020-11-07 21:13:21 +11:00
=
d2e9d3d8b4 Remove is_deleted from v4 side of task_statuses 2020-11-07 18:57:48 +11:00
Hillel Coren
cadd1a3b44 Update version 2020-11-05 10:51:09 +02:00
David Bomba
a86c5006af Fixes for company gateway schema 2020-11-04 11:36:30 +11:00
David Bomba
146df11c1f Refactor company logo URL 2020-11-04 11:21:28 +11:00
Hillel Coren
3190e5ac4d Update language files 2020-11-01 17:49:26 +02:00
Hillel Coren
33c1c7e646 Update version 2020-11-01 17:44:27 +02:00
Hillel Coren
08efcc0342 Minor fixes 2020-11-01 17:34:29 +02:00
Hillel Coren
d8a0462e1b Merge branch 'master' of github.com:invoiceninja/invoiceninja 2020-11-01 16:03:18 +02:00
Hillel Coren
3ab4d62bdf Remove Skrill to fix #4199 2020-11-01 16:02:56 +02:00
David Bomba
3e0b7a0659
Merge pull request #4245 from turbo124/master
Fix for tasks deleted_at
2020-11-01 21:06:16 +11:00
David Bomba
5561b9dc05 Fix for tasks deleted_at 2020-11-01 21:05:59 +11:00
David Bomba
69beb3b05d
Merge pull request #4244 from turbo124/master
Fix for task deleted_at
2020-11-01 21:02:18 +11:00
David Bomba
71d7b3217a Fix for task deleted_at 2020-11-01 21:01:51 +11:00
Hillel Coren
6c54a7fa2b Update lang file 2020-11-01 11:58:11 +02:00
David Bomba
0749bc570c
Merge pull request #4243 from turbo124/master
Fixes for migration
2020-11-01 20:46:24 +11:00
David Bomba
f39efb939b Fixes for migration 2020-11-01 20:45:51 +11:00
David Bomba
964be94407
Merge pull request #4241 from turbo124/master
Fix for expiry failure
2020-11-01 19:58:09 +11:00
David Bomba
303bfce10f Fix for expiry failure 2020-11-01 19:57:44 +11:00
David Bomba
8e223c83a5
Merge pull request #4238 from turbo124/master
Migration work for V4 -> V5
2020-10-31 16:36:38 +11:00
David Bomba
c19cebef80 Fixes for migration 2020-10-31 11:45:49 +11:00
David Bomba
fac2c80fe7 migration for vendors 2020-10-31 08:12:45 +11:00
David Bomba
b6e6518492 Fixes for type status 2020-10-30 23:15:45 +11:00
David Bomba
d5ea6fec60 Fixes for query 2020-10-30 23:01:18 +11:00
David Bomba
0bdda6a529 Migration for projects 2020-10-30 22:55:14 +11:00
David Bomba
38c017fdf8 Migration for projects 2020-10-30 22:53:50 +11:00
David Bomba
aff75e1d59 Tasks, Expenses migration 2020-10-30 19:52:45 +11:00
David Bomba
0d1c279f64 Fixes for payment meta data types 2020-10-28 16:26:08 +11:00
Hillel Coren
0962e0e301 Update lang file 2020-10-15 22:31:37 +03:00
David Bomba
5d6b86b6c2 Fix for type casting language id 2020-10-14 07:46:55 +11:00
David Bomba
f6315cb640 Disable custom designs in migration to V5 2020-10-07 10:09:34 +11:00
David Bomba
5ecd4da153 minor fix for recurring numbers 2020-10-06 11:44:22 +11:00
David Bomba
d79c936875
Merge pull request #4130 from beganovich/fix-migration-urls
(v4) Fixed migration urls
2020-10-05 19:46:57 +11:00
Benjamin Beganović
ac49832ffd Cross account migration message update 2020-10-05 10:29:11 +02:00
Benjamin Beganović
0621c215e7 Fix migration urls 2020-10-05 09:50:32 +02:00
David Bomba
2384e3d3e8 Recurring migration 2020-10-05 08:56:02 +11:00
David Bomba
9afd6c6fc2 recurring migration 2020-10-02 16:34:12 +10:00
David Bomba
4c87d6864a Recurring migrations 2020-10-02 08:19:29 +10:00
David Bomba
42ada7e3f8 Recurring migration 2020-10-02 07:38:42 +10:00
David Bomba
1e10bc3613 Working on recurring migration 2020-09-29 09:25:45 +10:00
David Bomba
f34df17d36
Merge pull request #4114 from turbo124/master
Fixes for migration V4 -> V5
2020-09-29 07:12:16 +10:00
David Bomba
a3029c4c74 Fixes for invoice item types 2020-09-29 07:11:23 +10:00
Hillel Coren
bac27c8609 Update lang file 2020-08-30 07:03:47 +03:00
David Bomba
e0cda24c09 Add referral_code to company transformer 2020-08-28 15:50:10 +10:00
Hillel Coren
49242a1469 Clarify v5 status 2020-08-27 15:28:54 +03:00
David Bomba
266abc8dd1
Merge pull request #3966 from bugzbrown/patch-1
Update Kanban column to allow vertical scroll
2020-08-05 23:04:34 +10:00
Gregory Brown
2e1a49a0cf
Update style on Kanban column to allow vert scroll
Update the Kanban Column to allow for vertical scroll with the screen. This makes it easier for your to scroll horizontally when you have a very big list.
It's a quick workaround that fixes user experience for users with small screens and big lists.
2020-08-05 09:22:19 -03:00
David Bomba
7cbda60f46
Merge pull request #3961 from turbo124/master
Improve handling for fees and limits and stale contacts
2020-08-05 10:14:16 +10:00
David Bomba
fe563fd423 Add additional fields for migration to V5 2020-08-05 10:13:05 +10:00
David Bomba
ab652c6ad0 Fixes for fees and limits - migration 2020-08-05 09:19:24 +10:00
David Bomba
4d4b318674
Merge pull request #3917 from woodspire/fix/missing-subscription-events
Add subscription events.
2020-07-21 15:05:26 +10:00
Felix Labrecque
7f3ebffb36 Add subscription events. 2020-07-20 17:37:58 -04:00
David Bomba
1f81f03e45
Merge pull request #3864 from turbo124/master
Remove invites from transformer
2020-06-30 13:19:19 +10:00
David Bomba
608734b652 Remove invites from transformer 2020-06-30 13:18:55 +10:00
David Bomba
d7d40172cf
Merge pull request #3863 from turbo124/master
Fixes for migrations including implementing migrations for payment terms
2020-06-30 10:46:07 +10:00
David Bomba
406445dbb3 Catch null floats 2020-06-30 10:44:50 +10:00
David Bomba
8ee1240cf7 Merge branch 'master' of https://github.com/invoiceninja/invoiceninja 2020-06-30 09:06:32 +10:00
David Bomba
d7f5657dda Minor fix for null client balancE 2020-06-30 09:02:18 +10:00
Hillel Coren
40cca935dd Update languages 2020-06-28 14:23:18 +03:00
Hillel Coren
48fb1d0bff Merge branch 'master' of github.com:invoiceninja/invoiceninja 2020-06-28 14:09:42 +03:00
Hillel Coren
b35c20e511 Update version 2020-06-28 14:09:32 +03:00
David Bomba
fd443cc4c2
Merge pull request #3845 from beganovich/v1-2606-fix-migration-routing
Fix absolute redirecting with url() helper
2020-06-27 07:47:24 +10:00
Benjamin Beganović
4b3d3d4460 Fix absolute redirecting with url() helper 2020-06-26 12:38:45 +02:00
Hillel Coren
bac1ed5e0c Update lang file 2020-06-25 18:50:32 +03:00
Hillel Coren
286a1a608f Merge branch 'master' of github.com:invoiceninja/invoiceninja 2020-06-25 18:45:23 +03:00
Hillel Coren
f45f1895a8 Update lang files 2020-06-25 18:40:16 +03:00
Hillel Coren
bee9547a87
Merge pull request #3803 from Sibin387/patch-1
handle id==0 and cancellation of confirm dialog box
2020-06-17 08:17:39 +03:00
Sibin
382593a8a2
handle id==0 and cancellation of confirm dialog box
handle id==0 and cancellation of confirm dialog box
2020-06-15 23:56:08 +05:30
David Bomba
1f1acaa500 Fixes for oauth images 2020-06-01 07:42:36 +10:00
David Bomba
743dca7335
Fixes for migrations including implementing migrations for payment terms (#3761) 2020-05-28 08:50:33 +10:00
David Bomba
5a8148c09f Fixes for migrations including implementing migrations for payment terms 2020-05-27 21:27:46 +10:00
Sebastian Gumprich
5fdb21cbf9
add yunohost to install options (#3728) 2020-05-23 08:28:36 +10:00
Benjamin Beganović
59ad5724d5
Change (#3731) 2020-05-22 07:23:48 +10:00
David Bomba
ab620c00fc
Update README.md 2020-05-20 09:02:19 +10:00
Leon Aves
edd57e1ca5
Import correct Document class into HasLogo trait. (#3711)
If you aren't using the local driver for logo storage, the attempts to use Document::getDirectFileUrl in this file will fail as it tries to autoload from Traits, Document needs to be explicitly imported.
2020-05-19 09:52:28 +10:00
Hillel Coren
485b46f235
Update README.md 2020-05-18 16:23:06 +03:00
Hillel Coren
674e5e253f
Merge pull request #3713 from codedge/stackoverflow
Add StackOverflow, fix broken links
2020-05-18 16:22:28 +03:00
Holger Lösken
d4724b417c Add StackOverflow, fix broken links 2020-05-18 15:01:00 +02:00
David Bomba
eaa261dad8 Minor fixes for migration 2020-05-05 10:31:58 +10:00
Hillel Coren
db0c5fc578
Merge pull request #3670 from dominikkaminski/patch-1
Fix wrong tax calculation
2020-05-03 00:40:36 +03:00
Dominik "kuberninski" Kaminski
e16900ef11
Fix wrong tax calculation
Tax calculation is wrong in pdf when 'inclusive_taxes' is enabled. This fixes #3668
2020-05-02 17:31:19 +02:00
Benjamin Beganović
56a9bc2bdd
[v1] Include validation erorrs for migration (#3660)
* Add

* Fix
2020-04-29 22:33:55 +10:00
Hillel Coren
33f70de451
Update README.md 2020-04-14 17:18:02 +03:00
Benjamin Beganović
d36cb2fafa
Refactor steps controller (#3627) 2020-04-14 08:20:38 +10:00
Hillel Coren
eea9015cd3
Merge pull request #3606 from DanAtIntegrateIT/master
Update GoCardlessV2RedirectPaymentDriver.php
2020-04-08 17:57:09 +03:00
Dan Holliday
aac4d8308d Update GoCardlessV2RedirectPaymentDriver.php 2020-04-08 15:50:27 +01:00
Benjamin Beganović
0b8b4a7505
Export company_user with users (#3597) 2020-04-08 06:43:34 +10:00
Benjamin Beganović
602a15f648
Export 'company_key' with migrations (#3600)
- Removed 'Hosted' option for migrating
- Passing companyKey property when sending request
2020-04-08 06:43:20 +10:00
Benjamin Beganović
0c7620a381
Catching possible account errors (#3596)
Co-authored-by: David Bomba <turbo124@gmail.com>
2020-04-07 07:23:57 +10:00
Benjamin Beganović
4323968240
Prevent cross site migration (#3594)
- php-cs-fixer applied
- Added new 'cross_migration_message'
- errors.blade.php - unescape characters
2020-04-07 07:21:46 +10:00
Hillel Coren
3239a1c041 Merge branch 'master' of github.com:invoiceninja/invoiceninja 2020-04-02 08:50:04 +03:00
Hillel Coren
7ee7146d00 Update lang files 2020-04-02 08:49:24 +03:00
David Bomba
f11503567e
Fixes for migrations (#3578) 2020-04-02 09:01:24 +11:00
Hillel Coren
5c61c1c0f4 Update version 2020-03-31 19:57:20 +03:00
Hillel Coren
30b5b33d0d Update languages 2020-03-31 13:00:02 +03:00
Hillel Coren
38875f719a Update GrapesJS 2020-03-29 10:07:30 +03:00
Hillel Coren
bb3603acd3 Rebuild JS files 2020-03-29 09:39:57 +03:00
Hillel Coren
ca6e981f29 Fix client redirect 2020-03-29 09:28:30 +03:00
Hillel Coren
5a33c42278 Fix typo 2020-03-29 09:27:13 +03:00
Hillel Coren
fceb82ea51 Clarify credit error 2020-03-29 09:25:52 +03:00
Hillel Coren
43f38d9d84 Update readme 2020-03-29 07:43:45 +03:00
Hillel Coren
6bb4bc3e69 White label invoice fix 2020-03-29 07:32:27 +03:00
Hillel Coren
927cd5a9a6 Fix lang file 2020-03-29 07:30:42 +03:00
Hillel Coren
be00050615 Clarify Stripe help 2020-03-29 07:24:39 +03:00
Hillel Coren
3308df7fff Clarify help text 2020-03-29 07:16:07 +03:00
Hillel Coren
f157b76b5f Added ETB currency 2020-03-29 06:47:13 +03:00
Hillel Coren
70efb7a7f2 Clarify help text 2020-03-29 06:31:40 +03:00
Hillel Coren
fc26e77c95 Fix typo in texts 2020-03-15 10:11:39 +02:00
Hillel Coren
c3a0c2a465 UI tweaks and hide on hosted 2020-03-12 09:42:31 +02:00
David Bomba
f6fced6b82
Minor fixes for migration (#3484) 2020-03-12 17:25:51 +11:00
Benjamin Beganović
b4f83a5755
Export 'invitations' with invoices (#3479)
* Export 'invitations' with invoices

* Export 'invitations' with quotes

* Send resource as 3rd parameter
2020-03-12 07:53:06 +11:00
Benjamin Beganović
9d5c3bd951
[v1] Add check for 0 value (#3473)
* Add check for 0 value

* David said, this one is better
2020-03-11 10:06:57 +11:00
Benjamin Beganović
8bb70c7e9a
[V1] Update payment fields for export (#3469)
* Update export payment fields

* Add currency_id, export
2020-03-11 08:12:08 +11:00
Benjamin Beganović
3f25b62ab6
[V1] Update 'migrations:export' message (#3470)
* Update command message

* Export migrations command improvements
2020-03-11 08:11:31 +11:00
Benjamin Beganović
d9a3b5453a
Make sure user is allowed to migrate (#3468) 2020-03-11 08:08:10 +11:00
Hillel Coren
be96bef3f0
Merge pull request #3448 from maikelreyes/master
Fix aging fields for statements
2020-03-07 22:09:41 +02:00
Maikel Reyes
89a243f88c Fin aging fields for statements 2020-03-07 00:14:31 -05:00
David Bomba
9070dfe55b
Export migrations to folder (#3429)
* Export migrations to folder

* Remove local property
2020-03-06 07:30:48 +11:00
David Bomba
67044f9dd3
Migration improvements: (#3422)
- Added option to force the migration
- Cleaned imports
2020-03-05 07:30:10 +11:00
Benjamin Beganović
bde276ad67
(V1) Improve migration (#3415)
* Imports improvements:
- Fix sorting
- Fix duplicate imports (Cannot use App\Http\Controllers\BaseController as BaseController because the name is already in use)

* Wrap up, sending migration file:
- Removed 'enable_invoice_quantity'
2020-03-04 09:44:30 +11:00
David Bomba
65b30189b3
Bump symfony/http-foundation from 3.4.20 to 3.4.36 (#3404)
Bumps [symfony/http-foundation](https://github.com/symfony/http-foundation) from 3.4.20 to 3.4.36.
- [Release notes](https://github.com/symfony/http-foundation/releases)
- [Changelog](https://github.com/symfony/http-foundation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-foundation/compare/v3.4.20...v3.4.36)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-03-01 21:14:43 +11:00
David Bomba
78f1df21ae
Bump symfony/dependency-injection from 3.4.6 to 3.4.35 (#3403)
Bumps [symfony/dependency-injection](https://github.com/symfony/dependency-injection) from 3.4.6 to 3.4.35.
- [Release notes](https://github.com/symfony/dependency-injection/releases)
- [Changelog](https://github.com/symfony/dependency-injection/blob/master/CHANGELOG.md)
- [Commits](https://github.com/symfony/dependency-injection/compare/v3.4.6...v3.4.35)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-03-01 21:14:17 +11:00
Hillel Coren
17cddb902c Merge branch 'master' of github.com:invoiceninja/invoiceninja 2020-03-01 09:57:06 +02:00
Hillel Coren
bf7142ce43 Update lang file 2020-03-01 09:56:56 +02:00
Benjamin Beganović
ff455c8ed9
Exporting migration data via HTTP (v1) (#3364)
* Migration: Option to select the migration type

* Migration: Logic for redirecting based on steps

* Work for migrations:
- Added authentication view, service
- Account connecting
- Scaffold services
- Companies service
- (wip) Sending data to v2

* Migration: Sending migration file

* Wrap up the migration first stage

* Split company per request / no bundle

Co-authored-by: David Bomba <turbo124@gmail.com>
2020-02-25 08:17:16 +11:00
David Bomba
8020204c8d
Migrate Company Gateways and Client Tokens (#3369)
* Working on migrations for Company Gateways and Client Tokens

* Working on exporting company gateways and documents
2020-02-25 08:16:19 +11:00
Hillel Coren
a500bfb583 Update lang file 2020-02-23 12:38:52 +02:00
Hillel Coren
6365187a1c Merge mobile lang script 2020-02-23 12:36:40 +02:00
Hillel Coren
9db94c9354 Merge mobile lang script 2020-02-23 12:34:36 +02:00
Hillel Coren
c4d2c31e06 Fix for product report 2020-02-23 12:15:33 +02:00
Hillel Coren
1a554ea1e3 Fix for calculate payouts 2020-02-23 12:13:39 +02:00
Hillel Coren
fa5cb690ba Merge branch 'master' of github.com:invoiceninja/invoiceninja 2020-02-23 12:01:50 +02:00
Hillel Coren
cf873bd197 Fix for calculate payouts 2020-02-23 12:01:37 +02:00
Benjamin Beganović
9085a27361
Export 'documents' (#3343)
* Export 'documents'

* Export 'invoice_id' & 'expense_id' with documents

* Code cleanup
2020-02-19 07:53:38 +11:00
David Bomba
2a8d2c7f5e additional fixes for Checkout 2020-02-17 06:52:00 +11:00
David Bomba
ac11681073
fixes for checkout.com (#3336) 2020-02-16 17:41:00 +11:00
WillieWookiee
1ab5bc1f6b
Fixing cancel button. (#3309)
This fix addresses a bug where if you create a quote and then go into the client portal to add a credit card, the cancel button will take you back to the first quote of the client regardless if it is a draft or not. This will now take you back to the previous page.
2020-02-12 07:53:06 +11:00
Benjamin Beganović
6defaebf34
Export settings with company array (#3264) (#3268) 2020-01-30 14:34:58 +11:00
Hillel Coren
ae8457c588 Fix for postmark logs 2020-01-28 19:53:59 +02:00
Benjamin Beganović
e31ab11364 Export contacts with client array (#3251) 2020-01-28 07:54:54 +11:00
David Bomba
24daf955d8
Fix taxes (#3246) 2020-01-25 14:19:22 +11:00
David Bomba
c2dfc3055c Remove last_login from migration array of clients 2020-01-24 13:17:51 +11:00
Benjamin Beganović
b67b97430c Export data for the migration (master) (#3239)
* Scaffold migration controller & steps

* - Basic controller scaffold
- Intro step
- Downloading data

* Import step for the v2

* Export file using account_key property

* Fix button displaying

* Client export mappings

* Company export mappings

* Add withTrashed() for clients

* Export users mappings

* Export invoices mappings

* Export company properties as array

* add withTrashed() for invoices

* Downloading the json file

* Fix 'account_id' for company export
- Code cleanup & leftovers

* Creating zip for logo & storing json as file (wip)

* Zipping & sending migration files (wip)

* Exporting & mappings for quotes

* Re-enable headers for downloading

* Mappings for tax rates

* Mappings for the products

* Fix formattings & php doc messages

* Bring back headers for downloading

* Export 'company_id', 'user_id' with clients

* Export 'id' with users resource

* Remove unused parameter

* Export mappings for payments

* Export 'line_items' with invoices

* Export credits & export client id

* Export 'credits' within main JSON

* Mappings for line_items

* Fix 'is_amount_discount' for invoice export

* Exporting migration file as .zip archive

* Improve settings card for migration

* Removed duplicated keys in texts.php for en

* Fix formatting in en/texts.php

* Integrate the migration part with rest of UI

* Export company as object, not array

* Clean up

* Fixes for V1

* Apply formatting

* Remove comments
- Added 'ext-zip' in composer.json
- Fixed $credits transform

* Remove unused params

Co-authored-by: David Bomba <turbo124@gmail.com>
2020-01-24 07:34:30 +11:00
trevDev()
0dfaf043bf allow scrolling in time-tracker task form (#3211) 2020-01-15 21:24:28 +10:00
Hillel Coren
6b4d8fba4a Update check data 2019-12-22 10:16:22 +02:00
Hillel Coren
e702f24937 Merge branch 'master' of github.com:invoiceninja/invoiceninja 2019-12-22 08:54:22 +02:00
Hillel Coren
d9d949666f Update prices 2019-12-22 08:54:13 +02:00
David Bomba
755c1f75d1
Fix for Istanbul timezone (#3164) 2019-12-19 21:51:23 +11:00
Hillel Coren
8a5621396b Add IP exception 2019-12-15 14:33:46 +02:00
Hillel Coren
618743ea1a Update version 2019-12-03 11:53:50 +02:00
Hillel Coren
69e8f9a2f3 Minor fixes 2019-12-03 11:50:38 +02:00
Hillel Coren
17c36b351d Minor fixes 2019-12-03 11:27:30 +02:00
Hillel Coren
893d200e2c Merge branch 'master' of github.com:invoiceninja/invoiceninja 2019-11-20 08:43:14 +02:00
Hillel Coren
a9b511738f Import currency fix 2019-11-20 08:43:05 +02:00
David Bomba
2ec4d6702c
Fix for regression (#3070) 2019-11-14 22:07:23 +11:00
Hillel Coren
202d644d53 Update lang files 2019-11-04 11:01:18 +02:00
Hillel Coren
6ebc492454 Update lang files 2019-10-27 11:53:22 +02:00
Hillel Coren
22bc25253e Merge branch 'master' of github.com:invoiceninja/invoiceninja 2019-10-27 11:41:28 +02:00
Hillel Coren
5959eb8eb5 Minor fixes 2019-10-27 11:41:19 +02:00
Hillel Coren
0524ac764d
Merge pull request #3011 from dicarlosystems/allow-mtrans-to-replace
Allow module trans helper to replace values (#3006)
2019-10-23 16:33:12 +03:00
Christopher Di Carlo
e6e690b32f Allow module trans helper to replace values (#3006) 2019-10-23 07:17:48 -04:00
Hillel Coren
e763a2b233 Update lang files 2019-10-06 12:25:40 +03:00
Hillel Coren
29ed0dd94b Bug fixes 2019-09-29 12:28:34 +03:00
Hillel Coren
fbb5826178 Duplicate payments 2019-09-29 12:02:30 +03:00
Hillel Coren
0054616020 Update GrapesJS 2019-09-29 10:27:15 +03:00
Hillel Coren
416da8b98d
Merge pull request #2952 from joshuadwire/master
Upgrade to Laravel 5.5 and PHP 7.3
2019-09-15 12:23:45 +03:00
Joshua Dwire
8ce81d15ba Upgrade modules and debugbar dependencies 2019-09-14 14:37:51 -04:00
Joshua Dwire
f222390ce8 Upgrade to Laravel 5.5 and PHP 7.3 2019-09-12 19:30:10 -04:00
Hillel Coren
49c4aa6a75 Updated readme 2019-09-05 12:14:33 +03:00
Hillel Coren
d6f2859d3d Merge branch 'master' of github.com:invoiceninja/invoiceninja 2019-09-05 07:14:50 +03:00
Hillel Coren
c0300c9e0d Update docs 2019-09-05 07:14:40 +03:00
Hillel Coren
36290336c3
Merge pull request #2944 from joshuadwire/master
Fix support for currencies with varying precisions
2019-08-30 10:56:32 +03:00
Joshua Dwire
20c12533f8 Fix support for currencies with varying precisions 2019-08-29 17:15:58 -04:00
Hillel Coren
34600446d9 Update lang files 2019-08-29 13:18:02 +03:00
Hillel Coren
96991da621 IAP 2019-08-29 13:12:27 +03:00
Hillel Coren
a4a757f288 Fix for ninja Stripe payments 2019-08-29 13:10:09 +03:00
Hillel Coren
0ee357e97a In app purchase 2019-08-28 10:14:05 +03:00
Hillel Coren
c1fa41ee30 Update lang file 2019-08-20 22:05:14 +03:00
Hillel Coren
195074a4b0 Working on tests 2019-08-12 12:09:40 +03:00
Hillel Coren
790a2a8a2d Merge branch 'master' of github.com:invoiceninja/invoiceninja 2019-08-12 12:01:43 +03:00
Hillel Coren
16623103cd Working on tests 2019-08-12 12:01:34 +03:00
Joshua Dwire
3cc9a580e2 Update PHP version number in Digital Ocean docs (#2927) 2019-08-11 12:11:03 +10:00
Hillel Coren
8c8a91ba4d
Merge pull request #2926 from joshuadwire/master
Add Digital Ocean image docs (master)
2019-08-10 20:52:25 +03:00
Joshua Dwire
caa3a34a4a Add Digital Ocean image docs 2019-08-10 10:50:33 -04:00
David Bomba
4ee0512827
Update README.md 2019-08-03 17:10:37 +10:00
hjone72
ba8c0eb035 Fix for subscription fails on getDisplayName() (#2909)
As per https://github.com/invoiceninja/invoiceninja/issues/2908
2019-07-24 14:04:21 +10:00
Hillel Coren
3cc9eb0bec Update version 2019-07-21 11:03:12 +03:00
Hillel Coren
bbb72875e3 Bug fix 2019-07-21 10:59:31 +03:00
Hillel Coren
f2416b3b91 Update lang files 2019-07-21 09:52:42 +03:00
Hillel Coren
23571848d5 Minor fixes 2019-07-21 09:28:42 +03:00
Hillel Coren
5b76c0a2d1 Make 'email history' easier to find 2019-07-21 09:19:39 +03:00
Hillel Coren
9943b89b2d API fixes 2019-07-21 09:13:03 +03:00
Francisco Ferreira
5f998b0ea8 Fixes recurring invoices end date parsing (port of #2905 to master) (#2906)
* Invoice edit view: fix date parsing

View gets the date already formatted and Carbon isn't always able to parse that format automatically, so convert it back to SQL format

* RecurringInvoiceDatatable: fix status label
2019-07-18 16:26:59 +10:00
Francisco Ferreira
2a290765e9 Account: allow to set more custom Invoice labels (#2904) 2019-07-18 16:26:24 +10:00
Francisco Ferreira
b0e680ee5c Stripe improvements (port #2863 to master) (#2903)
* View credit card: send more billing data to Stripe when available

As commit 8e8414ab49 shows, this commit had more code that was wrongly commited in ff064367d6 by another author

* Stripe: fill payment card details
2019-07-18 16:26:08 +10:00
Hillel Coren
989f114154 Fix for composer install 2019-07-13 23:11:26 +03:00
Hillel Coren
6a41952552
Merge pull request #2898 from joshuadwire/master
Merge Stripe 3D Secure into master
2019-07-13 22:19:50 +03:00
Joshua Dwire
cb37141643 Use the old Charge API for bank account payments 2019-07-09 17:16:37 -04:00
Joshua Dwire
ff064367d6 Support Stripe 3D secure 2019-07-09 17:16:20 -04:00
Hillel Coren
ec2aedbba0
Merge pull request #2884 from arubacao/patch-1
Sync services.php with upstream repo
2019-07-05 08:50:51 +03:00
arubacao
161f160ba7
Update services.php 2019-07-01 23:40:24 +02:00
arubacao
36ab20ae3a
Sync services.php with upstream repo
https://raw.githubusercontent.com/laravel/laravel/5.4/config/services.php
2019-07-01 17:08:27 +02:00
Hillel Coren
3a45a48a1a Merge task->invoice->withTrashed() 2019-05-27 18:10:40 +03:00
Hillel Coren
e3dcf4aa47 Fix for tests 2019-05-26 21:57:43 +03:00
Hillel Coren
91079b66d6 Update version 2019-05-26 21:29:46 +03:00
Hillel Coren
099e61343d Update lang files 2019-05-26 21:22:23 +03:00
Hillel Coren
72769deacc Update docs 2019-05-26 19:32:09 +03:00
Hillel Coren
6656bf3ab2 Update docs 2019-05-26 19:30:55 +03:00
Hillel Coren
1a5f89a905 Fix overlapping text 2019-05-26 18:40:08 +03:00
Hillel Coren
6c5af5c593 Fix recurring invoice status label 2019-05-26 18:31:28 +03:00
Hillel Coren
a6a4eac8fd Fix for Stripe import issue 2019-05-26 18:24:00 +03:00
Hillel Coren
a83f441b98 Fix imported payment date 2019-05-26 15:24:22 +03:00
Hillel Coren
003a5be614 Added client address to invoice/quote reports 2019-05-26 11:23:27 +03:00
Hillel Coren
c6a6926b7f Set WorldPay to offsite 2019-05-26 10:50:08 +03:00
Hillel Coren
5e7ee641a6 Adjustments to check data 2019-05-23 21:33:07 +03:00
Hillel Coren
d41e0b4759 Merges #2322 2019-05-23 21:28:35 +03:00
Hillel Coren
73da9d4acc Fix duplicate confirmation emails 2019-05-23 21:17:47 +03:00
Hillel Coren
14684c8ba7 Add currencies 2019-05-22 14:41:09 +03:00
David Bomba
9332d00b69
Set artisan to executable (#2827) 2019-05-09 08:51:37 +10:00
Hillel Coren
53fdf2434a Update readme 2019-04-29 15:35:22 +03:00
Hillel Coren
ef1d55f1fe Update docs 2019-04-25 15:53:49 +03:00
Hillel Coren
3b5bfd4eaf Update readme 2019-04-25 15:50:46 +03:00
David Bomba
3733583eef
Revert "Allow installing composer dependencies with PHP 7.3" (#2797) 2019-04-23 19:08:53 +10:00
Hillel Coren
89c21aa943
Merge pull request #2794 from nstapelbroek/install-on-php73
Allow installing composer dependencies with PHP 7.3
2019-04-23 00:43:06 +03:00
Nico Stapelbroek
24d5d387ff Run CI against PHP 7.3 2019-04-20 09:36:46 +02:00
Nico Stapelbroek
b070782dd2 Update mpdf/mpdf with its dependencies
Details: 0 installs, 5 updates, 0 removals
  - Updating myclabs/deep-copy (1.7.0 => 1.9.1)
  - Updating paragonie/random_compat (v2.0.17 => v2.0.18)
  - Updating setasign/fpdi (1.6.2 => v2.2.0)
  - Updating psr/log (1.0.2 => 1.1.0)
  - Updating mpdf/mpdf (v7.1.0 => v8.0.0)

Also undid URL change in google/protobuf
2019-04-20 09:35:36 +02:00
Hillel Coren
9db21e6f3c quote to invoice private notes #2742 2019-04-17 18:36:54 +03:00
Hillel Coren
40621823dc XSS fixes 2019-04-17 18:29:09 +03:00
Hillel Coren
a1d781c435 Fix endless reminder translation 2019-04-17 18:18:19 +03:00
Hillel Coren
72831b0cef Update version 2019-03-26 08:42:08 +02:00
Hillel Coren
d543cfcc3f Merge proposal PDF fix 2019-03-26 08:40:03 +02:00
Hillel Coren
b818ff95b6 Update docs 2019-03-26 08:38:03 +02:00
Hillel Coren
02fb5cede8 Fix for task tranformer 2019-03-26 08:33:39 +02:00
Hillel Coren
28d66567b4 Merge branch 'master' of github.com:invoiceninja/invoiceninja 2019-03-19 07:38:24 +02:00
Hillel Coren
b88ea8aa2c Remove fix for duplicate invitations 2019-03-19 07:38:13 +02:00
Hillel Coren
7546978f2b
Merge pull request #2724 from Kilian/master
Fix Typo: Speciy -> Specify
2019-03-14 12:16:48 +02:00
kilian
5f576a8852 Fix Typo: Speciy -> Specify 2019-03-14 11:12:38 +01:00
Hillel Coren
fb62be10cb Change Payment Express back to onsite gateway 2019-03-12 08:44:45 +02:00
Hillel Coren
4a28d9d455 Fix for Payment Express 2019-03-10 09:45:44 +02:00
Hillel Coren
ecaf16f9bd Fix placholder translation 2019-02-28 15:07:40 +02:00
Hillel Coren
736f1683d1 Update version 2019-02-28 09:47:32 +02:00
Hillel Coren
1a6e940888 Update language files 2019-02-28 09:45:38 +02:00
Hillel Coren
4426be8303 Add currencies 2019-02-28 09:39:07 +02:00
Hillel Coren
ef3d1cb966 Fix for invoice transformer 2019-02-28 09:27:19 +02:00
Hillel Coren
6c1bf7534a Hide export PDF option 2019-02-28 09:26:17 +02:00
Hillel Coren
27f0fb9474 Fix for tests 2019-02-25 15:25:53 +02:00
Hillel Coren
9dd1462d65 Fix for duplicate invitations 2019-02-25 12:42:14 +02:00
Hillel Coren
3e8565bd70 Added lang strings 2019-02-22 09:04:22 +02:00
Hillel Coren
fd1c73c472 Fix for GoCardless 2019-02-21 15:53:07 +02:00
Hillel Coren
5e269ed07a Update version 2019-02-19 18:01:59 +02:00
Hillel Coren
31a0641943 Update language files 2019-02-19 18:00:49 +02:00
Hillel Coren
4d471bccaf Fix for Google OAuth 2019-02-19 13:15:06 +02:00
Hillel Coren
2d4769137f Bug fixes 2019-02-19 12:55:39 +02:00
Hillel Coren
6fddd3a815 Added BOB currency 2019-02-19 12:15:34 +02:00
Hillel Coren
3a12da73bf Fix for Payment Express 2019-02-19 12:06:11 +02:00
Hillel Coren
fa45a02134 Add currencies 2019-02-19 11:47:29 +02:00
Hillel Coren
88b972be4b Bug fixes 2019-02-18 16:10:05 +02:00
Hillel Coren
02b78055d4 Bug fixes 2019-02-18 16:08:16 +02:00
Hillel Coren
16cc898e6a Bug fixes 2019-02-18 13:05:00 +02:00
Hillel Coren
08be751aa4 Hide report export to PDF option 2019-02-18 12:02:56 +02:00
Hillel Coren
738b531925 Try updating DomPDF 2019-02-18 11:49:48 +02:00
Hillel Coren
155f107238 Fix for tests 2019-02-17 14:22:00 +02:00
Hillel Coren
ea8f94bb51 Update .gitignore 2019-02-17 14:03:00 +02:00
Hillel Coren
cd8b7649a1 Fixes for mobile app 2019-02-17 13:52:56 +02:00
Wim de Ruijter
48c3b5fcff Made clear what "account with fees" means (#2664)
Should have done this in the previous PR: https://github.com/invoiceninja/invoiceninja/pull/2663
2019-02-12 07:12:42 +11:00
Hillel Coren
a0b85b491f
Merge pull request #2663 from wderuijter/patch-1
Made clear what "account with reminders" means
2019-02-11 12:47:17 +02:00
Wim de Ruijter
143b65ad9f
Made clear what "account with reminders" means 2019-02-11 11:34:22 +01:00
David Bomba
ad973919ad
Fix for Google Maps (#2651) 2019-02-03 11:52:02 +11:00
David Bomba
6b21e0bb8e
Update .travis.yml 2019-01-31 20:50:27 +11:00
David Bomba
b8ec0f6cab
Fixes for travis (#2645)
* add gitignores back into app

* gitignore bootstrap

* fixes for storage
2019-01-31 20:16:07 +11:00
David Bomba
1476f12a8d
.gitignore bootstrap (#2644)
* add gitignores back into app

* gitignore bootstrap
2019-01-31 19:54:06 +11:00
David Bomba
8677a72b7c
add gitignores back into app (#2643) 2019-01-31 19:50:04 +11:00
David Bomba
dc49fad81a
Update API docs (#2641)
* fix permissions

* Api update
2019-01-31 08:20:22 +11:00
David Bomba
aefe133ba0
fix permissions (#2637) 2019-01-30 22:25:37 +11:00
David Bomba
0fc66b0f02 Rebase to latest version of v4.5.9 2019-01-30 22:12:41 +11:00
David Bomba
5ccf7369ca Rebase to v4.5.9 2019-01-30 21:45:46 +11:00
385 changed files with 93789 additions and 60656 deletions

41
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: triage
assignees: ''
---
**What version of Invoice Ninja are you running? ie v4.5.25 / v5.0.30**
**What environment are you running?**
Docker
Shared Hosting
ZIP
Other
**Have you checked log files (storage/logs/) Please provide redacted output**
**Have you searched existing issues?**
**Have you reported this to Slack/forum before posting?**
**Describe the bug**
A clear and concise description of what the bug is.
**Steps To Reproduce**
Please list the steps to reproduce the issue
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
Note: Before posting don't forget to check our "Troubleshooting" category in the [docs](https://invoiceninja.github.io/docs/self-host-troubleshooting/) (https://invoiceninja.github.io/docs/self-host-troubleshooting/).
**(v5) Can you replicate the issue on our demo site? https://demo.invoiceninja.com**

View file

@ -0,0 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''
---
**What version of Invoice Ninja are you running? ie v4.5 / v5**
**What environment are you running?**
Docker
Shared Hosting
ZIP
Other
**Have you searched existing issues/requests?**
**Screenshots**
If applicable, add screenshots to help explain your request/question.
**Additional context**
Add any other context about the request/question here.

7
.gitignore vendored
View file

@ -9,7 +9,10 @@
/public/packages
/public/vendor
/resources/assets/bower
/storage
/storage/*.key
/storage/documents
/storage/import
/storage/migrations
/bootstrap/compiled.php
/bootstrap/environment.php
/vendor
@ -39,3 +42,5 @@ tests/_support/_generated/
/c3.php
_ide_helper.php
storage/version.txt
storage/framework/.DS_Store

View file

@ -1,5 +1,8 @@
language: php
services:
- mysql
sudo: true
# Prevent tests from taking more than 50 minutes
@ -7,6 +10,7 @@ group: deprecated-2017Q4
php:
- 7.2
- 7.3
addons:
hosts:
@ -26,7 +30,7 @@ env:
before_install:
# set GitHub token and update composer
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
- composer self-update && composer -V
- composer self-update 1.10.19 && composer -V
# - export USE_ZEND_ALLOC=0
- rvm use 1.9.3 --install --fuzzy

4
CODE_OF_CONDUCT.md Normal file
View file

@ -0,0 +1,4 @@
# Invoice Ninja Code of Conduct
The development team has invested a tremendous amount of time and energy into this project. While we appreciate that bugs can be frustrating we ask that our community refrain from insults and snide remarks. We're happy to provide support to both our hosted and selfhosted communities but ask that feedback is always polite.

View file

@ -9,39 +9,38 @@
## [Hosted](https://www.invoiceninja.com) | [Self-Hosted](https://www.invoiceninja.org)
### We're on Slack, join us at [slack.invoiceninja.com](http://slack.invoiceninja.com)
### We're on Slack, join us at [slack.invoiceninja.com](http://slack.invoiceninja.com) or if you like [StackOverflow](https://stackoverflow.com/tags/invoice-ninja/)
All Pro and Enterprise features from the hosted app are included in the open-source code. We offer a $20 per year white-label license to remove our branding for personal use.
Just make sure to add the `invoice-ninja` tag to your question.
#### Note: v5 is now tagged Stable! To upgrade from v4 you need to [install v5](https://invoiceninja.github.io/docs/self-host-installation/) as a separate app and then use the migration tool in the latest version of v4 on Settings > Account Management.
All Pro and Enterprise features from the hosted app are included in the open-source code. We offer a $30 per year white-label license to remove the Invoice Ninja branding from client facing parts of the app.
The self-host zip includes all third party libraries whereas downloading the code from GitHub requires using Composer to install the dependencies.
* [Features](https://www.invoiceninja.com/invoicing-features/)
* [Videos](https://www.youtube.com/channel/UCXAHcBvhW05PDtWYIq7WDFA/videos)
* [User Guide](https://invoice-ninja.readthedocs.io/en/latest/)
* [User Guide](https://docs.invoiceninja.com/)
* [Support Forum](https://www.invoiceninja.com/forums/forum/support/)
* [Roadmap](https://trello.com/b/63BbiVVe/)
* [StackOverflow](https://stackoverflow.com/tags/invoice-ninja/)
## Affiliates Programs
* Referral Program (we pay you)
* $100 per sign up paid over 3 years - [Learn more](https://www.invoiceninja.com/referral-program/)
* White-Label Reseller (you pay us)
* Hosted: $500 annually and either 10% of revenue or $1/user/month
* Self-Hosted: Contact us for volume license pricing
## Referral Program
* Earn 50% of Pro & Enterprise Plans up to 4 years - [Learn more](https://www.invoiceninja.com/referral-program/)
## Mobile Apps
* Current: [github.com/invoiceninja/flutter-mobile](https://github.com/invoiceninja/flutter-mobile)
* [iPhone](https://itunes.apple.com/us/app/invoice-ninja/id1435514417?ls=1&mt=8)
* [Android](https://play.google.com/store/apps/details?id=com.invoiceninja.flutter)
* Legacy
* [iPhone](https://itunes.apple.com/us/app/invoice-ninja/id1220337560?ls=1&mt=8)
* [Android](https://play.google.com/store/apps/details?id=com.invoiceninja.invoiceninja)
## Mobile App
* [iPhone](https://itunes.apple.com/us/app/invoice-ninja/id1435514417?ls=1&mt=8)
* [Android](https://play.google.com/store/apps/details?id=com.invoiceninja.flutter)
* [Source Code](https://github.com/invoiceninja/flutter-mobile)
## Installation Options
* [Ansible](https://github.com/invoiceninja/ansible-installer)
* [Self-Host Zip](https://invoice-ninja.readthedocs.io/en/latest/install.html)
* [Self-Host Zip](https://docs.invoiceninja.com/install.html)
* [Docker File](https://hub.docker.com/r/invoiceninja/invoiceninja/)
* [Cloudron](https://cloudron.io/store/com.invoiceninja.cloudronapp.html)
* [Softaculous](https://www.softaculous.com/apps/ecommerce/Invoice_Ninja)
* [Lando](https://github.com/invoiceninja/invoiceninja/issues/2880)
* [Yunohost](https://github.com/YunoHost-Apps/invoiceninja_ynh)
## Recommended Providers
* [Stripe](https://stripe.com/)
@ -56,6 +55,8 @@ The self-host zip includes all third party libraries whereas downloading the cod
## Third Party Modules
* [Event Scheduler](https://github.com/cytech/Scheduler-InvoiceNinja)
* [Manufacturer Module](https://github.com/dicarlosystems/manufacturer-invoiceninja)
* [Point of Sale](https://github.com/dicarlosystems/pointofsale-invoiceninja)
* [Invoice Design Import/Export](https://github.com/feyst/invoicedesignexport)
> Feel free to email us for help if you're working on a module, we're happy to provide developer support.
@ -65,7 +66,7 @@ The self-host zip includes all third party libraries whereas downloading the cod
* [Shopping Cart](https://github.com/Scifabric/invoiceninjashoppingcart)
## Third Party Developers
* [Some Techie](https://www.sometechie.com/customize-invoice-ninja/)
* [Bold Compass](https://boldcompass.com/customize-invoice-ninja/)
## Contributing
All contributors are welcome!
@ -80,12 +81,15 @@ For information on how contribute to Invoice Ninja, please see our [contributing
* [Troels Liebe Bentsen](https://github.com/tlbdk)
* [Jeramy Simpson](https://github.com/JeramyMywork) - [MyWork](https://www.mywork.com.au)
* [Sigitas Limontas](https://lt.linkedin.com/in/sigitaslimontas)
* [Joshua Dwire](https://github.com/joshuadwire) - [Some Techie](https://www.sometechie.com)
* [Joshua Dwire](https://github.com/joshuadwire) - [Bold Compass](https://boldcompass.com/)
* [Holger Lösken](https://github.com/codedge) - [codedge](http://codedge.de)
* [Samuel Laulhau](https://github.com/lalop) - [Lalop](http://lalop.co/)
* [Alexander Zamponi](https://github.com/alexz707)
* [Matthieu Calie](https://github.com/Matth--)
* [Suhas Sunil Gaikwad](https://github.com/Suhas-Gaikwad) - (Security)
* [Christopher Di Carlo](https://github.com/dicarlosystems) - [Di Carlo Systems Inc.](https://www.dicarlosystems.ca)
* [Kristian Feldsam](https://github.com/feldsam) - [FeldHost™](https://www.feldhost.net)
* [Suhas Sunil Gaikwad](https://github.com/Suhas-Gaikwad)
* [Mike Skaggs](https://github.com/titan-fail)
## License
Invoice Ninja is released under the Attribution Assurance License.

View file

@ -42,7 +42,6 @@ class CalculatePayouts extends Command
*/
public function handle()
{
$this->info('Running CalculatePayouts...');
$type = strtolower($this->option('type'));
switch ($type) {
@ -61,7 +60,6 @@ class CalculatePayouts extends Command
$userMap = [];
foreach ($servers as $server) {
$this->info('Processing users: ' . $server->name);
config(['database.default' => $server->name]);
$users = User::where('referral_code', '!=', '')
@ -72,7 +70,6 @@ class CalculatePayouts extends Command
}
foreach ($servers as $server) {
$this->info('Processing companies: ' . $server->name);
config(['database.default' => $server->name]);
$companies = Company::where('referral_code', '!=', '')
@ -80,19 +77,27 @@ class CalculatePayouts extends Command
->whereNotNull('payment_id')
->get();
$this->info('User,Client,Date,Amount,Reference');
foreach ($companies as $company) {
if (!isset($userMap[$company->referral_code])) {
continue;
}
$user = $userMap[$company->referral_code];
$payment = $company->payment;
if ($payment) {
$client = $payment->client;
$this->info("User: $user");
$this->info("Client: " . $client->getDisplayName());
foreach ($client->payments as $payment) {
$amount = $payment->getCompletedAmount();
$this->info("Date: $payment->payment_date, Amount: $amount, Reference: $payment->transaction_reference");
$this->info('"' . $user . '",' .
'"' . $client->getDisplayName() . '",' .
$payment->payment_date . ',' .
$amount . ',' .
$payment->transaction_reference
);
}
}
}

View file

@ -57,7 +57,7 @@ class ChargeRenewalInvoices extends Command
$this->paymentService = $paymentService;
}
public function fire()
public function handle()
{
$this->info(date('r').' ChargeRenewalInvoices...');

View file

@ -67,7 +67,7 @@ class CheckData extends Command
protected $log = '';
protected $isValid = true;
public function fire()
public function handle()
{
$this->logMessage(date('Y-m-d h:i:s') . ' Running CheckData...');
@ -75,6 +75,8 @@ class CheckData extends Command
config(['database.default' => $database]);
}
$this->checkContacts();
if (! $this->option('client_id')) {
$this->checkBlankInvoiceHistory();
$this->checkPaidToDate();
@ -82,21 +84,20 @@ class CheckData extends Command
}
//$this->checkInvoices();
$this->checkTranslations();
$this->checkInvoiceBalances();
$this->checkClientBalances();
$this->checkContacts();
$this->checkUserAccounts();
//$this->checkLogoFiles();
if (! $this->option('client_id')) {
$this->checkOAuth();
$this->checkInvitations();
//$this->checkInvitations();
$this->checkAccountData();
$this->checkLookupData();
$this->checkFailedJobs();
}
$this->checkTranslations();
$this->logMessage('Done: ' . strtoupper($this->isValid ? RESULT_SUCCESS : RESULT_FAILURE));
$errorEmail = env('ERROR_EMAIL');
@ -130,6 +131,7 @@ class CheckData extends Command
$this->logMessage($language->locale . ' is invalid: ' . $text);
}
/*
preg_match('/(.script)/', strtolower($text), $matches);
if (count($matches)) {
foreach ($matches as $match) {
@ -141,6 +143,7 @@ class CheckData extends Command
break;
}
}
*/
}
}
@ -427,7 +430,7 @@ class CheckData extends Command
$queueDB = config('queue.connections.database.connection');
$count = DB::connection($queueDB)->table('failed_jobs')->count();
if ($count > 0) {
if ($count > 25) {
$this->isValid = false;
}
@ -676,6 +679,8 @@ class CheckData extends Command
foreach ($clients as $client) {
$this->logMessage("=== Company: {$client->company_id} Account:{$client->account_id} Client:{$client->id} Balance:{$client->balance} Actual Balance:{$client->actual_balance} ===");
/*
$foundProblem = false;
$lastBalance = 0;
$lastAdjustment = 0;
@ -838,6 +843,7 @@ class CheckData extends Command
->where('id', $client->id)
->update($data);
}
*/
}
}

View file

@ -37,7 +37,7 @@ class CreateLuisData extends Command
/**
* @return bool
*/
public function fire()
public function handle()
{
$this->fakerField = $this->argument('faker_field');

View file

@ -76,7 +76,7 @@ class CreateTestData extends Command
/**
* @return bool
*/
public function fire()
public function handle()
{
if (Utils::isNinjaProd()) {
$this->info('Unable to run in production');
@ -133,7 +133,7 @@ class CreateTestData extends Command
$this->createInvoices($client);
$this->createInvoices($client, true);
$this->createTasks($client);
// $this->createTasks($client);
}
}

View file

@ -0,0 +1,115 @@
<?php
namespace App\Console\Commands;
use App\Libraries\Utils;
use App\Models\User;
use App\Traits\GenerateMigrationResources;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Auth;
class ExportMigrations extends Command
{
use GenerateMigrationResources;
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'migrations:export {--user=} {--random=}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Export account migrations to folder.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->info('Note: Migrations will be stored inside of (storage/migrations) folder.');
if($this->option('user')) {
$record = User::findOrFail($this->option('user'));
return $this->export($record);
}
if($this->option('random')){
User::all()->random(200)->each(function ($user){
$this->export($user);
});
return;
}
$users = User::all();
foreach($users as $user) {
Auth::login($user);
$this->export($user);
}
}
private function export($user)
{
$this->account = $user->account;
$date = date('Y-m-d');
$accountKey = $this->account->account_key;
$output = fopen('php://output', 'w') or Utils::fatalError();
$fileName = "{$accountKey}-{$date}-invoiceninja";
$data['data'] = [
'account' => $this->getAccount(),
'company' => $this->getCompany(),
'users' => $this->getUsers(),
'tax_rates' => $this->getTaxRates(),
'payment_terms' => $this->getPaymentTerms(),
'clients' => $this->getClients(),
'company_gateways' => $this->getCompanyGateways(),
'client_gateway_tokens' => $this->getClientGatewayTokens(),
'vendors' => $this->getVendors(),
'projects' => $this->getProjects(),
'products' => $this->getProducts(),
'credits' => $this->getCreditsNotes(),
'invoices' => $this->getInvoices(),
'recurring_invoices' => $this->getRecurringInvoices(),
'quotes' => $this->getQuotes(),
'payments' => array_merge($this->getPayments(), $this->getCredits()),
'documents' => $this->getDocuments(),
'expense_categories' => $this->getExpenseCategories(),
'task_statuses' => $this->getTaskStatuses(),
'expenses' => $this->getExpenses(),
'tasks' => $this->getTasks(),
'documents' => $this->getDocuments(),
];
$file = storage_path("migrations/{$fileName}.zip");
$zip = new \ZipArchive();
$zip->open($file, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
$zip->addFromString('migration.json', json_encode($data, JSON_PRETTY_PRINT));
$zip->close();
$this->info('User with id #' . $user->id . ' exported.');
}
}

View file

@ -0,0 +1,121 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\DbServer;
use App\Models\User;
use App\Models\Company;
use App\Libraries\CurlUtils;
class MobileLocalization extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ninja:mobile-localization {--type=}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Generate mobile localization resources';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$type = strtolower($this->option('type'));
switch ($type) {
case 'laravel':
$this->laravelResources();
break;
default:
$this->flutterResources();
break;
}
}
private function laravelResources()
{
$resources = $this->getResources();
foreach ($resources as $key => $val) {
$transKey = "texts.{$key}";
if (trans($transKey) == $transKey) {
echo "'$key' => '$val',\n";
}
}
}
private function flutterResources()
{
$languages = cache('languages');
$resources = $this->getResources();
foreach ($languages as $language) {
if ($language->locale == 'en') {
continue;
}
echo "'{$language->locale}': {\n";
foreach ($resources as $key => $val) {
$text = trim(addslashes(trans("texts.{$key}", [], $language->locale)));
if (substr($text, 0, 6) == 'texts.') {
$text = $resources->$key;
}
$text = str_replace(array('<b>', '</b>'), '', $text);
$text = str_replace(array('<i>', '</i>'), '', $text);
$text = str_replace(array('<strong>', '</strong>'), '', $text);
echo "'$key': '$text',\n";
}
echo "},\n";
}
}
private function getResources()
{
$url = 'https://raw.githubusercontent.com/invoiceninja/flutter-client/develop/lib/utils/i18n.dart';
$data = CurlUtils::get($url);
$start = strpos($data, 'do not remove comment') + 25;
$end = strpos($data, '},', $start);
$data = substr($data, $start, $end - $start - 5);
$data = str_replace("\n", "", $data);
$data = str_replace("\"", "\'", $data);
$data = str_replace("'", "\"", $data);
return json_decode('{' . rtrim($data, ',') . '}');
}
protected function getOptions()
{
return [
['type', null, InputOption::VALUE_OPTIONAL, 'Type', null],
];
}
}

View file

@ -21,7 +21,7 @@ class PruneData extends Command
*/
protected $description = 'Delete inactive accounts';
public function fire()
public function handle()
{
$this->info(date('r').' Running PruneData...');

View file

@ -21,7 +21,7 @@ class RemoveOrphanedDocuments extends Command
*/
protected $description = 'Removes old documents not associated with an expense or invoice';
public function fire()
public function handle()
{
$this->info(date('r').' Running RemoveOrphanedDocuments...');

View file

@ -21,7 +21,7 @@ class ResetData extends Command
*/
protected $description = 'Reset data';
public function fire()
public function handle()
{
$this->info(date('r') . ' Running ResetData...');

View file

@ -48,7 +48,7 @@ class SendRecurringInvoices extends Command
$this->recurringExpenseRepo = $recurringExpenseRepo;
}
public function fire()
public function handle()
{
$this->info(date('r') . ' Running SendRecurringInvoices...');
@ -81,8 +81,8 @@ class SendRecurringInvoices extends Command
$invoices = Invoice::with('account.timezone', 'invoice_items', 'client', 'user')
->whereRaw('is_deleted IS FALSE AND deleted_at IS NULL AND is_recurring IS TRUE AND is_public IS TRUE AND frequency_id > 0 AND start_date <= ? AND (end_date IS NULL OR end_date >= ?)', [$today, $today])
->orderBy('id', 'asc')
->get();
$this->info(date('r ') . $invoices->count() . ' recurring invoice(s) found');
->cursor();
$this->info(date('r ') . ' Recurring invoice(s) found');
foreach ($invoices as $recurInvoice) {
$shouldSendToday = $recurInvoice->shouldSendToday();

View file

@ -70,7 +70,7 @@ class SendReminders extends Command
$this->userMailer = $userMailer;
}
public function fire()
public function handle()
{
$this->info(date('r') . ' Running SendReminders...');
@ -125,7 +125,7 @@ class SendReminders extends Command
private function chargeLateFees()
{
$accounts = $this->accountRepo->findWithFees();
$this->info(date('r ') . $accounts->count() . ' accounts found with fees');
$this->info(date('r ') . $accounts->count() . ' accounts found with fees enabled');
foreach ($accounts as $account) {
if (! $account->hasFeature(FEATURE_EMAIL_TEMPLATES_REMINDERS)) {
@ -152,7 +152,7 @@ class SendReminders extends Command
private function sendReminderEmails()
{
$accounts = $this->accountRepo->findWithReminders();
$this->info(date('r ') . count($accounts) . ' accounts found with reminders');
$this->info(date('r ') . count($accounts) . ' accounts found with reminders enabled');
foreach ($accounts as $account) {
if (! $account->hasFeature(FEATURE_EMAIL_TEMPLATES_REMINDERS)) {
@ -211,8 +211,8 @@ class SendReminders extends Command
// send email as user
auth()->onceUsingId($user->id);
$report = dispatch(new RunReport($scheduledReport->user, $reportType, $config, true));
$file = dispatch(new ExportReportResults($scheduledReport->user, $config['export_format'], $reportType, $report->exportParams));
$report = dispatch_now(new RunReport($scheduledReport->user, $reportType, $config, true));
$file = dispatch_now(new ExportReportResults($scheduledReport->user, $config['export_format'], $reportType, $report->exportParams));
if ($file) {
try {

View file

@ -48,7 +48,7 @@ class SendRenewalInvoices extends Command
$this->accountRepo = $repo;
}
public function fire()
public function handle()
{
$this->info(date('r').' Running SendRenewalInvoices...');

View file

@ -37,7 +37,7 @@ class TestOFX extends Command
$this->bankAccountService = $bankAccountService;
}
public function fire()
public function handle()
{
$this->info(date('r').' Running TestOFX...');
}

View file

@ -27,7 +27,7 @@ class UpdateKey extends Command
*/
protected $description = 'Update application key';
public function fire()
public function handle()
{
$this->info(date('r') . ' Running UpdateKey...');

2
app/Console/Commands/stubs/command.stub Executable file → Normal file
View file

@ -37,7 +37,7 @@ class $CLASS$ extends Command
*
* @return mixed
*/
public function fire()
public function handle()
{
//
}

0
app/Console/Commands/stubs/composer.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/controller-plain.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/controller.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/event.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/job.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/json.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/listener.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/mail.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/middleware.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/migration/add.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/migration/create.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/migration/delete.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/migration/drop.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/migration/plain.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/model.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/notification.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/provider.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/request.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/route-provider.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/routes.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/scaffold/config.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/scaffold/provider.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/seeder.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/start.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/views.stub Executable file → Normal file
View file

0
app/Console/Commands/stubs/views/master.stub Executable file → Normal file
View file

View file

@ -21,6 +21,7 @@ class Kernel extends ConsoleKernel
'App\Console\Commands\PruneData',
'App\Console\Commands\CreateTestData',
'App\Console\Commands\CreateLuisData',
'App\Console\Commands\MobileLocalization',
'App\Console\Commands\SendRenewalInvoices',
'App\Console\Commands\ChargeRenewalInvoices',
'App\Console\Commands\SendReminders',
@ -30,6 +31,7 @@ class Kernel extends ConsoleKernel
'App\Console\Commands\InitLookup',
'App\Console\Commands\CalculatePayouts',
'App\Console\Commands\UpdateKey',
'App\Console\Commands\ExportMigrations',
];
/**

View file

@ -202,9 +202,9 @@ if (! defined('APP_NAME')) {
define('IMPORT_PANCAKE', 'Pancake');
define('MAX_NUM_CLIENTS', 100);
define('MAX_NUM_CLIENTS_PRO', 20000);
define('MAX_NUM_CLIENTS_PRO', 40000);
define('MAX_NUM_CLIENTS_LEGACY', 500);
define('MAX_INVOICE_AMOUNT', 1000000000);
define('MAX_INVOICE_AMOUNT', 10000000000);
define('LEGACY_CUTOFF', 57800);
define('ERROR_DELAY', 3);
@ -361,7 +361,7 @@ if (! defined('APP_NAME')) {
define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com'));
define('NINJA_DOCS_URL', env('NINJA_DOCS_URL', 'https://invoice-ninja.readthedocs.io/en/latest'));
define('NINJA_DATE', '2000-01-01');
define('NINJA_VERSION', '4.5.5' . env('NINJA_VERSION_SUFFIX'));
define('NINJA_VERSION', '4.5.40' . env('NINJA_VERSION_SUFFIX'));
define('NINJA_TERMS_VERSION', '1.0.1');
define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja'));
@ -371,9 +371,9 @@ if (! defined('APP_NAME')) {
define('NINJA_FORUM_URL', env('NINJA_FORUM_URL', 'https://www.invoiceninja.com/forums/forum/support/'));
define('NINJA_CONTACT_URL', env('NINJA_CONTACT_URL', 'https://www.invoiceninja.com/contact/'));
define('NINJA_FROM_EMAIL', env('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com'));
define('NINJA_IOS_APP_URL', 'https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=1220337560&mt=8');
define('NINJA_ANDROID_APP_URL', 'https://play.google.com/store/apps/details?id=com.invoiceninja.invoiceninja');
define('RELEASES_URL', env('RELEASES_URL', 'https://trello.com/b/63BbiVVe/invoice-ninja'));
define('NINJA_IOS_APP_URL', 'https://itunes.apple.com/us/app/invoice-ninja/id1435514417?ls=1&mt=8');
define('NINJA_ANDROID_APP_URL', 'https://play.google.com/store/apps/details?id=com.invoiceninja.flutter');
define('RELEASES_URL', env('RELEASES_URL', 'https://github.com/invoiceninja/invoiceninja/releases'));
define('ZAPIER_URL', env('ZAPIER_URL', 'https://zapier.com/zapbook/invoice-ninja'));
define('OUTDATE_BROWSER_URL', env('OUTDATE_BROWSER_URL', 'http://browsehappy.com/'));
define('PDFMAKE_DOCS', env('PDFMAKE_DOCS', 'http://pdfmake.org/playground.html'));
@ -414,12 +414,12 @@ if (! defined('APP_NAME')) {
define('INVOICE_DESIGNS_AFFILIATE_KEY', 'T3RS74');
define('SELF_HOST_AFFILIATE_KEY', '8S69AD');
define('PLAN_PRICE_PRO_MONTHLY', env('PLAN_PRICE_PRO_MONTHLY', 8));
define('PLAN_PRICE_ENTERPRISE_MONTHLY_2', env('PLAN_PRICE_ENTERPRISE_MONTHLY_2', 12));
define('PLAN_PRICE_ENTERPRISE_MONTHLY_5', env('PLAN_PRICE_ENTERPRISE_MONTHLY_5', 18));
define('PLAN_PRICE_ENTERPRISE_MONTHLY_10', env('PLAN_PRICE_ENTERPRISE_MONTHLY_10', 24));
define('PLAN_PRICE_ENTERPRISE_MONTHLY_20', env('PLAN_PRICE_ENTERPRISE_MONTHLY_20', 36));
define('WHITE_LABEL_PRICE', env('WHITE_LABEL_PRICE', 20));
define('PLAN_PRICE_PRO_MONTHLY', env('PLAN_PRICE_PRO_MONTHLY', 10));
define('PLAN_PRICE_ENTERPRISE_MONTHLY_2', env('PLAN_PRICE_ENTERPRISE_MONTHLY_2', 14));
define('PLAN_PRICE_ENTERPRISE_MONTHLY_5', env('PLAN_PRICE_ENTERPRISE_MONTHLY_5', 26));
define('PLAN_PRICE_ENTERPRISE_MONTHLY_10', env('PLAN_PRICE_ENTERPRISE_MONTHLY_10', 36));
define('PLAN_PRICE_ENTERPRISE_MONTHLY_20', env('PLAN_PRICE_ENTERPRISE_MONTHLY_20', 44));
define('WHITE_LABEL_PRICE', env('WHITE_LABEL_PRICE', 30));
define('INVOICE_DESIGNS_PRICE', env('INVOICE_DESIGNS_PRICE', 10));
define('USER_TYPE_SELF_HOST', 'SELF_HOST');
@ -695,7 +695,7 @@ if (! defined('APP_NAME')) {
}
// include modules in translations
function mtrans($entityType, $text = false)
function mtrans($entityType, $text = false, $replace = [])
{
if (! $text) {
$text = $entityType;
@ -704,7 +704,7 @@ if (! defined('APP_NAME')) {
// check if this has been translated in a module language file
if (! Utils::isNinjaProd() && $module = Module::find($entityType)) {
$key = "{$module->getLowerName()}::texts.{$text}";
$value = trans($key);
$value = trans($key, $replace);
if ($key != $value) {
return $value;
}

View file

@ -5,6 +5,7 @@ namespace App\Http\Controllers;
use App\Events\UserSignedUp;
use App\Http\Requests\RegisterRequest;
use App\Http\Requests\UpdateAccountRequest;
use App\Models\Company;
use App\Models\Account;
use App\Models\User;
use App\Ninja\OAuth\OAuth;
@ -14,6 +15,7 @@ use App\Ninja\Transformers\UserAccountTransformer;
use App\Services\AuthService;
use Auth;
use Cache;
use Carbon;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
@ -261,6 +263,17 @@ class AccountApiController extends BaseAPIController
$oAuth = new OAuth();
$user = $oAuth->getProvider($provider)->getTokenResponse($token);
/*
if ($user->google_2fa_secret && strpos($request->token_name, 'invoice-ninja-') !== false) {
$secret = \Crypt::decrypt($user->google_2fa_secret);
if (! $request->one_time_password) {
return $this->errorResponse(['message' => 'OTP_REQUIRED'], 401);
} elseif (! \Google2FA::verifyKey($secret, $request->one_time_password)) {
return $this->errorResponse(['message' => 'Invalid one time password'], 401);
}
}
*/
if ($user) {
Auth::login($user);
return $this->processLogin($request);
@ -276,4 +289,49 @@ class AccountApiController extends BaseAPIController
}
public function upgrade(Request $request)
{
$user = Auth::user();
$account = $user->account;
$company = $account->company;
$orderId = $request->order_id;
$timestamp = $request->timestamp;
$productId = $request->product_id;
if ($company->app_store_order_id) {
return '{"message":"error"}';
}
if ($productId == 'v1_pro_yearly') {
$company->plan = PLAN_PRO;
$company->num_users = 1;
$company->plan_price = PLAN_PRICE_PRO_MONTHLY * 10;
} else if ($productId == 'v1_enterprise_2_yearly') {
$company->plan = PLAN_ENTERPRISE;
$company->num_users = 2;
$company->plan_price = PLAN_PRICE_ENTERPRISE_MONTHLY_2 * 10;
} else if ($productId == 'v1_enterprise_5_yearly') {
$company->plan = PLAN_ENTERPRISE;
$company->num_users = 5;
$company->plan_price = PLAN_PRICE_ENTERPRISE_MONTHLY_5 * 10;
} else if ($productId == 'v1_enterprise_10_yearly') {
$company->plan = PLAN_ENTERPRISE;
$company->num_users = 10;
$company->plan_price = PLAN_PRICE_ENTERPRISE_MONTHLY_10 * 10;
} else if ($productId == 'v1_enterprise_20_yearly') {
$company->plan = PLAN_ENTERPRISE;
$company->num_users = 20;
$company->plan_price = PLAN_PRICE_ENTERPRISE_MONTHLY_20 * 10;
}
$company->app_store_order_id = $orderId;
$company->plan_term = PLAN_TERM_YEARLY;
$company->plan_started = $company->plan_started ?: date('Y-m-d');
$company->plan_paid = date('Y-m-d');
$company->plan_expires = Carbon::now()->addYear()->format('Y-m-d');
$company->trial_plan = null;
$company->save();
return '{"message":"success"}';
}
}

View file

@ -950,6 +950,7 @@ class AccountController extends BaseController
{
$account = Auth::user()->account;
$account->show_product_notes = Input::get('show_product_notes') ? true : false;
$account->fill_products = Input::get('fill_products') ? true : false;
$account->update_products = Input::get('update_products') ? true : false;
$account->convert_products = Input::get('convert_products') ? true : false;

View file

@ -44,6 +44,10 @@ class AppController extends BaseController
return Redirect::to('/');
}
if (file_exists(base_path() . '/.env')) {
exit('Error: app is already configured, backup then delete the .env file to re-run the setup');
}
return View::make('setup');
}
@ -131,7 +135,6 @@ class AppController extends BaseController
Cache::flush();
Artisan::call('db:seed', ['--force' => true, '--class' => 'UpdateSeeder']);
Artisan::call('optimize', ['--force' => true]);
if (! Account::count()) {
$firstName = trim(Input::get('first_name'));
@ -269,7 +272,6 @@ class AppController extends BaseController
if (Industry::count() == 0) {
Artisan::call('db:seed', ['--force' => true]);
}
Artisan::call('optimize', ['--force' => true]);
} catch (Exception $e) {
Utils::logError($e);
@ -307,7 +309,6 @@ class AppController extends BaseController
Artisan::call('route:clear');
Artisan::call('view:clear');
Artisan::call('config:clear');
Artisan::call('optimize', ['--force' => true]);
Auth::logout();
Cache::flush();
Session::flush();

View file

@ -42,7 +42,7 @@ class AuthController extends Controller
*/
public function oauthLogin($provider, Request $request)
{
return $this->authService->execute($provider, $request->has('code'));
return $this->authService->execute($provider, $request->filled('code'));
}
/**

View file

@ -25,7 +25,7 @@ class CalendarController extends BaseController
public function loadEvents()
{
if (auth()->user()->account->hasFeature(FEATURE_REPORTS)) {
$events = dispatch(new GenerateCalendarEvents());
$events = dispatch_now(new GenerateCalendarEvents());
} else {
$events = [];
}

View file

@ -43,7 +43,7 @@ class ClientApiController extends BaseAPIController
public function index()
{
$clients = Client::scope()
->orderBy('created_at', 'desc')
->orderBy('updated_at', 'desc')
->withTrashed();
if ($email = Input::get('email')) {

View file

@ -175,11 +175,9 @@ class LoginController extends Controller
*/
public function getLogoutWrapper(Request $request)
{
$contactKey = session('contact_key');
self::logout($request);
return redirect('/client/dashboard/' . $contactKey);
return redirect('/client/login?account_key=' . $request->account_key);
}
}

View file

@ -260,7 +260,7 @@ class ClientController extends BaseController
}
if (request()->json) {
return dispatch(new GenerateStatementData($client, request()->all()));
return dispatch_now(new GenerateStatementData($client, request()->all()));
}
$data = [
@ -276,14 +276,14 @@ class ClientController extends BaseController
public function getEmailHistory()
{
$history = dispatch(new LoadPostmarkHistory(request()->email));
$history = dispatch_now(new LoadPostmarkHistory(request()->email));
return response()->json($history);
}
public function reactivateEmail()
{
$result = dispatch(new ReactivatePostmarkEmail(request()->bounce_id));
$result = dispatch_now(new ReactivatePostmarkEmail(request()->bounce_id));
return response()->json($result);
}

View file

@ -136,6 +136,7 @@ class ClientPortalController extends BaseController
}
}
if (! Input::has('phantomjs')) {
if ($wepayGateway = $account->getGatewayConfig(GATEWAY_WEPAY)) {
$data['enableWePayACH'] = $wepayGateway->getAchEnabled();
}
@ -143,6 +144,7 @@ class ClientPortalController extends BaseController
//$data['enableStripeSources'] = $stripeGateway->getAlipayEnabled();
$data['enableStripeSources'] = true;
}
}
$showApprove = $invoice->quote_invoice_id ? false : true;
if ($invoice->invoice_status_id >= INVOICE_STATUS_APPROVED) {
@ -1033,7 +1035,7 @@ class ClientPortalController extends BaseController
}
if (request()->json) {
return dispatch(new GenerateStatementData($client, request()->all(), $contact));
return dispatch_now(new GenerateStatementData($client, request()->all(), $contact));
}
$data = [

View file

@ -54,7 +54,7 @@ class ClientPortalProposalController extends BaseController
$proposal = $invitation->proposal;
$pdf = dispatch(new ConvertProposalToPdf($proposal));
$pdf = dispatch_now(new ConvertProposalToPdf($proposal));
$this->downloadResponse($proposal->getFilename(), $pdf);
}

View file

@ -46,7 +46,7 @@ class CreditApiController extends BaseAPIController
$credits = Credit::scope()
->withTrashed()
->with(['client'])
->orderBy('created_at', 'desc');
->orderBy('updated_at', 'desc');
return $this->listResponse($credits);
}

View file

@ -154,7 +154,7 @@ class DocumentAPIController extends BaseAPIController
{
$entity = $request->entity();
$this->documentRepo->delete($entity);
$entity->delete();
return $this->itemResponse($entity);
}

View file

@ -47,7 +47,7 @@ class ExpenseApiController extends BaseAPIController
$expenses = Expense::scope()
->withTrashed()
->with('client', 'invoice', 'vendor', 'expense_category')
->orderBy('created_at', 'desc');
->orderBy('updated_at', 'desc');
return $this->listResponse($expenses);
}

View file

@ -61,7 +61,7 @@ class InvoiceApiController extends BaseAPIController
$invoices = Invoice::scope()
->withTrashed()
->with('invoice_items', 'client')
->orderBy('created_at', 'desc');
->orderBy('updated_at', 'desc');
// Filter by invoice number
if ($invoiceNumber = Input::get('invoice_number')) {
@ -73,11 +73,11 @@ class InvoiceApiController extends BaseAPIController
$invoices->where('invoice_status_id', '>=', $statusId);
}
if (request()->has('is_recurring')) {
if (request()->filled('is_recurring')) {
$invoices->where('is_recurring', '=', request()->is_recurring);
}
if (request()->has('invoice_type_id')) {
if (request()->filled('invoice_type_id')) {
$invoices->where('invoice_type_id', '=', request()->invoice_type_id);
}

View file

@ -192,6 +192,10 @@ class InvoiceController extends BaseController
}
}
if (Auth::user()->registered && ! Auth::user()->confirmed) {
session()->flash('warning', trans('texts.confirmation_required', ['link' => link_to('/resend_confirmation', trans('texts.click_here'))]));
}
return View::make('invoices.edit', $data);
}
@ -302,7 +306,7 @@ class InvoiceController extends BaseController
// Check for any taxes which have been deleted
$taxRateOptions = $account->present()->taxRateOptions;
if ($invoice->exists) {
if ($invoice->exists && !$invoice->deleted_at) {
foreach ($invoice->getTaxes() as $key => $rate) {
$key = '0 ' . $key; // mark it as a standard exclusive rate option
if (isset($taxRateOptions[$key])) {

View file

@ -0,0 +1,297 @@
<?php
namespace App\Http\Controllers\Migration;
use App\Http\Controllers\BaseController;
use App\Http\Requests\MigrationAuthRequest;
use App\Http\Requests\MigrationCompaniesRequest;
use App\Http\Requests\MigrationEndpointRequest;
use App\Http\Requests\MigrationTypeRequest;
use App\Libraries\Utils;
use App\Models\Account;
use App\Services\Migration\AuthService;
use App\Services\Migration\CompanyService;
use App\Services\Migration\CompleteService;
use App\Traits\GenerateMigrationResources;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
class StepsController extends BaseController
{
use GenerateMigrationResources;
public function __construct()
{
$this->middleware('migration');
}
private $access = [
'auth' => [
'steps' => ['MIGRATION_TYPE'],
'redirect' => '/migration/start',
],
'endpoint' => [
'steps' => ['MIGRATION_TYPE'],
'redirect' => '/migration/start',
],
'companies' => [
'steps' => ['MIGRATION_TYPE', 'MIGRATION_ACCOUNT_TOKEN'],
'redirect' => '/migration/auth',
],
];
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function start()
{
return view('migration.start');
}
public function import()
{
return view('migration.import');
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function download()
{
return view('migration.download');
}
public function handleType(MigrationTypeRequest $request)
{
session()->put('MIGRATION_TYPE', $request->option);
if ($request->option == 0) {
session()->put('MIGRATION_ENDPOINT', 'https://invoicing.co');
return redirect(
url('/migration/auth')
);
// return redirect(
// url('/migration/endpoint')
// );
}
return redirect(
url('/migration/endpoint')
);
}
public function endpoint()
{
if ($this->shouldGoBack('endpoint')) {
return redirect(
url($this->access['endpoint']['redirect'])
);
}
return view('migration.endpoint');
}
public function handleEndpoint(MigrationEndpointRequest $request)
{
if ($this->shouldGoBack('endpoint')) {
return redirect(
url($this->access['endpoint']['redirect'])
);
}
session()->put('MIGRATION_ENDPOINT', rtrim($request->endpoint,'/'));
return redirect(
url('/migration/auth')
);
}
public function auth()
{
if ($this->shouldGoBack('auth')) {
return redirect(
url($this->access['auth']['redirect'])
);
}
return view('migration.auth');
}
public function handleAuth(MigrationAuthRequest $request)
{
if ($this->shouldGoBack('auth')) {
return redirect(
url($this->access['auth']['redirect'])
);
}
if (auth()->user()->email !== $request->email) {
return back()->with('responseErrors', [trans('texts.cross_migration_message')]);
}
$authentication = (new AuthService($request->email, $request->password, $request->has('api_secret') ? $request->api_secret : null))
->endpoint(session('MIGRATION_ENDPOINT'))
->start();
if ($authentication->isSuccessful()) {
session()->put('MIGRATION_ACCOUNT_TOKEN', $authentication->getAccountToken());
session()->put('MIGRAITON_API_SECRET', $authentication->getApiSecret());
return redirect(
url('/migration/companies')
);
}
return back()->with('responseErrors', $authentication->getErrors());
}
public function companies()
{
if ($this->shouldGoBack('companies')) {
return redirect(
url($this->access['companies']['redirect'])
);
}
$companyService = (new CompanyService())
->start();
if ($companyService->isSuccessful()) {
return view('migration.companies', ['companies' => $companyService->getCompanies()]);
}
return response()->json([
'message' => 'Oops, looks like something failed. Please try again.'
], 500);
}
public function handleCompanies(MigrationCompaniesRequest $request)
{
if ($this->shouldGoBack('companies')) {
return redirect(
url($this->access['companies']['redirect'])
);
}
try {
$migrationData = $this->generateMigrationData($request->all());
$completeService = (new CompleteService(session('MIGRATION_ACCOUNT_TOKEN')))
->data($migrationData)
->endpoint(session('MIGRATION_ENDPOINT'))
->start();
}
finally {
if ($completeService->isSuccessful()) {
return view('migration.completed');
}
return view('migration.completed', ['customMessage' => $completeService->getErrors()[0]]);
}
}
public function completed()
{
return view('migration.completed');
}
/**
* ==================================
* Rest of functions that are used as 'actions', not controller methods.
* ==================================
*/
public function shouldGoBack(string $step)
{
$redirect = true;
foreach ($this->access[$step]['steps'] as $step) {
if (session()->has($step)) {
$redirect = false;
} else {
$redirect = true;
}
}
return $redirect;
}
/**
* Handle data downloading for the migration.
*
* @return string
*/
public function generateMigrationData(array $data): array
{
set_time_limit(0);
$migrationData = [];
foreach ($data['companies'] as $company) {
$account = Account::where('account_key', $company['id'])->firstOrFail();
$this->account = $account;
$date = date('Y-m-d');
$accountKey = $this->account->account_key;
$output = fopen('php://output', 'w') or Utils::fatalError();
$fileName = "{$accountKey}-{$date}-invoiceninja";
$localMigrationData['data'] = [
'account' => $this->getAccount(),
'company' => $this->getCompany(),
'users' => $this->getUsers(),
'tax_rates' => $this->getTaxRates(),
'payment_terms' => $this->getPaymentTerms(),
'clients' => $this->getClients(),
'company_gateways' => $this->getCompanyGateways(),
'client_gateway_tokens' => $this->getClientGatewayTokens(),
'vendors' => $this->getVendors(),
'projects' => $this->getProjects(),
'products' => $this->getProducts(),
'credits' => $this->getCreditsNotes(),
'invoices' => $this->getInvoices(),
'recurring_invoices' => $this->getRecurringInvoices(),
'quotes' => $this->getQuotes(),
'payments' => array_merge($this->getPayments(), $this->getCredits()),
'documents' => $this->getDocuments(),
'expense_categories' => $this->getExpenseCategories(),
'task_statuses' => $this->getTaskStatuses(),
'expenses' => $this->getExpenses(),
'tasks' => $this->getTasks(),
'documents' => $this->getDocuments(),
'ninja_tokens' => $this->getNinjaToken(),
];
$localMigrationData['force'] = array_key_exists('force', $company);
Storage::makeDirectory('migrations');
$file = Storage::path("migrations/{$fileName}.zip");
//$file = storage_path("migrations/{$fileName}.zip");
ksort($localMigrationData);
$zip = new \ZipArchive();
$zip->open($file, \ZipArchive::CREATE | \ZipArchive::OVERWRITE);
$zip->addFromString('migration.json', json_encode($localMigrationData, JSON_PRETTY_PRINT));
$zip->close();
$localMigrationData['file'] = $file;
$migrationData[] = $localMigrationData;
}
return $migrationData;
// header('Content-Type: application/zip');
// header('Content-Length: ' . filesize($file));
// header("Content-Disposition: attachment; filename={$fileName}.zip");
}
}

View file

@ -11,6 +11,7 @@ use App\Models\Payment;
use App\Models\PaymentMethod;
use App\Models\Product;
use App\Ninja\Mailers\UserMailer;
use App\Ninja\PaymentDrivers\PaymentActionRequiredException;
use App\Ninja\Repositories\ClientRepository;
use App\Ninja\Repositories\InvoiceRepository;
use App\Services\InvoiceService;
@ -124,11 +125,18 @@ class OnlinePaymentController extends BaseController
*
* @return \Illuminate\Http\RedirectResponse
*/
public function doPayment(CreateOnlinePaymentRequest $request, $invitationKey, $gatewayTypeAlias = false)
public function doPayment(
CreateOnlinePaymentRequest $request,
$invitationKey,
$gatewayTypeAlias = false,
$sourceId = false
)
{
$invitation = $request->invitation;
if ($gatewayTypeAlias) {
if ($gatewayTypeAlias == GATEWAY_TYPE_TOKEN) {
$gatewayTypeId = $gatewayTypeAlias;
} elseif ($gatewayTypeAlias) {
$gatewayTypeId = GatewayType::getIdFromAlias($gatewayTypeAlias);
} else {
$gatewayTypeId = Session::get($invitation->id . 'gateway_type');
@ -141,7 +149,16 @@ class OnlinePaymentController extends BaseController
}
try {
$paymentDriver->completeOnsitePurchase($request->all());
// Load the payment method to charge.
// Currently only hit for saved cards that still require 3D secure verification.
$paymentMethod = null;
if ($sourceId) {
$paymentMethod = PaymentMethod::clientId($invitation->invoice->client_id)
->wherePublicId($sourceId)
->firstOrFail();
}
$paymentDriver->completeOnsitePurchase($request->all(), $paymentMethod);
if (request()->capture) {
return redirect('/client/dashboard')->withMessage(trans('texts.updated_payment_details'));
@ -152,6 +169,8 @@ class OnlinePaymentController extends BaseController
}
return $this->completePurchase($invitation);
} catch (PaymentActionRequiredException $exception) {
return $paymentDriver->startStepTwo($exception->getData());
} catch (Exception $exception) {
return $this->error($paymentDriver, $exception, true);
}

View file

@ -51,7 +51,7 @@ class PaymentApiController extends BaseAPIController
$payments = Payment::scope()
->withTrashed()
->with(['invoice'])
->orderBy('created_at', 'desc');
->orderBy('updated_at', 'desc');
return $this->listResponse($payments);
}

View file

@ -218,7 +218,7 @@ class PaymentController extends BaseController
Session::flash('message', trans($credit ? 'texts.created_payment_and_credit' : 'texts.created_payment'));
}
return redirect()->to($payment->client->getRoute() . '#payments');
return url($payment->client->getRoute());
}
/**

View file

@ -56,7 +56,7 @@ class ProductApiController extends BaseAPIController
{
$products = Product::scope()
->withTrashed()
->orderBy('created_at', 'desc');
->orderBy('updated_at', 'desc');
return $this->listResponse($products);
}

View file

@ -74,7 +74,7 @@ class ProjectApiController extends BaseAPIController
{
$projects = Project::scope()
->withTrashed()
->orderBy('created_at', 'desc');
->orderBy('updated_at', 'desc');
return $this->listResponse($projects);
}

View file

@ -54,7 +54,7 @@ class ProjectController extends BaseController
{
$account = auth()->user()->account;
$project = $request->entity();
$chartData = dispatch(new GenerateProjectChartData($project));
$chartData = dispatch_now(new GenerateProjectChartData($project));
$data = [
'account' => auth()->user()->account,

View file

@ -168,7 +168,7 @@ class ProposalController extends BaseController
{
$proposal = $request->entity();
$pdf = dispatch(new ConvertProposalToPdf($proposal));
$pdf = dispatch_now(new ConvertProposalToPdf($proposal));
$this->downloadResponse($proposal->getFilename(), $pdf);
}

View file

@ -35,7 +35,7 @@ class QuoteApiController extends InvoiceApiController
->withTrashed()
->quotes()
->with('invoice_items', 'client')
->orderBy('created_at', 'desc');
->orderBy('updated_at', 'desc');
return $this->listResponse($invoices);
}

View file

@ -69,7 +69,7 @@ class ReportController extends BaseController
} else {
$reportType = ENTITY_INVOICE;
$dateField = FILTER_INVOICE_DATE;
$startDate = Utils::today(false)->modify('-3 month');
$startDate = Utils::today(false)->modify('-1 month');
$endDate = Utils::today(false);
}
@ -111,11 +111,11 @@ class ReportController extends BaseController
'start_date' => $params['startDate'],
'end_date' => $params['endDate'],
];
$report = dispatch(new RunReport(auth()->user(), $reportType, $config, $isExport));
$report = dispatch_now(new RunReport(auth()->user(), $reportType, $config, $isExport));
$params = array_merge($params, $report->exportParams);
switch ($action) {
case 'export':
return dispatch(new ExportReportResults(auth()->user(), $format, $reportType, $params))->export($format);
return dispatch_now(new ExportReportResults(auth()->user(), $format, $reportType, $params))->export($format);
break;
case 'schedule':
self::schedule($params, $config);
@ -190,7 +190,7 @@ class ReportController extends BaseController
public function loadEmailReport($startDate, $endDate)
{
$data = dispatch(new LoadPostmarkStats($startDate, $endDate));
$data = dispatch_now(new LoadPostmarkStats($startDate, $endDate));
return response()->json($data);
}

View file

@ -45,8 +45,8 @@ class TaskApiController extends BaseAPIController
{
$tasks = Task::scope()
->withTrashed()
->with('client', 'invoice', 'project')
->orderBy('created_at', 'desc');
->with('client', 'invoice', 'project', 'task_status')
->orderBy('updated_at', 'desc');
return $this->listResponse($tasks);
}

View file

@ -125,7 +125,7 @@ class TaskKanbanController extends BaseController
$origSortOrder = $status->sort_order;
$newSortOrder = request('sort_order');
if (request()->has('sort_order') && $newSortOrder != $origSortOrder) {
if (request()->filled('sort_order') && $newSortOrder != $origSortOrder) {
TaskStatus::scope()
->where('sort_order', '>', $origSortOrder)
->decrement('sort_order');

View file

@ -53,7 +53,7 @@ class VendorApiController extends BaseAPIController
{
$vendors = Vendor::scope()
->withTrashed()
->orderBy('created_at', 'desc');
->orderBy('updated_at', 'desc');
return $this->listResponse($vendors);
}

View file

@ -63,5 +63,6 @@ class Kernel extends HttpKernel
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'lookup' => \App\Http\Middleware\DatabaseLookup::class,
'permissions.required' => \App\Http\Middleware\PermissionsRequired::class,
'migration' => \App\Http\Middleware\EligibleForMigration::class,
];
}

View file

@ -71,7 +71,9 @@ class ApiCheck
return $next($request);
}
if (! Utils::hasFeature(FEATURE_API) && ! $hasApiSecret) {
$isMobileApp = strpos(array_get($_SERVER, 'HTTP_USER_AGENT'), '(dart:io)') !== false;
if (! Utils::hasFeature(FEATURE_API) && ! $hasApiSecret && ! $isMobileApp) {
$error['error'] = ['message' => 'API requires pro plan'];
return Response::json($error, 403, $headers);

View file

@ -68,7 +68,7 @@ class Authenticate
Session::put('contact_key', $contact->contact_key);
}
if (! $contact) {
return \Redirect::to('client/session_expired');
return \Redirect::to('client/login');
}
$account = $contact->account;

View file

@ -0,0 +1,24 @@
<?php
namespace App\Http\Middleware;
use Closure;
class EligibleForMigration
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if (auth()->user()->eligibleForMigration()) {
return $next($request);
}
return redirect('/settings/account_management');
}
}

View file

@ -72,8 +72,8 @@ class StartupCheck
$file = storage_path() . '/version.txt';
$version = @file_get_contents($file);
if ($version != NINJA_VERSION) {
if (version_compare(phpversion(), '7.0.0', '<')) {
dd('Please update PHP to >= 7.0.0');
if (version_compare(phpversion(), '7.1.0', '<')) {
dd('Please update PHP to >= 7.1.0');
}
$handle = fopen($file, 'w');
fwrite($handle, NINJA_VERSION);
@ -95,7 +95,7 @@ class StartupCheck
Session::put(SESSION_COUNTER, ++$count);
if (Utils::isNinja()) {
if ($coupon = request()->coupon) {
if (($coupon = request()->coupon) && ! $company->hasActivePlan()) {
if ($code = config('ninja.coupon_50_off')) {
if (hash_equals($coupon, $code)) {
$company->applyDiscount(.5);

View file

@ -42,7 +42,11 @@ class CreateOnlinePaymentRequest extends Request
$input['invitation'] = $invitation;
if ($gatewayTypeAlias = request()->gateway_type) {
if ($gatewayTypeAlias != GATEWAY_TYPE_TOKEN) {
$input['gateway_type'] = GatewayType::getIdFromAlias($gatewayTypeAlias);
} else {
$input['gateway_type'] = $gatewayTypeAlias;
}
} else {
$input['gateway_type'] = session($invitation->id . 'gateway_type');
}

View file

@ -0,0 +1,31 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class MigrationAuthRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'email' => 'required|email',
'password' => 'required',
];
}
}

View file

@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class MigrationCompaniesRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'companies' => 'required',
];
}
}

View file

@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class MigrationEndpointRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'endpoint' => 'required|url',
];
}
}

View file

@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class MigrationTypeRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'option' => 'required|in:0,1',
];
}
}

View file

@ -39,23 +39,4 @@ class RegisterRequest extends Request
return $rules;
}
public function response(array $errors)
{
/* If the user is not validating from a mobile app - pass through parent::response */
if (! isset($this->req->api_secret)) {
return parent::response($errors);
}
/* If the user is validating from a mobile app - pass through first error string and return error */
foreach ($errors as $error) {
foreach ($error as $key => $value) {
$message['error'] = ['message' => $value];
$message = json_encode($message, JSON_PRETTY_PRINT);
$headers = Utils::getApiHeaders();
return Response::make($message, 400, $headers);
}
}
}
}

View file

@ -3,7 +3,9 @@
namespace App\Http\Requests;
use App\Libraries\Utils;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\ValidationException;
use Response;
// https://laracasts.com/discuss/channels/general-discussion/laravel-5-modify-input-before-validation/replies/34366
@ -54,22 +56,20 @@ abstract class Request extends FormRequest
return $this->all();
}
public function response(array $errors)
protected function failedValidation(Validator $validator)
{
/* If the user is not validating from a mobile app - pass through parent::response */
if (! request()->api_secret) {
return parent::response($errors);
if ( ! request()->api_secret) {
parent::failedValidation($validator);
}
/* If the user is validating from a mobile app - pass through first error string and return error */
foreach ($errors as $error) {
foreach ($error as $key => $value) {
if ($value = $validator->getMessageBag()->first()) {
$message['error'] = ['message' => $value];
$message = json_encode($message, JSON_PRETTY_PRINT);
$headers = Utils::getApiHeaders();
return Response::make($message, 400, $headers);
}
throw new ValidationException($validator, Response::make($message, 400, $headers));
}
}
}

View file

@ -49,7 +49,7 @@ class SaveClientPortalSettings extends Request
} else {
$iframeURL = substr(strtolower($input['iframe_url']), 0, MAX_IFRAME_URL_LENGTH);
$iframeURL = preg_replace('/[^a-zA-Z0-9_\-\:\/\.]/', '', $iframeURL);
$input['iframe_url'] = rtrim($iframeURL, '/');
$input['iframe_url'] = $iframeURL;
$input['subdomain'] = null;
}
}

View file

@ -151,7 +151,7 @@ class GenerateStatementData
$item->product_key = $ageGroups['age_group_0'];
$item->notes = $ageGroups['age_group_30'];
$item->custom_value1 = $ageGroups['age_group_60'];
$item->custom_value1 = $ageGroups['age_group_90'];
$item->custom_value2 = $ageGroups['age_group_90'];
$item->cost = $ageGroups['age_group_120'];
$item->invoice_item_type_id = 4;
$data->push($item);

View file

@ -2,8 +2,8 @@
namespace App\Jobs;
use App\Jobs\Job;
use App\Libraries\CurlUtils;
use Utils;
class ConvertProposalToPdf extends Job
{
@ -14,11 +14,36 @@ class ConvertProposalToPdf extends Job
public function handle()
{
$proposal = $this->proposal;
$url = $proposal->getHeadlessLink();
if (! env('PHANTOMJS_CLOUD_KEY') && ! env('PHANTOMJS_BIN_PATH')) {
return false;
}
if (Utils::isTravis()) {
return false;
}
$proposal = $this->proposal;
$link = $proposal->getLink(true, true);
$phantomjsSecret = env('PHANTOMJS_SECRET');
$phantomjsLink = sprintf('%s?phantomjs=true&phantomjs_secret=%s', $link, $phantomjsSecret);
$filename = sprintf('%s/storage/app/%s.pdf', base_path(), strtolower(str_random(RANDOM_KEY_LENGTH)));
$pdf = CurlUtils::renderPDF($url, $filename);
try {
$pdf = CurlUtils::renderPDF($phantomjsLink, $filename);
if (! $pdf && ($key = env('PHANTOMJS_CLOUD_KEY'))) {
$url = "http://api.phantomjscloud.com/api/browser/v2/{$key}/?request=%7Burl:%22{$link}?phantomjs=true%26phantomjs_secret={$phantomjsSecret}%22,renderType:%22pdf%22%7D";
$pdf = CurlUtils::get($url);
}
} catch (\Exception $exception) {
Utils::logError("PhantomJS - Failed to load {$phantomjsLink}: {$exception->getMessage()}");
return false;
}
if (! $pdf || strlen($pdf) < 200) {
Utils::logError("PhantomJS - Invalid response {$phantomjsLink}: {$pdf}");
return false;
}
return $pdf;
}

View file

@ -69,6 +69,16 @@ class LoadPostmarkHistory extends Job
$details = $this->postmark->getOutboundMessageDetails($message['MessageID']);
$str .= sprintf('<b>%s</b><br/>', $details['subject']);
$event = $details['messageevents'][0];
$str .= sprintf('%s | %s<br/>', $event['Type'], $this->account->getDateTime($event['ReceivedAt'], true));
if ($message = $event['Details']['DeliveryMessage']) {
$str .= sprintf('<span class="text-muted">%s</span><br/>', $message);
}
if ($server = $event['Details']['DestinationServer']) {
$str .= sprintf('<span class="text-muted">%s</span><br/>', $server);
}
/*
if (count($details['messageevents'])) {
$event = $details['messageevents'][0];
$str .= sprintf('%s | %s<br/>', $event['Type'], $this->account->getDateTime($event['ReceivedAt'], true));
@ -81,6 +91,7 @@ class LoadPostmarkHistory extends Job
} else {
$str .= trans('texts.processing') . '...';
}
*/
$str .= '<p/>';
}

View file

@ -989,6 +989,38 @@ class Utils
return EVENT_CREATE_PAYMENT;
} elseif ($eventName == 'create_vendor') {
return EVENT_CREATE_VENDOR;
} elseif ($eventName == 'update_quote') {
return EVENT_UPDATE_QUOTE;
} elseif ($eventName == 'delete_quote') {
return EVENT_DELETE_QUOTE;
} elseif ($eventName == 'update_invoice') {
return EVENT_UPDATE_INVOICE;
} elseif ($eventName == 'delete_invoice') {
return EVENT_DELETE_INVOICE;
} elseif ($eventName == 'update_client') {
return EVENT_UPDATE_CLIENT;
} elseif ($eventName == 'delete_client') {
return EVENT_DELETE_CLIENT;
} elseif ($eventName == 'delete_payment') {
return EVENT_DELETE_PAYMENT;
} elseif ($eventName == 'update_vendor') {
return EVENT_UPDATE_VENDOR;
} elseif ($eventName == 'delete_vendor') {
return EVENT_DELETE_VENDOR;
} elseif ($eventName == 'create_expense') {
return EVENT_CREATE_EXPENSE;
} elseif ($eventName == 'update_expense') {
return EVENT_UPDATE_EXPENSE;
} elseif ($eventName == 'delete_expense') {
return EVENT_DELETE_EXPENSE;
} elseif ($eventName == 'create_task') {
return EVENT_CREATE_TASK;
} elseif ($eventName == 'update_task') {
return EVENT_UPDATE_TASK;
} elseif ($eventName == 'delete_task') {
return EVENT_DELETE_TASK;
} elseif ($eventName == 'approve_quote') {
return EVENT_APPROVE_QUOTE;
} else {
return false;
}
@ -1199,6 +1231,7 @@ class Utils
return '';
}
$link = e($link);
$title = $link;
if (substr($link, 0, 4) != 'http') {
$link = 'http://' . $link;

View file

@ -263,7 +263,7 @@ class SubscriptionListener
$jsonData = $manager->createData($resource)->toArray();
// For legacy Zapier support
if (isset($jsonData['client_id'])) {
if (isset($jsonData['client_id']) && $jsonData['client_id'] != 0) {
$jsonData['client_name'] = $entity->client->getDisplayName();
}

View file

@ -245,37 +245,91 @@ class Account extends Eloquent
];
public static $customLabels = [
'address1',
'address2',
'amount',
'amount_paid',
'balance',
'balance_due',
'blank',
'city_state_postal',
'client_name',
'company_name',
'contact_name',
'country',
'credit_card',
'credit_date',
'credit_issued_to',
'credit_note',
'credit_number',
'credit_to',
'custom_value1',
'custom_value2',
'date',
'delivery_note',
'description',
'details',
'discount',
'due_date',
'gateway_fee_item',
'email',
'from',
'gateway_fee_description',
'gateway_fee_discount_description',
'gateway_fee_item',
'hours',
'id_number',
'invoice',
'invoice_date',
'invoice_due_date',
'invoice_issued_to',
'invoice_no',
'invoice_number',
'invoice_to',
'invoice_total',
'item',
'line_total',
'method',
'outstanding',
'paid_to_date',
'partial_due',
'payment_date',
'phone',
'po_number',
'postal_city_state',
'product_key',
'quantity',
'quote',
'quote_date',
'quote_due_date',
'quote_issued_to',
'quote_no',
'quote_number',
'quote_to',
'rate',
'reference',
'service',
'statement',
'statement_date',
'statement_issued_to',
'statement_to',
'subtotal',
'surcharge',
'tax',
'tax_invoice',
'tax_quote',
'taxes',
'terms',
'to',
'total',
'unit_cost',
'valid_until',
'vat_number',
'website',
'work_phone',
'your_credit',
'your_invoice',
'your_quote',
'your_statement',
];
public static $customMessageTypes = [
@ -368,6 +422,14 @@ class Account extends Eloquent
return $this->hasMany('App\Models\TaxRate');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function task_statuses()
{
return $this->hasMany('App\Models\TaskStatus')->orderBy('sort_order');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/

View file

@ -51,7 +51,7 @@ class AccountGatewaySettings extends EntityModel
public function hasTaxes()
{
return floatval($this->fee_tax_rate1) || floatval($this->fee_tax_rate1);
return floatval($this->fee_tax_rate1) || floatval($this->fee_tax_rate2);
}
public function feesToString()

View file

@ -115,6 +115,7 @@ class Activity extends Eloquent
$user = $this->user;
$invoice = $this->invoice;
$contactId = $this->contact_id;
$contact = $this->contact;
$payment = $this->payment;
$credit = $this->credit;
$expense = $this->expense;
@ -126,7 +127,7 @@ class Activity extends Eloquent
'user' => $isSystem ? '<i>' . trans('texts.system') . '</i>' : e($user->getDisplayName()),
'invoice' => $invoice ? link_to($invoice->getRoute(), $invoice->getDisplayName()) : null,
'quote' => $invoice ? link_to($invoice->getRoute(), $invoice->getDisplayName()) : null,
'contact' => $contactId ? link_to($client->getRoute(), $client->getDisplayName()) : e($user->getDisplayName()),
'contact' => $contactId ? link_to($client->getRoute(), $contact->getDisplayName()) : e($user->getDisplayName()),
'payment' => $payment ? e($payment->transaction_reference) : null,
'payment_amount' => $payment ? $account->formatMoney($payment->amount, $payment) : null,
'adjustment' => $this->adjustment ? $account->formatMoney($this->adjustment, $this) : null,

View file

@ -103,7 +103,7 @@ class Company extends Eloquent
public function hasActivePlan()
{
return Carbon::parse($this->plan_expires) >= Carbon::today();
return $this->plan_expires && Carbon::parse($this->plan_expires) >= Carbon::today();
}
public function hasExpiredPlan($plan)
@ -202,7 +202,7 @@ class Company extends Eloquent
$this->promo_expires = date_create()->modify('3 days')->format('Y-m-d');
}
public function applyFreeYear()
public function applyFreeYear($numYears = 1)
{
if ($this->plan_started && $this->plan_started != '0000-00-00') {
return;
@ -213,7 +213,7 @@ class Company extends Eloquent
$this->plan_price = PLAN_PRICE_PRO_MONTHLY;
$this->plan_started = date_create()->format('Y-m-d');
$this->plan_paid = date_create()->format('Y-m-d');
$this->plan_expires = date_create()->modify('1 year')->format('Y-m-d');
$this->plan_expires = date_create()->modify($numYears . ' year')->format('Y-m-d');
}
}

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