Compare commits

..

2435 Commits

Author SHA1 Message Date
Dillon 78ceb62dec Sync code fix from exchange 2023-03-28 23:35:49 +08:00
Dillon b25adef107 Fix another error from production logs 2023-03-25 14:20:38 +08:00
Dillon 329aa4b496 Minor cleanup 2023-03-25 02:17:51 +08:00
Dillon a05609081b minor code streamline 2023-03-24 15:15:05 +08:00
Dillon 9d442c8cc4 CRM Task with dynamic data 2023-03-24 03:14:57 +08:00
Dillon f5df1adff8 Fix a problem with new registration uploadin documentg 2023-03-23 04:31:35 +08:00
Dillon 119e58c1c9 Added new task, new task details such as priority and due date + some cleanup 2023-03-23 04:18:17 +08:00
Dillon b08ba3e716 Exchange - changes code sync 2023-03-22 22:19:31 +08:00
edmondlang 57cdedbdd0 update billplz callback logic 2023-03-21 16:58:12 +08:00
edmondlang fea03de5bd audit billplz invoice 2023-03-21 13:08:05 +08:00
edmondlang 75babc9f38 audit billplz invoice 2023-03-21 13:03:27 +08:00
edmondlang a36f7123e8 audit billplz invoice 2023-03-21 12:56:53 +08:00
Dillon Ngo fad56e30dc Merge branch 'dillon/debug-and-fixes-1' into 'master'
Fix a problem in invoice where rounding issue cause an invoice that is fully...

See merge request CIEFWorldwideSdnBhd/shipping-portal!154
2023-03-20 14:17:04 +00:00
Dillon Ngo 6b56899004 Merge branch 'dillon/crm-invoice-update-23' into 'master'
Dillon/crm invoice update 23

See merge request CIEFWorldwideSdnBhd/shipping-portal!155
2023-03-20 14:16:13 +00:00
edmondlang 37444e6e30 update billing question display position 2023-03-20 18:05:29 +08:00
Dillon 32591273f8 Fix a problem in invoice where rounding issue cause an invoice that is fully paid to appear partially paid 2023-03-19 22:21:10 +08:00
Dillon f73b1d7fe3 Fix a problem at CRM where downloading of invoice in PDF throws errors 2023-03-19 22:20:49 +08:00
Dillon 0d4f7e0ed5 Another attempt to fix an error where invoice created at crm has no project id 2023-03-19 17:34:34 +08:00
Dillon 9786198ca2 Fix Error: BadMethodCallException: Call to undefined method 2023-03-19 16:31:30 +08:00
Dillon 76a9af2dc8 Fix a problem of a mismatch in data update for invoice 2023-03-19 04:50:12 +08:00
Dillon 3dcf3cff10 Update CRM invoice due date 2023-03-19 04:29:50 +08:00
Dillon Ngo 37da620927 Merge branch 'dillon/debug-and-fixes-1' into 'master'
Insert logs for debugging

See merge request CIEFWorldwideSdnBhd/shipping-portal!153
2023-03-18 08:28:57 +00:00
Dillon 64ec76eed6 Insert logs for debugging 2023-03-17 17:28:18 +08:00
edmondlang ef3c738fb1 debug billplz payment 2023-03-15 19:58:05 +08:00
edmondlang 92b6e6dc3a debug billplz payment 2023-03-15 19:48:48 +08:00
Dillon Ngo 0d330447eb Merge branch 'dillon/crm-tasks-department' into 'master'
CRM add department custom field to tasks

See merge request CIEFWorldwideSdnBhd/shipping-portal!152
2023-03-14 12:41:49 +00:00
Omair Saleh daeb376aa5 billplz audit 2023-03-13 16:05:41 +08:00
Omair Saleh f4d81cbde9 Merge remote-tracking branch 'origin/master' 2023-03-13 16:03:18 +08:00
Omair Saleh 0fd3584af2 billplz audit 2023-03-13 16:03:05 +08:00
edmondlang a2f70f266d billplz audit 2023-03-13 06:57:19 +08:00
Omair Saleh 432ce2d14a billplz audit 2023-03-13 01:42:14 +08:00
edmondlang 715384f4a4 audit billplz 2023-03-13 00:42:44 +08:00
edmondlang 8277b9d0fd fix bug unsuccessfull payment can went through 2023-03-13 00:32:59 +08:00
Dillon 4769541535 CRM add department custom field to tasks 2023-03-12 17:37:49 +08:00
Dillon Ngo fe8b6d0518 Merge branch 'dillon/crm-create-task-2' into 'master'
Add in missing update project function

See merge request CIEFWorldwideSdnBhd/shipping-portal!151
2023-03-11 11:45:11 +00:00
Dillon 5934fbcb6c Add in missing update project function 2023-03-11 19:43:30 +08:00
Dillon Ngo c078a879d2 Merge branch 'dillon/crm-feed-improvement-1' into 'master'
Dillon/crm feed improvement 1

See merge request CIEFWorldwideSdnBhd/shipping-portal!150
2023-03-11 08:56:40 +00:00
Dillon Ngo c58f2e55d7 Merge branch 'dillon/crm-create-task-2' into 'master'
Dillon/crm create task 2

See merge request CIEFWorldwideSdnBhd/shipping-portal!149
2023-03-11 08:56:25 +00:00
Dillon 45c94321b1 Fix a problem in invoice item where the amount cannot be 0 2023-03-11 16:32:49 +08:00
Dillon 4fbe771dce Fix a problem with task name in CRM must be unique 2023-03-10 21:12:43 +08:00
edmondlang 9f8ba5163c fix list admin user 2023-03-10 19:23:01 +08:00
Dillon b06cef4045 Feedback from user on crm leads registration 2023-03-10 17:58:13 +08:00
Dillon 1c072d7b96 CRM create all remaining tasks according to documentation 2023-03-10 02:41:41 +08:00
edmondlang eeb7bb77bb delete duplicated invoice 2023-03-09 12:46:00 +08:00
edmondlang 2de60c8262 test delete duplicated invoice 2023-03-09 12:44:36 +08:00
edmondlang c8a2ce71e1 test delete duplicated invoice 2023-03-09 12:39:28 +08:00
edmondlang 7e04580be0 update show duplicated invoice 2023-03-09 12:34:37 +08:00
edmondlang 3d15a8e312 delete duplicate invoice logic 2023-03-09 10:21:40 +08:00
edmondlang 9936e42574 update show duplicated invoice 2023-03-09 10:15:20 +08:00
edmondlang 16ffec01d4 fix missing invoices 2023-03-09 09:28:45 +08:00
edmondlang 7959f8c83c fix missing invoices 2023-03-08 22:02:03 +08:00
edmondlang 16b5660f12 fix duplicated packing list 2023-03-08 15:33:17 +08:00
edmondlang 023954db70 fix duplicated packing list 2023-03-08 14:32:10 +08:00
edmondlang 535b8a59b9 fix invoice drop date 2023-03-08 11:48:38 +08:00
omair saleh dc4d7004a3 Merge branch 'dillon/crm-create-invoice' into 'master'
Dillon/crm create invoice

See merge request CIEFWorldwideSdnBhd/shipping-portal!148
2023-03-07 15:16:46 +00:00
Dillon 128c8083c3 CRM tie invoice to project 2023-03-06 15:12:55 +08:00
Dillon d52131d9df CRM create invoice 2023-03-05 20:28:48 +08:00
edmondlang 579dd02ebf update allow user to edit billing address 2023-03-02 22:20:08 +08:00
edmondlang 1e6ac000ac fix invoice command 2023-03-02 17:06:29 +08:00
edmondlang 0802198c97 update allow user to edit billing address 2023-03-02 16:25:51 +08:00
edmondlang 2421f6dcf0 allow user to edit billing address 2023-03-02 16:15:51 +08:00
omair saleh 127a13c59c Merge branch 'dillon/crm-create-task' into 'master'
Add new tasks post payment into CRM + Add task append to lead

See merge request CIEFWorldwideSdnBhd/shipping-portal!146
2023-03-02 00:25:56 +00:00
Dillon ba2bd59b04 Add new tasks post payment into CRM + Add task append to lead 2023-03-01 12:29:47 +08:00
edmondlang 981ec9bbeb approve invoice function for testing 2023-02-28 14:22:32 +08:00
edmondlang b293542321 disable user to generate invoice on web link 2023-02-28 14:12:24 +08:00
Omair Saleh 18593cb959 fix duplicated invoices 2023-02-28 12:58:53 +08:00
Omair Saleh e2d1426d19 fix duplicated invoices 2023-02-28 12:58:18 +08:00
Omair Saleh d31deeb112 fix duplicated invoices 2023-02-28 12:50:52 +08:00
Omair Saleh d61a0c2104 fix duplicated invoices 2023-02-28 12:03:17 +08:00
edmondlang cbda7aa6ba delete duplicated invoice 2023-02-27 19:29:24 +08:00
edmondlang b5027c81f8 delete duplicated invoice 2023-02-27 19:26:26 +08:00
edmondlang e83e53a1d7 delete duplicated invoice 2023-02-27 19:21:25 +08:00
edmondlang 4058456797 delete duplicated invoice 2023-02-27 19:18:43 +08:00
edmondlang d03e34a1f4 delete duplicated invoice 2023-02-27 19:15:36 +08:00
edmondlang 5d79d5808a delete duplicated invoice for order marking 165005587 only 2023-02-27 16:17:47 +08:00
edmondlang e4464c3eb4 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2023-02-27 15:57:08 +08:00
edmondlang e227abac59 check duplicated invoice 2023-02-27 15:56:29 +08:00
omair saleh 997a9da276 Merge branch 'dillon/crm-integration' into 'master'
Dockerising shipping-portal usign the same setting from exchange-2.0.

See merge request CIEFWorldwideSdnBhd/shipping-portal!145
2023-02-27 05:14:32 +00:00
edmondlang a810fcad59 show duplicated invoice 2023-02-27 13:07:54 +08:00
edmondlang 9f4b04b9fb update show duplicated invoice 2023-02-27 12:57:46 +08:00
edmondlang 085692485a show duplicated invoice 2023-02-27 12:42:35 +08:00
edmondlang 6b5ae9b0b7 export invoice for PAID INVOICE and PENDING PAYMENT 2023-02-24 18:06:39 +08:00
edmondlang eb92a76a0b update invoice search function 2023-02-23 14:53:21 +08:00
Dillon 2b20160334 User feedback fix and enhancement on crm integration 2023-02-22 18:09:34 +08:00
Dillon 8a29f10ef3 Include company name and phone number into lead during regirstration 2023-02-22 10:36:35 +08:00
edmondlang a1bc3aa652 update PAYMENT AND BILLING invoice per_page to 5 2023-02-21 23:53:49 +08:00
edmondlang e5af2bf171 Merge branch 'auto-generate-invoice' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2023-02-21 23:42:58 +08:00
edmondlang 2443575744 correct typo 2023-02-21 23:42:37 +08:00
edmondlang 864bbc70b6 update invoice search function 2023-02-21 23:40:02 +08:00
edmondlang c439bb5d61 invoice search function 2023-02-21 23:31:20 +08:00
edmondlang 82b99a40cf update admin payments billing section component 2023-02-21 19:57:08 +08:00
edmondlang 272ce5fa39 auto generate invoice 2023-02-21 16:50:14 +08:00
edmondlang c16a49d55c update regenerate invoice by web route 2023-02-21 16:07:32 +08:00
edmondlang c85b603b81 Nana from the Digital marketing department has requested to remove the wechat_id in registration 2023-02-21 15:00:52 +08:00
Omair Saleh 6c6b104dff fix bug when container schedule has issue 2023-02-21 14:19:28 +08:00
Omair Saleh 430b26def0 Merge remote-tracking branch 'origin/master' 2023-02-21 14:15:07 +08:00
Omair Saleh 2d9482feb6 fix bug when container schedule has issue 2023-02-21 14:14:38 +08:00
edmondlang 615e3e7683 update export-customer-order 2023-02-21 09:58:47 +08:00
edmondlang 32936af538 update export-customer-order 2023-02-20 22:14:09 +08:00
edmondlang 7f4fdf0191 update export-customer-order 2023-02-20 20:31:52 +08:00
edmondlang 1c4d9520f9 update export-customer-order 2023-02-20 20:23:02 +08:00
edmondlang 6c7685dac2 update export-customer-order 2023-02-20 20:17:48 +08:00
edmondlang 4653e8403b export-customer-order 2023-02-20 19:50:53 +08:00
edmondlang a648a11567 Nana from the Digital marketing department has requested to remove the text 2023-02-20 18:22:21 +08:00
Dillon cb8d808562 done debugging, undo changes 2023-02-18 21:07:50 +08:00
Dillon 130aca262a debug 2023-02-18 20:29:49 +08:00
Dillon 06ab1be86e debug 2023-02-18 20:08:53 +08:00
Omair Saleh a78ed8271f auto generate invoices 2023-02-17 13:56:42 +08:00
Omair Saleh 16ce06ba7e auto generate invoices 2023-02-17 13:49:02 +08:00
Omair Saleh 5335b8affb auto generate invoices 2023-02-17 13:48:26 +08:00
Omair Saleh 6d1153298c auto generate invoices 2023-02-17 13:47:34 +08:00
Omair Saleh 8f65767996 auto generate invoices 2023-02-17 13:47:02 +08:00
Omair Saleh 4bba550b9e auto generate invoices 2023-02-17 13:46:16 +08:00
Omair Saleh b33b780563 auto generate invoices 2023-02-17 13:45:00 +08:00
Omair Saleh 342285247a auto generate invoices 2023-02-17 13:41:04 +08:00
Omair Saleh 0c82aa17fc auto generate invoices 2023-02-17 13:40:13 +08:00
Omair Saleh ed36b85a3d auto generate invoices 2023-02-17 13:20:55 +08:00
Omair Saleh 4f8e9fbd5f auto generate invoices 2023-02-17 13:10:02 +08:00
Omair Saleh ee575c21ea auto generate invoices 2023-02-17 13:06:52 +08:00
Omair Saleh f4f8c34cb9 auto generate invoices 2023-02-17 13:04:05 +08:00
Omair Saleh 7cb27a6114 auto generate invoices 2023-02-17 13:02:18 +08:00
Omair Saleh 2f4b568c9a auto generate invoices 2023-02-17 12:53:35 +08:00
Omair Saleh a23e0b35a2 auto generate invoices 2023-02-17 12:53:10 +08:00
Omair Saleh 598ca3807e auto generate invoices 2023-02-17 12:52:39 +08:00
Omair Saleh 0654f0335b auto generate invoices 2023-02-17 12:51:15 +08:00
Omair Saleh e4610e1a53 auto generate invoices 2023-02-17 12:50:37 +08:00
Omair Saleh 38ae8f72eb auto generate invoices 2023-02-17 12:49:55 +08:00
Omair Saleh cbdd4e8137 auto generate invoices 2023-02-17 12:49:27 +08:00
Omair Saleh c4d2b4e476 auto generate invoices 2023-02-17 12:48:48 +08:00
Omair Saleh 7eab58b45e auto generate invoices 2023-02-17 12:47:58 +08:00
Omair Saleh a9b21e9566 auto generate invoices 2023-02-17 12:47:19 +08:00
Omair Saleh 9aec5a71f1 auto generate invoices 2023-02-17 12:46:37 +08:00
Omair Saleh 771b10ffc9 auto generate invoices 2023-02-17 12:35:12 +08:00
Omair Saleh a9d4806a4a auto generate invoices 2023-02-17 12:34:06 +08:00
Omair Saleh 0d0048eb6c debug yd api 2023-02-17 11:11:51 +08:00
Omair Saleh d5f3e9ba71 debug yd api 2023-02-17 11:04:32 +08:00
Omair Saleh 5144e940f2 debug yd api 2023-02-17 10:58:35 +08:00
Omair Saleh 8dac196cb9 debug yd api 2023-02-17 10:58:02 +08:00
Omair Saleh e1bc996efb debug yd api 2023-02-17 10:56:53 +08:00
Omair Saleh ed7019f75e debug yd api 2023-02-17 10:56:25 +08:00
Omair Saleh 0f0a32488a debug yd api 2023-02-17 10:55:46 +08:00
Omair Saleh b3cc805e78 debug yd api 2023-02-17 10:55:00 +08:00
Omair Saleh fd8a09d443 debug yd api 2023-02-17 10:54:22 +08:00
Omair Saleh 8d5603c756 debug yd api 2023-02-17 10:53:58 +08:00
Omair Saleh c3de10f676 debug yd api 2023-02-17 10:53:06 +08:00
Omair Saleh 80a47f05f7 debug yd api 2023-02-17 10:52:18 +08:00
Omair Saleh 53cc2ee493 debug yd api 2023-02-17 10:49:30 +08:00
Omair Saleh fadef468bb debug yd api 2023-02-17 10:46:37 +08:00
Omair Saleh 3f0028aaf1 debug yd api 2023-02-17 10:43:47 +08:00
Omair Saleh 7ea7db9f49 debug yd api 2023-02-17 10:41:41 +08:00
Omair Saleh 7a95741af9 debug yd api 2023-02-17 10:39:36 +08:00
Omair Saleh 75c7772d98 debug yd api 2023-02-17 10:38:03 +08:00
Omair Saleh 851489bd12 debug yd api 2023-02-17 10:36:38 +08:00
Omair Saleh 666b5a7791 debug yd api 2023-02-17 10:35:07 +08:00
Omair Saleh a1461f899b debug yd api 2023-02-17 10:34:32 +08:00
Omair Saleh 2fda9e0c46 debug yd api 2023-02-17 10:33:58 +08:00
Omair Saleh ec2b46b192 debug yd api 2023-02-17 10:33:38 +08:00
Omair Saleh 833c4c5905 debug yd api 2023-02-17 10:33:05 +08:00
Omair Saleh 1aea633375 debug yd api 2023-02-17 10:32:41 +08:00
Omair Saleh cc90c16d9a debug yd api 2023-02-17 10:32:09 +08:00
Omair Saleh 10af83056a debug yd api 2023-02-17 10:31:39 +08:00
Omair Saleh cd930dbaf0 debug yd api 2023-02-17 10:30:46 +08:00
Omair Saleh 2bf3e38ced debug yd api 2023-02-17 10:07:17 +08:00
Omair Saleh 5f4010bb50 debug yd api 2023-02-17 10:03:54 +08:00
Dillon 53d076c7e5 CRM integration MVP Phase 1 - minor cleanup 2023-02-17 09:24:13 +08:00
Dillon 1b84ccf60e CRM integration MVP Phase 1 2023-02-17 09:06:18 +08:00
Omair Saleh 5955c1a633 debug yd api 2023-02-17 08:26:13 +08:00
Omair Saleh 7ece4f6470 debug yd api 2023-02-17 06:49:26 +08:00
Omair Saleh e0e82634d3 debug yd api 2023-02-17 06:47:16 +08:00
Omair Saleh 988e798cf1 debug yd api 2023-02-17 06:46:36 +08:00
Omair Saleh 4ce8440724 debug yd api 2023-02-17 06:45:35 +08:00
Omair Saleh e2f5097882 debug yd api 2023-02-17 06:44:56 +08:00
Omair Saleh 9f96caad7c debug yd api 2023-02-17 06:44:33 +08:00
Omair Saleh 3046530f71 debug yd api 2023-02-17 06:43:25 +08:00
Omair Saleh 84a6cb85dd debug yd api 2023-02-17 06:42:33 +08:00
Omair Saleh c86ea9cee4 debug yd api 2023-02-17 06:38:21 +08:00
Omair Saleh ac15f76c4f debug yd api 2023-02-17 06:36:26 +08:00
Omair Saleh 1fc176296e debug yd api 2023-02-17 06:35:29 +08:00
Omair Saleh 3f911f145a debug yd api 2023-02-17 05:45:19 +08:00
Omair Saleh d5c28df748 debug yd api 2023-02-17 05:19:04 +08:00
Omair Saleh 9bfe943898 debug yd api 2023-02-17 05:02:39 +08:00
Omair Saleh dbcbabec93 Merge remote-tracking branch 'origin/master' 2023-02-17 03:39:22 +08:00
Omair Saleh e24cdd82d4 debug yd api 2023-02-17 03:35:43 +08:00
edmondlang 01854a3292 update change company name 2023-02-16 23:09:47 +08:00
Omair Saleh 679bae6fe8 debug yd api 2023-02-16 16:41:17 +08:00
Omair Saleh f567995202 debug yd api 2023-02-16 16:40:17 +08:00
Omair Saleh 35b3cb4515 debug yd api 2023-02-16 16:39:17 +08:00
Omair Saleh 196cf3d58a debug yd api 2023-02-16 16:32:20 +08:00
Omair Saleh b12a862903 debug yd api 2023-02-16 16:27:53 +08:00
Omair Saleh f586314cd8 debug yd api 2023-02-16 16:24:42 +08:00
Omair Saleh 16f41482ad debug yd api 2023-02-16 16:19:47 +08:00
Omair Saleh 95866b0789 debug yd api 2023-02-14 14:50:45 +08:00
Omair Saleh fb2ba2a3c7 debug yd api 2023-02-14 14:50:03 +08:00
Omair Saleh 3041144968 debug yd api 2023-02-14 14:47:59 +08:00
Omair Saleh 2efdb33b71 debug yd api 2023-02-14 14:47:21 +08:00
Omair Saleh 5716050694 debug yd api 2023-02-14 14:46:51 +08:00
Omair Saleh e22c7c7e8b debug yd api 2023-02-14 14:46:31 +08:00
Omair Saleh d9972a8a95 debug yd api 2023-02-14 14:45:49 +08:00
Omair Saleh 6dbafde89c debug yd api 2023-02-14 14:45:06 +08:00
Omair Saleh 680ddd5066 debug yd api 2023-02-14 14:44:19 +08:00
Omair Saleh f6b5eb3098 debug yd api 2023-02-14 14:43:15 +08:00
Omair Saleh 82f8cae4a8 debug yd api 2023-02-14 14:41:22 +08:00
Omair Saleh 4c868de356 debug yd api 2023-02-14 14:40:30 +08:00
Omair Saleh c44278fe26 debug yd api 2023-02-14 14:38:59 +08:00
Omair Saleh 43c8530e6d debug yd api 2023-02-14 14:37:32 +08:00
edmondlang 198e0674bd Merge branch 'update-laravelmpdf' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2023-02-10 23:10:34 +08:00
edmondlang 7d09205817 update laravel mpdf 2023-02-10 20:55:32 +08:00
edmondlang 5f5dbeb3d1 update ExportsWarehousePackingList to only johor state 2023-02-08 18:59:09 +08:00
edmondlang 67a877ca15 update laravel mpdf 2023-02-07 23:54:33 +08:00
edmondlang 88e7bf44b5 update code on the prefix 'NX' 2023-02-07 23:40:24 +08:00
edmondlang 86461c19a1 add export function - export/packing-list-warehouse/guangzhou2-to-johor
add warehouse prefix 'NX/'
2023-02-07 23:32:18 +08:00
edmondlang 18d1841a30 Merge branch 'change-company-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2023-02-06 23:10:00 +08:00
edmondlang 990508501d revert testing code 2023-02-06 23:07:41 +08:00
edmondlang dfec2073b0 update change company and debtor code 2023-02-06 23:02:02 +08:00
edmondlang 2300d237d3 Merge branch 'change-company-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2023-02-06 22:43:24 +08:00
edmondlang a62e5d95fb add debtor in company resource folder 2023-02-06 22:33:57 +08:00
edmondlang 2d8535b7f5 change company name and debtor code 2023-02-06 22:24:00 +08:00
edmondlang 3f21802090 update customer payment billing section component 2023-02-03 16:10:57 +08:00
edmondlang e8191df0e9 update company invoice endpoint and customer payment-and-billing page design 2023-01-28 02:19:51 +08:00
edmondlang 02064ad68e reverse commit on app.php - Meneses\LaravelMpdf\LaravelMpdfServiceProvider::class 2023-01-28 01:15:46 +08:00
Wafie 13319aacff wip-invoice-tab 2023-01-26 21:36:52 +08:00
edmondlang 996ef4205f update multi invoice combined summary 2023-01-20 17:50:19 +08:00
edmondlang 0aaa7f486a debug multi invoicve combines ui 2023-01-20 17:14:59 +08:00
edmondlang 35dc74c3bb update shipping invoice 2023-01-19 00:33:09 +08:00
edmondlang 0310138644 add href link to payment and billing page 2023-01-19 00:20:16 +08:00
edmondlang 7e439a38fd multi invoice combined ui 2023-01-18 23:58:26 +08:00
edmondlang 1c800b70ec Merge branch 'multiple-payment-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-invoice-combined-ui 2023-01-18 23:17:57 +08:00
edmondlang c614190de8 combine multi invoice with summary 2023-01-18 23:13:32 +08:00
edmondlang 551fb7deaa update search customer by email component - enable search by pressing enter 2023-01-16 00:03:28 +08:00
sharifcse57 d91e0e56c3 Create option: Update customer name by pop up modal 2023-01-12 22:37:59 +06:00
Dillon 2248e76bd4 Allow admin to search a customer by email address to open in new window 2023-01-11 22:44:04 +08:00
Cleison Freitas df283e54a2 Company rename endpoint. 2023-01-10 23:03:35 -03:00
edmondlang 769b5dd050 multi payment ui 2023-01-09 22:57:30 +08:00
Omair Saleh 4c023aa393 export customer total yearly cbm 2023-01-05 10:41:38 +08:00
Omair Saleh 7922c10e2c export customer total yearly cbm 2023-01-05 10:39:04 +08:00
Omair Saleh 742fdf307b export customer total yearly cbm 2023-01-05 10:37:27 +08:00
Omair Saleh df993fe491 export customer total yearly cbm 2023-01-04 12:17:44 +08:00
Omair Saleh 5f5707718f show reference number for package 2023-01-04 11:29:40 +08:00
Omair Saleh d7d9a065fd show reference number for package 2023-01-04 11:23:16 +08:00
EDMOND MING 568d45808a Merge branch 'export-top-order-pdf' into 'master'
export top order pdf

See merge request CIEFWorldwideSdnBhd/shipping-portal!138
2023-01-03 05:47:39 +00:00
edmondlang 715051076c export top order pdf 2023-01-03 00:41:12 +08:00
Omair Saleh 7642f6e9d3 regenerate invoices for specific customers 2022-12-30 17:35:28 +08:00
Omair Saleh 84ad39ac11 regenerate invoices for specific customers 2022-12-30 17:35:07 +08:00
Omair Saleh 03b44cf71d regenerate invoices for specific customers 2022-12-30 17:34:33 +08:00
Omair Saleh 0b577c22f4 regenerate invoices for specific customers 2022-12-30 17:33:29 +08:00
Omair Saleh cabb7b7d63 regenerate invoices for specific customers 2022-12-30 17:32:34 +08:00
Omair Saleh 880d3fc8ce regenerate invoices for specific customers 2022-12-30 17:29:00 +08:00
Omair Saleh 8d901505fe regenerate invoices for specific customers 2022-12-30 17:28:27 +08:00
Omair Saleh 489216e7be regenerate invoices for specific customers 2022-12-30 17:23:56 +08:00
Omair Saleh e413dfa795 regenerate invoices for specific customers 2022-12-30 17:21:47 +08:00
Omair Saleh 4ff5c6df80 update gz warehouse notice 2022-12-26 21:21:00 +08:00
edmondlang 851e2e1815 multi payment ui 2022-12-24 16:39:17 +08:00
edmondlang 503bc90556 multiple payment ui 2022-12-23 16:37:06 +08:00
Omair Saleh 762add8e5c fix log data for transactional tables 2022-12-18 15:14:36 +08:00
Omair Saleh 96723461e4 log transactional data 2022-12-16 13:39:19 +08:00
Omair Saleh 2c1431a813 fix over weight minimum charge 2022-12-14 20:16:52 +08:00
Omair Saleh 90ca018e81 fix over weight minimum charge 2022-12-14 20:15:02 +08:00
Omair Saleh 60c51419bb fix over weight minimum charge 2022-12-14 20:07:31 +08:00
Omair Saleh 69f98125a0 fix over weight minimum charge 2022-12-14 20:05:50 +08:00
Omair Saleh f56bfb0309 fix over weight minimum charge 2022-12-14 20:04:02 +08:00
Omair Saleh aedd836211 fix over weight minimum charge 2022-12-14 20:03:11 +08:00
Omair Saleh abfb0ea47b fix over weight minimum charge 2022-12-14 19:57:10 +08:00
Omair Saleh 09461e5bef fix over weight minimum charge 2022-12-14 19:56:21 +08:00
Omair Saleh d5b16f288a fix over weight minimum charge 2022-12-14 19:55:55 +08:00
Omair Saleh 7c1a77089b fix over weight minimum charge 2022-12-14 19:54:19 +08:00
Omair Saleh 505d924eec fix over weight minimum charge 2022-12-14 19:48:39 +08:00
Omair Saleh d0dd802693 fix over weight minimum charge 2022-12-14 19:47:56 +08:00
Omair Saleh 3113cc9fc0 fix over weight minimum charge 2022-12-14 19:47:00 +08:00
Omair Saleh 840e1147c8 fix over weight minimum charge 2022-12-14 19:42:16 +08:00
Omair Saleh 5c89471e14 fix over weight minimum charge 2022-12-14 11:45:28 +08:00
Omair Saleh fbc73e040f fix billplz bill status 2022-12-13 11:03:48 +08:00
Omair Saleh 414f22ab05 fix billplz bill status 2022-12-13 10:56:36 +08:00
Omair Saleh d7328bafdc fix billplz bill status 2022-12-13 10:54:46 +08:00
Omair Saleh 5c5505174a fix billplz bill status 2022-12-13 10:52:51 +08:00
Omair Saleh 6b73d13c33 fix billplz bill status 2022-12-09 12:01:47 +08:00
Omair Saleh 8a62807356 fix billplz bill status 2022-12-09 11:54:16 +08:00
Omair Saleh acca5192b6 estimate container shipping cost 2022-12-07 17:30:48 +08:00
Dillon 515c71daa7 Merge branch 'dillon/setup-docker-2' into dillon/crm-integration 2022-12-06 08:34:29 +08:00
Omair Saleh dfbf22951b estimate container shipping cost 2022-12-02 11:23:40 +08:00
Omair Saleh cc26e67340 estimate container shipping cost 2022-12-02 11:22:47 +08:00
Omair Saleh 15db2715f5 estimate container shipping cost 2022-12-02 11:15:50 +08:00
Omair Saleh 2fc54f796a estimate container shipping cost 2022-12-02 11:01:33 +08:00
Omair Saleh 91b14b3820 estimate container shipping cost 2022-12-02 10:14:37 +08:00
Omair Saleh 7dc549ab2e estimate container shipping cost 2022-12-01 19:08:43 +08:00
Omair Saleh 5480a55edc estimate container shipping cost 2022-12-01 18:44:04 +08:00
Omair Saleh 0cb3bd6ce3 estimate container shipping cost 2022-12-01 18:41:17 +08:00
Omair Saleh f2cc45303c estimate container shipping cost 2022-12-01 18:40:36 +08:00
Omair Saleh e0db537931 estimate container shipping cost 2022-12-01 18:37:50 +08:00
Omair Saleh 53b4af2b5c estimate container shipping cost 2022-12-01 18:35:24 +08:00
Omair Saleh c9d2041653 estimate container shipping cost 2022-12-01 18:31:43 +08:00
Omair Saleh 53e9fcaeb8 debug minimum charge 2022-11-29 15:14:34 +08:00
Omair Saleh 7e007e7d78 debug minimum charge 2022-11-29 15:07:32 +08:00
Omair Saleh 7c879c8633 add bcc to invoice notification email for testing 2022-11-25 11:42:20 +08:00
Omair Saleh 9f255664ac show add/edit billing address to admin 2022-11-24 09:52:12 +08:00
Omair Saleh 63918b4eb0 update china on hold list 2022-11-22 12:10:24 +08:00
Omair Saleh ae36513635 round up cbm to 3 decimals 2022-11-16 16:52:01 +08:00
Omair Saleh 7ac66080ec update export invoice 2022-11-16 16:45:33 +08:00
Omair Saleh 4b699345b8 update export invoice 2022-11-16 16:32:45 +08:00
Dillon a041a70d93 Merge branch 'dillon/setup-docker' into dillon/setup-docker-2 2022-11-16 11:07:30 +08:00
Omair Saleh 634a97f3b4 minor changes to dummy data seeder comments 2022-11-15 19:56:03 +08:00
Omair Saleh 8a4810d961 remove lockdown announcement from order form 2022-11-15 15:07:33 +08:00
Omair Saleh ab3ba64d31 show anitha debtor ui 2022-11-14 15:01:56 +08:00
Omair Saleh 7bca4be9b9 show anitha debtor ui 2022-11-14 14:54:43 +08:00
Omair Saleh 4f12c7c8ac show anitha debtor ui 2022-11-14 14:53:37 +08:00
Omair Saleh 759a9c19d7 show anitha debtor ui 2022-11-14 14:21:25 +08:00
Omair Saleh 6fa72a4195 show anitha debtor ui 2022-11-14 14:19:06 +08:00
Omair Saleh c82581dcc4 show anitha debtor ui 2022-11-14 14:13:55 +08:00
Omair Saleh d4a63c0095 disable notification for non production enviroments 2022-11-10 21:13:28 +08:00
Omair Saleh 22b03669c6 disable notification for non production enviroments 2022-11-10 21:11:45 +08:00
Omair Saleh 58e9e80fd9 dummy data seed 2022-11-10 20:32:14 +08:00
Omair Saleh 4dab73fc8e re-release yd paid orders 2022-11-09 12:00:25 +08:00
Omair Saleh 9b87f26ca3 re-release yd paid orders 2022-11-09 11:56:43 +08:00
Omair Saleh cd81683816 add container summary for billing report 2022-11-07 13:18:59 +08:00
Omair Saleh 169fac4ab0 add container summary for billing report 2022-11-07 13:17:22 +08:00
Omair Saleh 34b4482139 add container summary for billing report 2022-11-07 13:16:42 +08:00
Omair Saleh 945e8585d4 show edit billing address at invoice pending approval 2022-11-07 10:57:11 +08:00
Omair Saleh 68cb7b7df1 show edit billing address at invoice pending approval 2022-11-07 10:51:32 +08:00
Omair Saleh 84b6750bcc show edit billing address at invoice pending approval 2022-11-07 10:21:27 +08:00
Omair Saleh 7f766cde6a Invoice reminder and shipment update notification emails 2022-11-07 09:38:03 +08:00
Omair Saleh 5d1bb976f8 misc fixes 2022-11-07 08:20:24 +08:00
Omair Saleh 529eb1be93 GZ warehouse close notice 2022-11-03 20:28:30 +08:00
Dillon d4c9899120 Dockerising shipping-portal usign the same setting from exchange-2.0.
Update gitignore to include docker-compose.yml (same as exchange-2.0)
2022-11-02 05:56:06 +08:00
Omair Saleh 95fd0aa45d shipping sales report 2022-11-01 15:45:46 +08:00
Omair Saleh 64a7e4e0b7 shipping sales report 2022-11-01 15:41:28 +08:00
Omair Saleh de4577346c shipping sales report 2022-11-01 15:36:37 +08:00
Omair Saleh 0ac9ca38f2 shipping sales report 2022-11-01 15:34:15 +08:00
Omair Saleh 4b79039a18 shipping sales report 2022-11-01 15:32:39 +08:00
Omair Saleh 4b32a48e07 shipping sales report 2022-11-01 15:30:53 +08:00
Omair Saleh eb09993397 yd api to fetch 30 days 2022-11-01 12:36:29 +08:00
Omair Saleh 627d782e5d yd api to fetch 30 days 2022-11-01 12:35:17 +08:00
Omair Saleh 04771cec4f yd api to fetch 30 days 2022-11-01 12:24:48 +08:00
Omair Saleh d7630af675 fix payment due date days filter 2022-10-31 12:30:24 +08:00
Omair Saleh 37c710def6 fix payment due date days filter 2022-10-30 20:41:20 +08:00
Omair Saleh 7423588324 fix payment due date days filter 2022-10-30 20:38:36 +08:00
Omair Saleh cb76e86c75 fix payment due date days filter 2022-10-30 20:37:43 +08:00
Omair Saleh cb862123b5 fix payment due date days filter 2022-10-30 20:37:02 +08:00
Omair Saleh 032efcb96b fix payment due date days filter 2022-10-30 20:35:54 +08:00
Omair Saleh a90730d616 fix payment due date days filter 2022-10-30 20:35:01 +08:00
Omair Saleh d5026df3a5 fix payment due date days filter 2022-10-30 20:33:33 +08:00
Omair Saleh 6dd3849bff fix payment due date days filter 2022-10-30 20:31:46 +08:00
Omair Saleh 9e4bad1eee fix payment due date days filter 2022-10-30 19:02:29 +08:00
Omair Saleh e356573715 fix payment due date days filter 2022-10-30 19:01:51 +08:00
Omair Saleh de6cb6a75f fix payment due date days filter 2022-10-30 18:59:47 +08:00
Omair Saleh 524da42526 fix payment due date days filter 2022-10-30 18:56:19 +08:00
Omair Saleh 1abc99fe10 fix payment due date days filter 2022-10-30 18:46:14 +08:00
Omair Saleh e91e770bf3 fix payment due date days filter 2022-10-30 18:41:55 +08:00
omair saleh 2e5d39fe96 Merge branch '417-payment-filter' into 'master'
Payment filter

See merge request CIEFWorldwideSdnBhd/shipping-portal!137
2022-10-30 10:28:25 +00:00
omair saleh 6efa78e40d Merge branch 'master' into '417-payment-filter'
# Conflicts:
#   app/Http/Resources/PackingListResource.php
2022-10-30 10:28:19 +00:00
Fairuz df862b7107 Payment filter 2022-10-30 17:44:14 +08:00
Omair Saleh 9df97f3db5 whitelist replica 3992WHE 2022-10-28 12:26:14 +08:00
Omair Saleh aa2ce980bc fix export invoice 2022-10-27 15:57:27 +08:00
Omair Saleh a6446b88fd shorten yd fetch duration 2022-10-20 11:37:55 +08:00
Omair Saleh be283dee78 shorten yd fetch duration 2022-10-20 11:28:09 +08:00
Omair Saleh 2d58db7bd9 allow to edit company name for personal account s 2022-10-20 11:12:10 +08:00
Omair Saleh 2b44254186 add further description to export payments 2022-10-19 15:50:18 +08:00
Omair Saleh e99cec81d7 add further description to export payments 2022-10-19 15:44:45 +08:00
Omair Saleh 5e810a1c16 add further description to export payments 2022-10-19 15:40:57 +08:00
Omair Saleh b5cba80db9 add further description to export payments 2022-10-19 15:09:33 +08:00
Omair Saleh 3479aed911 add further description to export payments 2022-10-19 15:07:45 +08:00
Omair Saleh f05e96725b add further description to export payments 2022-10-19 15:06:41 +08:00
Omair Saleh becb16c674 add further description to export payments 2022-10-19 14:53:51 +08:00
Omair Saleh 7e8163166b add further description to export payments 2022-10-19 14:52:26 +08:00
Omair Saleh ad21580c3e add excel extension 2022-10-19 12:04:19 +08:00
Omair Saleh 2f15268897 add excel extension 2022-10-19 11:34:56 +08:00
Omair Saleh ff4efdcd54 add excel extension 2022-10-19 11:31:52 +08:00
Omair Saleh fe400264c7 add excel extension 2022-10-19 11:23:30 +08:00
Omair Saleh cb0189e7d8 add excel extension 2022-10-19 10:49:57 +08:00
Omair Saleh f5070b2138 add excel extension 2022-10-19 10:46:33 +08:00
Omair Saleh 6a6497cac3 add excel extension 2022-10-19 10:39:30 +08:00
Omair Saleh dbf61d3a77 add excel extension 2022-10-19 10:37:43 +08:00
Omair Saleh 2f1164d606 add excel extension 2022-10-19 10:35:54 +08:00
Omair Saleh a472ec6684 add excel extension 2022-10-19 10:27:50 +08:00
Omair Saleh 10403943d0 add excel extension 2022-10-19 10:22:30 +08:00
Omair Saleh 5d49847f1f list customer with delayed shipment 2022-10-18 13:49:29 +08:00
Omair Saleh f96321c854 list customer with delayed shipment 2022-10-18 13:48:37 +08:00
Omair Saleh 2e6432f2e5 list customer with delayed shipment 2022-10-18 13:45:24 +08:00
Omair Saleh f8c37f4dbc list customer with delayed shipment 2022-10-18 13:44:17 +08:00
Omair Saleh 9deed272ad list customer with delayed shipment 2022-10-18 13:37:16 +08:00
Omair Saleh 38e7f89293 list customer with delayed shipment 2022-10-18 13:36:41 +08:00
Omair Saleh 724861270c list customer with delayed shipment 2022-10-18 13:34:29 +08:00
Omair Saleh 88cf72eb75 fix invoice complete bug 2022-10-18 10:44:15 +08:00
Omair Saleh 5fcd11e84c allow admin to do partial payment 2022-10-18 10:32:33 +08:00
Omair Saleh 13bd343198 allow admin to do partial payment 2022-10-18 10:29:59 +08:00
Omair Saleh d6c5b45b44 show manual transfer bank in details 2022-10-17 16:59:40 +08:00
Omair Saleh db0da02e27 show manual transfer bank in details 2022-10-17 16:57:08 +08:00
Omair Saleh 6db2675e76 hide sensitive pages from customer view 2022-10-17 16:31:25 +08:00
Omair Saleh 13271f311c fix debtor upload ui 2022-10-17 16:25:18 +08:00
Omair Saleh a2ac87b659 add published announcement filter 2022-10-17 15:21:21 +08:00
Omair Saleh 0b317ae1f7 hide payment button when outstanding is less than 0.01 2022-10-17 15:18:51 +08:00
Omair Saleh 5a0ef40e44 show debtor ui to anitha 2022-10-17 15:07:31 +08:00
Omair Saleh 97273a30cb show debtor ui to anitha 2022-10-17 15:05:32 +08:00
Omair Saleh c13145ad41 hide billing address button 2022-10-17 14:01:27 +08:00
Omair Saleh 045b0b9878 show edit billing address only to super admin 2022-10-17 13:55:24 +08:00
Omair Saleh 39a9e45fc4 export payment UI 2022-10-17 13:53:53 +08:00
Omair Saleh 910fa13867 export payment debug 2022-10-17 13:49:48 +08:00
Omair Saleh 6f86702df0 export payment debug 2022-10-17 13:49:06 +08:00
Omair Saleh b79bcdbbb3 export payment debug 2022-10-17 13:48:22 +08:00
Omair Saleh 086b262fca fix edit billing address ui 2022-10-17 13:44:32 +08:00
Omair Saleh 8396e8dab3 export payments 2022-10-17 13:43:26 +08:00
Omair Saleh 96948c96b5 edit billing address 2022-10-17 13:39:03 +08:00
Omair Saleh d8386601c3 1. Import Debtor
2. export payments
2022-10-17 13:29:52 +08:00
omair saleh bf2a6e7f23 Merge branch 'import-debtor' into 'master'
Import debtor

See merge request CIEFWorldwideSdnBhd/shipping-portal!136
2022-10-17 05:00:51 +00:00
omair saleh 235b04e395 Merge branch 'master' into 'import-debtor'
# Conflicts:
#   routes/web.php
2022-10-17 05:00:42 +00:00
Omair Saleh 5ea4044e3f debug callback url for billplz 2022-10-13 15:54:56 +08:00
Omair Saleh 66bbf9934c fix payment ui & reload issue 2022-10-13 01:44:48 +08:00
Omair Saleh 94a6f0758c fix payment ui & reload issue 2022-10-13 01:42:11 +08:00
Omair Saleh 04f43d8ea8 fix payment ui & reload issue 2022-10-13 01:40:47 +08:00
Omair Saleh 0808d86af9 fix payment ui & reload issue 2022-10-13 01:34:00 +08:00
Omair Saleh 714678fdc1 fix payment ui & reload issue 2022-10-13 01:31:41 +08:00
Omair Saleh c050444cdb export yd parcel postcode 2022-10-13 01:17:55 +08:00
Omair Saleh bc6c690b54 export yd parcel postcode 2022-10-13 01:12:22 +08:00
Omair Saleh 7cfa328ec0 export yd parcel postcode 2022-10-13 01:05:54 +08:00
Omair Saleh 45685bf2a4 export yd parcel postcode 2022-10-13 01:04:26 +08:00
Omair Saleh 534e02a20f export yd parcel postcode 2022-10-13 00:55:29 +08:00
Omair Saleh 26547328cb remove delivery address postcode to yd to release goods from china 2022-10-13 00:36:18 +08:00
Omair Saleh f92ca756aa submit delivery address postcode to yd to release goods from china 2022-10-11 23:25:30 +08:00
Omair Saleh 5514f3b8e0 submit delivery address postcode to yd to release goods from china 2022-10-11 23:13:48 +08:00
Omair Saleh 14d80fd457 fix invoice date 2022-10-10 17:51:04 +08:00
Omair Saleh c8d621057b fix invoice date 2022-10-10 17:49:14 +08:00
Omair Saleh 6ecfa8e031 fix invoice date 2022-10-10 17:43:32 +08:00
Omair Saleh 975e3d49e7 hide payment button for floating amount 2022-09-30 16:20:54 +08:00
Omair Saleh 2bd30492c5 hide payment button for floating amount 2022-09-30 16:13:15 +08:00
Omair Saleh c089b5f072 hide payment button for floating amount 2022-09-30 16:12:15 +08:00
Omair Saleh fbaa1238cb hide payment button for floating amount 2022-09-30 16:10:17 +08:00
Omair Saleh d1cf06d700 hide payment button for floating amount 2022-09-30 16:09:05 +08:00
Omair Saleh ff159730e0 hide payment button for floating amount 2022-09-30 16:07:06 +08:00
Omair Saleh e59934fa7b show order reference on payment verification component 2022-09-30 15:59:25 +08:00
Omair Saleh 650d232ab0 show order reference on payment verification component 2022-09-30 15:57:26 +08:00
Omair Saleh 71ae2437a4 show order reference on payment verification component 2022-09-30 15:54:06 +08:00
Omair Saleh 17edf59b57 show order reference on payment verification component 2022-09-30 15:52:21 +08:00
Omair Saleh 6268cdd21f show order reference on payment verification component 2022-09-30 15:50:30 +08:00
Omair Saleh 2ea62bcfb9 show order reference on payment verification component 2022-09-30 15:48:46 +08:00
Omair Saleh 1debc8e2d5 show order reference on payment verification component 2022-09-30 15:46:21 +08:00
Omair Saleh fb849aa4cc show order reference on payment verification component 2022-09-30 15:44:31 +08:00
Omair Saleh 913f6f84e2 show order reference on payment verification component 2022-09-30 15:40:24 +08:00
Omair Saleh f28d0382b8 show order reference on payment verification component 2022-09-30 15:35:57 +08:00
edmondlang 97a568322c edit billing address in payment and billing 2022-09-29 20:53:00 +08:00
edmondlang b01e2022dc import debtor 2022-09-29 19:11:59 +08:00
Omair Saleh f7a1ba05f8 customer announcement in customer profile 2022-09-28 17:34:27 +08:00
Omair Saleh a05a6381df fix delete packinglist 2022-09-28 13:12:57 +08:00
Omair Saleh d7c0f7302d delete duplicated buttons from unclaimed packing list component 2022-09-28 13:07:36 +08:00
Omair Saleh 78a8451699 fix unclaimed packing list pending invoice 2022-09-27 13:31:28 +08:00
Omair Saleh 5964123c5f fix bug when dispute has no comment 2022-09-27 13:28:30 +08:00
Omair Saleh 28e5fa43a5 update delivery keywords for yd 2022-09-27 10:54:31 +08:00
Omair Saleh 4d39d7f43f update delivery keywords for yd 2022-09-27 10:53:40 +08:00
Omair Saleh ee65ceac1d update delivery keywords for yd 2022-09-27 10:46:42 +08:00
Omair Saleh ee1dfea0c8 show packing list reference 2022-09-27 10:33:13 +08:00
omair saleh a90766ba13 fix cnt quantity in the invoice 2022-09-26 12:15:45 +08:00
omair saleh 6613ca9a86 fix qr image ratio in pdf 2022-09-25 22:36:34 +08:00
omair saleh 2839f7855c fix qr image ratio in pdf 2022-09-25 22:35:56 +08:00
omair saleh 9b70fdf37f fix qr image ratio in pdf 2022-09-25 22:35:09 +08:00
omair saleh 4667d8fbc3 fix qr image ratio in pdf 2022-09-25 22:34:32 +08:00
omair saleh 8b3e60a74a fix qr image ratio in pdf 2022-09-25 22:33:59 +08:00
omair saleh 1f6c6bf87d fix qr image ratio in pdf 2022-09-25 22:33:27 +08:00
omair saleh 8100ea0329 Merge remote-tracking branch 'origin/master' 2022-09-25 22:30:49 +08:00
omair saleh 20d706caf8 fix qr image ratio in pdf 2022-09-25 22:30:24 +08:00
edmondlang 3fe46f596a delete pending approval invoice 2022-09-22 23:27:32 +08:00
omair saleh c22e13f3cb show address at invoice component 2022-09-22 15:47:34 +08:00
omair saleh e39d364782 show address at invoice component 2022-09-22 15:35:47 +08:00
omair saleh 47fdac08aa debug invoice 2022-09-22 13:40:22 +08:00
omair saleh d824075e51 debug invoice 2022-09-22 13:40:10 +08:00
omair saleh af5de245ad debug invoice 2022-09-22 13:37:11 +08:00
omair saleh a58a5bd9a6 debug invoice 2022-09-22 13:35:41 +08:00
omair saleh 0493057805 debug invoice 2022-09-22 13:34:56 +08:00
omair saleh b6fc042d07 debug invoice 2022-09-22 13:33:19 +08:00
omair saleh 6bdcc007fc debug invoice 2022-09-22 13:32:44 +08:00
omair saleh 747402a5bc debug invoice 2022-09-22 13:32:06 +08:00
omair saleh c49d43f000 debug vt container update script 2022-09-22 13:25:40 +08:00
omair saleh 1e06e4db21 debug vt container update script 2022-09-22 13:24:12 +08:00
omair saleh 3b449fc812 change transactions receiver and issuer relationship from companies to company_modules 2022-09-22 13:18:57 +08:00
omair saleh a1ea94fa73 debug billing 2022-09-22 13:14:50 +08:00
omair saleh 79f6637b7b hide payment and billing page from customer 2022-09-22 11:56:20 +08:00
omair saleh dd684531c6 fetch vt recieve last 10 days 2022-09-21 13:02:01 +08:00
omair saleh 52e95b40ab fetch vt recieve last 10 days 2022-09-21 12:43:31 +08:00
omair saleh b6269ee369 fetch vt recieve last 10 days 2022-09-21 12:35:52 +08:00
omair saleh 144b5e7e13 fetch vt recieve last 10 days 2022-09-21 12:30:42 +08:00
omair saleh a84f44e9b0 fetch vt recieve last 10 days 2022-09-21 12:19:11 +08:00
omair saleh 32b90a3387 fetch vt recieve last 10 days 2022-09-21 11:54:24 +08:00
omair saleh 7faf5331e5 billing fix up 2022-09-21 10:10:39 +08:00
omair saleh 9783c76be3 billing fix up 2022-09-21 09:02:41 +08:00
omair saleh 3658991c43 billing fix up 2022-09-21 09:01:48 +08:00
omair saleh d2d82aabac Merge branch 'development' into 'master'
if company doesn't have billing address - hide generate invoice and show...

See merge request CIEFWorldwideSdnBhd/shipping-portal!135
2022-09-21 00:54:20 +00:00
omair saleh 6fe3023abc billing fix up 2022-09-20 16:50:50 +08:00
omair saleh e0356599bb billing fix up 2022-09-20 16:46:03 +08:00
omair saleh 37c3f95eda billing fix up 2022-09-20 16:43:21 +08:00
omair saleh 843b311c77 billing fix up 2022-09-20 16:41:30 +08:00
omair saleh 3fc7ccb51e billing fix up 2022-09-20 16:31:40 +08:00
omair saleh 9216c176f3 billing fix up 2022-09-20 16:27:38 +08:00
omair saleh 021c200d07 billing fix up 2022-09-20 16:24:56 +08:00
omair saleh a795a118a5 billing fix up 2022-09-20 16:23:05 +08:00
omair saleh 9833d07b04 billing fix up 2022-09-20 16:22:29 +08:00
omair saleh 7bf865ed3e billing fix up 2022-09-20 16:21:36 +08:00
omair saleh f7c8f68520 billing fix up 2022-09-20 16:19:05 +08:00
omair saleh 756e1b9419 billing fix up 2022-09-20 15:58:14 +08:00
omair saleh dd28171011 billing fix up 2022-09-20 09:13:46 +08:00
omair saleh 9f6fe2722c billing fix up 2022-09-20 09:09:11 +08:00
omair saleh 25928305ea billing fix up 2022-09-20 09:08:15 +08:00
omair saleh 499d1f9759 billing fix up 2022-09-20 09:06:10 +08:00
omair saleh 0e8c74bec2 billing fix up 2022-09-20 09:05:08 +08:00
omair saleh f774e90d50 billing fix up 2022-09-20 09:04:29 +08:00
omair saleh 6558ce20d9 billing fix up 2022-09-20 09:01:26 +08:00
omair saleh f16a843197 billing fix up 2022-09-20 08:49:48 +08:00
omair saleh 1ea081d831 billing fix up 2022-09-20 08:47:32 +08:00
omair saleh ce4e88fcdc billing fix up 2022-09-20 08:44:59 +08:00
omair saleh 6ca4f235df billing fix up 2022-09-20 08:06:39 +08:00
omair saleh 03843d8726 billing fix up 2022-09-20 08:04:43 +08:00
omair saleh 48b4381ba5 billing fix up 2022-09-20 07:56:29 +08:00
omair saleh 71d45fa100 billing fix up 2022-09-20 07:53:59 +08:00
omair saleh ebd42cfcbe billing fix up 2022-09-20 07:52:48 +08:00
omair saleh 9541f32641 billing fix up 2022-09-20 07:50:22 +08:00
omair saleh 5077e0e8d4 billing fix up 2022-09-20 07:48:49 +08:00
omair saleh c1c2c155be billing fix up 2022-09-20 07:36:20 +08:00
omair saleh c69dcf6ba3 billing fix up 2022-09-20 07:32:05 +08:00
omair saleh 10a95f0b4d billing fix up 2022-09-20 07:28:40 +08:00
omair saleh d8b41cbe55 billing fix up 2022-09-20 06:43:54 +08:00
omair saleh ad15b2f6b8 export parcel summary 2022-09-20 03:33:10 +08:00
omair saleh 5a69a31628 export parcel summary 2022-09-20 03:32:49 +08:00
omair saleh 65e0fe668d export parcel summary 2022-09-20 03:30:43 +08:00
omair saleh 0cd2272e6c export parcel summary 2022-09-20 03:29:55 +08:00
omair saleh 2f358c659b export parcel summary 2022-09-20 03:29:18 +08:00
omair saleh 3bec5b9c86 export parcel summary 2022-09-20 03:28:09 +08:00
omair saleh f499aaa0a7 export parcel summary 2022-09-20 03:27:29 +08:00
omair saleh dfcb6064f8 export parcel summary 2022-09-20 03:26:10 +08:00
omair saleh 968ff5c02a Merge branch 'connetction-segment-integration' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php
#	app/Http/Resources/OrderResource.php
#	app/Http/Resources/PackingListResource.php
#	resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue
#	resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingComponent.vue
2022-09-20 02:47:47 +08:00
omair saleh 427bbb9de2 export parcel summary 2022-09-20 02:31:09 +08:00
omair saleh dc4fabbf36 export parcel summary 2022-09-20 02:30:26 +08:00
omair saleh e5e93e500e fix pending delivery export 2022-09-19 12:03:07 +08:00
omair saleh 924f686381 fix pending delivery export 2022-09-19 11:57:36 +08:00
omair saleh acb334f2c2 fix pending delivery export 2022-09-19 11:39:59 +08:00
omair saleh 35611da094 fix pending delivery export 2022-09-19 11:39:16 +08:00
omair saleh ba192563ba fix pending delivery export 2022-09-19 11:38:01 +08:00
omair saleh 42525a4d32 fix export on hold list 2022-09-15 12:57:14 +08:00
omair saleh 7af7b28408 move csw to yd 2022-09-14 13:40:58 +08:00
omair saleh b90fa86eae don't allow to release packing list with yd without person in charge info 2022-09-14 13:35:51 +08:00
omair saleh ba7f9807a7 remove csw from yd exempt list 2022-09-09 14:17:59 +08:00
edmondlang daf5c65bd7 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	routes/web.php
2022-09-07 21:50:48 +08:00
omair saleh 4280a9188c add 2 days to eta date 2022-09-07 17:30:45 +08:00
omair saleh 08398c481e break line for postcode 2022-09-07 15:35:40 +08:00
omair saleh c8399cc336 break line for postcode 2022-09-07 15:31:13 +08:00
omair saleh 84bef88f16 break line for postcode 2022-09-07 15:25:22 +08:00
omair saleh 3e45f58b3b break line for postcode 2022-09-07 15:24:33 +08:00
omair saleh 856302f480 break line for postcode 2022-09-07 15:22:36 +08:00
edmondlang 1a67fa31dc fix connection segment in customer page 2022-09-03 18:59:12 +08:00
omair saleh d045e0401d billing segment 2022-09-03 15:03:17 +08:00
omair saleh d2e3e1979a remove announcement 2022-09-03 11:33:55 +08:00
omair saleh 4dba55eb32 add customers to the exception list for auto release 2022-09-02 14:39:17 +08:00
omair saleh 29fe4cf53c csw move to yd 2022-08-30 15:21:10 +08:00
omair saleh 3b39477369 holiday announcement 2022-08-26 11:15:42 +08:00
omair saleh a79d9249af update holiday announcement 2022-08-26 11:14:14 +08:00
omair saleh 6c1a9fe992 fix vt container api 2022-08-25 16:54:12 +08:00
omair saleh 01b539bea8 fix vt container api 2022-08-25 16:52:15 +08:00
omair saleh 73ba896e7c fix vt container api 2022-08-25 16:50:20 +08:00
omair saleh 8635e5f71f fix vt container api 2022-08-25 16:49:26 +08:00
omair saleh fb3405cdbc fix vt container api 2022-08-25 16:48:12 +08:00
omair saleh 4e4e0b5d9c fix vt container api 2022-08-25 16:45:48 +08:00
omair saleh 41c76c7c09 fix vt container api 2022-08-25 16:43:43 +08:00
omair saleh 5fada5310e fix vt container api 2022-08-25 16:41:24 +08:00
omair saleh 10fc3d7f68 fix vt container api 2022-08-25 14:39:39 +08:00
omair saleh a495d5ac0a fix vt container api 2022-08-25 14:33:58 +08:00
omair saleh 49a21865b6 fix vt container api 2022-08-25 14:33:21 +08:00
omair saleh 32c03caff1 fix vt container api 2022-08-25 14:28:53 +08:00
omair saleh 42e7ee43f2 fix vt container api 2022-08-25 14:28:13 +08:00
omair saleh 18fab0e8d4 fix vt container api 2022-08-25 14:27:21 +08:00
omair saleh f8bd9c0372 fix vt container api 2022-08-25 14:26:43 +08:00
omair saleh 9845b85cf0 fix vt container api 2022-08-25 14:24:58 +08:00
omair saleh 5163728298 fix vt container api 2022-08-25 14:17:41 +08:00
omair saleh 3e19696d02 fix vt container api 2022-08-25 14:16:32 +08:00
omair saleh 41dbd80d0d fix vt container api 2022-08-25 14:10:43 +08:00
omair saleh 4e64d8cd1d fix vt api 2022-08-24 18:49:50 +08:00
omair saleh 3108d20c16 fix vt update container 2022-08-24 18:42:53 +08:00
omair saleh ea35cd0c10 fix vt container update 2022-08-24 18:41:16 +08:00
omair saleh fffd6da513 fix vt container update 2022-08-24 18:40:17 +08:00
omair saleh 4b6d288485 fix vt container update 2022-08-24 18:37:33 +08:00
omair saleh 750ebbd769 fix vt container updates 2022-08-24 18:35:35 +08:00
omair saleh e638186367 fix vt container updates 2022-08-24 18:34:38 +08:00
omair saleh 77812e625a fix vt 2022-08-24 18:28:15 +08:00
omair saleh 5acd08d8e4 debug vt 2022-08-24 18:18:52 +08:00
omair saleh 6d7a05d264 add customer to exception for auto release from china 2022-08-24 17:11:47 +08:00
omair saleh fcb16cc115 enable yiwu 2022-08-22 15:32:12 +08:00
omair saleh 4f7097772f enable yiwu 2022-08-22 15:23:51 +08:00
omair saleh 9e8ee0f405 export all cbm report 2022-08-16 12:14:04 +08:00
omair saleh 8acbc56aeb yiwu notice 2022-08-11 19:47:04 +08:00
omair saleh 460b141102 yiwu notice 2022-08-11 19:43:55 +08:00
edmondlang d00620564b update Customer order page and admin payment billing page - include remarks 2022-08-09 02:44:05 +08:00
edmondlang 68028d5cf3 add function for admin to regenerate the dispute invoice 2022-08-08 22:19:55 +08:00
edmondlang a2c7eddf7b update payment and billing 2022-08-07 17:11:26 +08:00
edmondlang 9e756132ca update annoucment css 2022-08-06 23:53:43 +08:00
edmondlang 1706e2e1a3 remove console.log 2022-08-06 23:48:23 +08:00
edmondlang e84e39b8a1 debug annoucment segment 2022-08-06 23:46:37 +08:00
edmondlang 6ed383c06c update create annoucment service to suit the date time format from datetime picker 2022-08-06 23:34:07 +08:00
edmondlang b52445f106 migrate annoucment module from exchange 2022-08-06 23:33:09 +08:00
edmondlang e7f8b62116 update seeder for segment constant 2022-08-06 01:57:34 +08:00
edmondlang cd59debee4 update CUSTOM SEGMENTS price api 2022-08-06 01:46:06 +08:00
edmondlang f7a2861072 update admin payments billing page - do extra validation checking on each data with vue conditions 2022-08-06 00:42:20 +08:00
edmondlang 845fdfd5ca debug all constant in settings 2022-08-06 00:41:28 +08:00
edmondlang b984f931e1 update admin payments and billings page - add address and postcode 2022-08-05 23:40:59 +08:00
edmondlang 2b1fca6b2e if company doesn't have billing address - hide generate invoice and show create billing address modal 2022-08-05 21:24:36 +08:00
edmondlang 433d8e63b4 hide generate invoice for un-claimed packing list 2022-08-05 20:07:55 +08:00
edmondlang 30bf744854 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	resources/assets/vue/components/settings/forms/EditSegmentPriceFormComponent.vue
2022-08-05 19:53:55 +08:00
omair saleh ea880a1a54 update eta arrival date 2022-08-05 15:35:31 +08:00
omair saleh b6a62fed2b update eta arrival date 2022-08-05 15:34:35 +08:00
omair saleh 3106750be6 update eta arrival date 2022-08-05 15:26:02 +08:00
omair saleh f1c2ff7364 update eta when arrival 2022-08-05 15:22:53 +08:00
omair saleh 0f307bda1f update eta on arrival 2022-08-05 15:15:48 +08:00
omair saleh 52e601de00 disable yiwu warehouse temp 2022-08-05 10:40:49 +08:00
omair saleh 83351f17b1 hide payment and billing page from menu 2022-08-01 03:09:49 +08:00
omair saleh be3d10e055 rename addon table 2022-08-01 03:06:52 +08:00
omair saleh d6616c0c5c rename addon table 2022-08-01 03:06:07 +08:00
omair saleh a667e23647 rename addon table 2022-08-01 03:05:20 +08:00
omair saleh c018fa9050 rename addon table 2022-08-01 02:56:15 +08:00
omair saleh 61eae220d1 rename addon table 2022-08-01 02:55:22 +08:00
omair saleh e4aa8fdd57 rename addon table 2022-08-01 02:51:59 +08:00
omair saleh 8b41056129 rename addon table 2022-08-01 02:50:11 +08:00
omair saleh df69ff6fec disable addon migration temp 2022-08-01 02:49:01 +08:00
omair saleh 894799a801 disable addon migration temp 2022-08-01 02:47:56 +08:00
omair saleh c62231fe3a hide notification temp 2022-08-01 02:15:03 +08:00
omair saleh 6335e90aab update yd new delivery api 2022-08-01 02:13:19 +08:00
omair saleh 02c83044a2 Merge remote-tracking branch 'origin/master' 2022-08-01 02:11:40 +08:00
omair saleh 86e6ef7af5 update yd new delivery api 2022-08-01 02:11:07 +08:00
edmondlang 0bad26e8ff update segment - delete props 2022-08-01 00:17:24 +08:00
edmondlang c24ddb4fa2 remove code error 2022-07-31 22:52:05 +08:00
edmondlang ff68ee76ab update base price according to packlinglist drop date 2022-07-31 22:08:48 +08:00
edmondlang 2a0501ad99 remove extra line of codes 2022-07-31 22:08:15 +08:00
edmondlang 43491223ab customer payment ui inside orders 2022-07-31 21:38:15 +08:00
edmondlang 436985db8f fix error section not showing 2022-07-31 20:17:10 +08:00
edmondlang 37887de61d add invoice in order resources 2022-07-31 20:15:38 +08:00
edmondlang 374cc7748a update billplz ui 2022-07-31 18:00:05 +08:00
edmondlang af15e462ba Merge branch 'payment-and-billing-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-07-31 16:06:52 +08:00
edmondlang db6412c5c0 when click on cancel will disminss the modal 2022-07-31 16:06:35 +08:00
edmondlang afc6595715 Merge branch 'payment-and-billing-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-07-31 15:59:30 +08:00
edmondlang e77e82bac2 move bill plz to shipping 2022-07-31 15:58:20 +08:00
edmondlang ce38d098fd Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-07-31 14:38:36 +08:00
glovetleong 4db4f6094d unit test bug 2022-07-30 09:56:30 +08:00
glovetleong 2a6a980fc3 unit test 2022-07-30 09:40:50 +08:00
omair saleh 1b230dbce0 Merge branch 'development' into 'master'
seperate log in page and sign up page for marketing

See merge request CIEFWorldwideSdnBhd/shipping-portal!131
2022-07-28 04:49:21 +00:00
edmondlang 4329f77e95 Merge branch 'payment-and-billing-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-07-27 20:20:41 +08:00
edmondlang 2f999d7e3c code tidy up 2022-07-27 20:20:16 +08:00
edmondlang 302aa521ed Merge branch 'payment-and-billing-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-07-27 20:10:46 +08:00
edmondlang 50ca61c587 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-07-27 20:10:30 +08:00
edmondlang a6cbec3523 payment-and-billing ui 2022-07-27 20:09:53 +08:00
omair saleh ee2208c992 debug claim packing list 2022-07-26 11:05:28 +08:00
omair saleh b73ef5a386 debug claim packing list 2022-07-26 11:00:36 +08:00
omair saleh cecc0a1b1b debug claim packing list 2022-07-26 10:55:20 +08:00
omair saleh b92a6fe710 debug claim packing list 2022-07-26 10:52:04 +08:00
omair saleh 24bd8be09d debug claim packing list 2022-07-26 10:51:07 +08:00
omair saleh d8801408ae debug claim packing list 2022-07-26 10:49:44 +08:00
edmondlang 274b64de7e Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into payment-and-billing-ui 2022-07-23 23:32:54 +08:00
edmondlang 06da9bb435 add missing code 2022-07-23 23:32:31 +08:00
edmondlang a276bc9582 Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into payment-and-billing-ui
# Conflicts:
#	routes/web.php
2022-07-23 20:30:41 +08:00
edmondlang 72f555d7d2 payments and billing 2022-07-23 20:28:50 +08:00
edmondlang 9db80220b8 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	resources/assets/vue/components/containers/elements/PackingListComponent.vue
#	resources/assets/vue/components/orders/elements/UnclaimedPackinglistComponent.vue
2022-07-23 19:56:06 +08:00
omair saleh 55882aaacb delete packinglist when deleting warehouselist 2022-07-22 19:17:18 +08:00
omair saleh ca669f6f0a fix exports pending delivery lists 2022-07-22 19:15:38 +08:00
omair saleh ec70a390d0 fix exports pending delivery lists 2022-07-22 19:04:07 +08:00
omair saleh 987418d51a fix exports pending delivery lists 2022-07-22 18:57:44 +08:00
omair saleh 6b641d44f2 fix exports pending delivery lists 2022-07-22 18:56:34 +08:00
omair saleh b57dbe77be delete unclaimed packing list button 2022-07-22 14:22:15 +08:00
omair saleh b9ddd42f82 delete unclaimed packing list button 2022-07-22 14:21:43 +08:00
omair saleh 039a048150 delete unclaimed packing list button 2022-07-22 14:18:54 +08:00
omair saleh f727389add delete unclaimed packing list button 2022-07-22 14:18:18 +08:00
omair saleh 2bb6816794 delete unclaimed packing list button 2022-07-22 14:15:26 +08:00
omair saleh 0616ee0bac show more data for unclaimed packages 2022-07-22 14:08:57 +08:00
omair saleh c038324339 fix vt wrong delivery date 2022-07-21 11:00:32 +08:00
omair saleh ac839c5835 break address words in packing list component 2022-07-21 10:48:38 +08:00
omair saleh d4b85f2952 fix vt packing list api 2022-07-21 10:43:40 +08:00
omair saleh 2be24c4dac fix vt packing list api 2022-07-19 19:24:05 +08:00
omair saleh 6caa68cfa4 fix vt packing list api 2022-07-19 19:21:55 +08:00
omair saleh 582534849a fix vt packing list api 2022-07-19 19:00:55 +08:00
omair saleh b4f816b90d fix vt packing list api 2022-07-19 19:00:00 +08:00
omair saleh 0c939dca6f fix vt packing list api 2022-07-19 18:59:11 +08:00
omair saleh f5b2664f5f fix vt packing list api 2022-07-19 18:56:44 +08:00
omair saleh 9613ed32c1 fix vt packing list api 2022-07-19 18:46:54 +08:00
omair saleh 202456289b fix vt packing list api 2022-07-19 18:46:10 +08:00
omair saleh c59bbd6677 fix vt packing list api 2022-07-19 18:41:27 +08:00
omair saleh ebfa25933d fix vt packing list api 2022-07-19 18:39:34 +08:00
omair saleh 3dedb75239 fix vt packing list api 2022-07-19 18:38:56 +08:00
omair saleh 9152bae815 fix vt packing list api 2022-07-19 18:38:35 +08:00
omair saleh a88512e973 fix vt packing list api 2022-07-19 18:36:23 +08:00
omair saleh 2f59295f67 fix vt packing list api 2022-07-19 18:34:01 +08:00
omair saleh bdb81daf1a fix vt packing list api 2022-07-19 16:45:44 +08:00
omair saleh 42935d025d fix vt packing list api 2022-07-19 16:36:22 +08:00
omair saleh 92b463b78e fix vt packing list api 2022-07-18 14:41:46 +08:00
omair saleh f62fc48636 fix vt packing list api 2022-07-18 14:39:40 +08:00
omair saleh a71ca9dd29 fix vt packing list api 2022-07-18 09:44:31 +08:00
omair saleh 651dea8f3a fix vt packing list api 2022-07-18 09:31:15 +08:00
omair saleh 79ada10312 fix vt containers api 2022-07-18 09:15:04 +08:00
omair saleh 66ef0c08f5 fix vt warehouse list api 2022-07-18 08:45:41 +08:00
omair saleh fafc716109 fix vt warehouse list api 2022-07-18 08:37:54 +08:00
omair saleh d93d51ff09 fix vt warehouse list api 2022-07-18 08:35:23 +08:00
omair saleh b260d30e42 fix vt warehouse list api 2022-07-18 08:02:56 +08:00
omair saleh af2d3adbcd fix vt warehouse list api 2022-07-18 08:01:44 +08:00
omair saleh 846f617e00 fix packinglist without package bug in packinglist component 2022-07-18 06:25:23 +08:00
omair saleh daa8618616 fix packinglist without package bug in packinglist component 2022-07-18 06:23:12 +08:00
omair saleh 22aaccbe21 yd fetch daily 2022-07-18 04:38:44 +08:00
omair saleh 1be99a0730 yd fetch daily 2022-07-18 04:30:54 +08:00
omair saleh ac461a48b7 yd fetch daily 2022-07-18 04:20:07 +08:00
omair saleh 1619bc212f yd fetch daily 2022-07-18 04:05:49 +08:00
omair saleh c487b31673 yd fetch daily 2022-07-18 04:03:45 +08:00
omair saleh 0775c2687f yd fetch daily 2022-07-18 04:03:13 +08:00
omair saleh 7767b4f177 yd fetch daily 2022-07-18 03:51:16 +08:00
omair saleh ee7acbc683 yd fetch daily 2022-07-18 03:49:13 +08:00
omair saleh b3b048ef2b yd fetch daily 2022-07-18 03:47:02 +08:00
omair saleh 12e2ce4de1 yd fetch daily 2022-07-18 03:44:49 +08:00
omair saleh d90347d2ee yd debug 2022-07-18 03:42:34 +08:00
omair saleh ad39cdd124 yd debug 2022-07-18 03:41:34 +08:00
omair saleh e0f0e0e59e yd debug 2022-07-18 03:38:53 +08:00
omair saleh e497eec331 yd debug 2022-07-18 03:37:38 +08:00
omair saleh 1429f97bca yd debug 2022-07-18 03:35:51 +08:00
omair saleh 952333e5cb yd debug 2022-07-18 03:34:46 +08:00
omair saleh e4af160ad2 yd debug 2022-07-18 03:33:59 +08:00
omair saleh 16031665a9 yd debug 2022-07-18 03:32:49 +08:00
omair saleh 39e1c09f05 yd debug 2022-07-18 03:11:00 +08:00
omair saleh 0d4db39013 yd debug 2022-07-18 03:09:50 +08:00
edmondlang 1e634ddc44 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-07-11 15:00:15 +08:00
omair saleh 06015cea72 remove customer profile junk code 2022-07-07 11:31:07 +08:00
omair saleh 3ccf7a088a debug smc report 2022-07-06 10:40:34 +08:00
omair saleh 258b8085ee debug smc report 2022-07-06 10:39:03 +08:00
omair saleh 76c05b7c77 debug smc report 2022-07-06 10:37:05 +08:00
omair saleh 6ebe22b798 debug smc report 2022-07-06 10:36:40 +08:00
omair saleh 17042b4312 debug smc report 2022-07-06 10:34:14 +08:00
omair saleh f935cc10a6 debug smc report 2022-07-06 10:03:01 +08:00
omair saleh 415b5d7697 debug smc report 2022-07-06 10:00:00 +08:00
omair saleh 591575081a add customer to yd exempt list 2022-06-30 09:20:28 +08:00
omair saleh 96fcfb241a update air shipment product list 2022-06-29 11:08:28 +08:00
omair saleh 5b9a286467 Merge remote-tracking branch 'origin/development' into development 2022-06-29 11:07:29 +08:00
omair saleh 5ed84c1ee9 update air shipment product list 2022-06-29 11:07:05 +08:00
omair saleh 40fec78213 update yd list to fetch 3 months 2022-06-24 11:47:35 +08:00
ahmedsophyudden b4dcc0f049 Create approve shipping invoice endpoint 2022-06-18 22:51:15 +08:00
ahmedsophyudden 6873ddb7cf New endpoint to add/edit/delete item in shipping invoiceNew endpoint to add/edit/delete item in shipping invoice 2022-06-17 14:45:34 +08:00
ahmedsophyudden 84e45f9824 New endpoint to add/edit/delete item in shipping invoice 2022-06-17 09:28:14 +08:00
ahmedsophyudden 8079584f04 Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-06-17 09:25:50 +08:00
ahmedsophyudden 866dda9d98 New endpoint to add/edit/delete item in shipping invoice 2022-06-17 09:25:47 +08:00
edmondlang 8715997f88 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-06-16 23:25:06 +08:00
omair saleh 822c9c467f fix development js compile error 2022-06-16 14:52:38 +08:00
omair saleh 59d2b5c50a fix development js compile error 2022-06-16 14:51:50 +08:00
omair saleh 6676951dee temp disable vt 2022-06-15 11:17:31 +08:00
omair saleh 1ac7657870 Merge branch 'EXCHANGE-648-Shipping-Estimation-Calculator-API' into 'development'
implement ShippingEstimationCalculator

See merge request CIEFWorldwideSdnBhd/shipping-portal!132
2022-06-14 07:30:33 +00:00
omair saleh 761dedf427 Merge branch 'EXCHANGE-653-Revise-data-structure-of-the-segment_constant-table' into 'development'
implementing new data structure for segment_constant table

See merge request CIEFWorldwideSdnBhd/shipping-portal!133
2022-06-14 07:30:21 +00:00
edmondlang 0c2c64c637 Merge branch 'new-air-shipment-module' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-06-13 23:05:42 +08:00
edmondlang 10b699990f Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-06-13 22:59:07 +08:00
edmondlang 606325706e air shipment module 2022-06-13 22:58:41 +08:00
omair saleh 742d26bdd3 update vt container packing list api 2022-06-13 11:39:41 +08:00
omair saleh 308a1bcdc0 update vt container packing list api 2022-06-13 11:36:21 +08:00
omair saleh f0f70e421e update vt container packing list api 2022-06-13 11:24:32 +08:00
omair saleh 3dff650b04 update vt container packing list api 2022-06-13 11:23:25 +08:00
omair saleh 5a55b4ccf2 update vt container packing list api 2022-06-13 11:22:50 +08:00
omair saleh 303b1abff1 update vt container packing list api 2022-06-13 11:21:07 +08:00
omair saleh 69a2743056 update vt container packing list api 2022-06-13 11:19:09 +08:00
omair saleh cf49a661e1 update vt container packing list api 2022-06-13 11:17:21 +08:00
omair saleh 4bcb67e972 update vt container packing list api 2022-06-13 11:16:28 +08:00
omair saleh e8564ee3b5 update vt container packing list api 2022-06-13 11:13:38 +08:00
omair saleh 23e5e1e268 update vt container packing list api 2022-06-13 11:13:25 +08:00
omair saleh cce1979388 update vt container packing list api 2022-06-13 11:12:21 +08:00
omair saleh f39f9ee2a7 update vt container packing list api 2022-06-13 11:09:59 +08:00
omair saleh c1cf22544f update vt container packing list api 2022-06-13 11:07:53 +08:00
omair saleh 321002ed04 remove old notice 2022-06-09 17:45:47 +08:00
omair saleh de237a4110 update new notice 2022-06-09 17:41:08 +08:00
omair saleh ee408da523 update smc monthly summary containers ref 2022-05-31 16:16:05 +08:00
omair saleh de797d65ee update smc monthly summary containers ref 2022-05-31 16:15:14 +08:00
omair saleh 9831ff29af update smc monthly summary containers ref 2022-05-31 16:14:22 +08:00
omair saleh 0102dabdba update smc monthly summary containers ref 2022-05-31 15:18:40 +08:00
omair saleh 86913ad80b update smc monthly summary containers ref 2022-05-31 15:15:20 +08:00
omair saleh fad2685534 update smc monthly summary containers ref 2022-05-31 15:14:22 +08:00
omair saleh 589422a9a8 update smc monthly summary containers ref 2022-05-31 15:09:05 +08:00
omair saleh e2b96d7281 update smc monthly summary containers ref 2022-05-31 15:03:47 +08:00
omair saleh df14f196b9 holiday announcement 2022-05-30 17:25:23 +08:00
omair saleh 7698c35b85 fix onhold packing list 2022-05-30 11:19:25 +08:00
omair saleh 88c0b4303e update vt new warehouselist 2022-05-26 10:14:12 +08:00
omair saleh c4eec73803 update vt new warehouselist 2022-05-26 10:11:55 +08:00
marjuqi@ad 6932b3291c implementing new data structure for segment_constant table 2022-05-25 10:28:51 +07:00
edmondlang cbaf05389e Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-05-24 00:12:34 +08:00
marjuqi@ad 00f4f141c4 remove unused newline 2022-05-20 09:07:24 +07:00
marjuqi@ad 7771b903ae refactor codes in ShippingEstimationCalculatorLogic.php 2022-05-20 09:06:20 +07:00
marjuqi@ad 6de35b13f1 rearrange the lines of code to improve readability 2022-05-20 08:14:14 +07:00
marjuqi@ad 46da64fc47 revert the changes for CreateShippingInvoiceTransactionLogic.php and Helper.php 2022-05-20 08:11:28 +07:00
marjuqi@ad 0821db2899 refactor functions: getConstantByKey, checkPostcodeExistInConstant 2022-05-19 06:23:19 +07:00
marjuqi@ad 74005ba312 remove unused lines 2022-05-19 06:07:28 +07:00
marjuqi@ad 7935be2912 update logic for state_rate 2022-05-19 05:40:13 +07:00
omair saleh 8e0d23a208 update yd fetch api to include delivery missing cases 2022-05-18 16:59:49 +08:00
omair saleh 2a077edcde update vt api url for new warehouse list 2022-05-18 16:41:15 +08:00
marjuqi@ad 142904b0af activate lines after executing SegmentConstantsTableSeeder 2022-05-18 11:15:25 +07:00
marjuqi@ad 97fe1d9192 revise logic for ShippingEstimationCalculator following Omair's feedback 2022-05-18 10:43:09 +07:00
omair saleh 27940854e2 add chi bin to vt 2022-05-17 17:26:09 +08:00
marjuqi@ad d4c35a5286 initial commit for ShippingEstimationCalculator 2022-05-17 15:31:17 +07:00
omair saleh 35dec3042b fix export arrival list 2022-05-17 11:47:30 +08:00
omair saleh 918db70429 fix export arrival list 2022-05-17 11:46:24 +08:00
omair saleh 1796ddefbf fix export arrival list 2022-05-17 11:45:13 +08:00
edmondlang e1ee96f77c Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-05-13 23:03:35 +08:00
omair saleh 31e28c3dfa fix export arrival list 2022-05-13 12:51:20 +08:00
omair saleh faf4d35340 fix export arrival list 2022-05-13 12:50:36 +08:00
omair saleh 4fef6f8e6f fix export arrival list 2022-05-13 12:45:54 +08:00
omair saleh 5d504b5111 fix export arrival list 2022-05-13 12:44:19 +08:00
omair saleh 3854884370 fix export arrival list 2022-05-12 12:14:29 +08:00
omair saleh fe70c4b111 fix export arrival list 2022-05-11 18:00:13 +08:00
omair saleh dad2f95eaa fix export arrival list 2022-05-11 14:03:52 +08:00
omair saleh 764e709135 fix export arrival list 2022-05-11 14:01:02 +08:00
omair saleh 9b35f8c374 fix export arrival list 2022-05-11 13:51:13 +08:00
omair saleh 2e03ce370d fix export arrival list 2022-05-11 13:42:26 +08:00
omair saleh d972e98732 fix export arrival list 2022-05-10 19:50:19 +08:00
omair saleh 9041d9623b fix export arrival list 2022-05-10 19:46:16 +08:00
omair saleh f4a96fec78 fix export arrival list 2022-05-10 19:41:35 +08:00
omair saleh c299c60d38 fix export arrival list 2022-05-10 19:38:04 +08:00
omair saleh 96eeb5a63e fix export arrival list 2022-05-10 19:37:49 +08:00
omair saleh fc6c365792 fix export arrival list 2022-05-10 19:37:39 +08:00
omair saleh 6094adadec fix export arrival list 2022-05-10 19:35:16 +08:00
omair saleh 78ce2084b9 fix export arrival list 2022-05-10 19:31:04 +08:00
omair saleh 4fb284c85c fix export arrival list 2022-05-10 19:27:45 +08:00
omair saleh 9e060bccd3 fix export arrival list 2022-05-10 19:24:02 +08:00
omair saleh 3100d42bd7 fix export arrival list 2022-05-10 19:23:03 +08:00
omair saleh 0640e0de9b fix export arrival list 2022-05-10 19:13:36 +08:00
omair saleh aa1d1dccc5 fix export arrival list 2022-05-10 18:57:22 +08:00
omair saleh e369bc7f9e fix export arrival list 2022-05-10 15:42:33 +08:00
omair saleh 6713542dc9 fix export arrival list 2022-05-10 15:02:06 +08:00
omair saleh f73094ca06 fix export arrival list 2022-05-10 15:01:35 +08:00
omair saleh 453683ca76 fix export arrival list 2022-05-10 14:59:43 +08:00
edmondlang caef08aa98 update generate invoice api 2022-05-07 22:28:13 +08:00
edmondlang 2c2e4eece8 update generate invoice api 2022-05-07 20:08:22 +08:00
omair saleh a30421a3e9 fix addons table migration 2022-05-07 16:42:44 +08:00
omair saleh 056342308e fix addons table migration 2022-05-07 16:37:48 +08:00
omair saleh f7ca8558f5 fix addons table migration 2022-05-07 16:32:02 +08:00
edmondlang 92255056cc Merge branch 'container-payment-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-05-07 16:28:40 +08:00
edmondlang 5e1626e6a4 add soft delete in segemtns model 2022-05-07 16:28:11 +08:00
edmondlang c533c0c4a6 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-05-06 21:34:57 +08:00
omair saleh e8eb02430b update warehouse operation time 2022-05-06 13:49:14 +08:00
edmondlang f17bfea250 fix generate invoice api and database seeder for segment constant 2022-05-05 21:05:45 +08:00
edmondlang 24ceb3cb39 Merge branch 'new-signup' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-05-02 12:05:40 +08:00
edmondlang b6086554e2 sepereate delivery login component and shipping login component 2022-05-02 12:05:19 +08:00
edmondlang fee73f7708 Merge branch 'new-signup' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-30 21:08:29 +08:00
edmondlang cd7ee3afb3 new signup 2022-04-30 11:57:32 +08:00
edmondlang 3329028860 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-30 10:18:56 +08:00
omair saleh 6507b84e55 update warehouse operation time 2022-04-28 10:12:27 +08:00
omair saleh eab465e837 update gz default warehouse 2022-04-27 17:29:26 +08:00
omair saleh 1cc0303539 update raya announcement 2022-04-27 12:55:49 +08:00
omair saleh 305ae6c217 update raya announcement 2022-04-27 12:51:39 +08:00
omair saleh bcd926b4c9 update crisp session data 2022-04-25 15:14:11 +08:00
edmondlang cd84348542 Merge branch 'delete-packing-list' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-24 23:30:18 +08:00
edmondlang 8e0efdf6e7 delete packing list 2022-04-24 23:30:02 +08:00
edmondlang 37cdbbb2c4 Merge branch 'api-intergration' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-24 23:04:26 +08:00
edmondlang 86893efe3d update base price date range 2022-04-23 14:59:52 +08:00
edmondlang 3dfec9fd6d update list base price section component 2022-04-22 22:23:35 +08:00
edmondlang 0634fbf78e update constant base price 2022-04-22 21:41:02 +08:00
edmondlang 6375ac753e clean up error in console for settiongs page 2022-04-22 00:23:59 +08:00
edmondlang 3899dd8416 update base price api 2022-04-22 00:18:12 +08:00
edmondlang 8ca1cc1625 Merge branch 'api-intergration' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-21 22:08:07 +08:00
edmondlang d0ee2473ac update section name 2022-04-21 22:07:50 +08:00
edmondlang b67b676704 Merge branch 'update-delivery-date' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-21 21:42:53 +08:00
edmondlang 2f98dc976a add file RescheduleTransportDateFormComponent 2022-04-21 21:42:32 +08:00
edmondlang 2421dd0988 Merge branch 'update-delivery-date' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-21 21:02:38 +08:00
edmondlang 20237d69fb update 2022-04-21 21:02:25 +08:00
edmondlang 03851deeea Merge branch 'update-delivery-date' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-21 20:59:16 +08:00
edmondlang 22f1548eac update delivery date 2022-04-21 20:58:27 +08:00
omair saleh 4e4475ad12 switch back to temp warehouse 2022-04-21 14:12:23 +08:00
omair saleh a287a1193a allow admin to add arrived parcels 2022-04-21 12:19:57 +08:00
omair saleh a80b3013c3 go to previous yd warehouse 2022-04-21 10:31:24 +08:00
edmondlang 4224c3e436 Merge branch 'api-intergration' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-21 09:31:12 +08:00
edmondlang 33124d6588 update declare postcode and implement api 2022-04-21 09:30:56 +08:00
edmondlang 77c2ede28e Merge branch 'api-intergration' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-21 01:14:33 +08:00
edmondlang 86e257106a add code to check if postcode constant does not exist, insert new postcode constant 2022-04-21 01:13:46 +08:00
edmondlang edb644eaeb remove insert segment if segment does not exist 2022-04-21 01:12:32 +08:00
edmondlang 8418268731 Merge branch 'api-intergration' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-19 20:50:28 +08:00
edmondlang 98dc43d23a update segment constant logic 2022-04-19 20:50:09 +08:00
edmondlang 5fdc6d5719 Merge branch 'api-intergration' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-19 15:10:12 +08:00
edmondlang cfd6757a84 tidy up 2022-04-19 15:09:56 +08:00
edmondlang 08517e8ee7 Merge branch 'api-intergration' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-19 14:58:17 +08:00
edmondlang eb31291e25 update warehouse api 2022-04-19 14:57:38 +08:00
edmondlang ddbecaae6f Merge branch 'api-intergration' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-19 13:31:04 +08:00
edmondlang 7b88fd5c3c update state charges 2022-04-19 13:28:56 +08:00
edmondlang 1814352780 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into api-intergration 2022-04-19 13:26:23 +08:00
edmondlang 8795f1c203 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-19 11:00:57 +08:00
omair saleh f5cf2ac2df fix login error handler & add new modern warehouse 2022-04-19 00:00:12 +08:00
omair saleh 2767d94a16 fix login error handler & add new modern warehouse 2022-04-18 23:56:27 +08:00
omair saleh f68ef5c5e2 fix login error handler & add new modern warehouse 2022-04-18 23:46:25 +08:00
omair saleh 639ccd3927 fix login error handler & add new modern warehouse 2022-04-18 23:40:08 +08:00
omair saleh 5651ed7010 fix LMD to HWT 2022-04-18 15:47:25 +08:00
omair saleh fd89233e49 fix LMD to HWT 2022-04-18 15:44:58 +08:00
omair saleh be70afd9bf fix LMD to HWT 2022-04-18 15:44:25 +08:00
omair saleh efac46264e fix LMD to HWT 2022-04-18 15:43:43 +08:00
omair saleh a0817dbb6e debug delivery registration 2022-04-18 15:42:10 +08:00
omair saleh dfa7013f04 debug delivery registration 2022-04-18 15:39:57 +08:00
omair saleh 28a57887b6 debug forget password 2022-04-18 04:59:49 +08:00
edmondlang 762e9b8dca update segment migration files 2022-04-17 23:54:44 +08:00
edmondlang d8c9c77d8d Merge branch 'api-intergration' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-17 23:42:26 +08:00
edmondlang f21708ff57 Merge branch 'notification-ui' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	routes/web.php
2022-04-17 23:38:10 +08:00
edmondlang ac4fcb05e9 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	resources/views/vendor/js.blade.php
2022-04-17 23:36:42 +08:00
edmondlang b3a296f2eb update notification ui, display no result found if no notification 2022-04-17 21:10:52 +08:00
edmondlang 5a723c5fd1 update notification ui - solve ui bug when only have 1 notification 2022-04-16 23:54:51 +08:00
edmondlang 6e9a27024b update notification ui 2022-04-16 16:19:25 +08:00
omair saleh 8a96941127 debug forget password 2022-04-15 14:55:21 +08:00
omair saleh 3a5423a308 on hold packing list export 2022-04-15 14:21:08 +08:00
omair saleh ddd1b7b29e on hold packing list export 2022-04-15 14:20:20 +08:00
omair saleh 5433c202a7 on hold packing list export 2022-04-15 14:19:32 +08:00
omair saleh b967e4f9ab on hold packing list export 2022-04-15 14:18:38 +08:00
omair saleh e9b7de47fa on hold packing list export 2022-04-15 14:17:43 +08:00
omair saleh 3c942af883 on hold packing list export 2022-04-15 14:17:20 +08:00
omair saleh baa9f79272 on hold packing list export 2022-04-15 14:00:13 +08:00
omair saleh 10c66dc2dc export delivery list excel 2022-04-15 11:58:37 +08:00
omair saleh 05d4b7fe36 fix fetch from vt 2022-04-15 11:43:17 +08:00
omair saleh 7fc4568fbf fix fetch from vt 2022-04-14 13:14:47 +08:00
omair saleh f55a57c222 fix fetch from vt 2022-04-14 13:12:56 +08:00
omair saleh 301d7b5520 update hywavetech lineclear excel format 2022-04-14 10:15:07 +08:00
omair saleh 9f965109c7 update hywavetech lineclear excel format 2022-04-14 10:01:10 +08:00
omair saleh 108a952ee3 update hywavetech lineclear excel format 2022-04-13 21:56:21 +08:00
omair saleh 1426d804e5 fix yd fetch 2022-04-13 15:10:10 +08:00
omair saleh 88b3dc8b84 fix yd fetch 2022-04-13 14:27:08 +08:00
omair saleh 4b3274f6d5 fix yd fetch 2022-04-13 14:24:50 +08:00
omair saleh da1b6b1b6d fix yd fetch 2022-04-13 13:22:23 +08:00
omair saleh ac0a90c168 fix yd fetch 2022-04-13 13:17:04 +08:00
omair saleh a5e47324b2 fix yd fetch 2022-04-13 13:11:30 +08:00
omair saleh 40d22de809 fix customer profile 2022-04-13 12:19:34 +08:00
omair saleh 7154b5a943 fix customer profile 2022-04-13 12:15:32 +08:00
omair saleh 863c2874dd fix yd fetch 2022-04-13 11:50:23 +08:00
omair saleh 862398b0d5 update qr pdf 2022-04-13 11:30:53 +08:00
omair saleh 9e20b717a6 update qr pdf 2022-04-13 11:29:15 +08:00
omair saleh 129f3ecf10 update crisp to production 2022-04-13 00:25:49 +08:00
omair saleh f71f1fecd4 update crisp to production 2022-04-13 00:18:57 +08:00
omair saleh 6f5f854827 update crisp to production 2022-04-13 00:18:44 +08:00
omair saleh f4275f20a3 update crisp to production 2022-04-13 00:17:19 +08:00
omair saleh 35d9a1f8d8 update crisp to production 2022-04-13 00:15:51 +08:00
omair saleh de1afc26dc update crisp to production 2022-04-12 16:22:57 +08:00
omair saleh 904fb3d9e5 update crisp to production 2022-04-12 16:18:33 +08:00
omair saleh 304337d5e2 update crisp to production 2022-04-12 16:02:00 +08:00
omair saleh aa312c8f6e Merge remote-tracking branch 'origin/master' 2022-04-12 15:20:41 +08:00
omair saleh 05d079f261 update crisp to production 2022-04-12 15:20:13 +08:00
omair saleh a1cb511125 Merge branch 'export-arrived-parcel' into 'master'
export-arrived-parcel

See merge request CIEFWorldwideSdnBhd/shipping-portal!130
2022-04-12 07:10:44 +00:00
omair saleh 8d29a25793 create replica white list 2022-04-12 09:42:27 +08:00
edmondlang a7593e4ab2 export-arrived-parcel 2022-04-11 23:29:39 +08:00
omair saleh 8ecb306e92 update final touch up for last delivery integration 2022-04-09 20:43:00 +08:00
omair saleh 918fd0d17d update final touch up for last delivery integration 2022-04-09 20:41:48 +08:00
omair saleh 4f888da29a Merge branch 'last-mile-integration' into 'master'
update field change value of  'Pickup_Address_Type' from sender to Default'

See merge request CIEFWorldwideSdnBhd/shipping-portal!129
2022-04-09 12:20:56 +00:00
edmondlang 559de29acf update field change value of 'Pickup_Address_Type' from sender to Default'
export multiple sheet with the correct name of each field
2022-04-09 15:10:54 +08:00
edmondlang 5ba46a96a3 api intergration 2022-04-08 21:08:54 +08:00
edmondlang 1c79d88d8d remove service set up and add in base price 2022-04-08 19:05:18 +08:00
edmondlang 029f25a003 update state charges 2022-04-08 18:42:30 +08:00
edmondlang 557881104c implement api for warehouse charges 2022-04-08 18:23:54 +08:00
edmondlang d30dab61ea intergrate api for decalreing postcode area 2022-04-07 23:45:36 +08:00
edmondlang e0018de70d Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-07 22:57:28 +08:00
edmondlang 87116d29c9 last mile delivery search order ui and search order number function 2022-04-07 22:54:02 +08:00
omair saleh d9eeaf4bef update final touch up for last delivery integration 2022-04-07 22:47:30 +08:00
omair saleh 5dabc88fa9 update final touch up for last delivery integration 2022-04-07 22:40:01 +08:00
omair saleh 8c29fcda1f update final touch up for last delivery integration 2022-04-07 22:28:51 +08:00
omair saleh edd6b0d6ff update final touch up for last delivery integration 2022-04-07 22:22:22 +08:00
omair saleh 6940290570 update final touch up for last delivery integration 2022-04-07 22:21:21 +08:00
omair saleh 327bd75cc9 update final touch up for last delivery integration 2022-04-07 22:20:47 +08:00
omair saleh 9f760d8694 Merge branch 'last-mile-integration' into 'master'
updates last mile intergration - add functions

See merge request CIEFWorldwideSdnBhd/shipping-portal!128
2022-04-07 14:13:57 +00:00
omair saleh f5a0e9cd07 Merge branch 'last-mile-integration' into 'development'
update final touch up for last delivery integration

See merge request CIEFWorldwideSdnBhd/shipping-portal!127
2022-04-07 13:28:33 +00:00
omair saleh 4a1905abde update final touch up for last delivery integration 2022-04-07 21:27:53 +08:00
omair saleh 908c547ddc Merge branch 'last-mile-integration' into 'development'
update final touch up for last delivery integration

See merge request CIEFWorldwideSdnBhd/shipping-portal!126
2022-04-07 13:21:17 +00:00
omair saleh 5d1ff709eb update final touch up for last delivery integration 2022-04-07 21:20:13 +08:00
omair saleh cdda3ff5e1 Merge branch 'last-mile-integration' into 'development'
update final touch up for last delivery integration

See merge request CIEFWorldwideSdnBhd/shipping-portal!125
2022-04-07 13:17:48 +00:00
omair saleh a50b475525 update final touch up for last delivery integration 2022-04-07 21:16:59 +08:00
omair saleh 27bacd412a Merge branch 'last-mile-integration' into 'development'
Last mile integration

See merge request CIEFWorldwideSdnBhd/shipping-portal!124
2022-04-07 13:13:58 +00:00
omair saleh 97ec65e292 Merge remote-tracking branch 'origin/last-mile-integration' into last-mile-integration 2022-04-07 21:13:21 +08:00
omair saleh 5df226c153 update final touch up for last delivery integration 2022-04-07 21:12:15 +08:00
edmondlang 424ac600c3 Merge branch 'export-customer-order-list' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-07 12:31:05 +08:00
edmondlang 715635954a update file name 2022-04-07 12:30:39 +08:00
edmondlang a5a450a7d4 Merge branch 'export-customer-order-list' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-07 11:50:03 +08:00
edmondlang 3e87f320bf Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into last-mile-integration 2022-04-07 11:45:56 +08:00
edmondlang 2919544769 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into export-customer-order-list 2022-04-07 11:37:10 +08:00
edmondlang e3284fdf98 export customer order list 2022-04-07 11:36:03 +08:00
omair saleh 114a083627 Merge branch 'last-mile-integration' into 'development'
update last mile delivery logo

See merge request CIEFWorldwideSdnBhd/shipping-portal!123
2022-04-07 03:13:22 +00:00
omair saleh 408a3a1211 update last mile delivery logo 2022-04-07 11:12:27 +08:00
omair saleh bed78c053a remove memo 2022-04-07 10:59:50 +08:00
omair saleh 32a509d090 Merge branch 'last-mile-integration' into 'development'
updates last mile intergration - add functions

See merge request CIEFWorldwideSdnBhd/shipping-portal!122
2022-04-07 01:54:39 +00:00
omair saleh c53ebf76b3 hide admin menu flashing 2022-04-07 09:53:59 +08:00
omair saleh bd2b7b236b Merge branch 'last-mile-integration' into 'development'
hide admin menu flashing

See merge request CIEFWorldwideSdnBhd/shipping-portal!121
2022-04-07 01:48:33 +00:00
omair saleh 4085ac4829 hide admin menu flashing 2022-04-07 09:46:22 +08:00
omair saleh 6a08d88031 Merge branch 'last-mile-integration' into 'development'
hide admin menu flashing

See merge request CIEFWorldwideSdnBhd/shipping-portal!120
2022-04-07 01:45:16 +00:00
omair saleh 778729b81d hide admin menu flashing 2022-04-07 09:44:02 +08:00
omair saleh ef95893c3b Merge branch 'last-mile-integration' into 'development'
update last mile delivery module

See merge request CIEFWorldwideSdnBhd/shipping-portal!119
2022-04-06 10:53:05 +00:00
omair saleh 54c212e905 update last mile delivery module 2022-04-06 18:51:08 +08:00
edmondlang 5043b32191 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-06 18:31:15 +08:00
omair saleh 7169ba423c Merge branch 'last-mile-integration' into 'development'
updates last mile intergration - add functions

See merge request CIEFWorldwideSdnBhd/shipping-portal!118
2022-04-06 10:25:09 +00:00
omair saleh 5b370a299c update pending delivery report excel 2022-04-06 16:01:31 +08:00
omair saleh e57dc231e6 update pending delivery report excel 2022-04-06 16:01:03 +08:00
omair saleh 5727801918 update pending delivery report excel 2022-04-06 15:59:28 +08:00
omair saleh bf325ff028 update pending delivery report excel 2022-04-06 15:55:31 +08:00
omair saleh 229e757663 Merge branch 'export-delivery-list' into 'master'
Export delivery list

See merge request CIEFWorldwideSdnBhd/shipping-portal!117
2022-04-06 07:32:01 +00:00
edmondlang f8e7573cfd Merge branch 'export-delivery-list' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-06 14:37:23 +08:00
edmondlang 10d62dd8d1 update export delivery list - include state and postcode 2022-04-06 13:53:43 +08:00
edmondlang 0fa0d8daab Shipping portal - export function for Delivery list (only 'Pending Arrangement' tab) 2022-04-06 13:30:16 +08:00
edmondlang bb59a444cf update export excel form 2022-04-06 11:24:24 +08:00
edmondlang 45c878a2ed add orders created date to the table 2022-04-06 10:21:40 +08:00
edmondlang e871f4b287 hide tick and show only for admin 2022-04-05 20:03:27 +08:00
edmondlang 5aa93b30c7 update container select packing list 2022-04-05 19:05:57 +08:00
edmondlang 8c35601ccd Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-04-05 19:04:24 +08:00
omair saleh 0ec9226226 add crisp 2022-04-05 13:26:24 +08:00
omair saleh 3286939ccc Merge remote-tracking branch 'origin/development' into development 2022-04-05 13:21:07 +08:00
omair saleh 3a2146146c add crisp 2022-04-05 13:20:52 +08:00
edmondlang 6eaa810b67 remove text order list 2022-04-05 11:40:58 +08:00
omair saleh 68d961a681 custom clearance status 2022-04-05 11:38:21 +08:00
omair saleh 2c29e5939e custom clearance status 2022-04-05 11:25:56 +08:00
omair saleh 6910dce35f custom clearance status 2022-04-05 11:23:39 +08:00
omair saleh a19db06b6b custom clearance status 2022-04-05 11:20:45 +08:00
edmondlang 4e53e1b48a updates last mile intergration - add functions
- admin cancel order
- add filter to display only active orders
- hide customer page
- show parcel weight as total weight (quantity * weight per quantity)
    - in create order form
    - order table
    - export excel
- update export excel, only include the data of the selected Ids
2022-04-05 10:45:30 +08:00
omair saleh aef9b82918 Merge remote-tracking branch 'origin/last-mile-integration' into last-mile-integration
# Conflicts:
#	resources/views/pages/delivery/admin.blade.php
2022-04-04 19:41:43 +08:00
omair saleh f96fef94fe finalize last mile delivery 2022-04-04 19:40:54 +08:00
edmondlang ab141ae160 update admin view for last mile intergration 2022-04-04 14:21:59 +08:00
edmondlang bf4830ba7a update mobile responsive for delivery order form component 2022-04-03 23:47:58 +08:00
edmondlang 5baf04c835 fix mobile responsive 2022-04-03 23:39:27 +08:00
edmondlang 4917c54868 remove vuetable 2022-04-03 23:26:45 +08:00
edmondlang 9c7d07f603 remove imports that are not using 2022-04-03 20:20:09 +08:00
edmondlang 6f9320f3a4 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into last-mile-integration 2022-04-03 19:13:24 +08:00
omair saleh c69c043576 fix the user ui, create delivery order, delivery customer dashboard 2022-04-03 19:10:06 +08:00
edmondlang 745655dbfa last mile intergration 2022-04-02 15:21:14 +08:00
omair saleh b764ee0769 update packing list monthly summary containers 2022-04-01 17:02:36 +08:00
omair saleh ab1d92af86 fix yd missing packages from order 2022-04-01 14:58:27 +08:00
omair saleh 2ff9a38114 fix yd missing packages from order 2022-04-01 14:57:41 +08:00
omair saleh 0abdbd525e fix yd missing packages from order 2022-04-01 14:56:46 +08:00
omair saleh f44aace3c5 fix yd missing packages from order 2022-04-01 14:56:05 +08:00
omair saleh 0af84a9b7d fix yd missing packages from order 2022-04-01 14:54:09 +08:00
omair saleh 1aff95b41c fix yd missing packages from order 2022-04-01 14:51:57 +08:00
omair saleh 745f476f89 fix yd missing packages from order 2022-04-01 14:41:24 +08:00
omair saleh e1d751b859 fix yd missing packages from order 2022-04-01 11:21:44 +08:00
omair saleh 6077b1fbbb fix yd missing packages from order 2022-04-01 10:56:56 +08:00
omair saleh 5fe8a7a59e fix order address update to vt 2022-03-31 21:15:19 +08:00
omair saleh 8b38bcac8a fix order address update to vt 2022-03-31 21:10:23 +08:00
omair saleh 5561442932 fix order address update to vt 2022-03-31 21:09:01 +08:00
omair saleh f33efd373c fix order address update to vt 2022-03-31 21:05:44 +08:00
omair saleh 53c325b36d fetch only 2 months orders from yd 2022-03-31 20:47:14 +08:00
omair saleh cd141bf988 fix yd older than 2 months orders 2022-03-31 20:30:49 +08:00
omair saleh 908f3fc11b fix yd older than 2 months orders 2022-03-31 20:29:49 +08:00
omair saleh 8e9f12b17e fix yd older than 2 months orders 2022-03-31 20:29:14 +08:00
omair saleh 782bcc69f1 fix yd older than 2 months orders 2022-03-31 20:28:41 +08:00
omair saleh 144464621e fix yd older than 2 months orders 2022-03-31 20:28:07 +08:00
omair saleh b290f95426 fix yd older than 2 months orders 2022-03-31 20:27:31 +08:00
omair saleh b7e6269aa9 fix yd older than 2 months orders 2022-03-31 20:25:14 +08:00
omair saleh 7180f802b3 fix yd older than 2 months orders 2022-03-31 20:20:19 +08:00
omair saleh 7159c1c11d fix yd older than 2 months orders 2022-03-31 20:17:55 +08:00
omair saleh cce0cae57c fix yd older than 2 months orders 2022-03-31 20:17:03 +08:00
omair saleh bebce6fbaa fix yd older than 2 months orders 2022-03-31 19:50:55 +08:00
omair saleh 531ab699ba show delivery delay days 2022-03-31 19:45:06 +08:00
omair saleh 9f9c17977d show delivery delay days 2022-03-31 19:44:11 +08:00
omair saleh 24f5de8c2c fix missing yd delivery 2022-03-31 14:41:10 +08:00
omair saleh 3b8079785a fix missing yd delivery 2022-03-31 14:19:47 +08:00
omair saleh 627fb3aa96 fix missing yd delivery 2022-03-31 14:18:34 +08:00
omair saleh 2b4d3f1992 fix missing yd delivery 2022-03-31 14:16:40 +08:00
omair saleh 65daceb59c fix missing yd delivery 2022-03-31 14:13:26 +08:00
omair saleh d7457e7174 fix missing yd delivery 2022-03-31 14:10:24 +08:00
omair saleh 9753eb3a18 fix packages is missing in yd api 2022-03-31 13:56:47 +08:00
omair saleh e7df49a0d1 fix packages is missing in yd api 2022-03-31 13:54:48 +08:00
omair saleh cd4e7aab10 fix packages is missing in yd api 2022-03-31 13:52:36 +08:00
omair saleh 29350dbb86 fix packages is missing in yd api 2022-03-31 13:52:16 +08:00
omair saleh 7338ebc78a fix packages is missing in yd api 2022-03-31 13:49:47 +08:00
omair saleh 4eded7a742 update holiday announcement 2022-03-31 09:31:09 +08:00
omair saleh dc562f6554 update holiday announcement 2022-03-31 09:29:31 +08:00
edmondlang d96a35a49f revert RegistrationFormComponent 2022-03-30 20:01:45 +08:00
edmondlang 8024fef2e8 Merge branch 'new-registration-ui' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into last-mile-integration 2022-03-30 19:54:35 +08:00
omair saleh 2d965009ec move unclaimed packing lists to dashboard 2022-03-30 11:31:40 +08:00
omair saleh 7d84ddee95 fix do update bug 2022-03-30 00:25:18 +08:00
omair saleh 92b31a9342 fix do update bug 2022-03-30 00:22:05 +08:00
omair saleh 012dbfde09 fix do update bug 2022-03-30 00:21:14 +08:00
omair saleh 0b651953ea fix do update bug 2022-03-30 00:20:24 +08:00
omair saleh b34f50ae9d fix do update bug 2022-03-30 00:20:11 +08:00
omair saleh 8f0d1e6fdf fix do update bug 2022-03-30 00:19:22 +08:00
omair saleh e8990d96f7 debug do update 2022-03-30 00:06:22 +08:00
omair saleh 69ee0eea2c debug do update 2022-03-30 00:05:45 +08:00
omair saleh adcdf5909e debug do update 2022-03-29 23:57:16 +08:00
omair saleh b9523fb567 debug do update 2022-03-29 23:56:31 +08:00
omair saleh 79678d7b93 debug do update 2022-03-29 23:56:01 +08:00
omair saleh 2bdfd2772a debug do update 2022-03-29 23:54:14 +08:00
omair saleh 55513f5175 debug do update 2022-03-29 23:44:22 +08:00
omair saleh 709534ce04 debug do update 2022-03-29 23:43:29 +08:00
omair saleh 74d85eee60 debug do update 2022-03-29 23:42:32 +08:00
omair saleh 63badc08f0 debug do update 2022-03-29 23:41:34 +08:00
omair saleh 73010ed32b debug do update 2022-03-29 23:40:20 +08:00
omair saleh 7a2a90545b debug do update 2022-03-29 23:40:05 +08:00
omair saleh c0ee3a8e57 debug do update 2022-03-29 23:39:28 +08:00
omair saleh 0c7e4d5785 debug do update 2022-03-29 23:38:33 +08:00
omair saleh c3cd8ae3a0 debug do update 2022-03-29 23:35:27 +08:00
omair saleh 0e7469f1cd new registration ui flow 2022-03-29 23:15:42 +08:00
omair saleh 32476afdd4 fix vt warehouse list 2022-03-27 12:56:31 +08:00
omair saleh 8b6db1fb68 temp test vt warehouse list 2022-03-27 12:55:06 +08:00
omair saleh 43f3fbff07 temp test vt warehouse list 2022-03-27 12:54:06 +08:00
omair saleh caf8624d4c temp test vt warehouse list 2022-03-27 12:51:43 +08:00
omair saleh eb417cf389 temp test vt warehouse list 2022-03-27 12:50:23 +08:00
omair saleh 276a87ff0d temp test vt warehouse list 2022-03-27 12:49:08 +08:00
omair saleh 6d2f179025 Merge branch 'development' into 'master'
Development

See merge request CIEFWorldwideSdnBhd/shipping-portal!116
2022-03-27 03:54:48 +00:00
omair saleh 8609c926f9 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-27 11:53:18 +08:00
omair saleh 368a055bb4 add chat box to development 2022-03-27 11:50:27 +08:00
omair saleh d617001412 fix vt YW orders 2022-03-27 11:49:32 +08:00
omair saleh c932cb00cc add chat widget 2022-03-25 17:36:27 +08:00
omair saleh 1be62a5f77 fix vt order number to filter yw 2022-03-25 16:54:10 +08:00
omair saleh 445bcb3864 small clean up 2022-03-24 13:33:04 +08:00
omair saleh d489775924 small clean up 2022-03-24 13:32:34 +08:00
omair saleh fff428882d small clean up 2022-03-24 13:31:37 +08:00
omair saleh 42205ddbc3 small clean up 2022-03-24 13:29:59 +08:00
omair saleh 722e502b3b tidy up invoices details descriptions 2022-03-24 13:26:55 +08:00
omair saleh 4f93569b4c Merge branch 'development' into 'master'
Development

See merge request CIEFWorldwideSdnBhd/shipping-portal!115
2022-03-24 05:22:35 +00:00
omair saleh e1abebc66c Merge branch 'transaction-invoice' into 'development'
transaction detail over weight

See merge request CIEFWorldwideSdnBhd/shipping-portal!114
2022-03-24 05:18:22 +00:00
omair saleh 2424882cfe Merge branch 'development' into 'transaction-invoice'
# Conflicts:
#   app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php
2022-03-24 05:18:17 +00:00
omair saleh 23f50faa84 release create warehouse arrival parcel module 2022-03-24 13:11:22 +08:00
edmondlang edc510681e Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-24 11:40:20 +08:00
omair saleh db03836ef5 add new way of detecting yd container rescheduling 2022-03-24 10:59:59 +08:00
edmondlang 3a5f404294 Tidy Up Export Customer activity details, add new filter - minOrders and minCbm 2022-03-23 00:53:16 +08:00
edmondlang 9b79f16faa Merge branch 'api-to-update-segment-constants' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-22 21:55:24 +08:00
edmondlang 4ff4418f7f Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-19 13:35:09 +08:00
glovetleong 19c8f1e658 transaction detail over weight 2022-03-18 20:46:40 +08:00
omair saleh e1c4d674b6 smc report for specific containers 2022-03-18 17:48:18 +08:00
omair saleh 3326de9c4f smc report for specific containers 2022-03-18 17:44:28 +08:00
omair saleh 54dd6d407d revert invoice changes 2022-03-18 16:18:44 +08:00
omair saleh 9ee81d9385 update rfm to table 2022-03-18 16:18:12 +08:00
omair saleh aa1ba03415 update rfm to table 2022-03-18 16:16:25 +08:00
omair saleh fb6b2173b5 update rfm to table 2022-03-18 16:14:42 +08:00
omair saleh f18e4a882f update container reschedule for yd 2022-03-17 17:47:34 +08:00
omair saleh 8edc91bb61 update container reschedule for yd 2022-03-17 17:46:24 +08:00
omair saleh 6122c288df update container reschedule for yd 2022-03-17 17:45:10 +08:00
omair saleh 9650877819 update container reschedule for yd 2022-03-17 17:43:03 +08:00
omair saleh c65d875a3d update container reschedule for yd 2022-03-17 17:41:39 +08:00
omair saleh c1bc610549 update container reschedule for yd 2022-03-17 17:41:06 +08:00
omair saleh 82d406abfc update container reschedule for yd 2022-03-17 17:39:47 +08:00
omair saleh 701610978d update container reschedule for yd 2022-03-17 17:37:07 +08:00
omair saleh f7e1665a02 update container reschedule for yd 2022-03-17 17:36:24 +08:00
omair saleh d389b87609 update container reschedule for yd 2022-03-17 17:34:51 +08:00
omair saleh 987fdcfba2 update container reschedule for yd 2022-03-17 17:33:23 +08:00
omair saleh 6214a2b723 update container reschedule for yd 2022-03-17 17:31:39 +08:00
omair saleh fe00b1fab7 update container reschedule for yd 2022-03-17 17:22:02 +08:00
omair saleh 41df3e6ae7 update container reschedule for yd 2022-03-17 17:18:47 +08:00
omair saleh cf7d9ccca5 update container reschedule for yd 2022-03-17 17:17:01 +08:00
omair saleh 384d234b50 update container reschedule for yd 2022-03-17 17:16:35 +08:00
omair saleh 3fbfa44a04 update container reschedule for yd 2022-03-17 17:14:02 +08:00
omair saleh cbc294054e update container reschedule for yd 2022-03-17 17:12:47 +08:00
omair saleh 324556985a update container reschedule for yd 2022-03-17 17:08:23 +08:00
omair saleh 1b8c6ca317 update container reschedule for yd 2022-03-17 17:08:12 +08:00
omair saleh bbd09d300c update container reschedule for yd 2022-03-17 17:07:33 +08:00
omair saleh 47c97d6151 update container reschedule for yd 2022-03-17 17:05:04 +08:00
omair saleh 435e3a8f7a update container reschedule for yd 2022-03-17 17:03:40 +08:00
omair saleh 151032bb66 update container reschedule for yd 2022-03-17 17:02:40 +08:00
omair saleh f32335d57b update container reschedule for yd 2022-03-17 16:58:52 +08:00
omair saleh 2deddc4e03 update container reschedule for yd 2022-03-17 16:57:49 +08:00
omair saleh 32e665e4f7 update container reschedule for yd 2022-03-17 16:57:03 +08:00
omair saleh a987419040 update container reschedule for yd 2022-03-17 16:36:50 +08:00
omair saleh b0a65f870c update container reschedule for yd 2022-03-17 16:33:00 +08:00
omair saleh 33a75eca7d smc monthly report 2022-03-17 13:53:50 +08:00
Leong Chee Siong deb68dc723 Merge branch 'transaction-invoice' into 'development'
billpliz callback

See merge request CIEFWorldwideSdnBhd/shipping-portal!113
2022-03-17 02:13:19 +00:00
omair saleh 519408c2b5 lawas and Limbang show kk warehouse 2022-03-17 09:55:46 +08:00
omair saleh 53907e2463 lawas and Limbang show kk warehouse 2022-03-17 09:52:24 +08:00
omair saleh 10e6f6045e lawas and Limbang show kk warehouse 2022-03-17 09:51:36 +08:00
omair saleh c06cec5b41 lawas and Limbang show kk warehouse 2022-03-17 09:47:31 +08:00
omair saleh cfe611d05d lawas and Limbang show kk warehouse 2022-03-17 09:45:24 +08:00
ahmedsophyudden b9b79ca65a Shipping Portal - Api to update segment (general, state, postcode) 2022-03-17 01:01:01 +08:00
glovetleong 9a1562386f billpliz callback 2022-03-16 23:01:38 +08:00
omair saleh 22700893a2 fix qr remark 2022-03-16 10:03:47 +08:00
omair saleh 550c9480a4 fix qr remark 2022-03-16 10:02:17 +08:00
omair saleh 48bab9998c fix qr remark 2022-03-16 09:47:26 +08:00
omair saleh 3ff81d4f00 fix qr remark 2022-03-16 09:46:23 +08:00
omair saleh cc7edfc784 sort deliveries by date 2022-03-16 01:24:37 +08:00
omair saleh 72448d656c sort deliveries by date 2022-03-16 01:20:13 +08:00
omair saleh c941f679b6 sort deliveries by date 2022-03-16 01:19:31 +08:00
omair saleh 78f6c70cad sort deliveries by date 2022-03-16 01:18:53 +08:00
omair saleh 1575d62e0f sort deliveries by date 2022-03-16 01:17:21 +08:00
omair saleh 43f4bc533a sort deliveries by date 2022-03-16 01:16:13 +08:00
omair saleh 9ae36dc400 sort deliveries by date 2022-03-16 01:14:27 +08:00
omair saleh 02c55d97b7 sort deliveries by date 2022-03-16 01:00:27 +08:00
omair saleh baeaa0f31a sort deliveries by date 2022-03-16 00:58:16 +08:00
omair saleh dadc786f1f Merge branch 'development' into 'master'
Development

See merge request CIEFWorldwideSdnBhd/shipping-portal!112
2022-03-15 16:32:13 +00:00
omair saleh bd9dab0029 hide invoice button for production 2022-03-16 00:31:24 +08:00
omair saleh e2b795c872 Merge remote-tracking branch 'origin/development' into development 2022-03-16 00:30:55 +08:00
omair saleh 9a79c6dd1d Merge branch 'development' into 'master'
Warehouse Profile

See merge request CIEFWorldwideSdnBhd/shipping-portal!111
2022-03-15 16:28:58 +00:00
omair saleh d8e1c38429 hide invoice button for production 2022-03-16 00:24:18 +08:00
edmondlang e2e8f69f90 update notification add List Notifications API and UI 2022-03-15 16:14:21 +08:00
Leong Chee Siong aa28afb9f0 Merge branch 'transaction-invoice' into 'development'
soft delete user

See merge request CIEFWorldwideSdnBhd/shipping-portal!110
2022-03-14 05:45:21 +00:00
glovetleong 7ec109eb3e soft delete user 2022-03-14 13:42:48 +08:00
omair saleh 7151616b04 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-14 13:19:04 +08:00
edmondlang e5c28faba7 Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into notification-ui 2022-03-14 12:38:13 +08:00
omair saleh f2007b25e4 fix delivery list filter 2022-03-14 11:32:22 +08:00
omair saleh 6389fc6600 fix delivery list filter 2022-03-14 11:24:33 +08:00
omair saleh eb6b2943af fix delivery list filter 2022-03-14 11:21:20 +08:00
omair saleh 5fb7ddb0ec fix delivery list filter 2022-03-14 11:20:16 +08:00
omair saleh 91feb5b8fa fix delivery list filter 2022-03-14 11:19:45 +08:00
omair saleh 9c98693071 Merge remote-tracking branch 'origin/development' into development 2022-03-14 11:14:29 +08:00
omair saleh 56fb250e6f fix delivery list filter 2022-03-14 11:14:14 +08:00
Leong Chee Siong eabfeb6724 Merge branch 'transaction-invoice' into 'development'
payment transaction

See merge request CIEFWorldwideSdnBhd/shipping-portal!109
2022-03-14 03:10:20 +00:00
omair saleh 8902a09337 fix delivery list filter 2022-03-14 10:59:44 +08:00
omair saleh 0a69faeb3b fix delivery list filter 2022-03-14 10:58:48 +08:00
omair saleh bea9507dae fix delivery list filter 2022-03-14 10:57:43 +08:00
edmondlang 4b81666cf2 Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into notification-ui 2022-03-13 22:16:16 +08:00
edmondlang a1a9ab76bb tidy up route and put reports route inside report.php 2022-03-13 22:06:11 +08:00
glovetleong 5d9e621920 payment document approve 2022-03-12 20:06:10 +08:00
omair saleh 5b1f4eff0d Merge remote-tracking branch 'origin/development' into development 2022-03-12 17:20:49 +08:00
omair saleh ac41229f8b notifiable 2022-03-12 17:20:32 +08:00
edmondlang 4a2fb8e9e4 update notification icon 2022-03-12 17:10:38 +08:00
edmondlang ea772c3916 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into notification-ui 2022-03-12 17:02:36 +08:00
azumiru 2fb12d3a7c container-export-pdf-ui add export button and call api 2022-03-11 20:54:49 +08:00
omair saleh 28088f7d9a fix mysql crash on supplier update api 2022-03-11 14:43:21 +08:00
edmondlang ced07a293e update the createRemarkLogic, so all modules are able to use it
create a RemarkFormComponent
update order page to use this API
clean up old remark API
2022-03-10 19:39:47 +08:00
edmondlang 59ee063186 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-10 16:48:13 +08:00
omair saleh 8cd63e93c3 show order search to admin 2022-03-10 14:27:17 +08:00
omair saleh d3bf6b0dee show order search to admin 2022-03-10 14:25:01 +08:00
omair saleh 093ea075f0 show order search to admin 2022-03-10 14:24:14 +08:00
omair saleh 62066a5be5 show order search to admin 2022-03-10 14:22:24 +08:00
omair saleh 88c0ba31d7 show order search to admin 2022-03-10 14:21:31 +08:00
edmondlang 36236144ce update downloadQrPdfController 2022-03-09 20:06:31 +08:00
omair saleh 69e4f83919 Merge remote-tracking branch 'origin/development' into development 2022-03-09 20:02:20 +08:00
omair saleh 6338fdf771 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-09 20:01:48 +08:00
edmondlang 83091caa46 create company module remark and ui 2022-03-09 18:51:23 +08:00
edmondlang 99f5dcf8ab update indentation 2022-03-09 18:34:26 +08:00
edmondlang eb6f313c77 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-09 18:33:18 +08:00
omair saleh 3b60a90435 fix yd to vt error 2022-03-09 11:14:25 +08:00
omair saleh 3a9fe2b6af fix yd to vt error 2022-03-09 11:10:27 +08:00
omair saleh 603b807225 fix yd to vt error 2022-03-09 11:09:36 +08:00
omair saleh 0ae05f05b6 update qr for yd orders 2022-03-09 11:03:57 +08:00
edmondlang 290e531d12 update delivery-list api filters 2022-03-08 19:17:10 +08:00
edmondlang a44ad3df3a Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-08 19:05:46 +08:00
glovetleong de56c21734 payment transaction 2022-03-08 16:55:31 +08:00
omair saleh 89aa52e9c2 add enter trigger to search containers 2022-03-08 12:27:29 +08:00
omair saleh 072e65c00c fix claim packinglist status 2022-03-08 12:06:59 +08:00
omair saleh 8701620dcf add warehouse remark to qr pdf 2022-03-08 10:12:59 +08:00
ahmedsophyudden e9f86f0603 Shipping Portal - Create filter for pending arrangement, pending delivery, delivered 2022-03-07 16:56:38 +08:00
omair saleh 6d77fe171a fix yd exemption list 2022-03-07 15:36:34 +08:00
omair saleh 073250ce43 fix yd exemption list 2022-03-07 15:36:08 +08:00
edmondlang 07d3b4b7a3 update shipping invoice 2022-03-06 21:19:44 +08:00
edmondlang 3b86a50bed update shipping-invoice 2022-03-06 21:12:09 +08:00
edmondlang 35cf8a20c3 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-06 16:08:21 +08:00
Leong Chee Siong a17534ae6d Merge branch 'transaction-invoice' into 'development'
notification

See merge request CIEFWorldwideSdnBhd/shipping-portal!106
2022-03-06 06:46:50 +00:00
glovetleong ab12494ba5 pdf generate 2022-03-06 14:44:49 +08:00
omair saleh b6834ac6f5 fix active customer list 2022-03-06 12:33:49 +08:00
omair saleh 200a954730 fix active customer list 2022-03-06 12:21:51 +08:00
glovetleong 499837b135 Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into transaction-invoice 2022-03-06 10:21:45 +08:00
edmondlang 537dbd4564 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-06 10:12:42 +08:00
omair saleh a4365e5c33 fix active customer list 2022-03-05 18:06:21 +08:00
omair saleh 98424eacf4 fix active customer list 2022-03-05 18:04:11 +08:00
omair saleh eb905e7176 fix active customer list 2022-03-05 17:59:02 +08:00
omair saleh 7998f6e43f show packing list receive date 2022-03-05 16:51:30 +08:00
omair saleh eb41d7c2ef show packing list receive date 2022-03-05 16:49:19 +08:00
edmondlang fd8f8d6cb4 Update copyright year using php to get current year 2022-03-05 16:47:19 +08:00
edmondlang fafd145bca Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-05 16:39:02 +08:00
edmondlang d9a3f42e87 Update copyright year using php to get current year 2022-03-05 16:38:17 +08:00
omair saleh 686ef83f31 group container packing lists by customer 2022-03-05 16:38:12 +08:00
omair saleh 5fab8224c6 group container packing lists by customer 2022-03-05 16:36:03 +08:00
omair saleh 9e95da84c4 group container packing lists by customer 2022-03-05 16:34:41 +08:00
omair saleh a54aefcf9f missing orders 2022-03-05 16:25:20 +08:00
omair saleh d217cf0ef2 missing orders 2022-03-05 16:24:39 +08:00
omair saleh 1978cf017b missing orders 2022-03-05 16:24:04 +08:00
omair saleh ea381e0bf5 missing orders 2022-03-05 16:23:32 +08:00
omair saleh de26957532 missing orders 2022-03-05 16:22:54 +08:00
omair saleh 715d26c9d2 missing orders 2022-03-05 16:18:32 +08:00
omair saleh f1432388d8 missing orders 2022-03-05 16:07:06 +08:00
omair saleh 5ca53c2124 missing orders 2022-03-05 16:02:02 +08:00
omair saleh 48dbe00744 missing orders 2022-03-05 16:00:58 +08:00
omair saleh e2df3af9cd missing orders 2022-03-05 16:00:10 +08:00
omair saleh df0b67d9b9 missing orders 2022-03-05 15:55:35 +08:00
omair saleh a28a5a0c29 missing orders 2022-03-05 15:53:56 +08:00
omair saleh 1560bdfcf8 missing orders 2022-03-05 15:48:47 +08:00
omair saleh 585e4705a4 missing orders 2022-03-05 15:47:41 +08:00
omair saleh 2e41499fd1 missing orders 2022-03-05 15:44:57 +08:00
omair saleh f3688385eb missing orders 2022-03-05 15:44:04 +08:00
omair saleh fdfae861c6 missing orders 2022-03-05 15:38:31 +08:00
omair saleh b16eddf13a missing orders 2022-03-05 15:37:43 +08:00
omair saleh dd78be57fe missing orders 2022-03-05 15:34:19 +08:00
omair saleh 49042f5507 missing orders 2022-03-05 15:29:33 +08:00
omair saleh a97faa0024 missing orders 2022-03-05 15:28:35 +08:00
omair saleh 99d7aeac5f missing orders 2022-03-05 15:26:54 +08:00
omair saleh fe340b1246 missing orders 2022-03-05 15:25:49 +08:00
omair saleh e79206a681 missing orders 2022-03-05 15:25:33 +08:00
omair saleh 1838e46d1b missing orders 2022-03-05 15:23:45 +08:00
omair saleh 6bfbac6494 missing orders 2022-03-05 15:21:34 +08:00
omair saleh 266fd7302b missing orders 2022-03-05 15:20:58 +08:00
omair saleh f7b081eb94 missing orders 2022-03-05 15:20:13 +08:00
omair saleh 388a1024b4 missing orders 2022-03-05 15:19:09 +08:00
omair saleh 899f84aed0 missing orders 2022-03-05 15:18:17 +08:00
omair saleh 4a497dd61b missing orders 2022-03-05 15:17:14 +08:00
edmondlang 02f3686768 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-03-05 14:42:18 +08:00
omair saleh 826840f992 missing orders 2022-03-05 13:51:02 +08:00
omair saleh bd5d9fe520 missing orders 2022-03-05 13:47:52 +08:00
omair saleh 34d4aeed1c missing order 2022-03-05 13:45:02 +08:00
omair saleh 6d5b6a206f missing order 2022-03-05 13:43:23 +08:00
omair saleh c9678b5be3 active customers filter list 2022-03-05 11:27:39 +08:00
omair saleh f4c252546a active customers filter list 2022-03-05 11:10:56 +08:00
omair saleh 24c8f5acbc active customers filter list 2022-03-05 10:14:13 +08:00
omair saleh 5f2d5c36a1 active customers filter list 2022-03-05 10:08:24 +08:00
omair saleh eed71a4696 Merge remote-tracking branch 'origin/development' into development 2022-03-05 09:46:47 +08:00
omair saleh d947caa1e0 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	resources/views/pages/warehouse_list.blade.php
2022-03-05 09:46:33 +08:00
omair saleh d3b6e56f76 fix missing order issue 2022-03-04 13:56:09 +08:00
omair saleh 5b692fa7a5 fix claim packing list 2022-03-03 16:49:43 +08:00
omair saleh 1413b619f6 fix claim packing list 2022-03-03 16:48:08 +08:00
omair saleh 46e49b7e5b fix container attach packing list 2022-03-02 21:06:43 +08:00
omair saleh 5201874111 show estimated parcel cbm 2022-03-02 20:43:22 +08:00
omair saleh 7426d6dff2 show estimated parcel cbm 2022-03-02 20:41:51 +08:00
omair saleh ede4231676 show estimated parcel cbm 2022-03-02 20:40:09 +08:00
omair saleh bc1a7c04db show estimated parcel cbm 2022-03-02 20:39:02 +08:00
omair saleh 5356098cc4 show estimated parcel cbm 2022-03-02 20:37:51 +08:00
omair saleh e83206ceab show estimated parcel cbm 2022-03-02 20:35:03 +08:00
omair saleh 251d44912f show estimated parcel cbm 2022-03-02 20:31:05 +08:00
omair saleh 7e4b5d8528 update yiwu warehouse west malaysia notice 2022-03-02 11:20:07 +08:00
omair saleh 9ab0133e00 debug release button 2022-03-01 20:14:40 +08:00
omair saleh 87d7a7572f debug release button 2022-03-01 20:13:25 +08:00
omair saleh 56c71e1500 debug release button 2022-03-01 20:12:04 +08:00
omair saleh d37dfa2aa8 debug release button 2022-03-01 20:11:02 +08:00
omair saleh 2fad8a5994 debug release button 2022-03-01 20:08:59 +08:00
omair saleh f3c7422e6c update announcements 2022-03-01 13:33:34 +08:00
omair saleh 22da7b5efd update announcements 2022-03-01 13:31:07 +08:00
omair saleh 5b7d6b0a2f update announcements 2022-03-01 13:26:30 +08:00
omair saleh 788b632285 update announcements 2022-03-01 13:22:46 +08:00
edmondlang 35d0d9e97b Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development 2022-02-28 13:36:48 +08:00
omair saleh 0ef2c9bf6d fix yd yiwu warehouse selection 2022-02-28 10:51:57 +08:00
omair saleh 34532d0f68 fix detached containers 2022-02-27 15:37:25 +08:00
omair saleh 50a545595f fix detached containers 2022-02-27 15:34:13 +08:00
edmondlang 3462430474 Delivery List, Pending Delivery List
Customer Profile
2022-02-26 16:55:56 +08:00
edmondlang 60a263c508 change warehouse-list page to parcel page
add on hold parcel
2022-02-26 11:20:31 +08:00
edmondlang 5829d9c0a1 Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into shipping-updates 2022-02-26 10:43:05 +08:00
edmondlang 9a061d2f37 Warehouse Profile
settings - warehouse - view details-> warehouse details / warehouse profile page
2022-02-26 10:40:45 +08:00
omair saleh 564bac38b9 remove receive date notice, for order form 2022-02-25 13:09:27 +08:00
omair saleh ad2be90c3b exception ley key to use vt gz warehouse 2022-02-25 12:53:26 +08:00
omair saleh 47624ed8f2 fix address approval bug 2022-02-25 12:29:02 +08:00
edmondlang 528cc2f68d Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into shipping-updates
# Conflicts:
#	routes/web.php
2022-02-24 21:32:10 +08:00
omair saleh 69ede16fe9 fix address approval bug 2022-02-24 17:39:12 +08:00
omair saleh 6060c7966a fix address approval bug 2022-02-24 17:32:02 +08:00
omair saleh f8f470078c fix address approval bug 2022-02-24 17:28:11 +08:00
omair saleh e5f4068bc0 fix address approval bug 2022-02-24 17:25:40 +08:00
omair saleh e0504c8d79 fix address approval bug 2022-02-24 17:24:25 +08:00
omair saleh 3a8f64719d fix address approval bug 2022-02-24 17:16:51 +08:00
omair saleh 1d86949d54 fix container search 2022-02-24 14:37:41 +08:00
omair saleh 74b363fb12 revert temp hide setting button 2022-02-24 12:45:51 +08:00
omair saleh 1212372515 temp hide setting button 2022-02-24 12:35:35 +08:00
omair saleh e17c4cb014 temp hide setting button 2022-02-24 12:34:44 +08:00
omair saleh e4c32b5ad2 Merge branch 'development' into 'master'
hide all setting until the set up is complete

See merge request CIEFWorldwideSdnBhd/shipping-portal!107
2022-02-24 04:29:15 +00:00
omair saleh 6a86738f61 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/PackingLists/Processors/FetchOrderListsFromYdPortalProcessor.php
2022-02-24 12:27:41 +08:00
omair saleh 79d8acb50b Merge remote-tracking branch 'origin/development' into development 2022-02-24 12:24:19 +08:00
omair saleh 388973de4c Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/PackingLists/Processors/FetchOrderListsFromYdPortalProcessor.php
2022-02-24 12:24:06 +08:00
edmondlang 7292ce37e4 update function - update comapny name 2022-02-23 22:44:13 +08:00
omair saleh f2ad76a7ae Merge remote-tracking branch 'origin/development' into development 2022-02-23 21:37:21 +08:00
omair saleh 7d273b5ce6 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/PackingLists/Processors/FetchOrderListsFromYdPortalProcessor.php
2022-02-23 21:37:02 +08:00
edmondlang 15be2c14ab Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-02-23 19:08:16 +08:00
edmondlang a735885bbb cretae update comapny name function 2022-02-23 19:07:45 +08:00
omair saleh 1ed5a3e4a0 Merge remote-tracking branch 'origin/development' into development 2022-02-23 18:56:07 +08:00
omair saleh 816a40d647 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/PackingLists/Processors/FetchOrderListsFromYdPortalProcessor.php
2022-02-23 18:55:28 +08:00
edmondlang 0316b7c651 update form component file location 2022-02-23 18:44:30 +08:00
edmondlang 91415bd11d Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-02-23 18:15:27 +08:00
edmondlang f037352a28 cretae update document reference function 2022-02-23 18:13:57 +08:00
omair saleh 0f508aed3a Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/PackingLists/Processors/FetchOrderListsFromYdPortalProcessor.php
2022-02-23 18:12:03 +08:00
omair saleh 7d352a90e5 Merge remote-tracking branch 'origin/development' into development 2022-02-23 18:11:19 +08:00
omair saleh 95c37f1e1f Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/PackingLists/Processors/FetchOrderListsFromYdPortalProcessor.php
2022-02-23 17:34:41 +08:00
edmondlang a84e826c31 Create search function in container page 2022-02-23 17:26:26 +08:00
omair saleh c882450dce fix unclaimed packing lists 2022-02-23 13:57:14 +08:00
omair saleh 6fd8956892 fix unclaimed packing lists 2022-02-23 13:54:31 +08:00
omair saleh adb9a18651 fix unclaimed packing lists 2022-02-23 13:51:17 +08:00
omair saleh c932f2b86f fix unclaimed packing lists 2022-02-23 13:49:48 +08:00
omair saleh 1dc23b088e fix unclaimed packing lists 2022-02-23 13:48:34 +08:00
omair saleh 47704001dd fix unclaimed packing lists 2022-02-23 13:47:18 +08:00
omair saleh d02f395e72 fix unclaimed packing lists 2022-02-23 13:45:42 +08:00
omair saleh bdfccca2c8 fix unclaimed packing lists 2022-02-23 13:42:46 +08:00
omair saleh 97c900447f fix unclaimed packing lists 2022-02-23 13:42:12 +08:00
omair saleh 5db4b715e2 fix unclaimed packing lists 2022-02-23 13:39:16 +08:00
omair saleh 745cfef185 fix unclaimed packing lists 2022-02-23 13:37:19 +08:00
omair saleh 05aa23a645 fix unclaimed packing lists 2022-02-23 13:31:31 +08:00
omair saleh c7330fd051 fix unclaimed packing lists 2022-02-23 13:29:41 +08:00
omair saleh a4bb600a3c fix unclaimed packing lists 2022-02-23 13:29:09 +08:00
omair saleh 2631edc326 fix unclaimed packing lists 2022-02-23 13:28:44 +08:00
omair saleh c1faa710b4 fix unclaimed packing lists 2022-02-23 13:24:08 +08:00
omair saleh ab37914145 fix unclaimed packing lists 2022-02-23 13:20:35 +08:00
omair saleh c49ebe2836 fix unclaimed packing lists 2022-02-23 13:17:27 +08:00
omair saleh 85f67db797 Merge remote-tracking branch 'origin/development' into development 2022-02-23 13:12:53 +08:00
omair saleh 284b21ec51 fix unclaimed packing lists 2022-02-23 13:12:32 +08:00
edmondlang 7146600376 update service configuration form component 2022-02-21 20:53:55 +08:00
edmondlang b5b2ba59af add warehouse charges in settings 2022-02-21 20:34:25 +08:00
edmondlang fa29de775c update bugs 2022-02-21 20:00:09 +08:00
edmondlang 0496851286 update settings add state charges TAB 2022-02-21 16:11:39 +08:00
omair saleh 584fbccb93 fix yd bug 2022-02-21 14:55:58 +08:00
edmondlang 994d7ab4d9 update list postcode component 2022-02-21 14:42:10 +08:00
omair saleh 529cec7864 remove chinese new year announcement 2022-02-21 12:59:53 +08:00
edmondlang 6f30884a8c add page orders table 2022-02-20 16:38:46 +08:00
glovetleong f8a985035e notification 2022-02-18 21:57:25 +08:00
edmondlang ca3ecb0fda Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-02-17 21:50:55 +08:00
omair saleh f5a67f7e97 test vt do 2022-02-17 15:11:27 +08:00
omair saleh 288cced125 test vt do 2022-02-17 15:10:57 +08:00
omair saleh a76ce39830 test vt do 2022-02-17 15:09:40 +08:00
omair saleh 64467ea4be test vt do 2022-02-17 15:07:25 +08:00
edmondlang 09e0565988 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-02-15 21:56:22 +08:00
edmondlang 22ce6b8156 Update admin setting ui icons 2022-02-15 17:04:50 +08:00
edmondlang f810168dbb update postcodes area ui 2022-02-15 16:44:25 +08:00
omair saleh fc0809d9d2 add remark to yd address on release 2022-02-15 14:50:52 +08:00
omair saleh 29d1fb893d add remark to yd address on release 2022-02-15 11:33:10 +08:00
omair saleh f01640d9f2 add remark to yd address on release 2022-02-15 11:31:24 +08:00
omair saleh 753951a1d2 add remark to yd address on release 2022-02-15 11:30:43 +08:00
omair saleh 552b6f0e1e add remark to yd address on release 2022-02-15 11:28:42 +08:00
omair saleh 314575e2b6 add remark to yd address on release 2022-02-15 11:28:10 +08:00
omair saleh 2deea66f0a add remark to yd address on release 2022-02-15 11:25:40 +08:00
edmondlang aab739737c update code merge 2022-02-14 12:22:51 +08:00
edmondlang 595df401c2 update ui 2022-02-14 12:16:42 +08:00
edmondlang b03601cec5 Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into null_order_packing_list_ui 2022-02-14 00:09:15 +08:00
edmondlang c040dfe2c3 update null_order_packing_list_ul 2022-02-14 00:08:37 +08:00
edmondlang 0abf617a0d Merge branch 'admin-settings-ui' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into merge-dev-conflict
# Conflicts:
#	app/Classes/Modules/Announcements/DataTransferObjects/AnnouncementObject.php
#	app/Classes/Modules/Segments/ControllersLogic/CreateSegmentLogic.php
#	app/Classes/Modules/Segments/ControllersLogic/DeleteSegmentLogic.php
#	app/Classes/Modules/Segments/DataTransferObjects/SegmentObject.php
#	app/Classes/Modules/Segments/Services/CreatesSegment.php
#	app/Classes/Modules/Segments/Standards/Rules/CanCreateSegment.php
#	app/Classes/Modules/Segments/Standards/Rules/CanDeleteSegment.php
#	app/Classes/Modules/Segments/Standards/Validators/SegmentValidation.php
#	app/Http/Controllers/Announcements/AssignAnnouncementToSegmentController.php
#	app/Http/Controllers/Announcements/RemoveSegmentFromAnnouncementController.php
#	app/Http/Controllers/Segments/DeleteSegmentController.php
#	routes/announcement.php
#	routes/segment.php
#	routes/web.php
2022-02-12 20:16:33 +08:00
edmondlang ffe39f40ff Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into merge-dev-conflict 2022-02-12 20:06:27 +08:00
omair saleh 6f547b0a2f add remark to yd address on release 2022-02-12 19:53:01 +08:00
Leong Chee Siong 06785efe9b Merge branch 'transaction-invoice' into 'development'
Transaction invoice

See merge request CIEFWorldwideSdnBhd/shipping-portal!105
2022-02-12 04:00:37 +00:00
glovetleong 556c9352c8 shipping invoice 2022-02-12 11:35:12 +08:00
glovetleong d97357f33a Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into transaction-invoice 2022-02-11 14:38:57 +08:00
omair saleh 2691d7df33 fix $ is not a function bug 2022-02-10 11:26:55 +08:00
omair saleh 9df9e5bd7c fix $ is not a function bug 2022-02-10 11:13:58 +08:00
edmondlang 05b1aedda5 Merge branch 'admin-settings-ui' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/Announcements/DataTransferObjects/AnnouncementObject.php
#	app/Classes/Modules/Segments/ControllersLogic/CreateSegmentLogic.php
#	app/Classes/Modules/Segments/ControllersLogic/DeleteSegmentLogic.php
#	app/Classes/Modules/Segments/DataTransferObjects/SegmentObject.php
#	app/Classes/Modules/Segments/Services/CreatesSegment.php
#	app/Classes/Modules/Segments/Standards/Rules/CanCreateSegment.php
#	app/Classes/Modules/Segments/Standards/Rules/CanDeleteSegment.php
#	app/Classes/Modules/Segments/Standards/Validators/SegmentValidation.php
#	app/Http/Controllers/Announcements/AssignAnnouncementToSegmentController.php
#	app/Http/Controllers/Announcements/ListAnnouncementsController.php
#	app/Http/Controllers/Announcements/RemoveSegmentFromAnnouncementController.php
#	app/Http/Controllers/Announcements/UpdateAnnouncementController.php
#	app/Http/Controllers/Segments/CreateSegmentController.php
#	app/Http/Controllers/Segments/DeleteSegmentController.php
#	routes/announcement.php
#	routes/api.php
#	routes/segment.php
#	routes/web.php
2022-02-09 21:09:17 +08:00
edmondlang 7ece556475 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/Orders/Processors/ApproveChangeOrderAddressProcessor.php
#	app/Classes/Modules/Orders/Processors/UpdateDoFromYDPortalProcessor.php
#	app/Classes/Modules/PackingLists/ControllersLogic/UpdatePackingListStatusLogic.php
#	app/Classes/Modules/PackingLists/Processors/FetchOrderListsFromYdPortalProcessor.php
#	resources/assets/vue/components/containers/elements/ContainerComponent.vue
#	routes/web.php
2022-02-09 21:00:13 +08:00
edmondlang 919a48eb9a Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-02-09 19:30:17 +08:00
omair saleh 495574e60d Merge remote-tracking branch 'origin/development' into development 2022-02-09 19:29:06 +08:00
omair saleh c17c29ad06 add owner id filter 2022-02-09 19:28:50 +08:00
omair saleh 4c8d363e25 add owner id filter 2022-02-09 19:27:59 +08:00
omair saleh f5df10297e add yd reschedule container logic 2022-02-09 19:07:06 +08:00
Leong Chee Siong 9245793ebe Merge branch 'null_order_packing_list' into 'development'
bug

See merge request CIEFWorldwideSdnBhd/shipping-portal!104
2022-02-08 14:59:13 +00:00
edmondlang 5547e80993 Merge branch 'null_order_packing_list' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2022-02-08 22:59:02 +08:00
glovetleong 658a669a4d bug 2022-02-08 22:52:12 +08:00
Leong Chee Siong d6faaecb35 Merge branch 'null_order_packing_list' into 'development'
bug

See merge request CIEFWorldwideSdnBhd/shipping-portal!103
2022-02-08 14:16:32 +00:00
glovetleong fdc6a4adc1 bug 2022-02-08 22:15:18 +08:00
glovetleong 3dbcf81cc3 pull 2022-02-08 18:05:01 +08:00
omair saleh b3bf814d25 add yd reschedule container logic 2022-02-06 12:08:11 +08:00
omair saleh d489c0091f add yd reschedule container logic 2022-02-06 12:01:09 +08:00
omair saleh 46699784da fix yd tracking api json line break bug 2022-02-06 11:30:56 +08:00
omair saleh 1538994cc5 update chinese new year holiday announcement 2022-01-28 18:18:08 +08:00
omair saleh a5cb002b4e update chinese new year holiday announcement 2022-01-28 18:17:13 +08:00
omair saleh 7d23f86c0d update chinese new year holiday announcement 2022-01-28 18:08:40 +08:00
omair saleh 999d2f535d add over weight cbm to yd 2022-01-28 12:47:17 +08:00
omair saleh fcdf4e32d7 add over weight cbm to yd 2022-01-28 12:43:57 +08:00
omair saleh 96dd0ec72a add over weight cbm to yd 2022-01-28 12:40:20 +08:00
omair saleh 1b333e1061 add over weight cbm to yd 2022-01-28 12:38:22 +08:00
omair saleh 18a2ac1fd7 add over weight cbm to yd 2022-01-28 12:35:49 +08:00
omair saleh 52377d6ecb add over weight cbm to yd 2022-01-28 12:32:20 +08:00
omair saleh 2b956f4cfe add over weight cbm to yd 2022-01-28 12:26:05 +08:00
omair saleh e84995bcc7 add over weight cbm to yd 2022-01-28 12:25:51 +08:00
omair saleh 97bda44d61 add over weight cbm to yd 2022-01-28 12:24:10 +08:00
omair saleh fc2fe2c712 add over weight cbm to yd 2022-01-28 12:13:25 +08:00
omair saleh 983d7a5092 add over weight cbm to yd 2022-01-28 12:09:20 +08:00
omair saleh df1112f86f add over weight cbm to yd 2022-01-28 12:06:16 +08:00
omair saleh 1bfc44c1e0 add over weight cbm to yd 2022-01-28 12:05:22 +08:00
omair saleh f75d2235a2 add over weight cbm to yd 2022-01-28 12:03:20 +08:00
omair saleh 31ce575f5f add over weight cbm to yd 2022-01-28 11:57:51 +08:00
omair saleh cd6d86fb4b add over weight cbm to yd 2022-01-28 11:57:27 +08:00
omair saleh 7f7101cce5 add over weight cbm to yd 2022-01-28 11:37:54 +08:00
omair saleh a892656725 fix yd delivery address update api 2022-01-27 16:06:59 +08:00
omair saleh 86cc7faf30 fix yd delivery address update api 2022-01-27 16:03:14 +08:00
omair saleh c2ed6ce35e fix yd delivery address update api 2022-01-27 15:30:43 +08:00
omair saleh 579bcbb17f fix yd delivery address update api 2022-01-27 15:18:30 +08:00
omair saleh 4d4d9165ce fix yd delivery address update api 2022-01-27 15:16:10 +08:00
omair saleh bfcc3e1aae fix yd delivery address update api 2022-01-27 15:09:12 +08:00
omair saleh 199a18e8dd fix yd delivery address update api 2022-01-27 15:08:30 +08:00
omair saleh 33277d080a fix yd delivery address update api 2022-01-27 15:08:04 +08:00
omair saleh 5c86e7fda0 fix yd delivery address update api 2022-01-27 13:32:19 +08:00
omair saleh efdc235502 fix yd delivery address update api 2022-01-27 13:30:25 +08:00
omair saleh c89510dda7 fix yd delivery address update api 2022-01-27 13:28:05 +08:00
omair saleh a6ef50d350 fix yd delivery address update api 2022-01-27 13:23:56 +08:00
omair saleh e7164e903d fix yd delivery address update api 2022-01-27 13:21:20 +08:00
omair saleh 3eaeccc8d3 fix yd delivery address update api 2022-01-27 13:19:55 +08:00
omair saleh 8e4a6b3911 fix yd delivery address update api 2022-01-27 13:12:12 +08:00
omair saleh f9b657ab43 fix yd delivery address update api 2022-01-27 13:10:00 +08:00
omair saleh ada8117bd1 fix yd delivery address update api 2022-01-27 13:08:57 +08:00
omair saleh 402556d51b fix yd delivery address update api 2022-01-27 13:01:25 +08:00
omair saleh a60ab688da fix yd delivery address update api 2022-01-27 12:55:16 +08:00
omair saleh 5d9a08ea0b fix overlapping schedules for vt and yd 2022-01-27 12:48:55 +08:00
omair saleh e4ef885553 update order address in yd 2022-01-27 12:27:14 +08:00
omair saleh bdece13293 Merge branch 'customer_latest_order_date_export_master' into 'master'
customer export

See merge request CIEFWorldwideSdnBhd/shipping-portal!98
2022-01-27 03:50:45 +00:00
omair saleh e3cfb002a5 Merge branch 'master' into 'customer_latest_order_date_export_master'
# Conflicts:
#   app/Http/Controllers/Exports/ExportCustomersToExcelController.php
#   routes/web.php
2022-01-27 03:50:27 +00:00
omair saleh f5bace1c3b Merge branch 'null_order_packing_list' into 'development'
Null order packing list

See merge request CIEFWorldwideSdnBhd/shipping-portal!102
2022-01-27 03:48:30 +00:00
glovetleong 642e1b2d5a status 2022-01-26 17:44:36 +08:00
glovetleong d2321a3347 out 2022-01-26 17:33:58 +08:00
glovetleong 5cf7511c31 Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into null_order_packing_list 2022-01-26 17:33:15 +08:00
glovetleong 0a8109ae9e null order packing list, assign packing list 2022-01-26 17:32:14 +08:00
omair saleh 36289a3694 minor clean up 2022-01-26 13:44:38 +08:00
omair saleh 46b079462a confirm yd orders for release in china 2022-01-25 12:44:51 +08:00
omair saleh 3c83f91a27 confirm yd orders for release in china 2022-01-25 12:29:58 +08:00
omair saleh 0a51074064 confirm yd orders for release in china 2022-01-25 12:15:26 +08:00
omair saleh bd5e89e832 confirm yd orders for release in china 2022-01-25 12:11:33 +08:00
omair saleh 763cc2d38c add vue versions for cache issues 2022-01-21 19:23:15 +08:00
omair saleh a36adc7ca5 show warehouse reference to admin 2022-01-21 19:09:02 +08:00
omair saleh 950b3d168a show warehouse reference to admin 2022-01-21 19:07:11 +08:00
omair saleh a35cf282f6 show warehouse reference to admin 2022-01-21 19:06:23 +08:00
omair saleh 39408e08ca show warehouse reference to admin 2022-01-21 19:03:49 +08:00
omair saleh e472260db1 update replica packages logic and over weight price announcement 2022-01-21 17:09:15 +08:00
omair saleh 2428fac309 update replica packages logic and over weight price announcement 2022-01-21 17:08:16 +08:00
omair saleh aa681ecd93 update replica packages logic and over weight price announcement 2022-01-21 17:06:41 +08:00
omair saleh 611adf96e7 update replica packages logic and over weight price announcement 2022-01-21 16:46:27 +08:00
omair saleh d4f1184779 update replica packages logic and over weight price announcement 2022-01-21 16:42:42 +08:00
omair saleh 45acd797da update replica packages logic and over weight price announcement 2022-01-21 16:31:13 +08:00
omair saleh 4b411ddaf4 update replica packages logic and over weight price announcement 2022-01-21 16:29:15 +08:00
omair saleh c13d2ce219 update replica packages logic and over weight price announcement 2022-01-21 16:28:30 +08:00
omair saleh 412f4cc4b6 update replica packages logic and over weight price announcement 2022-01-21 16:26:15 +08:00
omair saleh 04650debbb update replica packages logic and over weight price announcement 2022-01-21 16:24:54 +08:00
omair saleh 3436ed37a1 update replica packages logic and over weight price announcement 2022-01-21 16:22:35 +08:00
omair saleh 980dd22c4b update replica packages logic and over weight price announcement 2022-01-21 16:21:55 +08:00
omair saleh 7cc43bcdd9 update replica packages logic and over weight price announcement 2022-01-21 16:20:27 +08:00
omair saleh 8487c6adf3 update replica packages logic and over weight price announcement 2022-01-21 16:00:53 +08:00
omair saleh ca5879cab0 update replica packages logic and over weight price announcement 2022-01-21 16:00:38 +08:00
omair saleh 2bb8adf175 update replica packages logic and over weight price announcement 2022-01-21 15:59:52 +08:00
omair saleh d0a873e065 update replica packages logic and over weight price announcement 2022-01-21 14:39:46 +08:00
omair saleh e6eb05739c update replica packages logic and over weight price announcement 2022-01-21 14:25:44 +08:00
omair saleh 5c4fbe2c52 fix release and hold button for packing lists 2022-01-20 11:16:52 +08:00
omair saleh 1854ca24de fix yd order number bug 2022-01-19 13:29:26 +08:00
omair saleh d93e6ea25e improve loading speed for container page 2022-01-18 15:42:24 +08:00
omair saleh 5c780ae0f9 improve loading speed for container page 2022-01-18 15:40:46 +08:00
omair saleh 5c374e2e19 improve loading speed for container page 2022-01-18 15:39:14 +08:00
edmondlang b6ed451b54 update route for warehouse details 2022-01-15 14:46:23 +08:00
edmondlang 74ede9e3dd shipping updates 2022-01-15 14:40:48 +08:00
edmondlang f8d65d05da notification-ui 2022-01-15 13:39:17 +08:00
omair saleh 438f7fdff5 fix yd fetch 2022-01-14 15:30:05 +08:00
omair saleh d6647b488f fix yd fetch 2022-01-14 15:23:00 +08:00
omair saleh 3fb7bc93d7 fix yd fetch 2022-01-14 15:17:00 +08:00
omair saleh f97fc04a2b fix yd fetch 2022-01-14 15:12:21 +08:00
omair saleh 77690cb607 fix yd fetch 2022-01-14 15:08:50 +08:00
omair saleh f876c59a0d fix yd fetch 2022-01-14 15:07:00 +08:00
omair saleh c5d5195d2d fix yd fetch 2022-01-14 15:05:36 +08:00
Leong Chee Siong 7ba48b07d1 Merge branch 'container-packing-list-export' into 'development'
export packing list

See merge request CIEFWorldwideSdnBhd/shipping-portal!101
2022-01-14 06:36:38 +00:00
glovetleong 96131c5b33 export packing list 2022-01-14 14:03:40 +08:00
edmondlang 3ae4b019ce update text-color for days ago in container page 2022-01-12 23:55:05 +08:00
edmondlang 2558e8f4f2 Revert "update text-color for days ago in container page"
This reverts commit fdec05ca45.
2022-01-12 23:11:42 +08:00
edmondlang fdec05ca45 update text-color for days ago in container page 2022-01-12 22:53:58 +08:00
edmondlang 9fe86c52bd update containers page add days ago 2022-01-12 22:26:28 +08:00
omair saleh ea34c74f6d fix monthly report 2022-01-11 19:46:18 +08:00
omair saleh 3a69ce6972 fix monthly report 2022-01-11 19:43:54 +08:00
omair saleh 83fc73acec fix monthly report 2022-01-11 19:42:13 +08:00
omair saleh e8613bd6d9 fix monthly report 2022-01-11 19:39:43 +08:00
omair saleh 3e4f627cbe fix monthly report 2022-01-11 19:37:05 +08:00
omair saleh a870d259f9 fix monthly report 2022-01-11 19:30:22 +08:00
omair saleh ed0db2e372 fix monthly report 2022-01-11 19:28:20 +08:00
omair saleh 80359cc23b fix monthly report 2022-01-11 19:26:56 +08:00
omair saleh 67867220ed fix monthly report 2022-01-11 19:26:16 +08:00
omair saleh 35206ca249 fix monthly report 2022-01-11 19:22:39 +08:00
omair saleh 394eadf6a2 remove the exempted customer list from yd warehouse 2022-01-11 18:03:43 +08:00
omair saleh 440271bc27 activate yd warehouses as default 2022-01-11 12:56:16 +08:00
omair saleh 7769a27a73 activate yd warehouses as default 2022-01-11 12:56:00 +08:00
omair saleh a28ad55508 activate yd warehouses as default 2022-01-11 12:55:05 +08:00
omair saleh 845873354f activate yd warehouses as default 2022-01-11 12:47:13 +08:00
omair saleh b065881715 activate yd warehouses as default 2022-01-11 00:55:26 +08:00
omair saleh fb5c5ad890 add yd yiwu warehouse seeder 2022-01-10 20:54:47 +08:00
omair saleh 1e37de379d update api routes 2022-01-10 15:52:51 +08:00
omair saleh be2b9d8759 update api routes 2022-01-10 15:51:20 +08:00
omair saleh aaf68b6368 fix monthly report 2022-01-08 11:01:32 +08:00
omair saleh c0577128ae fix monthly report 2022-01-08 10:53:12 +08:00
omair saleh 6a91da7b69 fix approve address change bug when doesn't exist on vt portal 2022-01-08 10:51:40 +08:00
omair saleh d6eda8a11d fix approve address change bug when doesn't exist on vt portal 2022-01-08 10:50:12 +08:00
omair saleh 5dec999cbf fix on hold and release status for packing list 2022-01-07 15:17:48 +08:00
omair saleh 99060ffa51 add new customer to yd warehouse list 2022-01-06 22:39:11 +08:00
omair saleh 73fdc2c0f4 add yiwu warehouse announcement 2022-01-06 11:28:06 +08:00
omair saleh 52038cb365 add yiwu warehouse announcement 2022-01-06 11:22:19 +08:00
omair saleh bb2f75d837 add yiwu warehouse announcement 2022-01-06 11:18:37 +08:00
Leong Chee Siong b94b87c1b7 Merge branch 'yd_sync_update' into 'development'
Yd sync update

See merge request CIEFWorldwideSdnBhd/shipping-portal!100
2022-01-05 01:17:25 +00:00
omair saleh 0aa1979611 fix yd fetch data 2022-01-04 21:32:16 +08:00
omair saleh 9e872dfb35 fix yd fetch data 2022-01-04 21:25:03 +08:00
omair saleh ff035c1f70 fix yd fetch data 2022-01-04 21:24:30 +08:00
omair saleh 8408add279 fix yd fetch data 2022-01-04 21:10:07 +08:00
omair saleh 47d6849dfa fix yd fetch data 2022-01-04 21:08:56 +08:00
omair saleh 56559d3daa fix yd fetch data 2022-01-04 21:08:45 +08:00
omair saleh bae61caae1 fix yd fetch data 2022-01-04 21:08:21 +08:00
omair saleh af07299bcf fix yd fetch data 2022-01-04 21:07:25 +08:00
omair saleh 3e26c7e8ef fix yd fetch data 2022-01-04 21:03:54 +08:00
omair saleh bac81b57f4 fix yd fetch data 2022-01-04 20:56:01 +08:00
omair saleh 1d64dc9984 fix yd fetch data 2022-01-04 20:53:49 +08:00
omair saleh bbadaa53ba fix yd fetch data 2022-01-04 20:53:01 +08:00
omair saleh e4f5210e83 fix yd fetch data 2022-01-04 20:52:26 +08:00
omair saleh 078e83477e fix yd fetch data 2022-01-04 20:50:56 +08:00
omair saleh ce6e6be2bf fix yd fetch data 2022-01-04 20:50:04 +08:00
omair saleh f608bb54f0 fix yd fetch data 2022-01-04 20:47:53 +08:00
omair saleh bb210f8583 fix yd fetch data 2022-01-04 20:46:17 +08:00
omair saleh d4016e869b fix yd fetch data 2022-01-04 20:45:20 +08:00
omair saleh e0d743b5a0 fix yd fetch data 2022-01-04 20:42:07 +08:00
omair saleh 8052ae3a11 fix yd fetch data 2022-01-04 20:41:31 +08:00
omair saleh 6a381446bc fix yd fetch data 2022-01-04 20:40:17 +08:00
omair saleh 1dbade82a7 fix yd fetch data 2022-01-04 20:39:02 +08:00
omair saleh e70d804c32 fix yd fetch data 2022-01-04 20:38:02 +08:00
omair saleh 39391990af fix yd fetch data 2022-01-04 20:37:19 +08:00
omair saleh b96dad37f5 fix yd fetch data 2022-01-04 20:26:34 +08:00
glovetleong 012904c522 yd sync update order address 2022-01-04 20:26:27 +08:00
omair saleh 90420cebe7 fix yd fetch data 2022-01-04 20:25:25 +08:00
omair saleh 04bd67573c fix yd fetch data 2022-01-04 20:23:47 +08:00
omair saleh f69c99b070 fix yd fetch data 2022-01-04 20:16:20 +08:00
omair saleh fdf4f21155 fix yd fetch data 2022-01-04 20:13:15 +08:00
omair saleh 95ab15df21 fix yd fetch data 2022-01-04 20:12:21 +08:00
omair saleh 2d885776dd fix yd fetch data 2022-01-04 20:10:55 +08:00
omair saleh 1f02b7247d fix yd fetch data 2022-01-04 20:08:09 +08:00
omair saleh ef3460f796 fix yd fetch data 2022-01-04 20:06:44 +08:00
omair saleh 8825e49b68 fix yd fetch data 2022-01-04 20:05:28 +08:00
omair saleh 7c17edc5fd fix yd fetch data 2022-01-04 20:03:12 +08:00
omair saleh 6423aa6345 fix yd fetch data 2022-01-04 20:01:34 +08:00
omair saleh d22e3884fa fix yd fetch data 2022-01-04 20:00:35 +08:00
omair saleh 263e122dea fix yd fetch data 2022-01-04 19:58:55 +08:00
omair saleh 6ecee81112 fix yd fetch data 2022-01-04 19:46:44 +08:00
omair saleh cee6ca4eee fix yd fetch data 2022-01-04 19:45:14 +08:00
omair saleh e2766c66a1 fix yd fetch data 2022-01-04 19:42:35 +08:00
glovetleong 6c94e39da8 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal
# Conflicts:
#	app/Http/Controllers/Exports/ExportCustomersToExcelController.php
#	routes/web.php
2022-01-03 22:21:37 +08:00
omair saleh c7b6622a62 fix yd fetch data 2022-01-03 16:59:56 +08:00
omair saleh efe3a97f3e fix yd fetch data 2022-01-03 16:58:44 +08:00
omair saleh 2d167ef47e fix yd fetch data 2022-01-03 16:56:05 +08:00
omair saleh e504b31b15 fix yd fetch data 2022-01-03 16:52:51 +08:00
omair saleh 0469a725ed fix yd fetch data 2022-01-03 16:51:30 +08:00
omair saleh 68075186d4 fix yd fetch data 2022-01-03 16:50:25 +08:00
omair saleh 3897821cb7 fix yd fetch data 2022-01-03 16:47:00 +08:00
omair saleh 07d70af213 fix yd fetch data 2022-01-03 16:45:35 +08:00
omair saleh 6b491cc2e5 fix yd fetch data 2022-01-03 16:16:02 +08:00
omair saleh 53809af105 fix yd fetch data 2022-01-03 16:12:55 +08:00
omair saleh 1efbca15ec fix total cbm order component 2022-01-03 16:11:35 +08:00
omair saleh a331c659a8 debug yd orders 2022-01-03 16:08:47 +08:00
omair saleh 4a1d021b85 debug missing packages 2022-01-03 16:06:08 +08:00
omair saleh 87e155334b debug missing packages 2022-01-03 16:02:00 +08:00
omair saleh 4d594bb084 debug missing packages 2022-01-03 15:58:29 +08:00
omair saleh 5fdae14e01 debug missing packages 2022-01-03 15:57:12 +08:00
omair saleh 7b3793e6d7 debug missing packages 2022-01-03 15:54:11 +08:00
omair saleh d281017c24 fix order status count 2022-01-03 15:53:22 +08:00
omair saleh d08ded395a fix order status count 2022-01-03 15:50:17 +08:00
omair saleh 40c5692276 fix order status count 2022-01-03 15:40:38 +08:00
omair saleh 18554e9924 fix order status count 2022-01-03 15:19:15 +08:00
omair saleh 8a8fb3e03e update schedule for fetching data from api 2022-01-03 10:37:34 +08:00
omair saleh 396f9370ae set users list allowed to see original packing measurements 2022-01-03 10:13:14 +08:00
omair saleh 919cbc463b set users list allowed to see original packing measurements 2022-01-03 10:12:29 +08:00
omair saleh 78e223844f fix vt container transport bug 2022-01-03 09:46:04 +08:00
omair saleh dcfbbd63a7 fix vt container transport bug 2022-01-03 09:45:39 +08:00
omair saleh 1fc9330d98 fix vt container transport bug 2022-01-03 09:43:32 +08:00
omair saleh 9ff98196f0 fix package component bug 2022-01-03 09:32:45 +08:00
omair saleh d2fe2bfef4 adjust column size for order remark input 2022-01-03 09:28:03 +08:00
omair saleh ff0713f005 Merge branch 'development' into 'master'
Development

See merge request CIEFWorldwideSdnBhd/shipping-portal!99
2022-01-03 01:22:12 +00:00
omair saleh 7bd24b6547 clean up before production 2022-01-03 08:36:41 +08:00
omair saleh 33086eb1a6 sort customers orders by latest 2021-12-31 17:04:00 +08:00
omair saleh 82517e3cb3 sort customers orders by latest 2021-12-31 17:02:49 +08:00
omair saleh 41d9769d04 fix package component before loading to container 2021-12-29 03:30:42 +08:00
omair saleh 906623bad3 fix package component before loading to container 2021-12-29 03:29:16 +08:00
omair saleh 898205ec9d fix package component before loading to container 2021-12-29 03:28:17 +08:00
omair saleh 7b791abf80 YD curl request 2021-12-29 03:22:08 +08:00
omair saleh 27f2367e88 YD curl request 2021-12-29 03:19:28 +08:00
omair saleh 6874d09ced YD curl request 2021-12-29 03:17:44 +08:00
omair saleh eeaba20fb0 YD curl request 2021-12-29 03:16:06 +08:00
omair saleh 5599c1ba71 YD curl request 2021-12-29 02:54:49 +08:00
omair saleh 0220f876c4 YD curl request 2021-12-29 01:23:35 +08:00
omair saleh 1f0f5e8afd YD curl request 2021-12-29 01:22:47 +08:00
omair saleh 1426d6f13c YD curl request 2021-12-29 01:21:19 +08:00
omair saleh 187411237d YD curl request 2021-12-29 01:20:18 +08:00
omair saleh dac4470f72 YD curl request 2021-12-29 01:20:04 +08:00
omair saleh 65b49d4d61 YD curl request 2021-12-29 01:19:17 +08:00
omair saleh bfbe07dc8e YD curl request 2021-12-29 01:18:17 +08:00
omair saleh 4ef90f7cf2 YD curl request 2021-12-29 01:15:49 +08:00
omair saleh c07aa6c1f1 YD curl request 2021-12-29 01:13:51 +08:00
omair saleh 28ad88900e YD curl request 2021-12-29 01:05:23 +08:00
omair saleh b707717418 YD curl request 2021-12-29 01:02:11 +08:00
omair saleh 6b4d2736c5 YD curl request 2021-12-29 00:53:04 +08:00
omair saleh 9ebacae701 YD curl request 2021-12-29 00:50:32 +08:00
omair saleh e18f49b5b7 YD curl request 2021-12-29 00:48:00 +08:00
omair saleh 81a7d79e0c YD curl request 2021-12-29 00:47:07 +08:00
omair saleh c698466b3d YD curl request 2021-12-29 00:46:52 +08:00
omair saleh 8e3be2747f YD curl request 2021-12-29 00:45:44 +08:00
omair saleh 8dafa7d678 YD curl request 2021-12-29 00:44:11 +08:00
omair saleh f36bb9d090 YD curl request 2021-12-29 00:43:20 +08:00
omair saleh 87c60dc488 YD curl request 2021-12-29 00:29:38 +08:00
omair saleh e11e0307af add packing list replica 2021-12-28 22:03:11 +08:00
omair saleh 78fcb6c111 add packing list replica 2021-12-28 21:50:30 +08:00
omair saleh f0bc306ebd Merge remote-tracking branch 'origin/development' into development 2021-12-28 21:45:50 +08:00
omair saleh 0671e24916 add packing list replica 2021-12-28 21:45:16 +08:00
glovetleong a328be683e customer export 2021-12-28 17:48:50 +08:00
Leong Chee Siong 4854e9b095 Merge branch 'customer_latest_order_date_export' into 'development'
Customer latest order date export

See merge request CIEFWorldwideSdnBhd/shipping-portal!97
2021-12-28 09:37:07 +00:00
glovetleong 64a4e4b45f customer order latest date export 2021-12-28 17:35:16 +08:00
omair saleh 9774f4b823 add packing list replica 2021-12-28 15:42:42 +08:00
glovetleong 2365ad10cf Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into development
# Conflicts:
#	app/Classes/Modules/Orders/Services/FetchesDataFromYDPortal.php
#	app/Classes/Modules/PackingLists/Processors/FetchOrderListsFromYdPortalProcessor.php
#	app/Console/Commands/CurlYdOrderListCommand.php
2021-12-28 15:31:01 +08:00
omair saleh 47eb9262ad add packing list replica 2021-12-28 01:19:26 +08:00
omair saleh 9f6d0fbc79 Merge branch 'development'
# Conflicts:
#	resources/views/pages/orders/index.blade.php
2021-12-21 19:36:46 +08:00
omair saleh 22a2d7d7a1 sync vt do with shipping portal 2021-12-21 19:10:03 +08:00
omair saleh 5339799312 Merge remote-tracking branch 'origin/development' into development 2021-12-20 14:48:07 +08:00
omair saleh 565fd5eae3 fix create address logic 2021-12-20 14:47:52 +08:00
omair saleh 1156f437df Merge branch 'order-search-function' into 'development'
Order search function

See merge request CIEFWorldwideSdnBhd/shipping-portal!94
2021-12-19 05:46:09 +00:00
omair saleh c5ffe372cc Merge branch 'yb-job' into 'development'
yd-job connect

See merge request CIEFWorldwideSdnBhd/shipping-portal!91
2021-12-19 05:19:18 +00:00
omair saleh 12a51722b3 Merge branch 'announcement-backend' into 'development'
Announcement backend

See merge request CIEFWorldwideSdnBhd/shipping-portal!92
2021-12-19 05:19:09 +00:00
omair saleh 82f45007d1 update chinese new year annoucement 2021-12-17 21:54:04 +08:00
omair saleh 048cd52fc8 fix warehouse name 2021-12-17 15:07:01 +08:00
omair saleh 4a7c4f51a5 debug address contact 2021-12-17 12:23:09 +08:00
omair saleh 3f9874a0bd debug address contact 2021-12-17 12:21:44 +08:00
omair saleh c972bc87a3 debug address contact 2021-12-17 12:19:43 +08:00
omair saleh b057cd91c3 debug address contact 2021-12-17 12:17:53 +08:00
omair saleh d29ead2144 debug address contact 2021-12-17 12:16:48 +08:00
omair saleh 71eb8db3f3 debug address contact 2021-12-17 12:15:23 +08:00
omair saleh 7b1df81649 debug address contact 2021-12-17 12:14:17 +08:00
omair saleh ce1a2556b7 debug address contact 2021-12-17 12:12:34 +08:00
omair saleh bec9f121ab add packing list relationship in packing list model 2021-12-17 12:02:01 +08:00
omair saleh 1d479f6f79 Merge branch 'copy_packinglists' into 'development'
Duplicate packing list for admin CIEF reference

See merge request CIEFWorldwideSdnBhd/shipping-portal!89
2021-12-17 02:26:38 +00:00
omair saleh 550f6c6b77 Merge branch 'order-contact-remark' into 'development'
Order contact remark

See merge request CIEFWorldwideSdnBhd/shipping-portal!88
2021-12-17 02:25:17 +00:00
omair saleh 5caac091aa remove refresh orders button 2021-12-17 09:57:39 +08:00
glovetleong 1d3ab4ab2a yd-job connect 2021-12-16 21:48:59 +08:00
glovetleong 5e11b8ebdf job connect YD portal 2021-12-16 21:46:33 +08:00
edmondlang 4a158b8dac update order profile section - only super admin can edit the order reference number 2021-12-16 18:17:27 +08:00
edmondlang 280f5f4974 update order profile section - only admins can edit the order reference number 2021-12-16 13:50:04 +08:00
glovetleong 926cb61ca3 Vt sync update 2021-12-13 21:23:04 +08:00
Fairuz 3aec23525c Duplicate packing list for admin CIEF reference 2021-12-13 11:45:48 +08:00
glovetleong 992e5b0008 Merge branch 'development' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into order-contact-remark
# Conflicts:
#	routes/web.php
2021-12-09 16:01:17 +08:00
omair saleh 0f0e99af35 fix announcement position 2021-12-08 15:53:47 +08:00
omair saleh da1c653570 debug loaded container job 2021-12-07 13:08:20 +08:00
omair saleh f86f129949 debug loaded container job 2021-12-07 13:06:47 +08:00
omair saleh ec24033209 debug loaded container job 2021-12-07 13:05:20 +08:00
omair saleh e3dd8440df debug loaded container job 2021-12-07 13:01:38 +08:00
omair saleh 7647dc0e23 debug loaded container job 2021-12-07 12:58:53 +08:00
omair saleh 3bfb67b55a debug loaded container job 2021-12-07 12:55:01 +08:00
omair saleh a26368b728 debug loaded container job 2021-12-07 12:36:59 +08:00
omair saleh a1a9ffa0aa debug loaded container job 2021-12-07 12:32:44 +08:00
omair saleh c3050445e1 debug loaded container job 2021-12-07 12:32:16 +08:00
omair saleh 3620e4c4b5 debug loaded container job 2021-12-07 12:30:39 +08:00
omair saleh 3dafe41c33 debug loaded container job 2021-12-07 12:04:38 +08:00
omair saleh e28cc43b18 debug loaded container job 2021-12-07 12:00:13 +08:00
omair saleh 80873a14e2 debug loaded container job 2021-12-07 11:56:32 +08:00
omair saleh 799936fd8b debug loaded container job 2021-12-07 11:55:05 +08:00
omair saleh c6d4a6ffae debug loaded container job 2021-12-07 11:49:35 +08:00
omair saleh bc5a8bce47 debug loaded container job 2021-12-07 11:47:27 +08:00
omair saleh 2c03e68242 update chinese new year announcment 2021-12-06 11:35:00 +08:00
omair saleh 857004a6a5 update chinese new year announcment 2021-12-06 10:37:05 +08:00
omair saleh 35b2d526ed list yiwu to sabah or srawak orders 2021-12-03 14:16:26 +08:00
omair saleh 7e7290acc5 list yiwu to sabah or srawak orders 2021-12-03 14:02:27 +08:00
omair saleh 5256d5b2f9 list yiwu to sabah or srawak orders 2021-12-03 14:00:50 +08:00
omair saleh e8c33e46c4 list yiwu to sabah or srawak orders 2021-12-03 13:55:58 +08:00
omair saleh 5afd37652c list yiwu to sabah or srawak orders 2021-12-03 13:55:28 +08:00
omair saleh aeb0dfb025 list yiwu to sabah or srawak orders 2021-12-03 13:54:16 +08:00
omair saleh 1a591c0404 list yiwu to sabah or srawak orders 2021-12-03 13:53:13 +08:00
omair saleh 22c07b19ad list yiwu to sabah or srawak orders 2021-12-03 13:52:10 +08:00
omair saleh 9d2dceab2e Merge remote-tracking branch 'origin/master' 2021-12-03 13:45:27 +08:00
omair saleh d00be021bc list yiwu to sabah or srawak orders 2021-12-03 13:45:12 +08:00
omair saleh 3d89a25f5c remove list yiwu to sabah or srawak orders 2021-12-03 13:44:42 +08:00
omair saleh 13c4b173d3 list yiwu to sabah or srawak orders 2021-12-03 13:44:08 +08:00
edmondlang 0bbf0f9138 move admin setting ui components from exchange 2021-12-02 18:45:59 +08:00
edmondlang 2c39c66a2d update setting page enable team settings 2021-11-30 17:23:14 +08:00
omair saleh 3a74fa5e12 add contact and remark to address 2021-11-29 11:46:43 +08:00
omair saleh 098297188d add contact and remark to address 2021-11-29 11:44:02 +08:00
omair saleh 4440f229d9 add contact and remark to address 2021-11-29 11:33:26 +08:00
omair saleh 32465e2170 add contact and remark to address 2021-11-28 21:03:04 +08:00
omair saleh 5d9782d1c9 package tracking page 2021-11-28 20:19:09 +08:00
omair saleh 036f389308 package tracking page 2021-11-28 19:29:06 +08:00
omair saleh 3de95f7019 package tracking page 2021-11-28 19:27:02 +08:00
omair saleh 0dc1a3c289 package tracking page 2021-11-28 19:24:18 +08:00
omair saleh 4302b42ad8 package tracking page 2021-11-28 19:22:28 +08:00
omair saleh 95daebb8f1 package tracking page 2021-11-28 19:21:27 +08:00
omair saleh 2cc0465165 package tracking page 2021-11-28 19:19:18 +08:00
omair saleh d626c0bb51 package tracking page 2021-11-28 16:49:40 +08:00
edmondlang a56b5c64ba update admin setting - change email address 2021-11-28 14:51:06 +08:00
omair saleh 4601d5191b package tracking page 2021-11-28 14:31:05 +08:00
omair saleh 13fa349605 package tracking page 2021-11-28 14:28:17 +08:00
omair saleh bb2e6f0c67 package tracking page 2021-11-28 14:21:36 +08:00
omair saleh c681e89d34 Merge remote-tracking branch 'origin/development' into development 2021-11-28 13:55:27 +08:00
omair saleh fd686d9ca5 fix contact processor and remarks database 2021-11-28 13:55:13 +08:00
edmondlang 86401cdad6 hide all setting until the set up is complete
update user reset password
2021-11-27 22:34:56 +08:00
edmondlang 327c2958c4 adjust alignment for order remarks 2021-11-27 21:37:40 +08:00
edmondlang 92c086a5bc clear merge bug dupplicated code 2021-11-27 17:24:30 +08:00
edmondlang cc5b39e457 Merge branch 'development' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development 2021-11-27 17:06:59 +08:00
omair saleh 42883b3723 Merge branch 'remark-create-api' into 'master'
remark for order, container, packing list

See merge request CIEFWorldwideSdnBhd/shipping-portal!80
2021-11-26 07:23:42 +00:00
omair saleh 634d4b8b7d Merge branch 'master' into 'remark-create-api'
# Conflicts:
#   app/Models/Container.php
#   app/Models/PackingList.php
#   routes/order.php
#   routes/packing_list.php
2021-11-26 07:23:35 +00:00
omair saleh 6255936cd1 Merge branch 'container-profile-forms-ui' into 'master'
Container profile forms ui

See merge request CIEFWorldwideSdnBhd/shipping-portal!86
2021-11-26 07:14:27 +00:00
omair saleh b31c8d508c Merge branch 'update-id-number' into 'development'
Update id number

See merge request CIEFWorldwideSdnBhd/shipping-portal!85
2021-11-26 07:10:16 +00:00
omair saleh 90c1c037ca Merge branch 'development' into 'update-id-number'
# Conflicts:
#   resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue
2021-11-26 07:10:09 +00:00
omair saleh 20289c7f1e Merge branch 'order-remark-backend' into 'development'
Order remark backend

See merge request CIEFWorldwideSdnBhd/shipping-portal!83
2021-11-26 02:34:25 +00:00
omair saleh ac1fc3103b add customer to new warehouse list 2021-11-26 10:11:13 +08:00
omair saleh cf6bebcde2 Merge branch 'development' into 'master'
Development

See merge request CIEFWorldwideSdnBhd/shipping-portal!82
2021-11-26 01:56:02 +00:00
omair saleh a6fc5dd1a5 change warehouse address format 2021-11-25 17:08:44 +08:00
omair saleh fa88ffca49 add marking to new warehouse special list 2021-11-25 03:18:12 +08:00
omair saleh 2b6a2810e5 clean up company module un used dependencies 2021-11-25 03:11:20 +08:00
omair saleh c67ee25654 add new yd Guangzhou warehouse 2021-11-25 03:08:32 +08:00
omair saleh f1cde19261 hide login as exchange 2021-11-20 10:47:03 +08:00
omair saleh b7e5475014 hide login as exchange 2021-11-20 10:42:18 +08:00
omair saleh a75c05fdae update container shortage announcement 2021-11-09 23:58:17 +08:00
omair saleh 3327b8a4f5 update container shortage announcement 2021-11-09 23:54:39 +08:00
omair saleh 604413d978 update container shortage announcement 2021-11-09 23:54:14 +08:00
edmondlang 558868d859 update setting edit full name 2021-11-06 20:43:39 +08:00
omair saleh a25feacf53 categorise containers 2021-11-03 20:42:35 +08:00
omair saleh 1090de9060 categorise containers 2021-11-02 23:08:41 +08:00
omair saleh 1c721f7f10 categorise containers 2021-11-02 23:05:42 +08:00
omair saleh 4813c54e6d categorise containers 2021-11-02 23:03:45 +08:00
omair saleh b79ecdc6a9 categorise containers 2021-11-02 22:41:39 +08:00
omair saleh 7fa70becde categorise containers 2021-11-02 22:39:24 +08:00
omair saleh 57a0ea535a categorise containers 2021-11-02 22:38:41 +08:00
omair saleh f84415ce89 categorise containers 2021-11-02 22:37:32 +08:00
omair saleh 0b79ff5521 categorise containers 2021-11-02 22:29:46 +08:00
omair saleh d0f209b006 categorise containers 2021-11-02 22:28:23 +08:00
omair saleh 8cec7b436f categorise containers 2021-11-02 22:25:59 +08:00
omair saleh d2468769df categorise containers 2021-11-02 22:24:39 +08:00
omair saleh 884f4b33d1 categorise containers 2021-11-02 22:20:47 +08:00
omair saleh c15f67e304 order container by loading date 2021-11-02 21:40:35 +08:00
omair saleh f5ea06e3fe show packages quantity loaded into container 2021-11-02 21:32:20 +08:00
edmondlang 6fcf952967 update order remark ui 2021-11-02 00:00:31 +08:00
edmondlang b0a2ab08c9 tody up container forms component 2021-10-31 19:10:16 +08:00
edmondlang e0a78cc126 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into order-remark-backend 2021-10-31 15:45:55 +08:00
edmondlang 5e7cfd4da0 tidy up the order remark backend api 2021-10-31 15:43:57 +08:00
edmondlang feec49318b update container profile comment section with api 2021-10-30 17:11:28 +08:00
omair saleh 9977d516e1 fix order by arrival date 2021-10-30 12:49:22 +08:00
omair saleh c9131b3c3d order warehouse parcels by arrival date 2021-10-30 12:37:52 +08:00
omair saleh 2675fd8704 Merge branch 'create-new-filter-to-order-by-arrival-dates'
# Conflicts:
#	routes/api.php
2021-10-30 12:30:58 +08:00
omair saleh 02c6825c4a Merge branch 'create-new-filter-to-order-by-arrival-dates'
# Conflicts:
#	routes/api.php
2021-10-30 12:24:44 +08:00
omair saleh 908e0a49f9 Merge branch 'create-new-filter-to-order-by-arrival-dates'
# Conflicts:
#	routes/api.php
2021-10-30 12:23:58 +08:00
edmondlang 9252134cc4 wip update container comments(remarks) section and implement api 2021-10-29 16:20:05 +08:00
edmondlang 6444f471e8 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into order-remark-backend
# Conflicts:
#	app/Classes/Modules/PackingLists/ControllersLogic/Containers/CreateContainerRemarkLogic.php
#	app/Models/Order.php
2021-10-28 00:31:48 +08:00
omair saleh cf03a032e5 create container remark 2021-10-27 21:20:01 +08:00
edmondlang 149029bc24 change settings page input label design 2021-10-26 18:46:43 +08:00
edmondlang ab84ca4719 move settings ui from exchange 2021-10-26 11:46:49 +08:00
omair saleh 2cb8f9f407 show change ratio for profit model calculator 2021-10-26 10:51:06 +08:00
edmondlang a846028919 wip 2021-10-25 22:49:42 +08:00
edmondlang 274cd83c81 order search funtion 2021-10-25 22:26:19 +08:00
omair saleh ef1759379e disable customer order scope to temp fix pdf download issue 2021-10-25 14:54:46 +08:00
omair saleh ad9b983325 optimise order queries 2021-10-25 14:29:24 +08:00
omair saleh fc36a193e9 optimise order queries 2021-10-25 14:28:55 +08:00
omair saleh 86d26edb72 Merge branch 'improve-responsive-ui' into 'master'
improve responsive ui

See merge request CIEFWorldwideSdnBhd/shipping-portal!78
2021-10-25 05:56:44 +00:00
omair saleh 052218b621 Merge branch 'delivery-packing-list-ui' into 'master'
Delivery packing list ui

See merge request CIEFWorldwideSdnBhd/shipping-portal!76
2021-10-25 05:54:58 +00:00
omair saleh da52ddd3ac Merge branch 'cross-login' into 'master'
Cross login

See merge request CIEFWorldwideSdnBhd/shipping-portal!75
2021-10-25 05:54:01 +00:00
omair saleh 6cfed45ffe Merge branch 'create-deliver-packing-list-api' into 'master'
create deliver packing list api

See merge request CIEFWorldwideSdnBhd/shipping-portal!74
2021-10-25 05:53:33 +00:00
omair saleh a048a79ca8 Merge branch 'cbm_calc' into 'master'
Shipping Cost Calculations

See merge request CIEFWorldwideSdnBhd/shipping-portal!70
2021-10-25 05:49:04 +00:00
edmondlang 487d024039 wip 2021-10-23 15:00:16 +08:00
edmondlang 6a4e2926b9 wip 2021-10-23 13:55:38 +08:00
omair saleh e7afc0bc10 profit model calculator 2021-10-22 14:28:30 +08:00
omair saleh 999c29411f profit model calculator 2021-10-22 14:27:02 +08:00
omair saleh c5183ac0a7 create container remark 2021-10-21 21:25:13 +08:00
omair saleh 896a101fad fix createRemark service class 2021-10-21 21:21:26 +08:00
omair saleh 0d6df7ec0c add remarkable interface 2021-10-21 21:04:41 +08:00
edmondlang 25c36d085f code review update id number, min length 2021-10-21 15:50:31 +08:00
omair saleh dd38f41f47 show order numbers with shipped more than received 2021-10-21 13:40:35 +08:00
omair saleh 062b2fb908 show orders with shipping packing list more than warehouse received list 2021-10-21 13:29:22 +08:00
omair saleh 7c027ef62f remove typhoon announcement 2021-10-21 13:11:55 +08:00
omair saleh 6137012a35 remove report web route 2021-10-21 12:43:57 +08:00
omair saleh c79f4cfdab update reference eloquent filter to small letters 2021-10-21 12:42:13 +08:00
edmondlang ba0dbf80a1 update order no 2021-10-21 00:38:16 +08:00
edmondlang afba2d6880 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into update-id-number 2021-10-20 22:16:08 +08:00
edmondlang 39771a42b6 Merge branch 'update-id-number' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into update-id-number 2021-10-20 22:14:37 +08:00
omair saleh 073f89be12 fix package component buy when they shipping schedule is not set 2021-10-20 14:59:15 +08:00
omair saleh 3752d71b4f fix package component bug when the schedule is not set 2021-10-20 14:57:08 +08:00
omair saleh b82f3b9f45 update sales report, show unloaded cbm 2021-10-19 18:28:37 +08:00
Obenny 624df67ca5 copied modules, resources, and updated route files 2021-10-18 19:38:56 +08:00
ahmedsophyudden 3f73848c18 Create new filter to order by arrival dates 2021-10-18 11:22:56 +08:00
Fairuz 63aae14b28 Shipping Cost Calculations 2021-10-18 10:04:33 +08:00
Obenny ea6711f06b copied controllers, models, migrations 2021-10-17 21:43:25 +08:00
Obenny 8c23d178e8 copied migrations, model, controllers, routes 2021-10-17 21:33:40 +08:00
glovetleong aae9f160e6 simplify order resource 2021-10-17 17:55:16 +08:00
ahmedsophyudden ba61f7f3ab add & delete segment api 2021-10-15 19:18:09 +08:00
omair saleh 4a3b3344e7 customer notice 2021-10-15 16:00:11 +08:00
omair saleh ae42e1e03b update notice to customer profiles 2021-10-15 15:55:22 +08:00
omair saleh 8ba5f95690 reference lik eloquent filter 2021-10-13 21:05:08 +08:00
edmondlang 04117754db Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into improve-responsive-ui 2021-10-13 20:33:18 +08:00
edmondlang 821a39e5ff improve responsive ui 2021-10-13 20:23:59 +08:00
glovetleong 05cb3dd35e cross login 2021-10-13 14:10:32 +08:00
omair saleh 70cc67a559 reposition the order refresh button 2021-10-13 11:26:42 +08:00
omair saleh 149376e4b5 don't show rejected company identifications 2021-10-13 11:17:59 +08:00
omair saleh d5dd880d9e customer report 2021-10-12 19:09:00 +08:00
omair saleh fa628e81ac customer reports 2021-10-12 19:07:41 +08:00
omair saleh 51a6569cf0 show received cbm in sales report 2021-10-12 18:30:00 +08:00
omair saleh 886f091f6a customer report 2021-10-12 17:16:47 +08:00
omair saleh b22b4c374a customer report 2021-10-12 17:12:53 +08:00
omair saleh 2b065cb4a8 customer report 2021-10-12 17:12:26 +08:00
omair saleh bcf7ae4098 fix daily cbm report 2021-10-12 14:07:21 +08:00
omair saleh b355df27db fix daily cbm report 2021-10-12 13:57:35 +08:00
omair saleh c33649fda2 fix daily cbm report 2021-10-12 13:54:46 +08:00
omair saleh 4615843e17 fix daily cbm report 2021-10-12 13:44:31 +08:00
omair saleh 40f51a0f60 ui fix 2021-10-12 13:16:41 +08:00
omair saleh 2c3dff7e77 update datepicker vue component 2021-10-12 13:15:09 +08:00
omair saleh 8178cda2b4 create sales report range frontend 2021-10-12 13:13:12 +08:00
omair saleh 04215916f5 add report from to filters 2021-10-12 12:25:26 +08:00
ahmedsophyudden 5b5bf1bb06 add & delete segment api 2021-10-12 11:29:09 +08:00
glovetleong 3d7090758d Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into cross-login 2021-10-12 08:53:57 +08:00
ahmedsophyudden e546825520 New add & delete company connection to connection segment api 2021-10-11 22:28:11 +08:00
omair saleh 25f9db99c7 temp show specific report period 2021-10-11 15:13:27 +08:00
omair saleh 04f248e88d temp show specific report period 2021-10-11 15:12:36 +08:00
omair saleh 70e53c197c temp show specific report period 2021-10-11 15:04:11 +08:00
omair saleh 642731b680 temp show specific report period 2021-10-11 15:02:53 +08:00
omair saleh 7bd3ae056d temp show specific report period 2021-10-11 15:00:18 +08:00
omair saleh e58805a023 temp show specific report period 2021-10-11 14:58:45 +08:00
omair saleh fdce49ea82 temp show specific report period 2021-10-11 14:56:40 +08:00
omair saleh 90a0c4ddf5 temp show specific report period 2021-10-11 14:54:52 +08:00
omair saleh f963b012ec temp show specific report period 2021-10-11 14:53:02 +08:00
omair saleh d8289599c9 temp show specific report period 2021-10-11 14:52:30 +08:00
omair saleh 7965398c5a temp show specific report period 2021-10-11 14:51:57 +08:00
omair saleh a1b5737935 temp show specific report period 2021-10-11 14:51:15 +08:00
omair saleh 72400f2ab2 temp show specific report period 2021-10-11 14:48:12 +08:00
omair saleh 6badfadd2d temp show specific report period 2021-10-11 14:47:40 +08:00
omair saleh b9a65005e6 temp show specific report period 2021-10-11 14:44:56 +08:00
omair saleh 190ed6c5f9 temp show specific report period 2021-10-11 14:43:39 +08:00
omair saleh 7c96f3039a temp show specific report period 2021-10-11 14:42:45 +08:00
omair saleh fbb7d31726 temp show specific report period 2021-10-11 14:41:37 +08:00
omair saleh 3d1fb48cfb temp show specific report period 2021-10-11 14:39:30 +08:00
omair saleh f2e944cc0b temp show specific report period 2021-10-11 14:38:23 +08:00
omair saleh 44d7507cbd temp show specific report period 2021-10-11 14:37:13 +08:00
omair saleh 0a32d64e8d temp show specific report period 2021-10-11 14:35:15 +08:00
omair saleh f1edf72fb8 temp show specific report period 2021-10-11 14:32:54 +08:00
omair saleh c85248bc0f temp show specific report period 2021-10-11 14:31:02 +08:00
omair saleh 1aad4de653 temp show specific report period 2021-10-11 14:29:05 +08:00
omair saleh ae031078bc temp show specific report period 2021-10-11 14:28:05 +08:00
omair saleh d5d2a13e31 temp show specific report period 2021-10-11 14:25:47 +08:00
omair saleh 6809bfc693 temp show specific report period 2021-10-11 14:24:44 +08:00
omair saleh a21465992f temp show specific report period 2021-10-11 14:23:14 +08:00
omair saleh f844f5d879 show delivery status in container component 2021-10-11 13:17:05 +08:00
omair saleh 959e5dc970 remove duplicated try catch from logic 2021-10-11 11:01:43 +08:00
omair saleh 149469598e remove unused dependencies from route file 2021-10-11 11:00:53 +08:00
omair saleh fce976ff6b show refresh orders button only in orders page 2021-10-11 10:58:18 +08:00
omair saleh 4b0e1b4b78 change the definition of destination warehouse arrival 2021-10-11 10:53:34 +08:00
omair saleh e6f13fd3d0 change the definition of destination warehouse arrival 2021-10-11 10:39:37 +08:00
edmondlang f6af7c5f4f code review remove d-flex 2021-10-10 15:42:26 +08:00
edmondlang 6ea51d56c1 improve responsive ui
fix order status bar width problem
2021-10-10 15:38:48 +08:00
glovetleong b36313e24c remark for order, container, packing list 2021-10-10 15:22:49 +08:00
edmondlang f2422ea45c improve responsive ui 2021-10-09 20:59:23 +08:00
edmondlang d26c90136b improve responsive 2021-10-09 20:43:40 +08:00
edmondlang c10e78ad51 imporve respnsive ui 2021-10-09 17:32:44 +08:00
omair saleh 8a40ea35ee show daily target 2021-10-08 23:23:18 +08:00
omair saleh 19d0802d0e show daily target 2021-10-08 23:21:15 +08:00
omair saleh 95bd1ca6af add customer without orders list 2021-10-08 22:35:54 +08:00
omair saleh e6c42ef55c add customer without orders list 2021-10-08 22:34:54 +08:00
omair saleh a9c914b41c add customer without orders list 2021-10-08 21:45:37 +08:00
omair saleh c00239c959 add customer without orders list 2021-10-08 21:43:55 +08:00
omair saleh b4844874bb add customer without orders list 2021-10-08 21:42:26 +08:00
omair saleh 1b3c63e05d add customer without orders list 2021-10-08 21:41:06 +08:00
omair saleh c3b0e55271 add customer without orders list 2021-10-08 21:37:45 +08:00
omair saleh 9463bc9478 add customer without orders list 2021-10-08 21:17:49 +08:00
edmondlang e4c8c021ec implement api from create-delivery-packing-list-api 2021-10-07 20:02:56 +08:00
edmondlang 46891669f1 Merge branch 'create-deliver-packing-list-api' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into delivery-packing-list-ui 2021-10-07 10:58:09 +08:00
glovetleong c281beb87a create deliver packing list api 2021-10-07 09:20:04 +08:00
omair saleh 500917fbba make the service chart thinner 2021-10-06 21:56:37 +08:00
omair saleh 9af8dd0d0e fix sales report decimals 2021-10-06 21:54:08 +08:00
omair saleh 2895acc8fc fix sales report decimals 2021-10-06 21:52:28 +08:00
omair saleh 33cd2cef7d fix sales report decimals 2021-10-06 21:50:26 +08:00
omair saleh d2485eaae7 fix sales report decimals 2021-10-06 21:49:05 +08:00
omair saleh 0a5aa9843d show current months sales report 2021-10-06 21:40:58 +08:00
omair saleh 0dbdeba0d2 show september sales report 2021-10-06 21:38:03 +08:00
omair saleh fbd108e8e8 increase fetch container date range limit 2021-10-06 21:34:48 +08:00
omair saleh 52ec457b52 service report 2021-10-06 15:18:40 +08:00
omair saleh f159bf7982 service report 2021-10-06 15:17:06 +08:00
omair saleh 5386700762 service report 2021-10-06 14:15:41 +08:00
omair saleh 5aefef5366 service report 2021-10-05 20:54:19 +08:00
edmondlang 0d53a61f18 update select all packing list funtion 2021-10-05 20:40:48 +08:00
omair saleh 943ec5f7f7 service report 2021-10-05 17:02:17 +08:00
edmondlang 6d0e7dd51d delivery-packing-list-ui 2021-10-05 17:00:00 +08:00
omair saleh 647103f387 service report 2021-10-05 14:57:52 +08:00
omair saleh 9340d4360e update monthly report 2021-10-05 14:24:43 +08:00
omair saleh ebbe2c7863 hide buttons create container button 2021-10-04 16:32:34 +08:00
omair saleh 73dbb41044 hide buttons for packing lists 2021-10-04 16:28:27 +08:00
omair saleh 3dfceeaf37 Merge remote-tracking branch 'origin/master'
# Conflicts:
#	app/Http/Resources/OrderResource.php
#	resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue
2021-10-04 16:21:44 +08:00
omair saleh 509f14c790 improve load speed by cleaning the resources to reduce the number of queries submitted per request 2021-10-04 16:17:10 +08:00
omair saleh 33a8d370c5 Merge branch 'container-profile-ui' into 'master'
add 'ADD Container' button

See merge request CIEFWorldwideSdnBhd/shipping-portal!68
2021-10-04 05:27:58 +00:00
omair saleh ad4b8a821c Merge branch 'packaging-list-schedule' into 'master'
create package list ui

See merge request CIEFWorldwideSdnBhd/shipping-portal!66
2021-10-04 05:26:18 +00:00
omair saleh 6c276b59b1 Merge branch 'package-ui-create' into 'master'
create package list ui

See merge request CIEFWorldwideSdnBhd/shipping-portal!55
2021-10-04 05:25:35 +00:00
omair saleh b57a511bb6 Merge branch 'task/EXC-338' into 'master'
Inbound custom cleared

See merge request CIEFWorldwideSdnBhd/shipping-portal!67
2021-10-04 05:25:04 +00:00
glovetleong 8314820204 packing schedule, transport, complete 2021-10-03 21:22:59 +08:00
glovetleong a2cc1e5e4f Merge branch 'package-ui-create' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into packaging-list-schedule 2021-10-03 20:42:46 +08:00
glovetleong 17fb297942 pull 2021-10-03 20:42:35 +08:00
edmondlang b12da6ff44 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into container-profile-ui
# Conflicts:
#	resources/assets/vue/components/containers/elements/ContainerProfileSectionComponent.vue
#	routes/web.php
2021-10-03 18:13:20 +08:00
edmondlang cf78e92c5f update container profile section component 2021-10-03 18:07:25 +08:00
edmondlang 7db7553dca Update container profile forms 2021-10-03 18:00:58 +08:00
edmondlang fa1871d712 modify modal add data-dismiss="modal" 2021-10-03 17:06:11 +08:00
omair saleh 16b35b34b3 customer report 2021-10-02 15:24:02 +08:00
omair saleh 33f152ae9c customer report 2021-10-02 15:22:28 +08:00
omair saleh 93c9412298 customer report 2021-10-02 15:17:22 +08:00
omair saleh c74e2927ad customer report 2021-10-02 15:15:27 +08:00
omair saleh 95f52b3a62 customer report 2021-10-02 15:06:10 +08:00
omair saleh 24a286a5a2 customer report 2021-10-02 15:00:49 +08:00
omair saleh bbc247d67e customer report 2021-10-02 14:59:15 +08:00
omair saleh 019073afc5 customer report 2021-10-01 21:25:02 +08:00
omair saleh feb04e8498 customer report 2021-10-01 21:14:33 +08:00
omair saleh 557d85ef8d customer report 2021-10-01 20:45:00 +08:00
omair saleh 1e5df1d64b customer report 2021-10-01 19:50:44 +08:00
omair saleh 186d6f71c6 customer report 2021-10-01 19:48:04 +08:00
omair saleh 2f11666539 customer report 2021-10-01 19:46:00 +08:00
omair saleh 87e9dbe3ec customer report 2021-10-01 19:43:50 +08:00
omair saleh 626ba6bbf4 customer report 2021-10-01 19:40:12 +08:00
omair saleh 8b5ac008d3 customer report 2021-10-01 19:37:12 +08:00
omair saleh ccd7d91076 customer report 2021-10-01 19:35:55 +08:00
omair saleh 7bde77036d customer report 2021-10-01 19:34:25 +08:00
omair saleh bf7443887c customer report 2021-10-01 19:26:42 +08:00
omair saleh 933f39d280 container monthly report 2021-10-01 18:33:29 +08:00
omair saleh 463d342441 container monthly report 2021-10-01 18:33:19 +08:00
omair saleh 27e856bc4d container monthly report 2021-10-01 18:23:10 +08:00
omair saleh 8f381b42f3 container monthly report 2021-10-01 18:18:40 +08:00
omair saleh 1af45e5132 container monthly report 2021-10-01 18:17:17 +08:00
omair saleh 6c5bbf842e container report 2021-10-01 18:16:56 +08:00
omair saleh 96d701bc80 container monthly report 2021-10-01 18:14:46 +08:00
omair saleh 9221bd094c count total containers 2021-10-01 18:11:15 +08:00
omair saleh c76271d8ab loaded cbm monthly report 2021-10-01 18:02:09 +08:00
omair saleh 26a0bc186e total loaded cbm monthly report 2021-10-01 18:00:07 +08:00
omair saleh 2305ddb39d fix container component ui 2021-10-01 17:55:06 +08:00
omair saleh c66273874d marking container loading date as a timestamp in the modal 2021-10-01 17:52:28 +08:00
omair saleh 9ef636c5d5 add container loading date 2021-10-01 17:49:59 +08:00
omair saleh 9b9292546b test updating loading date for containers from vt portal 2021-10-01 17:45:37 +08:00
omair saleh 2974fe4e9a test updating loading date for containers from vt portal 2021-10-01 17:44:20 +08:00
omair saleh e93da67ec1 test updating loading date for containers from vt portal 2021-10-01 17:43:46 +08:00
omair saleh 7c14b74dd1 test updating loading date for containers from vt portal 2021-10-01 17:42:44 +08:00
omair saleh b9b05dfdbe test updating loading date for containers from vt portal 2021-10-01 17:41:42 +08:00
omair saleh e5e00bb9ac test updating loading date for containers from vt portal 2021-10-01 17:40:19 +08:00
omair saleh c6e222caf2 add loading date for container table 2021-10-01 17:35:19 +08:00
omair saleh 973ab58818 hint claim id 2021-09-30 16:12:48 +08:00
glovetleong 592e8c489b env 2021-09-29 14:24:37 +08:00
glovetleong ee77fd236a cross login 2021-09-29 14:23:50 +08:00
Fairuz 2ae879fd51 Inbound custom cleared 2021-09-29 04:38:41 +08:00
glovetleong ee87443ca4 pull 2021-09-28 22:23:51 +08:00
glovetleong 31105cfcef Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into cross-login 2021-09-28 22:09:05 +08:00
glovetleong 5d34201579 pull 2021-09-28 22:07:19 +08:00
Haziq Danial 61a75a4ee1 update order reference id 2021-09-28 18:51:43 +08:00
omair saleh 8e9db507f6 fix template routes, and hide report button temp 2021-09-28 15:55:24 +08:00
omair saleh 943f5ce64e add custom clearance routes 2021-09-28 13:24:29 +08:00
omair saleh 2c3ea9e3f1 order component address tooltip layout fixes 2021-09-28 13:23:56 +08:00
glovetleong f385407804 debug 2021-09-28 12:07:05 +08:00
edmondlang a69ecc2825 update create load container form 2021-09-27 23:56:13 +08:00
edmondlang d13aad9566 container profile forms ui 2021-09-27 21:56:04 +08:00
omair saleh 579200fd61 Merge branch 'task/EXC-337' into 'master'
Task/exc 337

See merge request CIEFWorldwideSdnBhd/shipping-portal!65
2021-09-27 09:10:51 +00:00
omair saleh 37d06798aa Merge branch 'master' into 'task/EXC-337'
# Conflicts:
#   routes/web.php
2021-09-27 09:10:46 +00:00
omair saleh 09a3654e2f add packing list inbound custom route 2021-09-27 17:05:58 +08:00
omair saleh 1c5fbec0b9 Merge branch 'task/EXC-338' into 'master'
Inbound custom cleared

See merge request CIEFWorldwideSdnBhd/shipping-portal!64
2021-09-27 09:04:39 +00:00
omair saleh c8820ad39e Merge branch 'master' into 'task/EXC-338'
# Conflicts:
#   routes/packing_list.php
2021-09-27 09:04:15 +00:00
omair saleh 4122ac4153 Merge branch 'assign-packing-list' into 'master'
assign packing list to container

See merge request CIEFWorldwideSdnBhd/shipping-portal!63
2021-09-27 09:01:15 +00:00
omair saleh 6959370b7a Merge branch 'package-switch-packing-list' into 'master'
package switch packing list

See merge request CIEFWorldwideSdnBhd/shipping-portal!62
2021-09-27 09:00:22 +00:00
omair saleh d7b4e716d8 Merge remote-tracking branch 'origin/master' 2021-09-27 16:59:23 +08:00
omair saleh d7f3b656f7 Merge branch 'container-profile-ui'
# Conflicts:
#	routes/web.php
2021-09-27 16:59:08 +08:00
omair saleh 3b20e240ee Merge branch 'shipping-queue-ui' into 'master'
Shipping queue ui

See merge request CIEFWorldwideSdnBhd/shipping-portal!59
2021-09-27 08:49:55 +00:00
omair saleh aa39adaeb8 clean web routes 2021-09-27 16:43:29 +08:00
omair saleh f0ebd20c5e Merge branch 'payment-and-billing-ui' into 'master'
Payment and billing ui

See merge request CIEFWorldwideSdnBhd/shipping-portal!57
2021-09-27 08:41:18 +00:00
omair saleh 0b3ae1f8df Merge branch 'master' into 'payment-and-billing-ui'
# Conflicts:
#   routes/web.php
2021-09-27 08:41:13 +00:00
Fairuz 27684a2940 Changes to inline report 2021-09-27 11:06:38 +08:00
Fairuz ed637739cc Inbound custom cleared 2021-09-27 09:48:00 +08:00
edmondlang a0531e344c add 'ADD Container' button
update add container form
2021-09-25 16:13:31 +08:00
edmondlang 9073d86859 Merge branch 'package-ui-create' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into container-profile-forms-ui 2021-09-24 21:59:39 +08:00
glovetleong ce20a941cd tidy 2021-09-24 21:56:50 +08:00
glovetleong b98ab2749a eta and etd in create container 2021-09-24 21:54:06 +08:00
edmondlang 5363034649 Merge branch 'package-ui-create' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into container-profile-forms-ui 2021-09-24 19:56:31 +08:00
edmondlang e83ed7a339 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into container-profile-forms-ui
# Conflicts:
#	routes/web.php
2021-09-24 19:56:07 +08:00
omair saleh 09f598ffe5 show container total cbm 2021-09-23 18:35:58 +08:00
omair saleh 9719f1da77 show container total cbm 2021-09-23 18:34:53 +08:00
glovetleong 0c63a9e7ca complete container 2021-09-23 15:04:04 +08:00
glovetleong 7d332f01e5 update drop date
update dispatch date
2021-09-23 14:40:12 +08:00
glovetleong 24ea9d381e Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into package-ui-create 2021-09-22 18:14:55 +08:00
glovetleong 9aec13da74 reschedule container 2021-09-22 18:14:36 +08:00
glovetleong 16573e9e00 container create with n/a eta and etd 2021-09-22 15:39:33 +08:00
omair saleh 8039446db5 tooltip for copying invitation link 2021-09-22 14:57:29 +08:00
omair saleh a8e26c4dd6 invitation link registration 2021-09-22 14:20:50 +08:00
omair saleh 65493e6c90 invitation link registration 2021-09-22 14:14:47 +08:00
edmondlang 36018f48b4 Merge branch 'package-ui-create' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into container-profile-forms-ui 2021-09-21 23:12:17 +08:00
edmondlang bf07a92873 container profile page ui 2021-09-21 22:37:08 +08:00
omair saleh fd8d9bd0db show claimed accounts in company profile 2021-09-21 02:51:50 +08:00
omair saleh 5b105caf0b show claimed accounts in company profile 2021-09-21 02:50:48 +08:00
omair saleh 1c5d814790 show claimed accounts in company profile 2021-09-21 02:39:58 +08:00
omair saleh c7b4b75982 exchange user table seeder 2021-09-21 02:31:04 +08:00
omair saleh fbfe68c1c2 exchange user table seeder 2021-09-21 02:19:41 +08:00
glovetleong 06b1258b55 merge branch 2021-09-20 16:54:16 +08:00
glovetleong b668708bd5 Merge branch 'package-switch-packing-list' into package-ui-create 2021-09-20 16:48:25 +08:00
glovetleong 13719d56a4 Merge branch 'assign-packing-list' into package-ui-create 2021-09-20 16:47:46 +08:00
glovetleong 26b4f012a8 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into package-ui-create 2021-09-20 16:46:15 +08:00
glovetleong ad2d54cf0e package switch packing list 2021-09-20 15:34:28 +08:00
glovetleong e84f9d8bef assign packing list to container 2021-09-18 13:40:15 +08:00
glovetleong d7e2366fed container load 2021-09-18 09:56:41 +08:00
omair saleh f7c6873316 update vt portal url 2021-09-17 17:59:37 +08:00
Fairuz b8a145cb5c Excel library, controllers 2021-09-17 07:12:08 +08:00
Fairuz b5076a6f9d Excel library, controllers 2021-09-16 20:47:33 +08:00
glovetleong 2f6055c577 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into package-ui-create 2021-09-15 21:31:13 +08:00
glovetleong 05ee6b3e98 create warehouse packing list
create shipping packing list
2021-09-15 21:30:49 +08:00
omair saleh 4626eb937e change container list to 5 per page 2021-09-15 18:29:34 +08:00
omair saleh 2be9a3dcfe remove logger from logout logic 2021-09-15 18:26:54 +08:00
omair saleh 1f05c4b56f remove timer from vt fetch jobs 2021-09-15 18:17:03 +08:00
omair saleh a3ecda8f8e round up cbm in container component 2021-09-14 17:26:33 +08:00
glovetleong 174992cc65 create package list ui
edit create package list api
2021-09-14 17:02:42 +08:00
omair saleh 3e23fa6809 revert changes for join table 2021-09-14 12:40:37 +08:00
omair saleh 41554be892 revert changes for join table 2021-09-14 12:32:18 +08:00
omair saleh a7c6c29c25 delete packages change migration 2021-09-14 12:15:17 +08:00
omair saleh 31c0b315b0 Merge branch 'task/EXC-328' into 'master'
Task/exc 328

See merge request CIEFWorldwideSdnBhd/shipping-portal!54
2021-09-14 03:45:35 +00:00
omair saleh 465c111bf1 Merge branch 'task/EXC-324' into 'master'
Join table from frontend

See merge request CIEFWorldwideSdnBhd/shipping-portal!53
2021-09-14 03:45:02 +00:00
omair saleh 0884bcf47a fix long reload issue for container on packing list status update 2021-09-12 17:12:59 +08:00
glovetleong 64f108163a package ui 2021-09-12 14:27:17 +08:00
Fairuz e80dbf4b49 Add timer, moved schedule to commands 2021-09-12 12:48:28 +08:00
Fairuz a203c5bf12 Add timer, moved schedule to commands 2021-09-12 12:46:26 +08:00
Fairuz 18b19fd90a Join table from frontend 2021-09-11 17:26:02 +08:00
omair saleh 2d1ec679eb fix delivery list job 2021-09-11 01:14:32 +08:00
omair saleh e43f7e2880 update packing list to complete after delivery updated 2021-09-11 00:39:39 +08:00
omair saleh 335a9f845e limit delivery list to first 50 2021-09-11 00:09:02 +08:00
omair saleh a5c652ef91 fix address resource loop 2021-09-10 23:55:20 +08:00
omair saleh 00c9fbfdca add db transactions back to packing lists 2021-09-10 23:48:35 +08:00
omair saleh 69180ef937 update delivery list for on hold goods 2021-09-10 23:20:19 +08:00
omair saleh bcffe4ef3e remove packing list database transactions 2021-09-10 23:10:26 +08:00
omair saleh b9794c8ff3 round up cbm 2021-09-10 23:07:24 +08:00
omair saleh 47f00e135b fix order resource loop 2021-09-10 18:26:28 +08:00
omair saleh f0c5ea8617 fix address resource owner bug 2021-09-10 18:18:48 +08:00
edmondlang 688832445a add the route for shipping queue 2021-09-10 16:41:30 +08:00
edmondlang f064ef2eff Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into shipping-queue-ui
# Conflicts:
#	routes/web.php
2021-09-10 16:22:29 +08:00
edmondlang c652d8df1a shipping queue ui 2021-09-10 15:58:28 +08:00
omair saleh fa5f129af0 add container ref in the package component 2021-09-10 13:38:35 +08:00
omair saleh 06ac4c4e62 merge marking and order number in the container list 2021-09-10 13:12:02 +08:00
omair saleh b57f56dd8f change order address 2021-09-09 23:07:48 +08:00
omair saleh 1939f64cdf change order address 2021-09-09 22:57:02 +08:00
omair saleh 1ba5282244 Merge branch '319_order_address_change_ui' into 'master'
319 order address change ui

See merge request CIEFWorldwideSdnBhd/shipping-portal!52
2021-09-09 12:45:41 +00:00
omair saleh 1c9fba7f19 Merge branch '293_order_address_change' into 'master'
293 order address change

See merge request CIEFWorldwideSdnBhd/shipping-portal!51
2021-09-09 12:45:31 +00:00
omair saleh 512cca3445 fix redirect bug 2021-09-09 15:31:39 +08:00
weichien00 54211a5b72 feat: add approve change prder address component - admin access only. 2021-09-09 13:48:57 +08:00
omair saleh ade8b0fe4f fix cbm calculation bug 2021-09-09 13:26:05 +08:00
omair saleh 3d46895328 fix cbm calculation bug 2021-09-09 13:25:14 +08:00
omair saleh 9970277411 show company create date 2021-09-09 13:18:29 +08:00
omair saleh d77c0b1c06 show company create date 2021-09-09 13:17:32 +08:00
omair saleh ea08d1d998 show company create date 2021-09-09 13:13:59 +08:00
omair saleh d6915bc22f hold and release goods for delivery 2021-09-09 06:43:35 +08:00
omair saleh b4215a5bde hold and release goods for delivery 2021-09-09 06:22:06 +08:00
omair saleh ac3e6fba20 hold and release goods for delivery 2021-09-09 05:47:51 +08:00
omair saleh ee30ebb05d hold and release goods for delivery 2021-09-09 05:35:02 +08:00
omair saleh f21eb73f4a hold and release goods for delivery 2021-09-09 05:09:10 +08:00
omair saleh aa26fb97a0 hold and release goods for delivery 2021-09-09 04:31:32 +08:00
omair saleh 502b702a0a hold and release goods for delivery 2021-09-09 04:26:18 +08:00
omair saleh e426550c73 hold and release goods for delivery 2021-09-09 04:18:49 +08:00
omair saleh fab262a959 hold and release goods for delivery 2021-09-09 04:15:40 +08:00
omair saleh e9b8815f08 hold and release goods for delivery 2021-09-09 04:10:20 +08:00
omair saleh 8dab2a09ff hold and release goods for delivery 2021-09-09 04:05:51 +08:00
weichien00 a4b2e02ec3 wip-feat: request change order shipping address ui. 2021-09-09 01:49:44 +08:00
LEE WC 97adb6b03d Merge branch 'master' into '319_order_address_change_ui'
Master to 319_order_address_change_ui

See merge request CIEFWorldwideSdnBhd/shipping-portal!50
2021-09-08 15:36:17 +00:00
omair saleh a531361514 refresh orders button 2021-09-08 23:23:11 +08:00
omair saleh b24fbc36f9 refresh orders button 2021-09-08 23:19:04 +08:00
omair saleh 600a154714 List containers 2021-09-08 23:06:25 +08:00
omair saleh 0a4753579c Merge branch 'debug_api' into 'master'
Debug api

See merge request CIEFWorldwideSdnBhd/shipping-portal!49
2021-09-08 11:11:55 +00:00
omair saleh 5c021a4e2e Merge branch 'task/EXC-317' into 'master'
Updates on Packing List & Package

See merge request CIEFWorldwideSdnBhd/shipping-portal!46
2021-09-08 11:10:05 +00:00
omair saleh 0045fc22e6 Merge branch 'container-page-ui' into 'master'
Container page ui

See merge request CIEFWorldwideSdnBhd/shipping-portal!48
2021-09-08 11:09:19 +00:00
omair saleh 77e3641be9 add delivery address to warehouse list 2021-09-08 19:06:58 +08:00
edmondlang 536833fd93 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into container-page-ui 2021-09-08 16:57:24 +08:00
edmondlang f6115c4012 hide container in menu 2021-09-08 16:56:54 +08:00
edmondlang 5e416f1760 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into payment-and-billing-ui 2021-09-08 16:45:36 +08:00
edmondlang d23b59b8e9 payment and billing ui 2021-09-08 16:44:24 +08:00
LEE WC 9a047faece Merge branch '293_order_address_change' into '319_order_address_change_ui'
merge change order address api

See merge request CIEFWorldwideSdnBhd/shipping-portal!47
2021-09-07 06:04:10 +00:00
LEE WC c6865bb5f6 Merge branch '319_order_address_change_ui' into '293_order_address_change'
# Conflicts:
#   app/Http/Resources/OrderResource.php
2021-09-07 06:01:11 +00:00
Fairuz cdaa395824 Updates on Packing List & Package 2021-09-07 09:51:04 +08:00
glovetleong c96a2b71d1 update api 2021-09-06 15:22:28 +08:00
glovetleong 102905df06 Container, Transport, Schedule Api Debug 2021-09-06 14:52:56 +08:00
omair saleh 7f8a4af3fe add marking to arrived parcel components 2021-09-06 13:03:45 +08:00
omair saleh a2f4e1f3fd Revert "add marking to arrived parcel components"
This reverts commit 91c8424dc5.
2021-09-06 13:00:31 +08:00
omair saleh 1933030e9a Revert "add marking to arrived parcel components"
This reverts commit 50cbafce25.
2021-09-06 12:59:11 +08:00
omair saleh 50cbafce25 add marking to arrived parcel components 2021-09-06 12:52:27 +08:00
omair saleh 91c8424dc5 add marking to arrived parcel components 2021-09-06 12:52:11 +08:00
omair saleh 6009e82994 add marking to arrived parcel components 2021-09-06 12:48:57 +08:00
omair saleh 7d67e13b9e change schedule for vt portal fetch 2021-09-05 20:12:52 +08:00
glovetleong 0554cc895f checkout 2021-09-05 12:55:11 +08:00
edmondlang b9ab2e9f36 Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into container-page-ui
# Conflicts:
#	resources/views/partials/menu.blade.php
2021-09-04 16:30:55 +08:00
edmondlang 51d999e3c8 add container page ui 2021-09-04 16:22:09 +08:00
omair saleh b049c95ca2 change schedule for vt portal fetch 2021-09-03 17:25:17 +08:00
omair saleh 3ee8afc4a4 add new schedule for fetching from vt at 11:30 am 2021-09-03 13:07:31 +08:00
omair saleh 1edcb296f3 sort orders by latest 2021-09-02 22:39:37 +08:00
omair saleh 51f1b3adcb change scheduled jobs into a chain 2021-09-02 22:32:01 +08:00
omair saleh 8e05c287b8 frontend suggested changes 2021-09-02 22:25:03 +08:00
omair saleh 050dc8ac7b frontend suggested changes 2021-09-02 22:20:01 +08:00
omair saleh 842fc52b4e fix warehouse list bugs 2021-09-02 16:51:10 +08:00
omair saleh 7008a01b11 fix reschedule containers etd bug 2021-09-02 12:27:40 +08:00
glovetleong afcb1277f1 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into cross-login
# Conflicts:
#	routes/web.php
2021-09-01 20:30:08 +08:00
omair saleh 7d47ac14d0 fix reschedule containers etd bug 2021-09-01 17:15:06 +08:00
omair saleh 5083ee83ad disable email verification temp 2021-09-01 15:55:15 +08:00
omair saleh 8363b8ca10 debug registration 2021-09-01 15:54:30 +08:00
omair saleh 0a89451889 debug registration 2021-09-01 15:33:34 +08:00
omair saleh 59730e21d2 debug registration 2021-09-01 15:32:35 +08:00
omair saleh 3887512721 debug registration 2021-09-01 15:29:35 +08:00
omair saleh e11cc64f89 debug registration 2021-09-01 15:27:47 +08:00
omair saleh 5ca3a927c1 debug registration 2021-09-01 15:26:07 +08:00
omair saleh 4246795e14 debug registration 2021-09-01 15:24:29 +08:00
omair saleh d0a9f1aa9f debug registration 2021-09-01 15:23:54 +08:00
omair saleh e8a7812583 debug registration 2021-09-01 15:23:19 +08:00
omair saleh c651b6ca09 debug registration 2021-09-01 15:22:28 +08:00
omair saleh d9f3ad74ca change registration loading section 2021-09-01 15:18:57 +08:00
omair saleh 278145e211 regenerate customers marking 2021-08-30 19:16:14 +08:00
omair saleh 7f0236d8d5 regenerate customers marking 2021-08-30 19:14:37 +08:00
omair saleh 414a042199 regenerate customers marking 2021-08-30 18:56:14 +08:00
omair saleh a85aeb00d7 regenerate customers marking 2021-08-30 18:55:12 +08:00
omair saleh a31d7b7b8b regenerate customers marking 2021-08-30 18:54:01 +08:00
omair saleh aa210c0b6f regenerate customers marking 2021-08-30 18:32:02 +08:00
omair saleh bf0d61c862 regenerate customers marking 2021-08-30 18:31:25 +08:00
omair saleh fae47f4a75 regenerate customers marking 2021-08-30 17:52:10 +08:00
omair saleh 53575cf59a regenerate customers marking 2021-08-30 16:58:49 +08:00
omair saleh 06db3ddf7b regenerate customers marking 2021-08-30 16:57:50 +08:00
omair saleh 15650f53ad regenerate customers marking 2021-08-30 16:56:52 +08:00
omair saleh 514364bb08 regenerate customers marking 2021-08-30 16:35:45 +08:00
omair saleh 46bfe78b77 regenerate customers marking 2021-08-30 16:23:13 +08:00
omair saleh 64ab158991 regenerate customers marking 2021-08-30 16:12:17 +08:00
omair saleh 0255b39f4b regenerate customers marking 2021-08-30 16:09:33 +08:00
omair saleh 94cf4dee1b regenerate customers marking 2021-08-30 16:08:35 +08:00
omair saleh 0a32af0dab regenerate customers marking 2021-08-30 16:07:10 +08:00
omair saleh 3f48d85e31 update packinglists from vt portal jobs and schedule 2021-08-30 01:46:56 +08:00
omair saleh 5e44386b24 update packinglists from vt portal jobs and schedule 2021-08-30 01:41:47 +08:00
omair saleh 11572a5627 update packinglists from vt portal jobs and schedule 2021-08-30 01:40:05 +08:00
omair saleh 30224f9114 update packinglists from vt portal jobs and schedule 2021-08-30 01:27:54 +08:00
omair saleh bf99141304 update packinglists from vt portal jobs and schedule 2021-08-30 01:23:54 +08:00
omair saleh 5b8bfa32d3 update packinglists from vt portal jobs and schedule 2021-08-30 01:22:17 +08:00
omair saleh dd4ecbe743 update packinglists from vt portal jobs and schedule 2021-08-30 01:21:23 +08:00
omair saleh 52cae7f877 update packinglists from vt portal jobs and schedule 2021-08-30 01:16:21 +08:00
omair saleh 5355b31bcb update packinglists from vt portal jobs and schedule 2021-08-30 01:09:16 +08:00
omair saleh c71727c9c0 update packinglists from vt portal jobs and schedule 2021-08-30 00:57:04 +08:00
omair saleh c6e621c4ab update packinglists from vt portal jobs and schedule 2021-08-30 00:52:23 +08:00
omair saleh 7279779377 update packinglists from vt portal jobs and schedule 2021-08-30 00:44:17 +08:00
omair saleh f90f5f7370 update packinglists from vt portal jobs and schedule 2021-08-30 00:40:54 +08:00
omair saleh d353a8629f update packinglists from vt portal jobs and schedule 2021-08-30 00:32:59 +08:00
omair saleh 9c62a792b7 update packinglists from vt portal jobs and schedule 2021-08-30 00:31:29 +08:00
omair saleh 32d3523190 update packinglists from vt portal jobs and schedule 2021-08-30 00:23:22 +08:00
omair saleh b5e2f47b31 update packinglists from vt portal jobs and schedule 2021-08-30 00:03:26 +08:00
omair saleh 82162026b3 update packinglists from vt portal jobs and schedule 2021-08-29 23:55:09 +08:00
omair saleh 3582654861 update packinglists from vt portal jobs and schedule 2021-08-29 23:46:00 +08:00
omair saleh 0772173dd9 update packinglists from vt portal jobs and schedule 2021-08-29 23:40:38 +08:00
omair saleh 61c11aef26 update packinglists from vt portal jobs and schedule 2021-08-29 21:20:49 +08:00
omair saleh 66c3b532cb update packinglists from vt portal jobs and schedule 2021-08-29 19:57:27 +08:00
omair saleh eac5c6d104 update packinglists from vt portal jobs and schedule 2021-08-29 19:50:35 +08:00
omair saleh 46b5d19331 update packinglists from vt portal jobs and schedule 2021-08-29 19:44:52 +08:00
omair saleh bea3836df8 update packinglists from vt portal jobs and schedule 2021-08-29 19:33:04 +08:00
glovetleong 2d49f4aabf cross login 2021-08-25 10:01:32 +08:00
omair saleh c07bcb6334 update packinglists from vt portal jobs and schedule 2021-08-23 10:52:25 +08:00
omair saleh c79443eb62 update packinglists from vt portal jobs and schedule 2021-08-23 10:45:06 +08:00
omair saleh 572cb4ac1d update packinglists from vt portal jobs and schedule 2021-08-23 10:43:02 +08:00
omair saleh 25c95f0843 update packinglists from vt portal jobs and schedule 2021-08-23 09:36:00 +08:00
omair saleh a3cdae6815 update packinglists from vt portal jobs and schedule 2021-08-23 09:35:37 +08:00
omair saleh 276e12679d update packinglists from vt portal 2021-08-23 08:39:59 +08:00
glovetleong 2095c18871 cross login 2021-08-22 13:55:51 +08:00
omair saleh d24fea2910 add wechat id to registration form, and fix loading bug on registration 2021-08-19 23:48:23 +08:00
omair saleh b15dce4fde run old companies migration only in production 2021-08-19 12:35:34 +08:00
weichien00 e0405bca1e swagger: add show order, request address change, and approve address change api endpoint. 2021-08-19 01:35:23 +08:00
weichien00 6fb5d66631 feat: add route for request and approve address change. 2021-08-19 01:33:50 +08:00
weichien00 5a043e89a0 feat: API to approve order address change. 2021-08-19 01:33:16 +08:00
weichien00 3c20386875 feat: API to request change order address 2021-08-19 01:31:27 +08:00
omair saleh ab747b3403 large commit 2021-08-18 15:54:38 +08:00
omair saleh 9e9de73d65 large commit 2021-08-18 06:57:29 +08:00
omair saleh 2033ef9ef6 large commit 2021-08-18 06:13:58 +08:00
omair saleh 14cbcfd6f5 large commit 2021-08-18 06:02:14 +08:00
omair saleh bdf3759dd5 update address form reference input label, and add login about us 2021-08-17 15:07:55 +08:00
omair saleh 94dde7bf7b update favicons 2021-08-16 09:17:02 +08:00
omair saleh d8c767c670 Large commit 2021-08-16 08:59:43 +08:00
Fairuz e2874f7199 Merge branch 'responsive-dashboard' into 'master'
responsive banner dashboard

See merge request CIEFWorldwideSdnBhd/shipping-portal!43
2021-08-15 12:00:39 +00:00
Amirul Amin 9cfc6e7cdf responsive banner dashboard 2021-08-15 16:29:52 +08:00
omair saleh 3c1ba6a780 temp fix destination warehouse reference 2021-08-15 14:58:47 +08:00
omair saleh 75be0ab0cc temp fix destination warehouse reference 2021-08-15 14:57:11 +08:00
omair saleh da8259ab4d Merge branch 'scrap-cookie' into 'master'
Scrap cookie

See merge request CIEFWorldwideSdnBhd/shipping-portal!42
2021-08-14 17:33:22 +00:00
omair saleh 2edb793765 Merge branch 'pdf-demo' into 'master'
demo

See merge request CIEFWorldwideSdnBhd/shipping-portal!41
2021-08-14 17:32:42 +00:00
Fairuz 05bdb9b91d Merge branch 'responsive-login' into 'master'
responsive login

See merge request CIEFWorldwideSdnBhd/shipping-portal!40
2021-08-14 14:29:28 +00:00
Amirul Amin c0e596a1eb responsive login 2021-08-14 21:46:22 +08:00
glovetleong cea018220f demo 2021-08-14 11:05:12 +08:00
omair saleh 8c4bac81e6 General fixes to table design, added state and district seeder for china, made changes to create order process, and ui and vue js components changes for registration, dashboard and registration 2021-08-14 09:28:36 +08:00
omair saleh dda0cf0b02 Merge remote-tracking branch 'origin/master' 2021-08-12 15:01:38 +08:00
omair saleh fc0786264a fix dashboard and order ui & fix address select component and added reference to addresses 2021-08-12 15:01:16 +08:00
Fairuz 7010bd3574 Merge branch 'modify_order_step' into 'master'
Modify order step relationship

See merge request CIEFWorldwideSdnBhd/shipping-portal!39
2021-08-12 06:45:32 +00:00
Fairuz c49136a94d Update order step, nullable relationship 2021-08-12 14:16:38 +08:00
Fairuz b0246ccfda Update relation for order steps 2021-08-12 13:41:27 +08:00
glovetleong 8ff3d73227 scrap job 2021-08-12 09:19:35 +08:00
glovetleong 984b486cfd scrap cookie script 2021-08-11 09:29:40 +08:00
Fairuz f876cc5822 Merge branch 'tracking' into 'master'
wip tracking page responsive

See merge request CIEFWorldwideSdnBhd/shipping-portal!38
2021-08-10 01:42:11 +00:00
Amirul Amin 25789deefd wip tracking page responsive 2021-08-09 22:38:54 +08:00
Fairuz 5e26fa7a82 Merge branch '284-address' into 'master'
feat: address component

See merge request CIEFWorldwideSdnBhd/shipping-portal!37
2021-08-09 09:12:52 +00:00
weichien00 053760701b feat: add addressComponent and related action component ex. deleteAddress and setDefaultAddress component. add new/edit form/ 2021-08-09 02:25:01 +08:00
weichien00 4f5054c55f feat: add addresslist component and include in address index.blade 2021-08-09 02:19:19 +08:00
weichien00 7a2f2e87b2 update: change to save default address based on company module id 2021-08-09 02:16:24 +08:00
Fairuz db12b2f26c Merge branch 'order-details' into 'master'
responsive order details

See merge request CIEFWorldwideSdnBhd/shipping-portal!36
2021-08-07 04:23:00 +00:00
Amirul Amin 4e910203d0 wip responsive order details 2021-08-06 21:19:51 +08:00
Fairuz efdc6c0e46 Merge branch '272-dashboard-first-order' into 'master'
272 dashboard first order

See merge request CIEFWorldwideSdnBhd/shipping-portal!35
2021-08-05 03:25:50 +00:00
weichien00 1005ec9c83 fix: getterstate. 2021-08-05 11:18:43 +08:00
weichien00 7c1f5ffaf8 revert tab active show manipulation. 2021-08-05 11:17:00 +08:00
Fairuz 1139c77101 Merge branch '248_order_steps_apis' into 'master'
Completes Order Steps on Unity

See merge request CIEFWorldwideSdnBhd/shipping-portal!34
2021-08-05 02:54:27 +00:00
Fairuz 06efb4c169 Completes Order Steps on Unity 2021-08-05 10:52:26 +08:00
weichien00 93e5371882 fix: order list tab visibility based on condition. 2021-08-05 03:38:24 +08:00
weichien00 e0df8ac524 fix: remove new-order param in localstorage when logout 2021-08-05 03:36:57 +08:00
weichien00 a18c9afe3e update: routes and it respective blade files/ 2021-08-05 03:05:51 +08:00
weichien00 efae44cfb0 update: add onboarding create order flow component. 2021-08-05 03:02:26 +08:00
weichien00 3b1218e1ea style: validation component. - remove border. 2021-08-05 02:59:43 +08:00
weichien00 6d3b4bc4f0 update: vuex module for order operation. 2021-08-05 02:59:14 +08:00
weichien00 96342f6e01 add: component of create order. 2021-08-05 02:58:35 +08:00
weichien00 60210fc676 fix: save address with companyModule polymorph relationship. 2021-08-05 02:49:20 +08:00
weichien00 73505b140c add: eloquent polymorph with companyModule filter. 2021-08-05 02:45:58 +08:00
Fairuz d9935ff6a1 Merge branch 'address-form' into 'master'
responsive radio customize design for address

See merge request CIEFWorldwideSdnBhd/shipping-portal!32
2021-08-04 05:49:13 +00:00
LEE WC b128a92740 Merge branch '248_order_steps_apis' into '272-dashboard-first-order'
merge 248_order_steps_apis to my working branch

See merge request CIEFWorldwideSdnBhd/shipping-portal!33
2021-08-03 16:45:59 +00:00
Amirul Amin cc9bb9976f responsive radio customize design for address 2021-08-04 00:18:00 +08:00
Fairuz fe52f0471b Merge branch '248_order_steps_apis' into 'master'
Add address to create order resources

See merge request CIEFWorldwideSdnBhd/shipping-portal!31
2021-08-03 02:57:49 +00:00
Fairuz 503a550637 Add address to create order resources 2021-08-03 10:57:11 +08:00
Fairuz 49f58659f6 Merge branch '248_order_steps_apis' into 'master'
248 order steps apis

See merge request CIEFWorldwideSdnBhd/shipping-portal!30
2021-08-02 18:07:27 +00:00
Fairuz 3427ad025c Merge branch 'master' into 248_order_steps_apis 2021-08-03 02:04:58 +08:00
Fairuz ec673e7d02 Add company id to address 2021-08-03 02:03:57 +08:00
Fairuz 3f70ead69a Activate contract 2021-08-03 02:01:20 +08:00
Fairuz ec1e338870 Activate contract 2021-08-03 01:43:22 +08:00
Fairuz 7e9b3259c3 Added contract entity, address to Orders 2021-08-03 01:18:34 +08:00
Fairuz af38004595 Added contract entity, address to Orders 2021-08-03 01:17:54 +08:00
LEE WC 4f896fe1cf Merge branch 'master' into '272-dashboard-first-order'
merge Master to my working branch

See merge request CIEFWorldwideSdnBhd/shipping-portal!29
2021-08-02 15:44:43 +00:00
weichien00 decb6265eb add: list order api. 2021-08-02 23:42:51 +08:00
omair saleh 2b3cdb3290 fix dashboard web route 2021-08-02 13:40:13 +08:00
omair saleh 6466c4724e fix dashboard web route 2021-08-02 13:39:41 +08:00
omair saleh a2d050e072 fix dashboard web route 2021-08-02 13:38:43 +08:00
omair saleh 79cc00a37f registration ui fixes, and clean up header menu and footer 2021-08-02 12:15:58 +08:00
omair saleh aab1da6c12 Merge remote-tracking branch 'origin/master' 2021-08-02 12:08:57 +08:00
omair saleh dfbfd04d31 registration ui fixes, and clean up header menu and footer 2021-08-02 12:08:30 +08:00
Fairuz 8e9a3ef05f Merge branch '248_order_steps_apis' into 'master'
248 order steps apis

See merge request CIEFWorldwideSdnBhd/shipping-portal!28
2021-08-02 03:51:04 +00:00
Fairuz fa5d063ea2 Merge branch 'master' into 248_order_steps_apis 2021-08-02 11:49:24 +08:00
Fairuz 58d8367bc7 WIP Unity Order APIs 2021-08-02 11:48:29 +08:00
Fairuz 1c8caac730 Merge branch 'data-table' into 'master'
Data table

See merge request CIEFWorldwideSdnBhd/shipping-portal!27
2021-08-02 02:26:55 +00:00
Amirul Amin 5d09b66e78 wip : data table responsive 2021-08-02 01:20:33 +08:00
Amirul Amin a7c1ac9982 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into data-table 2021-08-02 01:18:02 +08:00
Amirul Amin 817c30fe19 wip : data table container responsive 2021-08-02 01:17:38 +08:00
omair saleh ea9955c269 Merge remote-tracking branch 'origin/master' 2021-07-30 21:23:59 +08:00
omair saleh 41d59d9a80 fix migration files and add admin user seeder 2021-07-30 21:23:43 +08:00
Fairuz 2ad01a4195 Merge branch 'master' into 248_order_steps_apis 2021-07-30 19:07:59 +08:00
Fairuz e5814fcd01 Assign contract obligations at Unity 2021-07-30 19:06:38 +08:00
Fairuz 126c75df19 Merge branch '252/253/254-account-registration-vue' into 'master'
252/253/254 account registration vue

See merge request CIEFWorldwideSdnBhd/shipping-portal!26
2021-07-30 06:56:04 +00:00
weichien00 a3daef7203 add: vue emailVerification component. 2021-07-30 14:47:05 +08:00
weichien00 3e8265fe3a update: return company_module_id after login success. 2021-07-30 14:45:45 +08:00
weichien00 0dc68cea5a update: return number of order when login. 2021-07-30 14:26:11 +08:00
weichien00 7fe6009669 add: missing blade for email verification and reset password. 2021-07-30 03:37:23 +08:00
weichien00 8b5dd24a14 update: integrate header,side menu to blade+vuejs. 2021-07-30 02:10:37 +08:00
LEE WC ad7dae69c6 Merge branch 'side-menu' into '252/253/254-account-registration-vue'
Side menu to my working branch

See merge request CIEFWorldwideSdnBhd/shipping-portal!25
2021-07-29 05:01:01 +00:00
Fairuz 0681738d58 Merge branch 'side-menu' into 'master'
add side menu and header skeleton

See merge request CIEFWorldwideSdnBhd/shipping-portal!24
2021-07-29 03:26:02 +00:00
Amirul Amin dd51cf4f4c add side menu and header skeleton 2021-07-29 00:15:41 +08:00
weichien00 40af7bb690 fix: add missing class. 2021-07-26 15:04:51 +08:00
weichien00 693bd68726 fix: bank migration file typo. 2021-07-26 15:04:21 +08:00
Fairuz 238897e3eb Merge branch 'master' into 248_order_steps_apis 2021-07-26 14:21:07 +08:00
Fairuz 9edbdc3744 Merge branch '252/253/254-account-registration-vue' into 'master'
252/253/254 account registration vue

See merge request CIEFWorldwideSdnBhd/shipping-portal!22
2021-07-26 06:18:56 +00:00
LEE WC 04778859c4 Merge branch 'master' into '252/253/254-account-registration-vue'
Master to my working branch

See merge request CIEFWorldwideSdnBhd/shipping-portal!23
2021-07-26 05:17:35 +00:00
Fairuz fde433d60c Created contract at Unity 2021-07-26 13:14:43 +08:00
weichien00 bcdcac2382 fix: login and registration. 2021-07-26 12:50:16 +08:00
weichien00 a55272f556 update: add create acount link below login form 2021-07-26 12:13:22 +08:00
omair saleh 97ec698983 update gitignore 2021-07-25 14:36:09 +08:00
Fairuz 06de032867 Merge branch '248_order_steps_apis' into 'master'
248 Remaining APIs

See merge request CIEFWorldwideSdnBhd/shipping-portal!21
2021-07-24 08:25:01 +00:00
Fairuz 51e1127fd6 Merge branch 'master' into 248_order_steps_apis 2021-07-24 16:22:29 +08:00
Fairuz e12e5a460e WIP - Order steps & remaining APIs 2021-07-24 16:21:11 +08:00
Fairuz 9296c321f3 WIP - Order steps & remaining APIs 2021-07-24 15:17:54 +08:00
Fairuz 805ae4ff2b WIP - Order steps & remaining APIs 2021-07-24 13:40:21 +08:00
Fairuz 7ae581300d WIP - Order steps & remaining APIs 2021-07-24 11:39:40 +08:00
Fairuz 1281990b08 WIP - Order steps & remaining APIs 2021-07-24 00:11:59 +08:00
weichien00 a2e16193aa fix: resolve merge issue. 2021-07-23 23:44:29 +08:00
LEE WC 684a34c3f3 Merge branch 'master-merge-252/253/254-account-registration-vue' into '252/253/254-account-registration-vue'
Master merge 252/253/254 account registration vue

See merge request CIEFWorldwideSdnBhd/shipping-portal!20
2021-07-23 15:08:14 +00:00
weichien00 7106a44432 update to match master. 2021-07-23 23:06:11 +08:00
Fairuz 4eaf1917fa WIP - Order steps & remaining APIs 2021-07-23 21:27:18 +08:00
Fairuz d5dd26ae73 WIP - Order steps & remaining APIs 2021-07-23 18:31:52 +08:00
Fairuz 6ae3c64b3b WIP - Order steps & remaining APIs 2021-07-23 16:36:37 +08:00
Fairuz d65b630560 WIP - Order steps & remaining APIs 2021-07-23 16:14:54 +08:00
Fairuz 1fe25476ce WIP - Order steps & remaining APIs 2021-07-23 15:07:05 +08:00
Fairuz d7131dd5f8 WIP - Order steps & remaining APIs 2021-07-23 12:41:06 +08:00
Fairuz 67e104d7e7 WIP - Order steps & remaining APIs 2021-07-23 01:25:48 +08:00
Fairuz d74d12da96 WIP - Order steps & remaining APIs 2021-07-23 01:16:19 +08:00
Fairuz d87c4f7df4 WIP - Order steps & remaining APIs 2021-07-22 16:53:52 +08:00
Fairuz 3dfa087831 WIP - Order steps & remaining APIs 2021-07-22 14:28:02 +08:00
Fairuz adf9896410 WIP - Order steps & remaining APIs 2021-07-22 13:00:11 +08:00
Fairuz 6278ddb16b WIP - Order steps & remaining APIs 2021-07-22 11:28:58 +08:00
Fairuz d308ab4045 WIP - Order steps & remaining APIs 2021-07-22 11:25:00 +08:00
omair saleh e61bda751b Merge remote-tracking branch 'origin/master' 2021-07-21 16:10:27 +08:00
omair saleh 8b51cdc1dc login page, and forget password page 2021-07-21 16:10:07 +08:00
omair saleh 4f7b4ab9aa clean public folder 2021-07-21 16:09:25 +08:00
weichien00 398ceaa14f update: add filecomponent to registrationForm component 2021-07-21 09:53:46 +08:00
weichien00 fbb21df45b add: registration section and related component - 1 checkemail , 2 register form. 2021-07-21 02:58:55 +08:00
weichien00 54daf59e7c add: login form component. 2021-07-21 02:53:54 +08:00
weichien00 8d56e3af63 update: add login.blade file. 2021-07-21 02:48:09 +08:00
Fairuz ed157150e7 Merge branch '229_order_apis' into 'master'
Order APIs & Unity Service

See merge request CIEFWorldwideSdnBhd/shipping-portal!18
2021-07-17 10:55:48 +00:00
Fairuz 95660069c9 Order APIs & Unity services 2021-07-17 18:44:22 +08:00
Fairuz 9c0772bf65 Orders APIs WIP 2021-07-15 17:30:12 +08:00
Fairuz ac288981f5 Resolved conflict with Master branch 2021-07-15 10:50:03 +08:00
Fairuz d4acea78c0 Merge branch '223-company-api' into 'master'
223 company api

See merge request CIEFWorldwideSdnBhd/shipping-portal!17
2021-07-15 02:38:56 +00:00
Fairuz a7eec812c9 Orders APIs WIP 2021-07-15 10:33:12 +08:00
Fairuz 562ea1ff7b Orders APIs WIP 2021-07-14 15:18:25 +08:00
weichien00 b0a02a8c27 swagger - Add create company API. 2021-07-14 11:01:01 +08:00
weichien00 3715e9128d swagger: add new tag "Flow - Registration" and include related api. 2021-07-14 10:50:19 +08:00
Fairuz 4bae6e063e Merge branch 'hotfix-user-model-typo' into 'master'
hotfix: typo issue that cause login failed.

See merge request CIEFWorldwideSdnBhd/shipping-portal!15
2021-07-14 02:10:01 +00:00
weichien00 13b99f01ee fix: company list api - parameter "filter" change to "filters". update description. 2021-07-13 23:54:11 +08:00
LEE WC a8ac1b8cb1 Merge branch 'hotfix-user-model-typo' into '223-company-api'
hotfix: typo issue that cause login failed.

See merge request CIEFWorldwideSdnBhd/shipping-portal!16
2021-07-13 15:38:09 +00:00
weichien00 5fca745e58 hotfix: typo issue that cause login failed. 2021-07-13 23:32:03 +08:00
weichien00 8cde051869 fix: User Model - typo on companyModule. 2021-07-13 23:25:31 +08:00
weichien00 fa2f0bb56f update: account registration api - add new input field : business_type. 2021-07-13 23:07:36 +08:00
weichien00 d254b56629 fix: include business_type for company_module process in create_customer logic. 2021-07-13 22:23:56 +08:00
weichien00 b0b3f27738 update: add create company_module processsor in create company logic. #7 2021-07-13 22:22:45 +08:00
weichien00 a9c921b8cf fix: save businessType as type in company_module table. 2021-07-13 22:20:54 +08:00
weichien00 7700d863d6 update: CompanyModule Model - add belongto relationship with company. 2021-07-13 22:09:00 +08:00
Fairuz ddbf83465e Orders APIs WIP 2021-07-13 11:58:03 +08:00
weichien00 bbfd905e5d update: add company relationship with company module. 2021-07-12 16:51:43 +08:00
weichien00 ab5202d8bb fix: company seeder create company module along with creating new compaany 2021-07-12 16:50:12 +08:00
weichien00 7acda23f3d new: eloquent filter for company_module.type. 2021-07-12 16:48:39 +08:00
Fairuz e6fa91f696 Merge branch 'master' into 229_order_apis 2021-07-12 14:24:03 +08:00
Fairuz 1ada18c33f Order API progress 2021-07-12 10:19:05 +08:00
Fairuz ec2896fbbe Merge branch 'swagger_registration_flow' into 'master'
Swagger registration flow

See merge request CIEFWorldwideSdnBhd/shipping-portal!14
2021-07-12 02:18:41 +00:00
Fairuz ccb8e630ce Merge branch 'master' into 229_order_apis 2021-07-11 13:59:45 +08:00
Fairuz 0fa316a7ce Merge branch 'swagger_address' into 'master'
Missing resources address, district & swagger docs for it

See merge request CIEFWorldwideSdnBhd/shipping-portal!10
2021-07-09 10:55:58 +00:00
Fairuz 3cf303f33f Merge branch 'master' into swagger_address 2021-07-09 18:54:49 +08:00
Fairuz 487d0d353c Merge branch '222-restructur-table' into 'master'
add: new migration files -...

See merge request CIEFWorldwideSdnBhd/shipping-portal!11
2021-07-09 10:53:40 +00:00
weichien00 9c66821135 update swagger: default set to 2 and put remark on type field in account registration api. 2021-07-09 11:36:14 +08:00
weichien00 785a3a5a85 swagger - add check email existance, company list api 2021-07-09 02:11:13 +08:00
LEE WC a9bcf46d2f Merge branch 'swagger_address' into 'swagger_registration_flow'
Missing resources address, district & swagger docs for it

See merge request CIEFWorldwideSdnBhd/shipping-portal!12
2021-07-08 17:50:06 +00:00
weichien00 db5294332c update: address,conpanyModule,user models . 2021-07-09 00:34:07 +08:00
Fairuz 861341ce3a Migration file for orders 2021-07-08 16:30:10 +08:00
weichien00 5c432dbf6a update : address model add polymorphic relationship 2021-07-08 11:40:54 +08:00
weichien00 3ac76cfc99 add: service class required when creating new address. 2021-07-08 04:00:23 +08:00
weichien00 6cc27d1c43 fix: address table with column default set with default value false. 2021-07-08 03:59:14 +08:00
weichien00 29b43ee69b add: country,state and district seeder files. 2021-07-08 03:58:17 +08:00
weichien00 37f60792f2 update: company model. 2021-07-08 03:33:52 +08:00
weichien00 7ee83bad51 update: company route. 2021-07-08 03:32:16 +08:00
weichien00 10a7bd3421 new: copy remaining company module classes from exhange2.0. 2021-07-08 03:31:33 +08:00
weichien00 8da79a2017 update: add doctrine/dbal dependency to modify column in migration. 2021-07-08 02:02:07 +08:00
weichien00 14e35e2110 update: changes on Account Module based on changes #6 2021-07-08 01:59:09 +08:00
weichien00 8dc45d0848 update: changes on Company Module based on changes #6 2021-07-08 01:58:32 +08:00
weichien00 0866509107 add: contact interface #6 related to dc11a1f8 2021-07-08 01:56:36 +08:00
weichien00 dc11a1f8d5 update: changes on Contacts Module based on changes #6 2021-07-08 01:53:14 +08:00
weichien00 45077c953e add: company module classes. #7 2021-07-08 01:47:58 +08:00
weichien00 13988d1021 fix: company_employees table set primay key on company_module_id and user_id 2021-07-08 01:33:52 +08:00
weichien00 0e057a8832 update: Company,Contact,User model files - change accordingly based on new db structure. 2021-07-08 01:13:37 +08:00
weichien00 644339a224 add: copy serviceType models file from exchange2.0. 2021-07-08 01:10:49 +08:00
weichien00 99b173c4c8 add: new model files, CompanyEmployee and CompanyModule based on new tables. 2021-07-08 01:07:49 +08:00
weichien00 7f0d5843f5 remove: employee model. 2021-07-08 00:44:10 +08:00
weichien00 c7719eb787 update: contacts migration - default column with default value set to false. 2021-07-08 00:37:15 +08:00
Fairuz f603ef53c4 Missing resources address, district & swagger docs for it 2021-07-07 17:17:56 +08:00
weichien00 1351724030 new: add companiesTableSeeder - sample warehouse. 2021-07-07 00:29:05 +08:00
weichien00 a2f2b42ff4 remove: employee table migration file. 2021-07-07 00:27:04 +08:00
weichien00 6dfff29d02 add: new migration files - company_modules,company_employees,company_connections,connection_segments. 2021-07-07 00:26:35 +08:00
weichien00 04ebda1c6a update migration companies,address,contact,segments,segment_constants,segment_companies. 2021-07-07 00:25:10 +08:00
Fairuz c3d0cba20c Merge branch '209-document-api' into 'master'
209 document api

See merge request CIEFWorldwideSdnBhd/shipping-portal!8
2021-07-05 09:52:54 +00:00
weichien00 3dbbe743eb update: swagger - add identification_no and file input field. 2021-07-05 11:00:06 +08:00
Fairuz 4b330afc60 Merge branch '219_transactions_module' into 'master'
Copied transaction, receipt & currecny module from Exchange

See merge request CIEFWorldwideSdnBhd/shipping-portal!6
2021-07-04 04:51:27 +00:00
Fairuz bc8ec2854a Copied transaction, receipt & currecny module from Exchange 2021-07-04 11:52:31 +08:00
weichien00 aa4bee875c new: migration file to create documents and files table. #5 2021-07-03 02:40:17 +08:00
weichien00 a3ce7c14a1 update: filesystem config for upload document. 2021-07-03 02:39:22 +08:00
weichien00 da4b6cd850 update: return TypeError exception with ApiResponseObject . #4 2021-07-03 02:38:52 +08:00
weichien00 56c42fe8f9 update: createCustomerLogic - add upload identity document processor. related #5 2021-07-03 00:59:25 +08:00
weichien00 aaf0ff7645 new: Add classes required to upload identity document during account registration. #5 2021-07-03 00:58:24 +08:00
Fairuz 9bcb45e5cc Merge branch 'add_public_folder' into 'master'
Add public folder & Swagger Header Token

See merge request CIEFWorldwideSdnBhd/shipping-portal!5
2021-06-29 03:20:43 +00:00
Fairuz a3fc6895e8 Fixes for swagger to add bearer token to header 2021-06-29 11:18:45 +08:00
Fairuz 6bfcb11bb2 Add public folder, accidentally included in gitignore & remove swagger.json 2021-06-29 08:04:29 +08:00
Fairuz f29b8c4554 Merge branch '202-authentication-apis' into 'master'
add registration , user and authentication related api.

See merge request CIEFWorldwideSdnBhd/shipping-portal!4
2021-06-28 13:10:03 +00:00
weichien00 8ee5bb0f4d update: add valid.token to use in middleware on route with user prefix. 2021-06-28 20:06:09 +08:00
weichien00 aff5262a96 update: remove company_name from required field. 2021-06-27 03:02:09 +08:00
weichien00 c7da41b3e0 update: swagger - add registration and login API 2021-06-27 02:41:06 +08:00
weichien00 7fda7a4584 update: add route for user CRUD API 2021-06-27 01:14:04 +08:00
weichien00 42b58ce68c new:[user apis]add classes required for update user API #3 2021-06-27 01:13:23 +08:00
weichien00 d1065f0f39 new:[user apis]add classes required to delete a user API #3 2021-06-27 00:49:30 +08:00
weichien00 8697fb7a18 new:[user apis]add classes required to create admin user API #3 2021-06-27 00:41:06 +08:00
weichien00 eaa0b2d382 new:[user apis]add classes required to fetch a user API #3 2021-06-27 00:08:02 +08:00
weichien00 570fd257bf new:[User apis]add classes required for user listing API #3 2021-06-27 00:05:09 +08:00
weichien00 7beead2300 new:[authentication apis]add classes required for resend verification email API #2 2021-06-26 18:45:58 +08:00
weichien00 ce4b45708d new:[authentication apis]add classes required for email verification API #2 2021-06-26 18:30:35 +08:00
weichien00 116248b346 new:[authentication apis]add classes required for password reset API #2 2021-06-26 18:19:54 +08:00
weichien00 9248592417 new:[authentication apis]add classes required for request password reset API #2 2021-06-26 18:04:30 +08:00
weichien00 38cccef2fd new:[authentication apis]add classes required for refresh token API #2 2021-06-26 17:16:01 +08:00
weichien00 e0f72c25fb update: include logout route. #2 2021-06-26 03:46:30 +08:00
weichien00 38153de7c6 update: JWT auth config. 2021-06-26 03:45:56 +08:00
weichien00 3426d6b157 new:[authentication apis]add classes required for logout API #2 2021-06-26 03:45:00 +08:00
weichien00 287e72e714 new: [authentication apis]add classes required for login API #2 2021-06-26 02:46:08 +08:00
weichien00 9821c0e306 new: [authentication apis]add classes required for check email API #2 2021-06-26 02:39:41 +08:00
weichien00 da205cc706 clear: debug log message. 2021-06-26 02:03:07 +08:00
weichien00 be967ced3d fix: route - dummy login route(for verification email route reference.) 2021-06-26 01:55:31 +08:00
weichien00 26bf40b954 fix: routes - remove unnecessary route at this moment. 2021-06-26 01:43:49 +08:00
weichien00 f12ceac557 fix: add missing classes required to run seeder. 2021-06-26 01:25:59 +08:00
weichien00 e36ffdb8df update: route required when generate verification email. 2021-06-26 00:59:56 +08:00
weichien00 d4dc18b45f fix: add index.php in public folder. 2021-06-26 00:58:47 +08:00
weichien00 dda0879db2 new: add class required to authenticate user after registration success. #1 2021-06-26 00:55:01 +08:00
weichien00 2b02acf6eb new: verification email template. #1 2021-06-26 00:49:46 +08:00
weichien00 1ddeb1cac6 new: Add models currency, passwordReset, segmentCompany, segmentConstant. #1 2021-06-26 00:43:21 +08:00
weichien00 0e1ea69515 new :add classes required to send verification email after user registered. #1 2021-06-26 00:36:37 +08:00
weichien00 d3fa2170f7 new: assign segment to company created. #1 2021-06-26 00:27:55 +08:00
weichien00 b6f56ffebd delete: remove redundant migration files. 2021-06-26 00:17:01 +08:00
weichien00 e6b615e0b5 fix: remove classmap - error when run composer install 2021-06-26 00:14:32 +08:00
weichien00 741b4a89b4 Merge branch 'master' into 199-user-registration-api
# Conflicts:
#	routes/api.php
2021-06-25 13:00:07 +08:00
Fairuz a294287c5a Merge branch 'address' into 'master'
Address

See merge request CIEFWorldwideSdnBhd/shipping-portal!2
2021-06-25 02:22:35 +00:00
Fairuz 17c8b4f77c Merge branch 'swagger_apidocs' into 'master'
Swagger API docs initial setup

See merge request CIEFWorldwideSdnBhd/shipping-portal!1
2021-06-25 02:22:22 +00:00
weichien00 f59b3cba47 new: add classes required to assign user as an employee to a company. #1 2021-06-25 04:04:34 +08:00
weichien00 bac5622fe2 new: add classes required to create contact along with new user registration #1 2021-06-25 03:53:59 +08:00
weichien00 49cad624f1 new: add company model required by 55a25275 #1 2021-06-25 03:48:20 +08:00
weichien00 55a2527506 new: add classes required to create company along with new user registration. #1 2021-06-25 03:44:29 +08:00
weichien00 718a7bbf43 new: add classes required to create basic user entry. #1 2021-06-25 03:34:47 +08:00
weichien00 de9fb4d4f2 new: Add CreateCustomerLogic - Main class to create a account with other related infomation. 2021-06-25 03:21:40 +08:00
weichien00 923b0b581e new: add register account api route. #1 2021-06-25 03:16:23 +08:00
weichien00 96125d5dc8 update: DatabaseSeeder - run seeder added 5fbd5ef7 2021-06-25 03:13:00 +08:00
weichien00 5fbd5ef78a new: add country,currency,segment and segment constant seed #1 2021-06-25 03:10:47 +08:00
weichien00 0fbbfdaa3e update: Additional column on country table. #1 2021-06-25 03:07:23 +08:00
weichien00 0e73012be2 new:create job,segment,segment_constant,segment_company and currency migration file . #1 2021-06-25 03:06:30 +08:00
weichien00 168881e98a new: Add Account/CreateCustomerController. 2021-06-25 00:43:02 +08:00
unknown 28f8a7c44a new: create country, company,contact, user_email_verification ,employee table . and modify user table migration file. 2021-06-24 15:16:33 +08:00
Hafiz 1640e6ef26 fixed address branch as comments 2021-06-24 11:32:13 +08:00
unknown 5bfd4731ba auto prefixed on controller route declaration. 2021-06-24 11:05:03 +08:00
Hafiz f33c316ba5 Add address API,Model,Controller 2021-06-23 21:58:07 +08:00
Fairuz 3b9c28dcbd Swagger API docs initial setup 2021-06-22 13:02:19 +08:00
Fairuz ee1a7a12cc Initial setup 2021-06-17 20:12:08 +08:00
230 changed files with 7480 additions and 5020 deletions
+4
View File
@@ -55,3 +55,7 @@ EXCHANGE_URL=https://dev.exchange.cief-malaysia.com/
MIX_EXCHANGE_URL="${EXCHANGE_URL}"
YD_API_CODE=''
PERFEXCRM_BASE_URL=""
PERFEXCRM_API_KEY=""
PERFEXCRM_IS_ENABLED="false"
-1
View File
@@ -21,7 +21,6 @@ gox.iml
rebuild_docker.sh
docker/*
db/*
docker-compose.yml
package-lock.json
public/*
/public/*
-807
View File
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
yarnPath: ".yarn/releases/yarn-berry.cjs"
@@ -95,4 +95,4 @@ abstract class AbstractControllerLogic
return $this->response(json_decode($collection->response()->getContent(), true));
}
}
}
@@ -18,10 +18,7 @@ abstract class AbstractUpdateRecord
public function handler(Model $model){
try{
if($model->save()) {
return $model;
}
if($model->save()){ return $model; }
} catch (QueryException $exception){
throw new MalformedRequestException($exception);
@@ -15,7 +15,7 @@ class DoesNotHaveTransactionType implements Filter
public static function apply(Builder $builder, $value)
{
return $builder->whereDoesntHave('transactions', function (Builder $query) use($value) {
$query->where('type', $value);
$query->where('type', $value)->whereIn('status', [0,1,2,3]);
})->whereHas('containers', function ($query){
return $query->whereDate('loading_date', '>=', Carbon::parse('20-09-2022'));
});
@@ -0,0 +1,21 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use App\Models\Order;
use Illuminate\Database\Eloquent\Builder;
class OrderMarkingIn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereHas('owner', function($query) use ($value) {
$query->where('reference', 'LIKE', '%' . $value . '%');
});
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class Receiver implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('receiver', '=', $value);
}
}
-36
View File
@@ -1,36 +0,0 @@
<?php
namespace App\Classes\General\Eloquent;
use Illuminate\Support\Facades\Schema;
use DB;
trait logData
{
public static function boot()
{
parent::boot();
static::updating(function($model)
{
if (!Schema::hasTable(''.$model->table.'log')) {
DB::statement('CREATE TABLE '.$model->table.'log LIKE '.$model->table);
DB::statement('ALTER TABLE '.$model->table.'log DROP COLUMN id');
DB::statement('ALTER TABLE '.$model->table.'log ADD id INTEGER FIRST');
}
DB::table(''.$model->table.'log')->insert($model->getRawOriginal());
});
}
public function logs($model){
$result = DB::table(''.$model->table.'log')
->where('id', $model->id)
->get();
return $result;
}
}
+47
View File
@@ -0,0 +1,47 @@
<?php
namespace App\Classes\General\Traits;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str;
trait LogData
{
public static function boot()
{
parent::boot();
static::updating(function($model)
{
$tableName = Str::singular($model->table).'_logs';
$relationshipColumn = Str::singular($model->table).'_id';
$originalData = $model->getRawOriginal();
$originalData[$relationshipColumn] = $originalData['id'];
unset($originalData['id']);
if (!Schema::hasTable($tableName)) {
DB::statement('CREATE TABLE '.$tableName.' LIKE '.$model->table);
$indexs = DB::select('SHOW INDEX FROM '.$tableName.';');
$removedIndexes = [];
foreach ($indexs as $index){
if($index->Column_name === 'id' || in_array($index->Key_name, $removedIndexes)) continue;
DB::statement('ALTER TABLE '.$tableName.' drop index '.$index->Key_name);
$removedIndexes[] = $index->Key_name;
}
DB::statement('ALTER TABLE '.$tableName.' ADD COLUMN `'.$relationshipColumn.'` BIGINT NOT NULL AFTER `id`');
}
DB::table($tableName)->insert($originalData);
});
}
}
@@ -0,0 +1,41 @@
<?php
namespace App\Classes\Jobs;
use App\Classes\Modules\PerfexCRM\Processors\CreatePerfexCRMLeadProcessor;
use App\Classes\Modules\PerfexCRM\Services\FetchesPerfexCRMLead;
use App\Classes\Modules\PerfexCRM\Services\UpdatesPerfexCRMLead;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CreateLeadPerfexCRMObject;
class CreatePerfexCRMCustomer implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/** @var CreateLeadPerfexCRMObject */
private $createLeadPerfexCRMObject;
/**
* CreatePerfexCRMCustomer constructor.
* @param CreateLeadPerfexCRMObject $createLeadPerfexCRMObject
*/
public function __construct(CreateLeadPerfexCRMObject $createLeadPerfexCRMObject)
{
$this->createLeadPerfexCRMObject = $createLeadPerfexCRMObject;
}
public function handle()
{
$lead = (App()->make(FetchesPerfexCRMLead::class))->execute($this->createLeadPerfexCRMObject->getEmail());
if(!is_null($lead)){
(App()->make(UpdatesPerfexCRMLead::class))->execute($lead, $this->createLeadPerfexCRMObject->getCompanyReference());
}
else{
(App()->make(CreatePerfexCRMLeadProcessor::class))->execute($this->createLeadPerfexCRMObject);
}
}
}
@@ -0,0 +1,33 @@
<?php
namespace App\Classes\Jobs;
use App\Classes\Modules\PerfexCRM\Processors\CreatePerfexCRMInvoiceProcessor;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use App\Models\Transaction;
class CreatePerfexCRMInvoice implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/** @var Transaction $transaction*/
private $transaction;
/**
* CreatePerfexCRMInvoice constructor.
* @param Transaction $transaction
*/
public function __construct(Transaction $transaction)
{
$this->transaction = $transaction;
}
public function handle()
{
(App()->make(CreatePerfexCRMInvoiceProcessor::class))->execute($this->transaction);
}
}
@@ -0,0 +1,42 @@
<?php
namespace App\Classes\Jobs;
use App\Classes\Modules\PerfexCRM\Processors\CreatePerfexCRMTaskProcessor;
use App\Classes\Modules\PerfexCRM\Services\FetchesPerfexCRMLead;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CreateTaskPerfexCRMObject;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class CreatePerfexCRMSingleTask implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/** @var FetchesPerfexCRMLead */
private $fetchesPerfexCRMLead;
/** @var CreateTaskPerfexCRMObject */
private $createTaskPerfexCRMObject;
/**
* CreatePerfexCRMSingleTask constructor.
* @param CreateTaskPerfexCRMObject $createTaskPerfexCRMObject
*/
public function __construct(CreateTaskPerfexCRMObject $createTaskPerfexCRMObject)
{
$this->createTaskPerfexCRMObject = $createTaskPerfexCRMObject;
}
public function handle()
{
$lead = (App()->make(FetchesPerfexCRMLead::class))->execute($this->createTaskPerfexCRMObject->getEmail());
if(!is_null($lead))
{
$this->createTaskPerfexCRMObject->setLeadId($lead->id);
(App()->make(CreatePerfexCRMTaskProcessor::class))->execute($this->createTaskPerfexCRMObject);
}
}
}
@@ -2,8 +2,12 @@
namespace App\Classes\Jobs;
use App\Classes\Modules\PackingLists\Processors\FetchContainersFromYdPortalProcessor;
use App\Classes\Modules\PackingLists\Processors\FetchContainersUpdatesFromYdPortalProcessor;
use App\Classes\Modules\PackingLists\Processors\FetchDeliveryUpdatesFromYdPortalProcessor;
use App\Classes\Modules\PackingLists\Processors\FetchOrderListsFromYdPortalProcessor;
use App\Classes\Modules\PackingLists\Processors\FetchPackingListsFromYdPortalProcessor;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@@ -25,8 +29,12 @@ class FetchOrdersFromYDPortalJob implements ShouldQueue
*/
public function handle()
{
(App()->make(FetchPackingListsFromYdPortalProcessor::class))->execute();
(App()->make(FetchContainersFromYdPortalProcessor::class))->execute();
(App()->make(FetchContainersUpdatesFromYdPortalProcessor::class))->execute();
(App()->make(FetchDeliveryUpdatesFromYdPortalProcessor::class))->execute();
(App()->make(FetchOrderListsFromYdPortalProcessor::class))->execute();
// (App()->make(FetchOrderListsFromYdPortalProcessor::class))->execute();
}
}
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace App\Classes\Jobs;
use App\Classes\Modules\PerfexCRM\Processors\UpdatePerfexCRMProcessor;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMObject;
class UpdatePerfexCRM implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/** @var UpdatePerfexCRMObject */
private $updatePerfexCRMObject;
/**
* UpdatePerfexCRM constructor.
* @param UpdatePerfexCRMObject $updatePerfexCRMObject
*/
public function __construct(UpdatePerfexCRMObject $updatePerfexCRMObject)
{
$this->updatePerfexCRMObject = $updatePerfexCRMObject;
}
public function handle()
{
(App()->make(UpdatePerfexCRMProcessor::class))->execute($this->updatePerfexCRMObject);
}
}
+108
View File
@@ -0,0 +1,108 @@
<?php
namespace App\Classes\Jobs;
use App\Classes\Modules\PerfexCRM\Processors\CreatePerfexCRMInvoiceProcessor;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMInvoicePayment;
use App\Classes\Modules\PerfexCRM\Services\FetchesPerfexCRMCustomer;
use App\Classes\Modules\PerfexCRM\Services\FetchesPerfexCRMInvoice;
use App\Classes\Modules\PerfexCRM\Services\FetchesPerfexCRMProject;
use App\Classes\Modules\PerfexCRM\Services\UpdatesPerfexCRMInvoice;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMInvoiceObject;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\InvoicePaymentPerfexCRMObject;
use App\Classes\ValueObjects\Constants\PerfexCRMInvoiceStatus;
use App\Models\Transaction;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
class UpdatePerfexCRMInvoice implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/** @var UpdatePerfexCRMInvoiceObject */
private $updatePerfexCRMInvoiceObject;
/**
* CreatePerfexCRMSingleTask constructor.
* @param UpdatePerfexCRMInvoiceObject $createTaskPerfexCRMObject
*/
public function __construct(UpdatePerfexCRMInvoiceObject $updatePerfexCRMInvoiceObject)
{
$this->updatePerfexCRMInvoiceObject = $updatePerfexCRMInvoiceObject;
}
public function handle()
{
//get the client id
$customer = (App()->make(FetchesPerfexCRMCustomer::class))->execute($this->updatePerfexCRMInvoiceObject->getEmail());
$transaction = $this->updatePerfexCRMInvoiceObject->getTransaction();
//get the invoice id
$invoiceId = 0;
$invoiceStatus = 0;
$invoice = (App()->make(FetchesPerfexCRMInvoice::class))->execute($customer->userid,"INV-", $transaction->owner->bill_no);
if(is_null($invoice)){
$result = (App()->make(CreatePerfexCRMInvoiceProcessor::class))->execute($transaction->owner, $this->updatePerfexCRMInvoiceObject->getIsPaid());
$invoiceId = $result->payload['id'];
}
else{
$invoiceId = $invoice->id;
$invoiceStatus = $invoice->status;
//This only run when invoice already exist and the invoice does not have a PAID status
if($invoiceStatus != PerfexCRMInvoiceStatus::PAID){
//get project
$projectId = "";
$projectName = "";
if($transaction->owner instanceof Transaction){
$orderReference = $transaction->owner->owner->owner()->first()->reference;
$packingListReference = $transaction->owner->owner->reference;
$projectName = 'IZYIM | X1 Shipping | '.$orderReference.' | '.$packingListReference;
$result = (App()->make(FetchesPerfexCRMProject::class))->execute($projectName, $customer->userid);
if(isset($result->payload)){
$project = $result->payload[0];
$projectId = $project['id'];
}
}
if($projectId == ""){
Log::error(json_encode('UpdatePerfexCRMInvoice debug: '.$projectName));
Log::error(json_encode($transaction->owner));
}
//update invoice
(App()->make(UpdatesPerfexCRMInvoice::class))->execute($invoice, $projectId);
}
}
//create invoice payment
if($invoiceId != 0 && $invoiceStatus != PerfexCRMInvoiceStatus::PAID){
$date = Carbon::parse($transaction->created_at)->format('Y-m-d');
$invoicePaymentPerfexCRMObject = new InvoicePaymentPerfexCRMObject(
$invoiceId,
"$transaction->amount",
$date,
1,
"",
""
);
(App()->make(CreatesPerfexCRMInvoicePayment::class))->execute($invoicePaymentPerfexCRMObject);
}
}
public function delay($delay)
{
// Add delay in seconds to the job
$this->delay = $delay;
return $this;
}
}
@@ -0,0 +1,88 @@
<?php
namespace App\Classes\Jobs;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMObject;
use App\Models\PackingList;
use App\Models\Transaction;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
class UpdatePerfexCRMPrelude implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/** @var */
private $packingList;
/** @var */
private $transaction;
/** @var UpdatePerfexCRMObject */
private $updatePerfexCRMObject;
/** @var */
private $nextJob;
/**
* UpdatePerfexCRMPrelude constructor.
* @param $packingList
* @param $transaction
* @param UpdatePerfexCRMObject $updatePerfexCRMObject
* @param $nextJob
*/
public function __construct($packingList, $transaction, UpdatePerfexCRMObject $updatePerfexCRMObject, $nextJob)
{
$this->packingList = $packingList;
$this->transaction = $transaction;
$this->updatePerfexCRMObject = $updatePerfexCRMObject;
$this->nextJob = $nextJob;
}
public function handle()
{
if(is_null($this->packingList)){
$this->packingList = $this->transaction->owner->owner;
}
$amount = 0.00;
if(!is_null($this->transaction)){
$amount = $this->transaction->amount;
}
$data = [
'amount' => number_format($amount, 2, '.', ''),
'link_order' => config('app.url').'/order/show/'.$this->packingList->owner->reference,
'link_autocount_or' => 'https://docs.google.com/spreadsheets/d/1Q3rJBGQ9Bo04HZp5WR9zbLp7pIW2kfDYsabxG7JON-4/edit#gid=2013983170',
'link_perfex' => 'https://perfex.cief-malaysia.com/admin/projects/view/89',
];
$result = $this->replacePlaceholders($this->updatePerfexCRMObject->getTasks(), $data);
$this->updatePerfexCRMObject->setTasks($result);
$this->nextJob::dispatch($this->updatePerfexCRMObject);
}
function replacePlaceholders($template, $data, $prefix = '')
{
foreach ($template as $key => $value) {
foreach ($data as $dataKey => $dataValue) {
if (is_array($dataValue)) {
$template[$key] = $this->replacePlaceholders($template[$key], $dataValue, $dataKey);
} else {
if ($prefix != '') {
$template[$key] = str_replace('{' .$prefix. "." .$dataKey . '}', $dataValue, $template[$key]);
} else {
$template[$key] = str_replace('{' . $dataKey . '}', $dataValue, $template[$key]);
}
}
}
}
return $template;
}
}
@@ -8,23 +8,27 @@ use App\Classes\General\Services\GeneratesInitials;
use App\Classes\Modules\Accounts\Processors\AuthenticationProcessor;
use App\Classes\Modules\Accounts\Processors\CreateUserProcessor;
use App\Classes\Modules\Accounts\Processors\GenerateEmailVerificationAttemptProcessor;
use App\Classes\Modules\Companies\DataTransferObjects\CompanyConnectionObject;
use App\Classes\Modules\Companies\Processors\AssignEmployeeProcessor;
use App\Classes\Modules\Companies\Processors\CreateCompanyProcessor;
use App\Classes\Modules\Companies\Processors\CreateCompanyModuleProcessor;
use App\Classes\Modules\Companies\DataTransferObjects\EmploymentObject;
use App\Classes\Modules\Companies\Services\ApprovesCompanyConnection;
use App\Classes\Modules\Companies\Services\CreatesCompanyConnection;
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
use App\Classes\Modules\Contacts\Processors\CreateContactProcessor;
use App\Classes\Modules\PerfexCRM\Processors\CreatePerfexCRMLeadProcessor;
use App\Classes\Modules\Documents\Processors\UploadIdentityDocumentProcessor;
use App\Classes\Modules\Companies\DataTransferObjects\CompanyConnectionObject;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CreateLeadPerfexCRMObject;
use App\Classes\Modules\Companies\DataTransferObjects\EmploymentObject;
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\BusinessType;
use App\Classes\ValueObjects\Constants\CompanyType;
use App\Classes\ValueObjects\Constants\RoleTypes;
use App\Classes\Jobs\CreatePerfexCRMCustomer;
use App\Models\Company;
use App\Models\CompanyModule;
use App\Models\User;
@@ -80,6 +84,9 @@ class CreateCustomerLogic extends AbstractControllerLogic
/** @var FetchesCompanyModule */
private $fetchesCompanyModule;
/** @var CreatePerfexCRMLeadProcessor */
private $createPerfexCRMLeadProcessor;
/**
* CreateCustomerLogic constructor.
* @param CreateUserProcessor $createUserProcessor
@@ -93,8 +100,9 @@ class CreateCustomerLogic extends AbstractControllerLogic
* @param AuthenticationProcessor $authenticationProcessor
* @param GenerateEmailVerificationAttemptProcessor $generateEmailVerificationAttemptProcessor
* @param FetchesCompanyModule $fetchesCompanyModule
* @param CreatePerfexCRMLeadProcessor $createPerfexCRMLeadProcessor
*/
public function __construct(CreateUserProcessor $createUserProcessor, CreateCompanyProcessor $createCompanyProcessor, CreateCompanyModuleProcessor $createCompanyModuleProcessor, CreateContactProcessor $createContactProcessor, CreatesCompanyConnection $createsCompanyConnection, ApprovesCompanyConnection $approvesCompanyConnection, AssignEmployeeProcessor $assignEmployeeProcessor, UploadIdentityDocumentProcessor $uploadIdentityDocumentProcessor, AuthenticationProcessor $authenticationProcessor, GenerateEmailVerificationAttemptProcessor $generateEmailVerificationAttemptProcessor, FetchesCompanyModule $fetchesCompanyModule)
public function __construct(CreateUserProcessor $createUserProcessor, CreateCompanyProcessor $createCompanyProcessor, CreateCompanyModuleProcessor $createCompanyModuleProcessor, CreateContactProcessor $createContactProcessor, CreatesCompanyConnection $createsCompanyConnection, ApprovesCompanyConnection $approvesCompanyConnection, AssignEmployeeProcessor $assignEmployeeProcessor, UploadIdentityDocumentProcessor $uploadIdentityDocumentProcessor, AuthenticationProcessor $authenticationProcessor, GenerateEmailVerificationAttemptProcessor $generateEmailVerificationAttemptProcessor, FetchesCompanyModule $fetchesCompanyModule, CreatePerfexCRMLeadProcessor $createPerfexCRMLeadProcessor)
{
$this->createUserProcessor = $createUserProcessor;
$this->createCompanyProcessor = $createCompanyProcessor;
@@ -107,6 +115,7 @@ class CreateCustomerLogic extends AbstractControllerLogic
$this->authenticationProcessor = $authenticationProcessor;
$this->generateEmailVerificationAttemptProcessor = $generateEmailVerificationAttemptProcessor;
$this->fetchesCompanyModule = $fetchesCompanyModule;
$this->createPerfexCRMLeadProcessor = $createPerfexCRMLeadProcessor;
}
/**
@@ -146,6 +155,18 @@ class CreateCustomerLogic extends AbstractControllerLogic
$this->uploadIdentityDocumentProcessor->execute($request, $company);
if(config('perfexcrm.is_enabled') == 'true'){
// $this->createPerfexCRMLeadProcessor->execute($request);
$createLeadPerfexCRMObject = new CreateLeadPerfexCRMObject(
$request->input('name'),
$request->input('email'),
$request->input('phone'),
$request->input('type') === CompanyType::COMPANY_BUSINESS ? $request->input('company_name') : $request->input('name'),
$connection->invitee_reference
);
CreatePerfexCRMCustomer::dispatch($createLeadPerfexCRMObject);
}
// $this->generateEmailVerificationAttemptProcessor->execute($user);
return $this->response($this->authenticationProcessor->execute($request));
@@ -0,0 +1,63 @@
<?php
namespace App\Classes\Modules\Accounts\ControllersLogic;
use App\Classes\Modules\Accounts\Services\FetchesUser;
use App\Classes\Modules\Accounts\Standards\Rules\CanFetchUser;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Http\Resources\UserCompanyResource;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class FetchUserByEmailLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Fetch Users',
'message' => 'You have successfully retrieved the user by email'
];
}
/** @var CanFetchUser */
private $canFetchUser;
/** @var FetchesUser */
private $fetchesUser;
/**
* FetchUserByEmailLogic constructor.
* @param CanFetchUser $canFetchUser
* @param FetchesUser $fetchessUser
*/
public function __construct(CanFetchUser $canFetchUser, FetchesUser $fetchesUser)
{
$this->canFetchUser = $canFetchUser;
$this->fetchesUser = $fetchesUser;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic(Request $request) : JsonResponse
{
try {
$this->canFetchUser->passes();
$query = $this->fetchesUser->execute(['email' => $request->route('email')]);
return $this->resourceResponse(new UserCompanyResource($query));
} catch (\Exception $exception){
throw new ErrorException($exception->getMessage(), $exception->getCode());
}
}
}
@@ -0,0 +1,86 @@
<?php
namespace App\Classes\Modules\Addresses\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Addresses\Services\CreatesAddress;
use App\Classes\Modules\Addresses\Standards\Rules\CanCreateAddress;
use App\Classes\Modules\Addresses\DataTransferObjects\AddressObject;
use App\Classes\Modules\Addresses\Services\FetchesAddress;
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
use App\Classes\ValueObjects\Constants\AddressType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Http\Resources\AddressResource;
use App\Models\Address;
use App\Models\CompanyModule;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class CreateBillingAddressLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Created Billing Address',
'message' => 'You have successfully created a new Billing Address'
];
}
/** @var CanCreateAddress */
private $canCreateAddress;
/** @var FetchesCompanyModule */
private $fetchesCompanyModule;
/** @var CreatesAddress */
private $createsAddress;
/** @var FetchesAddress */
private $fetchesAddress;
/**
* CreateAddressLogic constructor.
* @param CanCreateAddress $canCreateAddress
* @param FetchesCompanyModule $fetchesCompanyModule
* @param CreatesAddress $createsAddress
* @param FetchesAddress $fetchesAddress
*/
public function __construct(CanCreateAddress $canCreateAddress, FetchesCompanyModule $fetchesCompanyModule, CreatesAddress $createsAddress, FetchesAddress $fetchesAddress)
{
$this->canCreateAddress = $canCreateAddress;
$this->fetchesCompanyModule = $fetchesCompanyModule;
$this->createsAddress = $createsAddress;
$this->fetchesAddress = $fetchesAddress;
}
/**
* @param Request $request
* @return JsonResponse
* @throws \App\Classes\Exceptions\AccessForbiddenException
* @throws \App\Classes\Exceptions\MalformedRequestException
* @throws \App\Classes\Exceptions\RequestValidationException
*/
public function logic(Request $request) : JsonResponse
{
$companyModule = $this->fetchesCompanyModule->execute(['id' => $request->input('company_module_id')]);
$address = $this->fetchesAddress->execute(['id' => $request->input('billing_address_id')]);
if ($address->type !== AddressType::BILLING || $address->id !== $companyModule->addresses->where('type', AddressType::BILLING)->first()->id) {
// delete all current billing address
Address::where('owner_type', CompanyModule::class)->where('owner_id', $request->input('company_module_id'))->where('type', AddressType::BILLING)->delete();
// create addrress
$billingAddress = new AddressObject($address->street_one, $address->street_two, $address->country_id, $address->state_id, $address->district_id, $address->postcode, AddressType::BILLING, ApprovalStatus::APPROVED, $address->reference);
$this->canCreateAddress->passes($billingAddress);
$this->createsAddress->execute($companyModule, $billingAddress);
}
return $this->resourceResponse(new AddressResource($address));
}
}
@@ -6,8 +6,6 @@ use App\Classes\Modules\Orders\Processors\UpdateDoFromVTPortalProcessor;
use App\Classes\Modules\Orders\Processors\UpdateDoFromYDPortalProcessor;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Wallets\Services\UpdatesWallet;
use App\Classes\Modules\Transactions\ControllersLogic\multipleInvoicesWithOnePaymentLogic;
use App\Classes\Exceptions\ResourceNotFoundException;
use App\Classes\Modules\Wallets\Services\UpdatesWalletBalance;
@@ -25,6 +23,7 @@ use App\Classes\Modules\Billplzs\DataTransferObjects\BillplzXSignatureObject;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Transactions\Services\FetchesTransaction;
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
use App\Classes\ValueObjects\Constants\TransactionType;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
@@ -46,10 +45,6 @@ class CallbackBillplzLogic
/** @var UpdateDoFromYDPortalProcessor */
private $updateDoFromYDPortalProcessor ;
/** @var UpdateDoFromYDPortalProcessor */
private $multipleInvoicesWithOnePaymentLogic ;
/**
* CallbackBillplzLogic constructor.
* @param GetBillplzBill $getBillplzBill
@@ -58,14 +53,13 @@ class CallbackBillplzLogic
* @param UpdateDoFromVTPortalProcessor $updateDoFromVTPortalProcessor
* @param UpdateDoFromYDPortalProcessor $updateDoFromYDPortalProcessor
*/
public function __construct(GetBillplzBill $getBillplzBill, FetchesTransaction $fetchesTransaction, UpdatesTransactionStatus $updatesTransactionStatus, UpdateDoFromVTPortalProcessor $updateDoFromVTPortalProcessor, UpdateDoFromYDPortalProcessor $updateDoFromYDPortalProcessor,multipleInvoicesWithOnePaymentLogic $multipleInvoicesWithOnePaymentLogic)
public function __construct(GetBillplzBill $getBillplzBill, FetchesTransaction $fetchesTransaction, UpdatesTransactionStatus $updatesTransactionStatus, UpdateDoFromVTPortalProcessor $updateDoFromVTPortalProcessor, UpdateDoFromYDPortalProcessor $updateDoFromYDPortalProcessor)
{
$this->getBillplzBill = $getBillplzBill;
$this->fetchesTransaction = $fetchesTransaction;
$this->updatesTransactionStatus = $updatesTransactionStatus;
$this->updateDoFromVTPortalProcessor = $updateDoFromVTPortalProcessor;
$this->updateDoFromYDPortalProcessor = $updateDoFromYDPortalProcessor;
$this->multipleInvoicesWithOnePaymentLogic= $multipleInvoicesWithOnePaymentLogic;
}
@@ -91,19 +85,12 @@ class CallbackBillplzLogic
$transaction = $this->fetchesTransaction->execute(['payment_reference' => $billplzXSignatureObject->getBillPlzId()]);
if ($transaction->type == 'topUp') {
$this->updatesTransactionStatus->execute($transaction, ApprovalStatus::APPROVED);
$this->multipleInvoicesWithOnePaymentLogic->verifypayment($transaction->id, $transaction->amount);
}
$invoice = $transaction->owner;
$packingList = $invoice->owner;
$order = $packingList->owner;
$status = ApprovalStatus::PENDING_VERIFICATION;
if($billPlz->state === 'paid') {
$status = ApprovalStatus::APPROVED;
}
@@ -115,9 +102,11 @@ class CallbackBillplzLogic
$token = Auth::fromUser(User::find(1));
$request->headers->set('Authorization', 'Bearer '.$token);
$this->updatesTransactionStatus->execute($transaction, ApprovalStatus::APPROVED);
$this->updatesTransactionStatus->execute($transaction, $status);
if(($invoice->amount - $transaction->amount) < 0.01) {
$totalPaidAmount = $invoice->transactions->where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount');
if(($invoice->amount - $totalPaidAmount) < 0.01) {
$this->updatesTransactionStatus->execute($invoice, ApprovalStatus::COMPLETED);
$packingList->status = ApprovalStatus::APPROVED;
@@ -132,7 +121,6 @@ class CallbackBillplzLogic
return $request->method() === 'POST' ? true : view('pages.payments_redirect', ['marking' => $order->reference, 'transaction' => $transaction, 'status' => $status]);
}
}
@@ -0,0 +1,88 @@
<?php
namespace App\Classes\Modules\Companies\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Companies\Services\UpdatesCompany;
use App\Classes\Modules\Companies\Services\UpdatesCompanyModuleName;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Companies\Standards\Rules\CanUpdateCompany;
use App\Classes\Modules\Companies\DataTransferObjects\CompanyObject;
use App\Classes\Modules\Companies\Services\UpdatesCompanyDebtor;
use App\Http\Resources\CompanyResource;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class UpdateCompanyNameAndDebtorLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Updated Company Name and Debtor',
'message' => 'You have successfully updated the Company'
];
}
/** @var CanUpdateCompany */
private $canUpdateCompany;
/** @var UpdatesCompany */
private $updatesCompany;
/** @var FetchesCompany */
private $fetchesCompany;
/** @var UpdatesCompanyDebtor */
private $updatesCompanyDebtor;
/** @var UpdatesCompanyModuleName */
private $updatesCompanyModuleName;
/**
* UpdateCompanyControllersLogic constructor.
* @param CanUpdateCompany $canUpdateCompany
* @param UpdatesCompany $updatesCompany
* @param FetchesCompany $fetchesCompany
* @param UpdatesCompanyDebtor $updatesCompanyDebtor
* @param UpdatesCompanyModuleName $updatesCompanyModuleName
*/
public function __construct(CanUpdateCompany $canUpdateCompany, UpdatesCompany $updatesCompany, FetchesCompany $fetchesCompany, UpdatesCompanyDebtor $updatesCompanyDebtor, UpdatesCompanyModuleName $updatesCompanyModuleName)
{
$this->canUpdateCompany = $canUpdateCompany;
$this->updatesCompany = $updatesCompany;
$this->fetchesCompany = $fetchesCompany;
$this->updatesCompanyDebtor = $updatesCompanyDebtor;
$this->updatesCompanyModuleName = $updatesCompanyModuleName;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic(Request $request) : JsonResponse
{
$object = new CompanyObject($request->input('name'), $request->input('reference'), $request->input('type'));
$this->canUpdateCompany->passes($object);
$query = $this->fetchesCompany->execute(['id' => $request->route('id')]);
$this->updatesCompanyModuleName->execute($query->companyModules()->first(), $object->getName());
$query = $this->updatesCompany->execute($query, $object);
if ($request->input('debtor') || $query->first()->debtor !== null) {
$this->updatesCompanyDebtor->execute($query, $request->input('debtor'));
}
return $this->resourceResponse(new CompanyResource($query));
}
}
@@ -0,0 +1,24 @@
<?php
namespace App\Classes\Modules\Companies\Services;
use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\Companies\DataTransferObjects\CompanyObject;
use App\Models\Company;
class UpdatesCompanyDebtor extends AbstractUpdateRecord
{
/**
* @param Company $model
* @param CompanyObject $object
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(Company $model, ?string $debtor)
{
$model->debtor = $debtor;
return $this->handler($model);
}
}
@@ -0,0 +1,84 @@
<?php
namespace App\Classes\Modules\Exports\Services;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Models\CompanyModule;
use App\Models\Company;
use App\Models\PackingList;
use Carbon\Carbon;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
use Illuminate\Http\Request;
class ExportsCustomerTotalOrderByYear implements FromCollection, WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize
{
use Exportable;
private $request;
public function __construct(Request $request)
{
$this->request = $request;
}
public function headings(): array
{
return [
'CompanyId',
'CompanyName',
'CompanyReference',
'TotalCbm'
];
}
/**
* @return \Illuminate\Support\Collection|mixed
*/
public function collection()
{
$packingLists = PackingList::where('type', PackingListType::SHIPPING_PACKING_LIST)->whereHas('containers', function($container){
return $container->where('loading_date', '>=', Carbon::parse('01-01-' . $this->request->route('year')))
->where('loading_date', '<=', Carbon::parse('31-12-' . $this->request->route('year')));
})->get();
$packingLists = $packingLists->groupBy(function ($packingList){
return $packingList->owner->company_module_id;
})->sortByDesc(function($companyModule){
return $companyModule->sum(function($packingList){
return $packingList->packages->sum(function ($package){
return (($package->width / 100) * ($package->height / 100) * ($package->length / 100)) * $package->quantity;
});
});
})->take(10);
return $packingLists;
}
/**
* @param $row
* @return array
*/
public function map($row): array
{
$companyModule = $row[0]->owner->companyModule;
$marking = $companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
$cbm = $row->sum(function($packingList){
return $packingList->packages->sum(function ($package){
return (($package->width / 100) * ($package->height / 100) * ($package->length / 100)) * $package->quantity;
});
});
return [
$companyModule->company_id,
$companyModule->name,
$marking,
$cbm
];
}
}
@@ -0,0 +1,108 @@
<?php
namespace App\Classes\Modules\Exports\Services;
use App\Models\CompanyConnection;
use App\Models\Container;
use App\Models\Order;
use App\Models\Package;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
use Maatwebsite\Excel\Concerns\WithMapping;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Carbon\Carbon;
class ExportsOrderSummaryByMarking implements FromCollection, WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize
{
use Exportable;
protected $customerMarking;
protected $dateFrom;
protected $dateTo;
public function headings(): array
{
return [
'Date',
'Container',
'Order Marking',
'Packing List Reference',
'Description',
'Quantity',
'L (cm)',
'H (cm)',
'W (cm)',
'CBM'
];
}
public function setParameters($customerMarking, $dateFrom, $dateTo)
{
$this->customerMarking = $customerMarking;
$this->dateFrom = $dateFrom;
$this->dateTo = $dateTo;
}
/**
* @return \Illuminate\Support\Collection|mixed
*/
public function collection()
{
$connection = CompanyConnection::where('invitee_reference', $this->customerMarking)->first();
$company_id = $connection->invitee->company->id;
$company_module_id = $connection->invitee->id;
$packagesArray = collect();
$orders = Order::where('company_module_id', $company_module_id);
if (isset($this->dateFrom) && isset($this->dateTo)) {
$from = Carbon::createFromFormat('d-m-Y', $this->dateFrom);
$to = Carbon::createFromFormat('d-m-Y', $this->dateTo);
$orders = $orders->whereBetween('created_at', [$from, $to]);
}
$orders = $orders->get();
foreach ($orders as $order){
$packingLists = $order->packingLists;
foreach ($packingLists as $packingList){
if($packingList->packingLists->first()){
$packingList = $packingList->packingLists->first();
}
$packages = $packingList->packages;
foreach ($packages as $package){
$packagesArray->push($package);
}
}
}
return $packagesArray;
}
/**
* @param Package $package
*
* @return array
*/
public function map($package): array
{
$packinglist = ($package->packingList()->first()->owner->owner_type == Order::class) ? $package->packingList()->first(): $package->packingList->owner;
$order = $packinglist->owner;
return [
Carbon::parse($package->created_at)->format('d-m-Y'),
'',
$order->reference,
$package->packingList->reference,
$package->description,
$package->quantity,
$package->length,
$package->height,
$package->width,
((($package->length / 100) * ($package->height / 100) * ($package->width / 100)) * $package->quantity)
];
}
}
@@ -60,7 +60,15 @@ class ExportsPaymentTransactions implements FromQuery, WithHeadings, WithHeading
$query = Transaction::query();
$query->where('type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [ApprovalStatus::COMPLETED]);
// paidInvoiceSection
$approvalStatus = ApprovalStatus::COMPLETED;
if ($this->request->route('section') == 'pendingPaymentSection') {
// pendingPaymentSection
$approvalStatus = ApprovalStatus::APPROVED;
}
$query->where('type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [$approvalStatus]);
if($start_date && $end_date) {
$query->whereBetween('updated_at', [
@@ -0,0 +1,58 @@
<?php
namespace App\Classes\Modules\Exports\Services;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Models\Order;
use App\Models\State;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\FromQuery;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
use Maatwebsite\Excel\Concerns\WithMapping;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Carbon\Carbon;
class ExportsWarehousePackingList implements FromQuery, WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize
{
use Exportable;
public function headings(): array
{
return [
'Customer Marking',
'Order Number'
];
}
/**
* @return \Illuminate\Support\Collection|mixed
*/
public function query()
{
$johor_state_id = State::where('name', 'johor')->first()->id;
return Order::whereHas('addresses', function($address) use ($johor_state_id){
$address->where('status', ApprovalStatus::APPROVED)->where('state_id', $johor_state_id);
})->whereHas('packingLists', function($packingLists) {
$packingLists->where('type', PackingListType::SHIPPING_PACKING_LIST)->whereDoesntHave('transports');
});
}
/**
* @param Order $order
*
* @return array
*/
public function map($order): array
{
$marking = $order->companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
return [
$marking,
$order->reference,
];
}
}
@@ -1,19 +0,0 @@
<?php
namespace App\Classes\Modules\Imports\Services;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use App\Classes\Modules\PackingLists\Processors\FetchOrderListsFromExcel;
class Importorder implements ToCollection
{
/**
* @param Collection $collection
*/
public function collection(Collection $collection)
{
// dd($collection);
(App()->make(FetchOrderListsFromExcel::class))->execute($collection);
}
}
@@ -7,6 +7,7 @@ use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Addresses\Services\FetchesAddress;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
use App\Classes\Modules\PerfexCRM\Processors\NewLeadTaskToPerfexCRMProcessor;
use App\Classes\Modules\Orders\Processors\CreateOrderProcessor;
use App\Classes\Modules\Orders\Services\GeneratesOrderNumber;
use App\Classes\ValueObjects\Constants\WarehouseReferences;
@@ -39,6 +40,8 @@ class CreateOrderLogic extends AbstractControllerLogic
/** @var GeneratesOrderNumber */
private $generatesOrderNumber;
/** @var NewLeadTaskToPerfexCRMProcessor */
private $newLeadTaskToPerfexCRMProcessor;
/**
* CreateOrderLogic constructor.
* @param FetchesCompany $fetchesCompany
@@ -46,22 +49,24 @@ class CreateOrderLogic extends AbstractControllerLogic
* @param CreateOrderProcessor $createOrderProcessor
* @param FetchesCompanyModule $fetchesCompanyModule
* @param GeneratesOrderNumber $generatesOrderNumber
* @param NewLeadTaskToPerfexCRMProcessor $newLeadTaskToPerfexCRMProcessor
*/
public function __construct(FetchesCompany $fetchesCompany, FetchesAddress $fetchesAddress, CreateOrderProcessor $createOrderProcessor, FetchesCompanyModule $fetchesCompanyModule, GeneratesOrderNumber $generatesOrderNumber)
public function __construct(FetchesCompany $fetchesCompany, FetchesAddress $fetchesAddress, CreateOrderProcessor $createOrderProcessor, FetchesCompanyModule $fetchesCompanyModule, GeneratesOrderNumber $generatesOrderNumber, NewLeadTaskToPerfexCRMProcessor $newLeadTaskToPerfexCRMProcessor)
{
$this->fetchesCompany = $fetchesCompany;
$this->fetchesAddress = $fetchesAddress;
$this->createOrderProcessor = $createOrderProcessor;
$this->fetchesCompanyModule = $fetchesCompanyModule;
$this->generatesOrderNumber = $generatesOrderNumber;
$this->newLeadTaskToPerfexCRMProcessor = $newLeadTaskToPerfexCRMProcessor;
}
public function logic(Request $request) : JsonResponse {
$company = $this->fetchesCompany->execute(['id' => $request->input('company_id')]);
$address = $this->fetchesAddress->execute(['id' => $request->input('address_id')]);
$originWarehouse = $this->fetchesCompanyModule->execute(['id' => $request->input('warehouse_id')]);
@@ -76,6 +81,10 @@ class CreateOrderLogic extends AbstractControllerLogic
$order = $this->createOrderProcessor->execute($company, $originWarehouse, $address, $this->generatesOrderNumber->execute());
if(config('perfexcrm.is_enabled') == 'true'){
$this->newLeadTaskToPerfexCRMProcessor->execute($company);
}
return $this->resourceResponse(new OrderResource($order));
}
}
@@ -14,12 +14,11 @@ class FetchesDataFromYDPortal
* @return \Psr\Http\Message\ResponseInterface
*/
public function clientRequest(string $url, string $method, $body){
$client = new \GuzzleHttp\Client();
$client = new \GuzzleHttp\Client();
$body['apicode'] = env('YD_API_CODE');
$request = $client->requestAsync($method, $url, ['query' => $body]);
$request = $client->requestAsync($method, $url, ['query' => $body, 'timeout' => 15]);
return $request->wait();
}
@@ -32,6 +31,7 @@ class FetchesDataFromYDPortal
$content = $request->getBody()->getContents();
$content = str_replace("\r",'', $content);
$content = str_replace("\n",'', $content);
$content = str_replace("\t",'', $content);
return json_decode($content);
}
}
}
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\PackingLists\Processors;
use App\Classes\General\Interfaces\Packable;
use App\Classes\Modules\PerfexCRM\Processors\PackingListToPerfexCRMProcessor;
use App\Classes\Modules\PackingLists\DataTransferObjects\PackingListObject;
use App\Classes\Modules\PackingLists\Services\CreatesPackingList;
use App\Classes\Modules\PackingLists\Standards\Rules\CanCreatePackingList;
@@ -25,16 +26,20 @@ class CreatePackingListProcessor
/** @var CreatesPackingList */
private $createsPackingList;
/** @var PackingListToPerfexCRMProcessor */
private $packingListToPerfexCRMProcessor;
/**
* CreatePackingListProcessor constructor.
* @param CanCreatePackingList $canCreatePackingList
* @param CreatesPackingList $createsPackingList
* @param PackingListToPerfexCRMProcessor $packingListToPerfexCRMProcessor
*/
public function __construct(CanCreatePackingList $canCreatePackingList, CreatesPackingList $createsPackingList)
public function __construct(CanCreatePackingList $canCreatePackingList, CreatesPackingList $createsPackingList, PackingListToPerfexCRMProcessor $packingListToPerfexCRMProcessor)
{
$this->canCreatePackingList = $canCreatePackingList;
$this->createsPackingList = $createsPackingList;
$this->packingListToPerfexCRMProcessor = $packingListToPerfexCRMProcessor;
}
/**
@@ -51,15 +56,19 @@ class CreatePackingListProcessor
/** @var PackingList $packingList */
$packingList = $this->createsPackingList->execute($object, $packable);
$appointee_id = $packingList->owner_id == 1 ? 2037 : $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_FREIGHT_FORWARDER)->first()->appointee->id;
$appointee_id = $packingList->owner_id == 1 ? 2307 : $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_FREIGHT_FORWARDER)->first()->appointee->id;
$type = $object->getType() === PackingListType::SHIPPING_PACKING_LIST ? PackingListType::SHIPPING_PACKING_LIST_REPLICA : PackingListType::WAREHOUSE_RECEIVE_LIST_REPLICA;
/** create packing list replica */
$object = new PackingListObject($object->getReference().'_01', $appointee_id, $type, ApprovalStatus::PENDING_SUBMISSION);
$this->createsPackingList->execute($object, $packingList);
if(config('perfexcrm.is_enabled') == 'true'){
$this->packingListToPerfexCRMProcessor->execute($packingList);
}
return $packingList;
}
}
}
@@ -0,0 +1,160 @@
<?php
namespace App\Classes\Modules\PackingLists\Processors;
use App\Classes\Exceptions\AccessForbiddenException;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\Exceptions\RequestValidationException;
use App\Classes\Exceptions\ResourceNotFoundException;
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
use App\Classes\Modules\Orders\Services\FetchesDataFromYDPortal;
use App\Classes\Modules\Orders\Services\FetchesOrder;
use App\Classes\Modules\PackingLists\DataTransferObjects\ContainerObject;
use App\Classes\Modules\PackingLists\DataTransferObjects\PackageObject;
use App\Classes\Modules\PackingLists\DataTransferObjects\PackingListObject;
use App\Classes\Modules\PackingLists\Services\Containers\FetchesContainer;
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject;
use App\Classes\Modules\Schedules\Services\CreatesSchedule;
use App\Classes\Modules\Steps\DataTransferObjects\StepsObject;
use App\Classes\Modules\Steps\Services\CreatesStep;
use App\Classes\Modules\Transports\DataTransferObjects\TransportObject;
use App\Classes\Modules\Transports\Services\CreatesTransport;
use App\Classes\Modules\Unity\Processors\ActivateContractProcessor;
use App\Classes\Modules\Unity\Processors\AssignContractEntityProcessor;
use App\Classes\Modules\Unity\Processors\CreateContractEntityProcessor;
use App\Classes\Modules\Unity\Services\CreatesContract;
use App\Classes\Modules\Unity\Services\UpdatesContractObligation;
use App\Classes\Notifications\ShipmentDepartureEmail;
use App\Classes\Notifications\ShipmentRescheduleEmail;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\ContainerTypes;
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
use App\Classes\ValueObjects\Constants\PackageType;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Classes\ValueObjects\Constants\TransportType;
use App\Classes\ValueObjects\Constants\WarehouseReferences;
use App\Models\Container;
use App\Models\Order;
use App\Models\PackingList;
use App\Models\Transport;
use Carbon\Carbon;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
class FetchContainersFromYdPortalProcessor
{
/** @var FetchesDataFromYDPortal */
private $fetchesDataFRomYDPortal;
/** @var CreatesTransport */
private $createsTransport;
/** @var CreatesSchedule */
private $createsSchedule;
/** @var FetchesContainer */
private $fetchesContainer;
/** @var CreateContainerProcessor */
private $createContainerProcessor;
/**
* @param FetchesDataFromYDPortal $fetchesDataFRomYDPortal
* @param CreatesTransport $createsTransport
* @param CreatesSchedule $createsSchedule
* @param FetchesContainer $fetchesContainer
* @param CreateContainerProcessor $createContainerProcessor
*/
public function __construct(FetchesDataFromYDPortal $fetchesDataFRomYDPortal, CreatesTransport $createsTransport, CreatesSchedule $createsSchedule, FetchesContainer $fetchesContainer, CreateContainerProcessor $createContainerProcessor)
{
$this->fetchesDataFRomYDPortal = $fetchesDataFRomYDPortal;
$this->createsTransport = $createsTransport;
$this->createsSchedule = $createsSchedule;
$this->fetchesContainer = $fetchesContainer;
$this->createContainerProcessor = $createContainerProcessor;
}
/**
* @return void
* @throws MalformedRequestException
* @throws AccessForbiddenException
* @throws RequestValidationException
*/
public function execute()
{
$packingLists = PackingList::where('type', PackingListType::SHIPPING_PACKING_LIST)->doesntHave('containers')->get();
foreach ($packingLists as $packingList) {
$time_start = microtime(true);
$containerReference = null;
$loadingDate = null;
$etd = null;
$eta = null;
$trackingRequest = $this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/ApiTracking.ashx', 'GET', [
'trakingno' => $packingList->reference
]);
$rows = $this->fetchesDataFRomYDPortal->getResponseBody($trackingRequest);
if(!$rows->data){
continue;
}
foreach (array_reverse($rows->data) as $trackingRow) {
if (strpos($trackingRow->tracking, '货物装柜完成。') !== false) {
$tracking = explode(':', $trackingRow->tracking);
$containerReference = explode('预计到港时间', $tracking[1])[0];
$loadingDate = Carbon::parse($trackingRow->trackingtime);
$etd = Carbon::parse($tracking[2])->subDays(5);
$eta = Carbon::parse($tracking[2])->addDays(2);
}
}
if($containerReference) {
try {
$container = $this->fetchesContainer->execute(['reference' => $containerReference]);
$container->packingLists()->detach($packingList);
$container->packingLists()->attach($packingList);
} catch (ResourceNotFoundException $exception){
if(!($packingList->owner instanceof Order)) continue;
$originWarehouse = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->appointee;
$containerObject = new ContainerObject($containerReference, '', '', ContainerTypes::FORTY_FEET_DRY_CONTAINER, $loadingDate, ApprovalStatus::PENDING_VERIFICATION);
/** @var Container $container */
$container = $this->createContainerProcessor->execute($containerObject, $originWarehouse);
$container->packingLists()->detach($packingList);
$container->packingLists()->attach($packingList);
$transport = $container->transports()->first();
if(!$transport){
$transportObject = new TransportObject(TransportType::SEA, null, null, $etd, null, ApprovalStatus::APPROVED);
/** @var Transport $transport */
$transport = $this->createsTransport->execute($transportObject, $container);
$this->createsSchedule->execute($transport, new ScheduleObject($etd, $eta, ApprovalStatus::APPROVED));
}
}
}
$time_end = microtime(true);
$execution_time = ($time_end - $time_start)/60;
echo 'successful => <b>Total Execution Time:</b> '.$execution_time.' Mins<br>';
}
}
}
@@ -0,0 +1,162 @@
<?php
namespace App\Classes\Modules\PackingLists\Processors;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\Modules\Orders\Services\FetchesDataFromYDPortal;
use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject;
use App\Classes\Modules\Schedules\Services\CreatesSchedule;
use App\Classes\Modules\Unity\Services\UpdatesContractObligation;
use App\Classes\Notifications\ShipmentRescheduleEmail;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
use App\Models\Container;
use App\Models\Order;
use App\Models\PackingList;
use Carbon\Carbon;
class FetchContainersUpdatesFromYdPortalProcessor
{
/** @var FetchesDataFromYDPortal */
private $fetchesDataFRomYDPortal;
/** @var UpdatesContractObligation */
private $updatesContractObligations;
/** @var CreatesSchedule */
private $createsSchedule;
/**
* @param FetchesDataFromYDPortal $fetchesDataFRomYDPortal
* @param UpdatesContractObligation $updatesContractObligations
* @param CreatesSchedule $createsSchedule
*/
public function __construct(FetchesDataFromYDPortal $fetchesDataFRomYDPortal, UpdatesContractObligation $updatesContractObligations, CreatesSchedule $createsSchedule)
{
$this->fetchesDataFRomYDPortal = $fetchesDataFRomYDPortal;
$this->updatesContractObligations = $updatesContractObligations;
$this->createsSchedule = $createsSchedule;
}
/**
* @return void
* @throws MalformedRequestException
*/
public function execute()
{
$containers = Container::where('status', ApprovalStatus::PENDING_VERIFICATION)->get();
foreach ($containers as $container) {
$time_start = microtime(true);
$packingList = $container->packingLists()->random();
$trackingRequest = $this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/ApiTracking.ashx', 'GET', [
'trakingno' => $packingList->reference
]);
$rows = $this->fetchesDataFRomYDPortal->getResponseBody($trackingRequest);
if(!$rows->data){
continue;
}
$unstuffingDate = null;
$delayDate = null;
foreach (array_reverse($rows->data) as $trackingRow) {
$rescheduleETD = strpos($trackingRow->remark, '开') || strpos($trackingRow->remark, '到港');
$rescheduleETA = strpos($trackingRow->remark, '到港');
if (($rescheduleETD !== false || $rescheduleETA !== false) && strpos($trackingRow->tracking, '货物装柜完成。') === false) {
preg_match_all('/([0-9]+.{3})/', $trackingRow->remark, $matches);
$dates = collect();
foreach($matches[0] as $date){
try {
$dates->push(Carbon::parse(str_replace('.', '/', $date).Carbon::now()->format('Y')));
} catch (\Exception $exception) {
continue;
}
}
$rescheduleDate = $dates->sortDesc()->first();
if(!$delayDate || $rescheduleDate > $delayDate){
/** @var Carbon $delayDate */
$delayDate = $rescheduleDate;
if($rescheduleETA === false && $delayDate) {
$delayDate = $delayDate->addDays('5');
}
}
}
if ($trackingRow->tracking === '到港') {
$delayDate = Carbon::parse($trackingRow->trackingtime);
}
if ($trackingRow->tracking === '已开船') {
$delayDate = Carbon::parse($trackingRow->trackingtime)->addDays('5');
}
if ($trackingRow->tracking === '货物已进目的港仓库') {
$unstuffingDate = Carbon::parse($trackingRow->trackingtime);
}
}
if($delayDate){
$delayDate = $delayDate->addDays(2);
$transport = $container->transports()->first();
if(!$transport->schedules()->whereDate('eta', '>=', $delayDate)->first()) {
$etd = $transport->schedules()->where('status', '=', ApprovalStatus::APPROVED)->first()->etd;
$transport->schedules()->update(['status' => ApprovalStatus::EXPIRED]);
$this->createsSchedule->execute($transport, new ScheduleObject($etd, $delayDate, ApprovalStatus::APPROVED));
foreach ($container->packingLists as $packingList){
if(!($packingList->owner instanceof Order)) continue;
$user = $packingList->owner->companyModule->employees()->first();
if(app()->environment(['production'])) {
$user->notify(new ShipmentRescheduleEmail($user, $packingList));
}
}
}
}
if($unstuffingDate){
$container->update(['status' => ApprovalStatus::COMPLETED]);
$container->transports()->first()->update(['drop_date' => $unstuffingDate, 'status' => ApprovalStatus::COMPLETED]);
/** @var PackingList $packingList */
foreach($container->packingLists as $packingList){
if($packingList->status === ApprovalStatus::PENDING_VERIFICATION){
$packingList->status = ApprovalStatus::APPROVED;
$packingList->save();
}
if(!($packingList->owner instanceof Order)) continue;
$signature = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->entity_sigiture;
foreach($packingList->steps()->where('reference', '!=', 'DELIVERY')->get() as $step){
$this->updatesContractObligations->execute($signature, $step->obligation_hash_id);
$step->update(['status' => ApprovalStatus::COMPLETED]);
}
}
}
$time_end = microtime(true);
$execution_time = ($time_end - $time_start)/60;
echo 'successful => <b>Total Execution Time:</b> '.$execution_time.' Mins<br>';
}
}
}
@@ -0,0 +1,115 @@
<?php
namespace App\Classes\Modules\PackingLists\Processors;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject;
use App\Classes\Modules\Schedules\Services\CreatesSchedule;
use App\Classes\Modules\Transports\DataTransferObjects\TransportObject;
use App\Classes\Modules\Transports\Services\CreatesTransport;
use App\Classes\Modules\Unity\Services\UpdatesContractObligation;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Classes\ValueObjects\Constants\TransportType;
use App\Classes\ValueObjects\Constants\WarehouseReferences;
use App\Models\CompanyModule;
use App\Models\Order;
use App\Models\PackingList;
use App\Models\Transport;
use Carbon\Carbon;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
class FetchDeliveryUpdatesFromYdPortalProcessor
{
/** @var UpdatesContractObligation */
private $updatesContractObligations;
/** @var CreatesTransport */
private $createsTransport;
/** @var CreatesSchedule */
private $createsSchedule;
/**
* @param UpdatesContractObligation $updatesContractObligations
* @param CreatesTransport $createsTransport
* @param CreatesSchedule $createsSchedule
*/
public function __construct(UpdatesContractObligation $updatesContractObligations, CreatesTransport $createsTransport, CreatesSchedule $createsSchedule)
{
$this->updatesContractObligations = $updatesContractObligations;
$this->createsTransport = $createsTransport;
$this->createsSchedule = $createsSchedule;
}
/**
* @return void
* @throws MalformedRequestException
* @throws GuzzleException
*/
public function execute()
{
$packingLists = PackingList::where('type', PackingListType::SHIPPING_PACKING_LIST)->whereRaw('LENGTH(reference) > 12')->whereHas('containers', function ($container){
return $container->where('status', 3);
})->doesntHave('transports')->get()->reverse();
foreach ($packingLists->chunk(50) as $chunk) {
foreach ($chunk as $packingList){
if(!$packingList->reference) continue;
$time_start = microtime(true);
$deliveryDate = null;
try {
$client = new \GuzzleHttp\Client(['cookies' => true, 'headers' => ['Cookie' => 'utc_offset=480']]);
$request = $client->request('get', 'https://main.universe.com.my/Tracking/User/Paging?sEcho=1&sTrackingNo='.$packingList->reference.'&sOrgId=sti', ['timeout' => 3]);
$deliveryTracking = json_decode($request->getBody()->getContents());
foreach (array_reverse($deliveryTracking->aaData) as $trackingRow) {
$trackingDate = Carbon::createFromFormat('d/m/y H:i', $trackingRow->LocalDateTime);
if (Str::contains($trackingRow->PublicDescription, ['delivered'])) {
$deliveryDate = $trackingDate;
}
}
} catch (\Exception $exception){
dump($exception);
Log::debug('failed to fetch delivery tracking');
}
if($deliveryDate){
$packingList->status = ApprovalStatus::COMPLETED;
$packingList->save();
$deliveryDate = Carbon::parse($deliveryDate);
$transportObject = new TransportObject(TransportType::LAND, null, null, $deliveryDate, $deliveryDate, ApprovalStatus::APPROVED);
/** @var Transport $transport */
$transport = $this->createsTransport->execute($transportObject, $packingList);
$this->createsSchedule->execute($transport, new ScheduleObject($deliveryDate, $deliveryDate, ApprovalStatus::APPROVED));
if(!($packingList->owner instanceof Order)) continue;
$deliveryStep = $packingList->steps()->where('reference', '=', 'LAST_MILE_DELIVERY')->first();
$signature = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->entity_sigiture;
$this->updatesContractObligations->execute($signature, $deliveryStep->obligation_hash_id);
$deliveryStep->update(['status' => ApprovalStatus::COMPLETED]);
}
$time_end = microtime(true);
$execution_time = ($time_end - $time_start)/60;
echo 'successful => <b>Total Execution Time:</b> '.$execution_time.' Mins<br>';
}
}
}
}
@@ -264,7 +264,7 @@ class FetchLoadedContainersFromVTPortalProcessor
//
// $this->unityAssignContractEntity->execute($supervisorContractEntity->hash_id, $contractObligations);
} else {
$appointee_id = 2037;
$appointee_id = 2307;
}
$packingListObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::SHIPPING_PACKING_LIST, ApprovalStatus::SUSPENDED, null);
@@ -1,488 +0,0 @@
<?php
namespace App\Classes\Modules\PackingLists\Processors;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\Exceptions\ResourceNotFoundException;
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
use App\Classes\Modules\Orders\Services\FetchesDataFromYDPortal;
use App\Classes\Modules\Orders\Services\FetchesOrder;
use App\Classes\Modules\PackingLists\DataTransferObjects\ContainerObject;
use App\Classes\Modules\PackingLists\DataTransferObjects\PackageObject;
use App\Classes\Modules\PackingLists\DataTransferObjects\PackingListObject;
use App\Classes\Modules\PackingLists\Services\Containers\FetchesContainer;
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
use App\Classes\Modules\Schedules\DataTransferObjects\ScheduleObject;
use App\Classes\Modules\Schedules\Services\CreatesSchedule;
use App\Classes\Modules\Steps\DataTransferObjects\StepsObject;
use App\Classes\Modules\Steps\Services\CreatesStep;
use App\Classes\Modules\Transports\DataTransferObjects\TransportObject;
use App\Classes\Modules\Transports\Services\CreatesTransport;
use App\Classes\Modules\Unity\Processors\ActivateContractProcessor;
use App\Classes\Modules\Unity\Processors\AssignContractEntityProcessor;
use App\Classes\Modules\Unity\Processors\CreateContractEntityProcessor;
use App\Classes\Modules\Unity\Services\CreatesContract;
use App\Classes\Modules\Unity\Services\UpdatesContractObligation;
use App\Classes\Notifications\ShipmentDepartureEmail;
use App\Classes\Notifications\ShipmentRescheduleEmail;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\ContainerTypes;
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
use App\Classes\ValueObjects\Constants\PackageType;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Classes\ValueObjects\Constants\TransportType;
use App\Models\Container;
use App\Models\Order;
use App\Models\PackingList;
use App\Models\Transport;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
class FetchOrderListsFromExcel
{
/** @var FetchesDataFromYDPortal */
private $fetchesDataFRomYDPortal;
/** @var FetchesOrder */
private $fetchesOrder;
/** @var UpdatesContractObligation */
private $updatesContractObligations;
/** @var CreatePackingListProcessor */
private $createPackingListProcessor;
/** @var CreatePackageProcessor */
private $createPackageProcessor;
/** @var CreatesTransport */
private $createsTransport;
/** @var CreatesSchedule */
private $createsSchedule;
/** @var FetchesContainer */
private $fetchesContainer;
/** @var FetchesPackingList */
private $fetchesPackingList;
/** @var FetchesCompanyModule */
private $fetchesCompanyModule;
/** @var CreateContainerProcessor */
private $createContainerProcessor;
/** @var CreatesContract */
private $unityCreateContract;
/** @var AssignContractEntityProcessor */
private $unityAssignContractEntity;
/** @var CreateContractEntityProcessor */
private $unityCreateContractEntity;
/** @var CreatesStep */
private $createsStep;
/** @var ActivateContractProcessor */
private $unityActivateContract;
/**
* FetchOrderListsFromYdPortalProcessor constructor.
* @param FetchesDataFromYDPortal $fetchesDataFRomYDPortal
* @param FetchesOrder $fetchesOrder
* @param UpdatesContractObligation $updatesContractObligations
* @param CreatePackingListProcessor $createPackingListProcessor
* @param CreatePackageProcessor $createPackageProcessor
* @param CreatesTransport $createsTransport
* @param CreatesSchedule $createsSchedule
* @param FetchesContainer $fetchesContainer
* @param FetchesPackingList $fetchesPackingList
* @param FetchesCompanyModule $fetchesCompanyModule
* @param CreateContainerProcessor $createContainerProcessor
* @param CreatesContract $unityCreateContract
* @param AssignContractEntityProcessor $unityAssignContractEntity
* @param CreateContractEntityProcessor $unityCreateContractEntity
* @param CreatesStep $createsStep
* @param ActivateContractProcessor $unityActivateContract
*/
public function __construct(FetchesDataFromYDPortal $fetchesDataFRomYDPortal , FetchesOrder $fetchesOrder, UpdatesContractObligation $updatesContractObligations, CreatePackingListProcessor $createPackingListProcessor, CreatePackageProcessor $createPackageProcessor, CreatesTransport $createsTransport, CreatesSchedule $createsSchedule, FetchesContainer $fetchesContainer, FetchesPackingList $fetchesPackingList, FetchesCompanyModule $fetchesCompanyModule, CreateContainerProcessor $createContainerProcessor, CreatesContract $unityCreateContract, AssignContractEntityProcessor $unityAssignContractEntity, CreateContractEntityProcessor $unityCreateContractEntity, CreatesStep $createsStep, ActivateContractProcessor $unityActivateContract)
{
$this->fetchesDataFRomYDPortal = $fetchesDataFRomYDPortal;
$this->fetchesOrder = $fetchesOrder;
$this->updatesContractObligations = $updatesContractObligations;
$this->createPackingListProcessor = $createPackingListProcessor;
$this->createPackageProcessor = $createPackageProcessor;
$this->createsTransport = $createsTransport;
$this->createsSchedule = $createsSchedule;
$this->fetchesContainer = $fetchesContainer;
$this->fetchesPackingList = $fetchesPackingList;
$this->fetchesCompanyModule = $fetchesCompanyModule;
$this->createContainerProcessor = $createContainerProcessor;
$this->unityCreateContract = $unityCreateContract;
$this->unityAssignContractEntity = $unityAssignContractEntity;
$this->unityCreateContractEntity = $unityCreateContractEntity;
$this->createsStep = $createsStep;
$this->unityActivateContract = $unityActivateContract;
}
/**
* @param Carbon|null $start
* @param Carbon|null $end
* @return void
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function execute( $excelData )
{
try {
// dd($start);
// $start = $start ? $start : Carbon::today()->subDays(30);
// $startLimit = Carbon::parse('01-12-2021');
// if($start->isBefore($startLimit)){
// $start = $startLimit;
// }
// $end = $end ? $end : Carbon::today()->addDay();
// $orderRequest = $this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/GetOrderList.ashx', 'GET', [
// 'begintime' => $start->timestamp,
// 'endtime' => $end->timestamp,
// ]);
// $rows = $this->fetchesDataFRomYDPortal->getResponseBody($orderRequest);
foreach($excelData as $row){
if("expressno"!= $row[0] && $row[0] != null){
// dd($row[0]);
$containerReference = null;
$loadingDate = null;
$unstuffingDate = null;
$deliveryDate = null;
$etd = null;
$eta = null;
$delayDate = null;
$trackingRequest = $this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/ApiTracking.ashx', 'GET', [
'trakingno' => $row[0]
]);
$rows = $this->fetchesDataFRomYDPortal->getResponseBody($trackingRequest);
if($rows->data == null){
continue;
}else{
dd($rows);
}
}else{
continue;
}
if(!$rows){
continue;
}
foreach (array_reverse($rows->data) as $trackingRow) {
if ($trackingRow->tracking === '货物已送达仓库准备入库中') {
$receiveDate = Carbon::parse($trackingRow->trackingtime);
}
if (strpos($trackingRow->tracking, '货物装柜完成。') !== false) {
$tracking = explode(':', $trackingRow->tracking);
$containerReference = explode('预计到港时间', $tracking[1])[0];
$loadingDate = Carbon::parse($trackingRow->trackingtime);
$etd = Carbon::parse($tracking[2])->subDays(5);
$eta = Carbon::parse($tracking[2])->addDays(2);
}
$rescheduleETD = strpos($trackingRow->remark, '开') || strpos($trackingRow->remark, '到港');
$rescheduleETA = strpos($trackingRow->remark, '到港');
if (($rescheduleETD !== false || $rescheduleETA !== false) && strpos($trackingRow->tracking, '货物装柜完成。') === false) {
preg_match_all('/([0-9]+.{3})/', $trackingRow->remark, $matches);
$dates = collect();
foreach($matches[0] as $date){
try {
$dates->push(Carbon::parse(str_replace('.', '/', $date).Carbon::now()->format('Y')));
} catch (\Exception $exception) {
continue;
}
}
$rescheduleDate = $dates->sortDesc()->first();
if(!$delayDate || $rescheduleDate > $delayDate){
/** @var Carbon $delayDate */
$delayDate = $rescheduleDate;
if($rescheduleETA === false && $delayDate) {
$delayDate = $delayDate->addDays('5');
}
}
}
if ($trackingRow->tracking === '到港') {
$delayDate = Carbon::parse($trackingRow->trackingtime);
}
if ($trackingRow->tracking === '已开船') {
$delayDate = Carbon::parse($trackingRow->trackingtime)->addDays('5');
}
if ($trackingRow->tracking === '货物已进目的港仓库') {
$unstuffingDate = Carbon::parse($trackingRow->trackingtime);
}
if (Str::contains($trackingRow->tracking, ['派送中', '已签收', '签收完成', ' 第三方提货', '货物已派送完成', '派送', 'delivery', 'delivered'])) {
$deliveryDate = Carbon::parse($trackingRow->trackingtime);
}
}
$client = new \GuzzleHttp\Client(['cookies' => true, 'headers' => ['Cookie' => 'utc_offset=480']]);
try {
$request = $client->request('get', 'https://main.universe.com.my/Tracking/User/Paging?sEcho=1&sTrackingNo='.$row->expressno.'&sOrgId=sti');
$deliveryTracking = json_decode($request->getBody()->getContents());
foreach (array_reverse($deliveryTracking->aaData) as $trackingRow) {
$trackingDate = Carbon::createFromFormat('d/m/y H:i', $trackingRow->LocalDateTime);
if (Str::contains($trackingRow->PublicDescription, ['accepted/picked'])){
$unstuffingDate = $trackingDate;
}
if (Str::contains($trackingRow->PublicDescription, ['delivered'])) {
$deliveryDate = $trackingDate;
}
}
} catch (\Exception $exception){
Log::debug('failed to fetch delivery tracking');
}
$customerno = preg_split('(-|\(|\)|\/)', $row->customerno);
$orderNumber = $customerno[array_key_last($customerno)];
$allow_contract = true;
try {
$order = $this->fetchesOrder->execute(['reference' => $orderNumber]);
} catch (ResourceNotFoundException $exception) {
try {
$order = $this->fetchesOrder->execute(['reference' => substr($orderNumber, -9)]);
} catch (ResourceNotFoundException $exception) {
$order = $this->fetchesCompanyModule->execute(['id' => 1]);
$allow_contract = false;
}
}
$packingListReference = $row->expressno;
try{
$packingList = $this->fetchesPackingList->execute(['reference' => $row->expressno, 'type' => PackingListType::SHIPPING_PACKING_LIST]);
$packingList->packages()->delete();
$replica = $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
if($replica) $replica->packages()->delete();
$warehouseReceiveList = $this->fetchesPackingList->execute(['reference' => $row->expressno, 'type' => PackingListType::WAREHOUSE_RECEIVE_LIST]);
$warehouseReceiveList->packages()->delete();
$replica = $warehouseReceiveList->packingLists()->where('type', PackingListType::WAREHOUSE_RECEIVE_LIST_REPLICA)->first();
if($replica) $replica->packages()->delete();
} catch (ResourceNotFoundException $exception) {
if (!$allow_contract) {
$appointee_id = 2037;
} else {
$appointee_id = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_FREIGHT_FORWARDER)->first()->appointee->id;
}
$warehouseReceiveObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::WAREHOUSE_RECEIVE_LIST, $allow_contract ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
/** @var PackingList $warehouseReceiveList */
$warehouseReceiveList = $this->createPackingListProcessor->execute($warehouseReceiveObject, $order);
$transportObject = new TransportObject(TransportType::LAND, null, $row->kuaidilist, Carbon::parse($receiveDate), Carbon::parse($receiveDate), $allow_contract ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
$transport = $this->createsTransport->execute($transportObject, $warehouseReceiveList);
if ($allow_contract) {
$contract = $this->unityCreateContract->execute();
$contractReference = $contract->hash_id;
$contractObligations = $contract->contract_obligation_list;
$this->unityActivateContract->execute($contractReference);
$supervisorHashId = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->unity_hash_id;
$supervisorContractEntity = $this->unityCreateContractEntity->execute($contractReference, $supervisorHashId);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->update(['entity_hash_id' => $supervisorContractEntity->hash_id, 'entity_signature' => $supervisorContractEntity->entity_signature_hash_id]);
$importerContractEntity = $this->unityCreateContractEntity->execute($contractReference, $order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->appointee->unity_hash_id);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->update(['entity_hash_id' => $importerContractEntity->hash_id, 'entity_signature' => $importerContractEntity->entity_signature_hash_id]);
$this->unityAssignContractEntity->execute($supervisorContractEntity->hash_id, $contractObligations);
}
$packingListObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::SHIPPING_PACKING_LIST, ApprovalStatus::SUSPENDED, !$allow_contract ? null : $contractReference);
/** @var PackingList $packingList */
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
if ($allow_contract) {
foreach ($contractObligations as $obligation) {
$stepObject = new StepsObject($order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->id, $obligation->reference, $obligation->sequence, $obligation->hash_id);
$this->createsStep->execute($packingList, $stepObject);
}
}
}
foreach($row->deliverysize as $package) {
$packageObject = new PackageObject(PackageType::CARTON, $row->goodname, (float) $package->width, (float) $package->height, (float) $package->length, 0, (float) $package->num, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $warehouseReceiveList);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
if(!count($row->deliverysize)){
$measurement = round(((float) $row->volume / (float) $row->goodcount) ** (1/3) * 100, 2);
$packageObject = new PackageObject(PackageType::CARTON, $row->goodname, (float) $measurement, (float) $measurement, (float) $measurement, 0, (float) $row->goodcount, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $warehouseReceiveList);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
$weightCbm = (float) $row->weight / 500;
$overWeightCbm = $weightCbm - $packingList->packages()->sum(DB::raw('(width/100) * (height/100) * (length/100) * quantity'));
if($overWeightCbm > 0){
$measurement = round($overWeightCbm ** (1/3) * 100, 2);
$packageObject = new PackageObject(PackageType::OVER_WEIGHT, 'Overweight CBM', (float) $measurement, (float) $measurement, (float) $measurement, 0, 1, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
if($order instanceof Order){
$marking = $order->companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
if(!in_array($marking, ['1290CSW', '8997ITB', '3992WHE', '962LOW', '1152AAT'])){
$this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/confirmsendorder.ashx', 'GET', [
'expressno' => $row->expressno
]);
}
}
if($containerReference) {
try {
$container = $this->fetchesContainer->execute(['reference' => $containerReference]);
$container->packingLists()->detach($packingList);
$container->packingLists()->attach($packingList);
} catch (ResourceNotFoundException $exception){
if (!$allow_contract) {
$appointee_id = 2037;
}
else {
$appointee_id = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->appointee->id;
}
$originWarehouse = $this->fetchesCompanyModule->execute(['id' => $appointee_id]);
$containerObject = new ContainerObject($containerReference, '', '', ContainerTypes::FORTY_FEET_DRY_CONTAINER, $loadingDate, ApprovalStatus::PENDING_VERIFICATION);
/** @var Container $container */
$container = $this->createContainerProcessor->execute($containerObject, $originWarehouse);
$container->packingLists()->detach($packingList);
$container->packingLists()->attach($packingList);
$transport = $container->transports()->first();
if(!$transport){
$transportObject = new TransportObject(TransportType::SEA, null, null, $etd, null, ApprovalStatus::APPROVED);
/** @var Transport $transport */
$transport = $this->createsTransport->execute($transportObject, $container);
$this->createsSchedule->execute($transport, new ScheduleObject($etd, $eta, ApprovalStatus::APPROVED));
}
}
if($delayDate){
$delayDate = $delayDate->addDays(2);
$transport = $container->transports()->first();
if(!$transport->schedules()->whereDate('eta', '>=', $delayDate)->first()) {
$etd = $transport->schedules()->where('status', '=', ApprovalStatus::APPROVED)->first()->etd;
$transport->schedules()->update(['status' => ApprovalStatus::EXPIRED]);
$this->createsSchedule->execute($transport, new ScheduleObject($etd, $delayDate, ApprovalStatus::APPROVED));
foreach ($container->packingLists as $packingList){
if(!($packingList->owner instanceof Order)) continue;
$user = $packingList->owner->companyModule->employees()->first();
if(app()->environment(['production'])) {
$user->notify(new ShipmentRescheduleEmail($user, $packingList));
}
}
}
}
if($unstuffingDate && $container->status !== ApprovalStatus::COMPLETED){
$container->update(['status' => ApprovalStatus::COMPLETED]);
$container->transports()->first()->update(['drop_date' => $unstuffingDate, 'status' => ApprovalStatus::COMPLETED]);
/** @var PackingList $packingList */
foreach($container->packingLists as $packingList){
if($packingList->status === ApprovalStatus::PENDING_VERIFICATION){
$packingList->status = ApprovalStatus::APPROVED;
$packingList->save();
}
if ($allow_contract) {
$signature = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->entity_sigiture;
foreach($packingList->steps()->where('reference', '!=', 'DELIVERY')->get() as $step){
$this->updatesContractObligations->execute($signature, $step->obligation_hash_id);
$step->update(['status' => ApprovalStatus::COMPLETED]);
}
}
}
}
}
if($deliveryDate && !$packingList->transports()->exists()){
$packingList->status = ApprovalStatus::COMPLETED;
$packingList->save();
$deliveryDate = Carbon::parse($deliveryDate);
$transportObject = new TransportObject(TransportType::LAND, null, null, $deliveryDate, $deliveryDate, ApprovalStatus::APPROVED);
/** @var Transport $transport */
$transport = $this->createsTransport->execute($transportObject, $packingList);
$this->createsSchedule->execute($transport, new ScheduleObject($deliveryDate, $deliveryDate, ApprovalStatus::APPROVED));
if ($allow_contract) {
$deliveryStep = $packingList->steps()->where('reference', '=', 'LAST_MILE_DELIVERY')->first();
$signature = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->entity_sigiture;
$this->updatesContractObligations->execute($signature, $deliveryStep->obligation_hash_id);
$deliveryStep->update(['status' => ApprovalStatus::COMPLETED]);
}
}
echo 'successful';
}
} catch (\Exception $exception) {
Log::debug($exception);
}
}
}
@@ -139,336 +139,360 @@ class FetchOrderListsFromYdPortalProcessor
*/
public function execute(?Carbon $start = null, ?Carbon $end = null)
{
try {
$start = $start ? $start : Carbon::today()->subDays(30);
ini_set('max_execution_time', '900');
// $missingOrders = ['M202302161513122', 'YW202302161027442', 'YW202302151637022', 'M202302151605025', 'M202302151527103', 'M202302151527356', 'M202302151556019', 'YW202302151520241', 'YW202302151445068', 'M202302151359169', 'YW202302151349223', 'YW202302151336520', 'M202302151334316', 'YW202302151148129', 'M202302151145379', 'M202302151142411', 'M202302151037036', 'M202302151036398', 'M202302150919406', 'M202302141535009', 'YW202302141532318', 'M202302141319463', 'M202302141319045', 'YW202302141405471', 'M202302141334494', 'YW202302141321569', 'YW202302141323005', 'M202302141309053', 'M202302140905116', 'M202302141039558', 'M202302141022333', 'YW202302140943182', 'YW202302140923485', 'YW202302131728233', 'YW202302131702040', 'M202302131649417', 'M202302131638056', 'YW202302131601110', 'YW202302131530436', 'YW202302131411338', 'YW202302131355161', 'YW202302131312526', 'M202302130859076', 'M202302111708070', 'M202302111455134', 'M202302111457501', 'M202302111444041', 'M202302111506514', 'M202302111440286', 'M202302111354585', 'M202302111055551', 'M202302110900216', 'YW202302101743112', 'M202302091559443', 'M202302101716374', 'M202302101700402', 'M202302101633570', 'M202302101612095', 'M202302101611408', 'M202302101542340', 'M202302101408370', 'M202302101323341', 'M202302101129532', 'M202302101025109', 'M202302101006595', 'M202302091706357', 'YW202302091255022', 'YW202302091448196', 'YW202302091446431', 'M202302091138154', 'M202302091129396', 'YW202302091028175', 'M202302091006545', 'YW202302090942033', 'YW202302081743094', 'M202302081530599', 'M202302081531210', 'M202302081508571', 'YW202302081530492', 'M202302081500361', 'M202302081253105', 'M202302081303370', 'M202302071636303', 'M202302071741187', 'YW202302071735407', 'M202302071706323', 'M202302071537501', 'M202302071538092', 'YW202302071516453', 'M202302071311314', 'M202302071148154', 'YW202302071136018', 'M202302071036027', 'M202302071008010', 'M202302061742178', 'M202302061615198', 'M202302061502093', 'M202302061458532', 'M202302061552141', 'M202302061548431', 'M202302061555033', 'YW202302061404567', 'M202302061322463', 'M202302061042556', 'M202302061021277', 'M202302060917276', 'M202302041551570', 'M202302041552382', 'YW202302041515257', 'M202302041405502', 'M202302041030185', 'YW202302041215576', 'YW202302041058469', 'YW202302041024459', 'YW202302040939568', 'M202302031701053', 'M202302031700316', 'M202302031430562', 'M202302031431535', 'M202302031147213', 'YW202302031406529', 'YW202302031322256', 'M202302021718554', 'M202302021417415', 'YW202302021404542', 'M202302021055324', 'YW202302021037462', 'M202302011613381', 'M202302011347586', 'M202302011348245', 'M202301151635132', 'M202301141803516', 'YW202301141653536', 'M202301131504477', 'M202301131538220', 'M202301121327453', 'YW202301111153183', 'M202301091649543', 'M202212311641071', 'YW202212211532191', 'YW202212191605226'];
$startLimit = Carbon::parse('01-12-2021');
$from = $end ? Carbon::today()->diff($end)->days : 0;
$to = $start ? Carbon::today()->diff($start)->days : 10;
if($start->isBefore($startLimit)){
$start = $startLimit;
}
for ($x = $from; $x <= $to; $x++) {
try {
$startDate = Carbon::today()->subDays($x);
$end = $end ? $end : Carbon::today()->addDay();
$startLimit = Carbon::parse('01-12-2021');
$orderRequest = $this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/GetOrderList.ashx', 'GET', [
'begintime' => $start->timestamp,
'endtime' => $end->timestamp,
]);
if($startDate->isBefore($startLimit)){
$startDate = $startLimit;
}
$rows = $this->fetchesDataFRomYDPortal->getResponseBody($orderRequest);
$endDate = Carbon::today()->subDays($x - 1);
foreach($rows->data as $row){
$containerReference = null;
$loadingDate = null;
$unstuffingDate = null;
$deliveryDate = null;
$etd = null;
$eta = null;
$delayDate = null;
$trackingRequest = $this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/ApiTracking.ashx', 'GET', [
'trakingno' => $row->expressno
$orderRequest = $this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/GetOrderList.ashx', 'GET', [
'begintime' => $startDate->timestamp,
'endtime' => $endDate->timestamp,
]);
$rows = $this->fetchesDataFRomYDPortal->getResponseBody($trackingRequest);
$rows = $this->fetchesDataFRomYDPortal->getResponseBody($orderRequest);
if(!$rows){
continue;
}
if(!$rows->data) continue;
foreach (array_reverse($rows->data) as $trackingRow) {
if ($trackingRow->tracking === '货物已送达仓库准备入库中') {
$receiveDate = Carbon::parse($trackingRow->trackingtime);
}
foreach($rows->data as $row){
$time_start = microtime(true);
if (strpos($trackingRow->tracking, '货物装柜完成。') !== false) {
$tracking = explode(':', $trackingRow->tracking);
$containerReference = explode('预计到港时间', $tracking[1])[0];
$loadingDate = Carbon::parse($trackingRow->trackingtime);
$etd = Carbon::parse($tracking[2])->subDays(5);
$eta = Carbon::parse($tracking[2])->addDays(2);
}
$containerReference = null;
$loadingDate = null;
$unstuffingDate = null;
$deliveryDate = null;
$etd = null;
$eta = null;
$delayDate = null;
$status = $row->status;
$rescheduleETD = strpos($trackingRow->remark, '开') || strpos($trackingRow->remark, '到港');
$rescheduleETA = strpos($trackingRow->remark, '到港');
if (($rescheduleETD !== false || $rescheduleETA !== false) && strpos($trackingRow->tracking, '货物装柜完成。') === false) {
preg_match_all('/([0-9]+.{3})/', $trackingRow->remark, $matches);
$dates = collect();
foreach($matches[0] as $date){
try {
$dates->push(Carbon::parse(str_replace('.', '/', $date).Carbon::now()->format('Y')));
} catch (\Exception $exception) {
continue;
}
}
$rescheduleDate = $dates->sortDesc()->first();
if(!$delayDate || $rescheduleDate > $delayDate){
/** @var Carbon $delayDate */
$delayDate = $rescheduleDate;
if($rescheduleETA === false && $delayDate) {
$delayDate = $delayDate->addDays('5');
}
}
}
if ($trackingRow->tracking === '到港') {
$delayDate = Carbon::parse($trackingRow->trackingtime);
}
if ($trackingRow->tracking === '已开船') {
$delayDate = Carbon::parse($trackingRow->trackingtime)->addDays('5');
}
if ($trackingRow->tracking === '货物已进目的港仓库') {
$unstuffingDate = Carbon::parse($trackingRow->trackingtime);
}
if (Str::contains($trackingRow->tracking, ['派送中', '已签收', '签收完成', ' 第三方提货', '货物已派送完成', '派送', 'delivery', 'delivered'])) {
$deliveryDate = Carbon::parse($trackingRow->trackingtime);
}
}
$client = new \GuzzleHttp\Client(['cookies' => true, 'headers' => ['Cookie' => 'utc_offset=480']]);
try {
$request = $client->request('get', 'https://main.universe.com.my/Tracking/User/Paging?sEcho=1&sTrackingNo='.$row->expressno.'&sOrgId=sti');
$deliveryTracking = json_decode($request->getBody()->getContents());
foreach (array_reverse($deliveryTracking->aaData) as $trackingRow) {
$trackingDate = Carbon::createFromFormat('d/m/y H:i', $trackingRow->LocalDateTime);
if (Str::contains($trackingRow->PublicDescription, ['accepted/picked'])){
$unstuffingDate = $trackingDate;
}
if (Str::contains($trackingRow->PublicDescription, ['delivered'])) {
$deliveryDate = $trackingDate;
}
}
} catch (\Exception $exception){
Log::debug('failed to fetch delivery tracking');
}
$customerno = preg_split('(-|\(|\)|\/)', $row->customerno);
$orderNumber = $customerno[array_key_last($customerno)];
$allow_contract = true;
try {
$order = $this->fetchesOrder->execute(['reference' => $orderNumber]);
} catch (ResourceNotFoundException $exception) {
try {
$order = $this->fetchesOrder->execute(['reference' => substr($orderNumber, -9)]);
} catch (ResourceNotFoundException $exception) {
$order = $this->fetchesCompanyModule->execute(['id' => 1]);
$allow_contract = false;
}
}
$packingListReference = $row->expressno;
try{
$packingList = $this->fetchesPackingList->execute(['reference' => $row->expressno, 'type' => PackingListType::SHIPPING_PACKING_LIST]);
$packingList->packages()->delete();
$replica = $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
if($replica) $replica->packages()->delete();
$warehouseReceiveList = $this->fetchesPackingList->execute(['reference' => $row->expressno, 'type' => PackingListType::WAREHOUSE_RECEIVE_LIST]);
$warehouseReceiveList->packages()->delete();
$replica = $warehouseReceiveList->packingLists()->where('type', PackingListType::WAREHOUSE_RECEIVE_LIST_REPLICA)->first();
if($replica) $replica->packages()->delete();
} catch (ResourceNotFoundException $exception) {
if (!$allow_contract) {
$appointee_id = 2037;
} else {
$appointee_id = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_FREIGHT_FORWARDER)->first()->appointee->id;
}
$warehouseReceiveObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::WAREHOUSE_RECEIVE_LIST, $allow_contract ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
/** @var PackingList $warehouseReceiveList */
$warehouseReceiveList = $this->createPackingListProcessor->execute($warehouseReceiveObject, $order);
$transportObject = new TransportObject(TransportType::LAND, null, $row->kuaidilist, Carbon::parse($receiveDate), Carbon::parse($receiveDate), $allow_contract ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
$transport = $this->createsTransport->execute($transportObject, $warehouseReceiveList);
if ($allow_contract) {
$contract = $this->unityCreateContract->execute();
$contractReference = $contract->hash_id;
$contractObligations = $contract->contract_obligation_list;
$this->unityActivateContract->execute($contractReference);
$supervisorHashId = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->unity_hash_id;
$supervisorContractEntity = $this->unityCreateContractEntity->execute($contractReference, $supervisorHashId);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->update(['entity_hash_id' => $supervisorContractEntity->hash_id, 'entity_signature' => $supervisorContractEntity->entity_signature_hash_id]);
$importerContractEntity = $this->unityCreateContractEntity->execute($contractReference, $order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->appointee->unity_hash_id);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->update(['entity_hash_id' => $importerContractEntity->hash_id, 'entity_signature' => $importerContractEntity->entity_signature_hash_id]);
$this->unityAssignContractEntity->execute($supervisorContractEntity->hash_id, $contractObligations);
}
$packingListObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::SHIPPING_PACKING_LIST, ApprovalStatus::SUSPENDED, !$allow_contract ? null : $contractReference);
/** @var PackingList $packingList */
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
if ($allow_contract) {
foreach ($contractObligations as $obligation) {
$stepObject = new StepsObject($order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->id, $obligation->reference, $obligation->sequence, $obligation->hash_id);
$this->createsStep->execute($packingList, $stepObject);
}
}
}
foreach($row->deliverysize as $package) {
$packageObject = new PackageObject(PackageType::CARTON, $row->goodname, (float) $package->width, (float) $package->height, (float) $package->length, 0, (float) $package->num, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $warehouseReceiveList);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
if(!count($row->deliverysize)){
$measurement = round(((float) $row->volume / (float) $row->goodcount) ** (1/3) * 100, 2);
$packageObject = new PackageObject(PackageType::CARTON, $row->goodname, (float) $measurement, (float) $measurement, (float) $measurement, 0, (float) $row->goodcount, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $warehouseReceiveList);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
$weightCbm = (float) $row->weight / 500;
$overWeightCbm = $weightCbm - $packingList->packages()->sum(DB::raw('(width/100) * (height/100) * (length/100) * quantity'));
if($overWeightCbm > 0){
$measurement = round($overWeightCbm ** (1/3) * 100, 2);
$packageObject = new PackageObject(PackageType::OVER_WEIGHT, 'Overweight CBM', (float) $measurement, (float) $measurement, (float) $measurement, 0, 1, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
if($order instanceof Order){
$marking = $order->companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
if(!in_array($marking, ['1290CSW', '8997ITB', '3992WHE', '962LOW', '1152AAT'])){
$this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/confirmsendorder.ashx', 'GET', [
'expressno' => $row->expressno
if($status >= 3){
$trackingRequest = $this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/ApiTracking.ashx', 'GET', [
'trakingno' => $row->expressno
]);
$rows = $this->fetchesDataFRomYDPortal->getResponseBody($trackingRequest);
if(!$rows){
continue;
}
foreach (array_reverse($rows->data) as $trackingRow) {
if ($trackingRow->tracking === '货物已送达仓库准备入库中') {
$receiveDate = Carbon::parse($trackingRow->trackingtime);
}
if (strpos($trackingRow->tracking, '货物装柜完成。') !== false) {
$tracking = explode(':', $trackingRow->tracking);
$containerReference = explode('预计到港时间', $tracking[1])[0];
$loadingDate = Carbon::parse($trackingRow->trackingtime);
$etd = Carbon::parse($tracking[2])->subDays(5);
$eta = Carbon::parse($tracking[2])->addDays(2);
}
$rescheduleETD = strpos($trackingRow->remark, '开') || strpos($trackingRow->remark, '到港');
$rescheduleETA = strpos($trackingRow->remark, '到港');
if (($rescheduleETD !== false || $rescheduleETA !== false) && strpos($trackingRow->tracking, '货物装柜完成。') === false) {
preg_match_all('/([0-9]+.{3})/', $trackingRow->remark, $matches);
$dates = collect();
foreach($matches[0] as $date){
try {
$dates->push(Carbon::parse(str_replace('.', '/', $date).Carbon::now()->format('Y')));
} catch (\Exception $exception) {
continue;
}
}
$rescheduleDate = $dates->sortDesc()->first();
if(!$delayDate || $rescheduleDate > $delayDate){
/** @var Carbon $delayDate */
$delayDate = $rescheduleDate;
if($rescheduleETA === false && $delayDate) {
$delayDate = $delayDate->addDays('5');
}
}
}
if ($trackingRow->tracking === '到港') {
$delayDate = Carbon::parse($trackingRow->trackingtime);
}
if ($trackingRow->tracking === '已开船') {
$delayDate = Carbon::parse($trackingRow->trackingtime)->addDays('5');
}
if ($trackingRow->tracking === '货物已进目的港仓库') {
$unstuffingDate = Carbon::parse($trackingRow->trackingtime);
}
if (Str::contains($trackingRow->tracking, ['派送中', '已签收', '签收完成', ' 第三方提货', '货物已派送完成', '派送', 'delivery', 'delivered'])) {
$deliveryDate = Carbon::parse($trackingRow->trackingtime);
}
}
}
}
if($status >= 5){
$client = new \GuzzleHttp\Client(['cookies' => true, 'headers' => ['Cookie' => 'utc_offset=480']]);
try {
$request = $client->request('get', 'https://main.universe.com.my/Tracking/User/Paging?sEcho=1&sTrackingNo='.$row->expressno.'&sOrgId=sti');
$deliveryTracking = json_decode($request->getBody()->getContents());
foreach (array_reverse($deliveryTracking->aaData) as $trackingRow) {
$trackingDate = Carbon::createFromFormat('d/m/y H:i', $trackingRow->LocalDateTime);
if (Str::contains($trackingRow->PublicDescription, ['accepted/picked'])){
$unstuffingDate = $trackingDate;
}
if (Str::contains($trackingRow->PublicDescription, ['delivered'])) {
$deliveryDate = $trackingDate;
}
}
} catch (\Exception $exception){
Log::debug('failed to fetch delivery tracking');
}
}
$customerno = preg_split('(-|\(|\)|\/)', $row->customerno);
$orderNumber = $customerno[array_key_last($customerno)];
$allow_contract = true;
if($containerReference) {
try {
$container = $this->fetchesContainer->execute(['reference' => $containerReference]);
$container->packingLists()->detach($packingList);
$container->packingLists()->attach($packingList);
} catch (ResourceNotFoundException $exception){
$order = $this->fetchesOrder->execute(['reference' => $orderNumber]);
} catch (ResourceNotFoundException $exception) {
try {
$order = $this->fetchesOrder->execute(['reference' => substr($orderNumber, -9)]);
} catch (ResourceNotFoundException $exception) {
$order = $this->fetchesCompanyModule->execute(['id' => 1]);
$allow_contract = false;
}
}
$packingListReference = $row->expressno;
try{
$packingList = $this->fetchesPackingList->execute(['reference' => $row->expressno, 'type' => PackingListType::SHIPPING_PACKING_LIST]);
$packingList->packages()->delete();
$replica = $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
if($replica) $replica->packages()->delete();
$warehouseReceiveList = $this->fetchesPackingList->execute(['reference' => $row->expressno, 'type' => PackingListType::WAREHOUSE_RECEIVE_LIST]);
$warehouseReceiveList->packages()->delete();
$replica = $warehouseReceiveList->packingLists()->where('type', PackingListType::WAREHOUSE_RECEIVE_LIST_REPLICA)->first();
if($replica) $replica->packages()->delete();
} catch (ResourceNotFoundException $exception) {
if (!$allow_contract) {
$appointee_id = 2037;
}
else {
$appointee_id = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->appointee->id;
$appointee_id = 2307;
} else {
$appointee_id = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_FREIGHT_FORWARDER)->first()->appointee->id;
}
$originWarehouse = $this->fetchesCompanyModule->execute(['id' => $appointee_id]);
$warehouseReceiveObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::WAREHOUSE_RECEIVE_LIST, $allow_contract ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
$containerObject = new ContainerObject($containerReference, '', '', ContainerTypes::FORTY_FEET_DRY_CONTAINER, $loadingDate, ApprovalStatus::PENDING_VERIFICATION);
/** @var Container $container */
$container = $this->createContainerProcessor->execute($containerObject, $originWarehouse);
/** @var PackingList $warehouseReceiveList */
$warehouseReceiveList = $this->createPackingListProcessor->execute($warehouseReceiveObject, $order);
$container->packingLists()->detach($packingList);
$container->packingLists()->attach($packingList);
$transportObject = new TransportObject(TransportType::LAND, null, $row->kuaidilist, Carbon::parse($receiveDate), Carbon::parse($receiveDate), $allow_contract ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
$transport = $this->createsTransport->execute($transportObject, $warehouseReceiveList);
$transport = $container->transports()->first();
if ($allow_contract) {
if(!$transport){
$transportObject = new TransportObject(TransportType::SEA, null, null, $etd, null, ApprovalStatus::APPROVED);
/** @var Transport $transport */
$transport = $this->createsTransport->execute($transportObject, $container);
$this->createsSchedule->execute($transport, new ScheduleObject($etd, $eta, ApprovalStatus::APPROVED));
}
}
$contract = $this->unityCreateContract->execute();
if($delayDate){
$delayDate = $delayDate->addDays(2);
$transport = $container->transports()->first();
$contractReference = $contract->hash_id;
$contractObligations = $contract->contract_obligation_list;
if(!$transport->schedules()->whereDate('eta', '>=', $delayDate)->first()) {
$etd = $transport->schedules()->where('status', '=', ApprovalStatus::APPROVED)->first()->etd;
$transport->schedules()->update(['status' => ApprovalStatus::EXPIRED]);
$this->createsSchedule->execute($transport, new ScheduleObject($etd, $delayDate, ApprovalStatus::APPROVED));
foreach ($container->packingLists as $packingList){
if(!($packingList->owner instanceof Order)) continue;
$user = $packingList->owner->companyModule->employees()->first();
if(app()->environment(['production'])) {
$user->notify(new ShipmentRescheduleEmail($user, $packingList));
}
}
$this->unityActivateContract->execute($contractReference);
$supervisorHashId = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->unity_hash_id;
$supervisorContractEntity = $this->unityCreateContractEntity->execute($contractReference, $supervisorHashId);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->update(['entity_hash_id' => $supervisorContractEntity->hash_id, 'entity_signature' => $supervisorContractEntity->entity_signature_hash_id]);
$importerContractEntity = $this->unityCreateContractEntity->execute($contractReference, $order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->appointee->unity_hash_id);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->update(['entity_hash_id' => $importerContractEntity->hash_id, 'entity_signature' => $importerContractEntity->entity_signature_hash_id]);
$this->unityAssignContractEntity->execute($supervisorContractEntity->hash_id, $contractObligations);
}
}
if($unstuffingDate && $container->status !== ApprovalStatus::COMPLETED){
$container->update(['status' => ApprovalStatus::COMPLETED]);
$container->transports()->first()->update(['drop_date' => $unstuffingDate, 'status' => ApprovalStatus::COMPLETED]);
$packingListObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::SHIPPING_PACKING_LIST, ApprovalStatus::SUSPENDED, !$allow_contract ? null : $contractReference);
/** @var PackingList $packingList */
foreach($container->packingLists as $packingList){
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
if($packingList->status === ApprovalStatus::PENDING_VERIFICATION){
$packingList->status = ApprovalStatus::APPROVED;
$packingList->save();
if ($allow_contract) {
foreach ($contractObligations as $obligation) {
$stepObject = new StepsObject($order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->id, $obligation->reference, $obligation->sequence, $obligation->hash_id);
$this->createsStep->execute($packingList, $stepObject);
}
}
}
foreach($row->deliverysize as $package) {
$packageObject = new PackageObject(PackageType::CARTON, $row->goodname, (float) $package->width, (float) $package->height, (float) $package->length, 0, (float) $package->num, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $warehouseReceiveList);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
if(!count($row->deliverysize)){
$measurement = round(((float) $row->volume / (float) $row->goodcount) ** (1/3) * 100, 2);
$packageObject = new PackageObject(PackageType::CARTON, $row->goodname, (float) $measurement, (float) $measurement, (float) $measurement, 0, (float) $row->goodcount, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $warehouseReceiveList);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
$weightCbm = (float) $row->weight / 500;
$overWeightCbm = $weightCbm - $packingList->packages()->sum(DB::raw('(width/100) * (height/100) * (length/100) * quantity'));
if($overWeightCbm > 0){
$measurement = round($overWeightCbm ** (1/3) * 100, 2);
$packageObject = new PackageObject(PackageType::OVER_WEIGHT, 'Overweight CBM', (float) $measurement, (float) $measurement, (float) $measurement, 0, 1, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
if($order instanceof Order){
$marking = $order->companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
if(!in_array($marking, ['1290CSW', '8997ITB', '3992WHE', '962LOW', '1152AAT'])){
$this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/confirmsendorder.ashx', 'GET', [
'expressno' => $row->expressno
]);
}
}
if($containerReference) {
try {
$container = $this->fetchesContainer->execute(['reference' => $containerReference]);
$container->packingLists()->detach($packingList);
$container->packingLists()->attach($packingList);
} catch (ResourceNotFoundException $exception){
if (!$allow_contract) {
$appointee_id = 2307;
}
else {
$appointee_id = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->appointee->id;
}
if ($allow_contract) {
$signature = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->entity_sigiture;
foreach($packingList->steps()->where('reference', '!=', 'DELIVERY')->get() as $step){
$this->updatesContractObligations->execute($signature, $step->obligation_hash_id);
$step->update(['status' => ApprovalStatus::COMPLETED]);
$originWarehouse = $this->fetchesCompanyModule->execute(['id' => $appointee_id]);
$containerObject = new ContainerObject($containerReference, '', '', ContainerTypes::FORTY_FEET_DRY_CONTAINER, $loadingDate, ApprovalStatus::PENDING_VERIFICATION);
/** @var Container $container */
$container = $this->createContainerProcessor->execute($containerObject, $originWarehouse);
$container->packingLists()->detach($packingList);
$container->packingLists()->attach($packingList);
$transport = $container->transports()->first();
if(!$transport){
$transportObject = new TransportObject(TransportType::SEA, null, null, $etd, null, ApprovalStatus::APPROVED);
/** @var Transport $transport */
$transport = $this->createsTransport->execute($transportObject, $container);
$this->createsSchedule->execute($transport, new ScheduleObject($etd, $eta, ApprovalStatus::APPROVED));
}
}
if($delayDate){
$delayDate = $delayDate->addDays(2);
$transport = $container->transports()->first();
if(!$transport->schedules()->whereDate('eta', '>=', $delayDate)->first()) {
$etd = $transport->schedules()->where('status', '=', ApprovalStatus::APPROVED)->first()->etd;
$transport->schedules()->update(['status' => ApprovalStatus::EXPIRED]);
$this->createsSchedule->execute($transport, new ScheduleObject($etd, $delayDate, ApprovalStatus::APPROVED));
foreach ($container->packingLists as $packingList){
if(!($packingList->owner instanceof Order)) continue;
$user = $packingList->owner->companyModule->employees()->first();
if(app()->environment(['production'])) {
$user->notify(new ShipmentRescheduleEmail($user, $packingList));
}
}
}
}
if($unstuffingDate && $container->status !== ApprovalStatus::COMPLETED){
$container->update(['status' => ApprovalStatus::COMPLETED]);
$container->transports()->first()->update(['drop_date' => $unstuffingDate, 'status' => ApprovalStatus::COMPLETED]);
/** @var PackingList $packingList */
foreach($container->packingLists as $packingList){
if($packingList->status === ApprovalStatus::PENDING_VERIFICATION){
$packingList->status = ApprovalStatus::APPROVED;
$packingList->save();
}
if ($allow_contract) {
$signature = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->entity_sigiture;
foreach($packingList->steps()->where('reference', '!=', 'DELIVERY')->get() as $step){
$this->updatesContractObligations->execute($signature, $step->obligation_hash_id);
$step->update(['status' => ApprovalStatus::COMPLETED]);
}
}
}
}
}
}
if($deliveryDate && !$packingList->transports()->exists()){
$packingList->status = ApprovalStatus::COMPLETED;
$packingList->save();
if($deliveryDate && !$packingList->transports()->exists()){
$packingList->status = ApprovalStatus::COMPLETED;
$packingList->save();
$deliveryDate = Carbon::parse($deliveryDate);
$transportObject = new TransportObject(TransportType::LAND, null, null, $deliveryDate, $deliveryDate, ApprovalStatus::APPROVED);
/** @var Transport $transport */
$transport = $this->createsTransport->execute($transportObject, $packingList);
$this->createsSchedule->execute($transport, new ScheduleObject($deliveryDate, $deliveryDate, ApprovalStatus::APPROVED));
$deliveryDate = Carbon::parse($deliveryDate);
$transportObject = new TransportObject(TransportType::LAND, null, null, $deliveryDate, $deliveryDate, ApprovalStatus::APPROVED);
/** @var Transport $transport */
$transport = $this->createsTransport->execute($transportObject, $packingList);
$this->createsSchedule->execute($transport, new ScheduleObject($deliveryDate, $deliveryDate, ApprovalStatus::APPROVED));
if ($allow_contract) {
$deliveryStep = $packingList->steps()->where('reference', '=', 'LAST_MILE_DELIVERY')->first();
$signature = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->entity_sigiture;
$this->updatesContractObligations->execute($signature, $deliveryStep->obligation_hash_id);
$deliveryStep->update(['status' => ApprovalStatus::COMPLETED]);
if ($allow_contract) {
$deliveryStep = $packingList->steps()->where('reference', '=', 'LAST_MILE_DELIVERY')->first();
$signature = $packingList->owner->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->entity_sigiture;
$this->updatesContractObligations->execute($signature, $deliveryStep->obligation_hash_id);
$deliveryStep->update(['status' => ApprovalStatus::COMPLETED]);
}
}
$time_end = microtime(true);
$execution_time = ($time_end - $time_start)/60;
echo '<b>Total Execution Time:</b> '.$execution_time.' Mins';
echo 'successful';
}
echo 'successful';
} catch (\Exception $exception) {
Log::debug($exception);
}
} catch (\Exception $exception) {
Log::debug($exception);
}
}
}
@@ -66,7 +66,6 @@ class FetchPackingListFromVTPortalProcessor
}
} catch (GuzzleException $exception) {
dd($exception);
Log::error($exception);
continue;
}
@@ -0,0 +1,267 @@
<?php
namespace App\Classes\Modules\PackingLists\Processors;
use App\Classes\Exceptions\ResourceNotFoundException;
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
use App\Classes\Modules\Orders\Services\FetchesDataFromYDPortal;
use App\Classes\Modules\Orders\Services\FetchesOrder;
use App\Classes\Modules\PackingLists\DataTransferObjects\PackageObject;
use App\Classes\Modules\PackingLists\DataTransferObjects\PackingListObject;
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
use App\Classes\Modules\Steps\DataTransferObjects\StepsObject;
use App\Classes\Modules\Steps\Services\CreatesStep;
use App\Classes\Modules\Transports\DataTransferObjects\TransportObject;
use App\Classes\Modules\Transports\Services\CreatesTransport;
use App\Classes\Modules\Unity\Processors\ActivateContractProcessor;
use App\Classes\Modules\Unity\Processors\AssignContractEntityProcessor;
use App\Classes\Modules\Unity\Processors\CreateContractEntityProcessor;
use App\Classes\Modules\Unity\Services\CreatesContract;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
use App\Classes\ValueObjects\Constants\PackageType;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Classes\ValueObjects\Constants\TransportType;
use App\Models\Order;
use App\Models\PackingList;
use Carbon\Carbon;
use GuzzleHttp\Exception\GuzzleException;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
class FetchPackingListsFromYdPortalProcessor
{
/** @var FetchesDataFromYDPortal */
private $fetchesDataFRomYDPortal;
/** @var FetchesOrder */
private $fetchesOrder;
/** @var CreatePackingListProcessor */
private $createPackingListProcessor;
/** @var CreatePackageProcessor */
private $createPackageProcessor;
/** @var CreatesTransport */
private $createsTransport;
/** @var FetchesPackingList */
private $fetchesPackingList;
/** @var FetchesCompanyModule */
private $fetchesCompanyModule;
/** @var CreatesContract */
private $unityCreateContract;
/** @var AssignContractEntityProcessor */
private $unityAssignContractEntity;
/** @var CreateContractEntityProcessor */
private $unityCreateContractEntity;
/** @var CreatesStep */
private $createsStep;
/** @var ActivateContractProcessor */
private $unityActivateContract;
/**
* @param FetchesDataFromYDPortal $fetchesDataFRomYDPortal
* @param FetchesOrder $fetchesOrder
* @param CreatePackingListProcessor $createPackingListProcessor
* @param CreatePackageProcessor $createPackageProcessor
* @param CreatesTransport $createsTransport
* @param FetchesPackingList $fetchesPackingList
* @param FetchesCompanyModule $fetchesCompanyModule
* @param CreatesContract $unityCreateContract
* @param AssignContractEntityProcessor $unityAssignContractEntity
* @param CreateContractEntityProcessor $unityCreateContractEntity
* @param CreatesStep $createsStep
* @param ActivateContractProcessor $unityActivateContract
*/
public function __construct(FetchesDataFromYDPortal $fetchesDataFRomYDPortal, FetchesOrder $fetchesOrder, CreatePackingListProcessor $createPackingListProcessor, CreatePackageProcessor $createPackageProcessor, CreatesTransport $createsTransport, FetchesPackingList $fetchesPackingList, FetchesCompanyModule $fetchesCompanyModule, CreatesContract $unityCreateContract, AssignContractEntityProcessor $unityAssignContractEntity, CreateContractEntityProcessor $unityCreateContractEntity, CreatesStep $createsStep, ActivateContractProcessor $unityActivateContract)
{
$this->fetchesDataFRomYDPortal = $fetchesDataFRomYDPortal;
$this->fetchesOrder = $fetchesOrder;
$this->createPackingListProcessor = $createPackingListProcessor;
$this->createPackageProcessor = $createPackageProcessor;
$this->createsTransport = $createsTransport;
$this->fetchesPackingList = $fetchesPackingList;
$this->fetchesCompanyModule = $fetchesCompanyModule;
$this->unityCreateContract = $unityCreateContract;
$this->unityAssignContractEntity = $unityAssignContractEntity;
$this->unityCreateContractEntity = $unityCreateContractEntity;
$this->createsStep = $createsStep;
$this->unityActivateContract = $unityActivateContract;
}
/**
* @param Carbon|null $start
* @param Carbon|null $end
* @return void
* @throws GuzzleException
*/
public function execute(?Carbon $start = null, ?Carbon $end = null)
{
$from = $end ? Carbon::today()->diff($end)->days : 0;
$to = $start ? Carbon::today()->diff($start)->days : 10;
for ($x = $from; $x <= $to; $x++) {
try {
$startDate = Carbon::today()->subDays($x);
$startLimit = Carbon::parse('01-12-2021');
if($startDate->isBefore($startLimit)){
$startDate = $startLimit;
}
$endDate = Carbon::today()->subDays($x - 1);
$orderRequest = $this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/GetOrderList.ashx', 'GET', [
'begintime' => $startDate->timestamp,
'endtime' => $endDate->timestamp,
]);
$rows = $this->fetchesDataFRomYDPortal->getResponseBody($orderRequest);
if(!$rows->data) continue;
foreach($rows->data as $row){
$time_start = microtime(true);
$receiveDate = Carbon::parse(substr(preg_replace("/[^0-9]/", "", $row->expressno), 0, 8));
$customerno = preg_split('(-|\(|\)|\/)', $row->customerno);
$orderNumber = $customerno[array_key_last($customerno)];
$allow_contract = true;
try {
$order = $this->fetchesOrder->execute(['reference' => $orderNumber]);
} catch (ResourceNotFoundException $exception) {
try {
$order = $this->fetchesOrder->execute(['reference' => substr($orderNumber, -9)]);
} catch (ResourceNotFoundException $exception) {
$order = $this->fetchesCompanyModule->execute(['id' => 1]);
$allow_contract = false;
}
}
$packingListReference = $row->expressno;
try{
$packingList = $this->fetchesPackingList->execute(['reference' => $row->expressno, 'type' => PackingListType::SHIPPING_PACKING_LIST]);
$packingList->packages()->delete();
$replica = $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
if($replica) $replica->packages()->delete();
$warehouseReceiveList = $this->fetchesPackingList->execute(['reference' => $row->expressno, 'type' => PackingListType::WAREHOUSE_RECEIVE_LIST]);
$warehouseReceiveList->packages()->delete();
$replica = $warehouseReceiveList->packingLists()->where('type', PackingListType::WAREHOUSE_RECEIVE_LIST_REPLICA)->first();
if($replica) $replica->packages()->delete();
} catch (ResourceNotFoundException $exception) {
if (!$allow_contract) {
$appointee_id = 2307;
} else {
$appointee_id = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::ORIGIN_FREIGHT_FORWARDER)->first()->appointee->id;
}
$warehouseReceiveObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::WAREHOUSE_RECEIVE_LIST, $allow_contract ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
/** @var PackingList $warehouseReceiveList */
$warehouseReceiveList = $this->createPackingListProcessor->execute($warehouseReceiveObject, $order);
$transportObject = new TransportObject(TransportType::LAND, null, $row->kuaidilist, Carbon::parse($receiveDate), Carbon::parse($receiveDate), $allow_contract ? ApprovalStatus::APPROVED : ApprovalStatus::REJECTED);
$transport = $this->createsTransport->execute($transportObject, $warehouseReceiveList);
if ($allow_contract) {
$contract = $this->unityCreateContract->execute();
$contractReference = $contract->hash_id;
$contractObligations = $contract->contract_obligation_list;
$this->unityActivateContract->execute($contractReference);
$supervisorHashId = $order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->unity_hash_id;
$supervisorContractEntity = $this->unityCreateContractEntity->execute($contractReference, $supervisorHashId);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->update(['entity_hash_id' => $supervisorContractEntity->hash_id, 'entity_signature' => $supervisorContractEntity->entity_signature_hash_id]);
$importerContractEntity = $this->unityCreateContractEntity->execute($contractReference, $order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->appointee->unity_hash_id);
$order->orderRoles()->where('role_id', '=', OrderRoleTypes::IMPORTER)->first()->update(['entity_hash_id' => $importerContractEntity->hash_id, 'entity_signature' => $importerContractEntity->entity_signature_hash_id]);
$this->unityAssignContractEntity->execute($supervisorContractEntity->hash_id, $contractObligations);
}
$packingListObject = new PackingListObject($packingListReference, $appointee_id, PackingListType::SHIPPING_PACKING_LIST, ApprovalStatus::SUSPENDED, !$allow_contract ? null : $contractReference);
/** @var PackingList $packingList */
$packingList = $this->createPackingListProcessor->execute($packingListObject, $order);
if ($allow_contract) {
foreach ($contractObligations as $obligation) {
$stepObject = new StepsObject($order->orderRoles()->where('role_id', '=', OrderRoleTypes::SUPERVISOR)->first()->appointee->id, $obligation->reference, $obligation->sequence, $obligation->hash_id);
$this->createsStep->execute($packingList, $stepObject);
}
}
}
foreach($row->deliverysize as $package) {
$packageObject = new PackageObject(PackageType::CARTON, $row->goodname, (float) $package->width, (float) $package->height, (float) $package->length, 0, (float) $package->num, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $warehouseReceiveList);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
if(!count($row->deliverysize)){
$measurement = round(((float) $row->volume / (float) $row->goodcount) ** (1/3) * 100, 2);
$packageObject = new PackageObject(PackageType::CARTON, $row->goodname, (float) $measurement, (float) $measurement, (float) $measurement, 0, (float) $row->goodcount, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $warehouseReceiveList);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
$weightCbm = (float) $row->weight / 500;
$overWeightCbm = $weightCbm - $packingList->packages()->sum(DB::raw('(width/100) * (height/100) * (length/100) * quantity'));
if($overWeightCbm > 0){
$measurement = round($overWeightCbm ** (1/3) * 100, 2);
$packageObject = new PackageObject(PackageType::OVER_WEIGHT, 'Overweight CBM', (float) $measurement, (float) $measurement, (float) $measurement, 0, 1, ApprovalStatus::APPROVED);
$this->createPackageProcessor->execute($packageObject, $packingList);
}
if($order instanceof Order){
$marking = $order->companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
if(!in_array($marking, ['1290CSW', '8997ITB', '3992WHE', '962LOW', '1152AAT'])){
$this->fetchesDataFRomYDPortal->clientRequest('http://www.yd-wl.com/api/confirmsendorder.ashx', 'GET', [
'expressno' => $row->expressno
]);
}
}
$time_end = microtime(true);
$execution_time = ($time_end - $time_start)/60;
echo 'successful => <b>Total Execution Time:</b> '.$execution_time.' Mins<br>';
}
} catch (\Exception $exception) {
Log::debug($exception);
}
}
}
}
@@ -152,7 +152,7 @@ class FetchWarehouseReceiveListFromVTPortalProcessor
} catch (ResourceNotFoundException $exception) {
$allow_contract = false;
$order = $this->fetchesCompanyModule->execute(['id' => 1]);
$appointee_id = 2037;
$appointee_id = 2307;
}
$packingListReference = $parcel[0];
@@ -0,0 +1,74 @@
<?php
namespace App\Classes\Modules\PerfexCRM\DataTransferObjects;
use Illuminate\Http\Request;
use App\Classes\General\Interfaces\DataTransferObject;
class CreateLeadPerfexCRMObject implements DataTransferObject
{
/** @var string */
private $name;
/** @var string */
private $email;
/** @var string */
private $phone;
/** @var string */
private $companyName;
/** @var string */
private $companyReference;
public function __construct(string $name, string $email, string $phone, string $companyName, string $companyReference)
{
$this->name = $name;
$this->email = $email;
$this->phone = $phone;
$this->companyName = $companyName;
$this->companyReference = $companyReference;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @return string
*/
public function getEmail(): string
{
return $this->email;
}
/**
* @return string
*/
public function getPhone(): string
{
return $this->phone;
}
/**
* @return string
*/
public function getCompanyName(): string
{
return $this->companyName;
}
/**
* @return string
*/
public function getCompanyReference(): string
{
return $this->companyReference;
}
}
@@ -0,0 +1,161 @@
<?php
namespace App\Classes\Modules\PerfexCRM\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
class CreateTaskPerfexCRMObject implements DataTransferObject
{
/** @var string */
private $email;
/** @var string */
private $name;
/** @var string */
private $description;
/** @var string */
private $leadId;
/** @var string */
private $milestoneId;
/** @var string */
private $projectId;
/** @var string */
private $reference;
/** @var string */
private $onTaskCompletion;
/** @var string */
private $status;
/** @var string */
private $department;
/** @var string */
private $priority;
/** @var string */
private $duedate;
public function __construct(string $email, string $name, string $description, string $leadId, string $projectId, string $milestoneId, string $reference, string $onTaskCompletion, string $status, string $department, string $priority, string $duedate)
{
$this->email = $email;
$this->name = $name;
$this->description = $description;
$this->leadId = $leadId;
$this->projectId = $projectId;
$this->milestoneId = $milestoneId;
$this->reference = $reference;
$this->onTaskCompletion = $onTaskCompletion;
$this->status = $status;
$this->department = $department;
$this->priority = $priority;
$this->duedate = $duedate;
}
/**
* @return string
*/
public function getEmail(): string
{
return $this->email;
}
/**
* @return string
*/
public function getName(): string
{
return $this->name;
}
/**
* @return string
*/
public function getDescription(): string
{
return $this->description;
}
/**
* @return string
*/
public function getLeadId(): string
{
return $this->leadId;
}
public function setLeadId(string $leadId)
{
$this->leadId = $leadId;
}
/**
* @return string
*/
public function getProjectId(): string
{
return $this->projectId;
}
/**
* @return string
*/
public function getMilestoneId(): string
{
return $this->milestoneId;
}
/**
* @return string
*/
public function getReference(): string
{
return $this->reference;
}
/**
* @return string
*/
public function getOnTaskCompletion(): string
{
return $this->onTaskCompletion;
}
/**
* @return string
*/
public function getStatus(): string
{
return $this->status;
}
/**
* @return string
*/
public function getDepartment(): string
{
return $this->department;
}
/**
* @return string
*/
public function getPriority(): string
{
return $this->priority;
}
/**
* @return string
*/
public function getDuedate(): string
{
return $this->duedate;
}
}
@@ -0,0 +1,99 @@
<?php
namespace App\Classes\Modules\PerfexCRM\DataTransferObjects;
use Illuminate\Http\Request;
use App\Classes\General\Interfaces\DataTransferObject;
class CustomerContactObject implements DataTransferObject
{
/** @var int */
private $customerId;
/** @var string */
private $firstname;
/** @var string */
private $lastname;
/** @var string */
private $email;
/** @var string */
private $password;
/** @var string */
private $isPrimary;
/** @var string */
private $sendSetPasswordEmail;
public function __construct(string $customerId, string $firstname, string $lastname, string $email, string $password, string $isPrimary, string $sendSetPasswordEmail)
{
$this->customerId = $customerId;
$this->firstname = $firstname;
$this->lastname = $lastname;
$this->email = $email;
$this->password = $password;
$this->isPrimary = $isPrimary;
$this->sendSetPasswordEmail = $sendSetPasswordEmail;
}
/**
* @return int
*/
public function getCustomerId(): int
{
return $this->customerId;
}
/**
* @return string
*/
public function getFirstName(): string
{
return $this->firstname;
}
/**
* @return string
*/
public function getLastName(): string
{
return $this->lastname;
}
/**
* @return string
*/
public function getEmail(): string
{
return $this->email;
}
/**
* @return string
*/
public function getPassword(): string
{
return $this->password;
}
/**
* @return string
*/
public function getIsPrimary(): string
{
return $this->isPrimary;
}
/**
* @return string
*/
public function getSendSetPasswordEmail(): string
{
return $this->sendSetPasswordEmail;
}
}
@@ -0,0 +1,124 @@
<?php
namespace App\Classes\Modules\PerfexCRM\DataTransferObjects;
use Illuminate\Http\Request;
use App\Classes\General\Interfaces\DataTransferObject;
class InitialPerfexCRMObject implements DataTransferObject
{
/** @var string */
private $companyName;
/** @var string */
private $companyReference;
/** @var string */
private $contactName;
/** @var string */
private $contactEmail;
/** @var string */
private $bookingMarking;
/** @var string */
private $projectName;
/** @var int */
private $projectStatus;
/** @var array */
private $milestoneNames;
/** @var array */
private $taskNames;
public function __construct(string $companyName, string $companyReference, string $contactName, string $contactEmail, string $bookingMarking, string $projectName, int $projectStatus, array $milestoneNames, array $taskNames)
{
$this->companyName = $companyName;
$this->companyReference = $companyReference;
$this->contactName = $contactName;
$this->contactEmail = $contactEmail;
$this->bookingMarking = $bookingMarking;
$this->projectName = $projectName;
$this->projectStatus = $projectStatus;
$this->milestoneNames = $milestoneNames;
$this->taskNames = $taskNames;
}
/**
* @return string
*/
public function getCompanyName(): string
{
return $this->companyName;
}
/**
* @return string
*/
public function getCompanyReference(): string
{
return $this->companyReference;
}
/**
* @return string
*/
public function getContactName(): string
{
return $this->contactName;
}
/**
* @return string
*/
public function getContactEmail(): string
{
return $this->contactEmail;
}
/**
* @return string
*/
public function getBookingMarking(): string
{
return $this->bookingMarking;
}
/**
* @return string
*/
public function getProjectName(): string
{
return $this->projectName;
}
/**
* @return string
*/
public function getProjectStatus(): int
{
return $this->projectStatus;
}
/**
* @return array
*/
public function getMilestoneNames(): array
{
return $this->milestoneNames;
}
/**
* @return array
*/
public function getTaskNames(): array
{
return $this->taskNames;
}
}
@@ -0,0 +1,86 @@
<?php
namespace App\Classes\Modules\PerfexCRM\DataTransferObjects;
use Illuminate\Http\Request;
use App\Classes\General\Interfaces\DataTransferObject;
class InvoicePaymentPerfexCRMObject implements DataTransferObject
{
/** @var int */
private $invoiceId;
/** @var float */
private $amount;
/** @var string */
private $date;
/** @var int */
private $paymentMode;
/** @var string */
private $transactionId;
/** @var string */
private $note;
public function __construct(int $invoiceId, float $amount, string $date, int $paymentMode, string $transactionId, string $note)
{
$this->invoiceId = $invoiceId;
$this->amount = $amount;
$this->date = $date;
$this->paymentMode = $paymentMode;
$this->transactionId = $transactionId;
$this->note = $note;
}
/**
* @return int
*/
public function getInvoiceId(): int
{
return $this->invoiceId;
}
/**
* @return float
*/
public function getAmount(): float
{
return $this->amount;
}
/**
* @return string
*/
public function getDate(): string
{
return $this->date;
}
/**
* @return int
*/
public function getPaymentMode(): int
{
return $this->paymentMode;
}
/**
* @return string
*/
public function getTransactionId(): string
{
return $this->transactionId;
}
/**
* @return string
*/
public function getNote(): string
{
return $this->note;
}
}
@@ -0,0 +1,145 @@
<?php
namespace App\Classes\Modules\PerfexCRM\DataTransferObjects;
use Illuminate\Http\Request;
use App\Classes\General\Interfaces\DataTransferObject;
class InvoicePerfexCRMObject implements DataTransferObject
{
/** @var string */
private $clientId;
/** @var string */
private $number;
/** @var string */
private $date;
/** @var string */
private $dueDate;
/** @var string */
private $currency;
/** @var float */
private $subTotal;
/** @var float */
private $total;
/** @var string */
private $billingStreet;
/** @var string */
private $projectId;
/** @var array */
private $allowedPaymentModes;
/** @var array */
private $invoiceItems;
public function __construct(string $clientId, string $number, string $date, string $dueDate, string $currency, float $subTotal, float $total, string $billingStreet, string $projectId, array $allowedPaymentModes, array $invoiceItems)
{
$this->clientId = $clientId;
$this->number = $number;
$this->date = $date;
$this->dueDate = $dueDate;
$this->currency = $currency;
$this->subTotal = $subTotal;
$this->total = $total;
$this->billingStreet = $billingStreet;
$this->projectId = $projectId;
$this->allowedPaymentModes = $allowedPaymentModes;
$this->invoiceItems = $invoiceItems;
}
/**
* @return string
*/
public function getClientId(): string
{
return $this->clientId;
}
/**
* @return string
*/
public function getNumber(): string
{
return $this->number;
}
/**
* @return string
*/
public function getDate(): string
{
return $this->date;
}
/**
* @return string
*/
public function getDueDate(): string
{
return $this->dueDate;
}
/**
* @return string
*/
public function getCurrency(): string
{
return $this->currency;
}
/**
* @return float
*/
public function getSubTotal(): float
{
return $this->subTotal;
}
/**
* @return float
*/
public function getTotal(): float
{
return $this->total;
}
/**
* @return string
*/
public function getBillingStreet(): string
{
return $this->billingStreet;
}
/**
* @return string
*/
public function getProjectId(): string
{
return $this->projectId;
}
/**
* @return array
*/
public function getAllowedPaymentModes(): array
{
return $this->allowedPaymentModes;
}
/**
* @return array
*/
public function getInvoiceItems(): array
{
return $this->invoiceItems;
}
}
@@ -0,0 +1,86 @@
<?php
namespace App\Classes\Modules\PerfexCRM\DataTransferObjects;
use Illuminate\Http\Request;
use App\Classes\General\Interfaces\DataTransferObject;
class InvoiceSingleItemPerfexCRMObject implements DataTransferObject
{
/** @var string */
public $description;
/** @var string */
public $longDescription;
/** @var float */
public $qty;
/** @var float */
public $rate;
/** @var int */
public $order;
/** @var string */
public $unit;
public function __construct(string $description, string $longDescription, float $qty, float $rate, int $order, string $unit)
{
$this->description = $description;
$this->longDescription = $longDescription;
$this->qty = $qty;
$this->rate = $rate;
$this->order = $order;
$this->unit = $unit;
}
/**
* @return string
*/
public function getDescription(): string
{
return $this->description;
}
/**
* @return string
*/
public function getLongDescription(): string
{
return $this->longDescription;
}
/**
* @return float
*/
public function getQty(): float
{
return $this->qty;
}
/**
* @return float
*/
public function getRate(): float
{
return $this->rate;
}
/**
* @return int
*/
public function getOrder(): int
{
return $this->order;
}
/**
* @return string
*/
public function getUnit(): string
{
return $this->unit;
}
}
@@ -0,0 +1,50 @@
<?php
namespace App\Classes\Modules\PerfexCRM\DataTransferObjects;
use Illuminate\Http\Request;
use App\Classes\General\Interfaces\DataTransferObject;
use App\Models\Transaction;
class UpdatePerfexCRMInvoiceObject implements DataTransferObject
{
/** @var string */
private $email;
/** @var Transaction */
private $transaction;
/** @var bool */
private $isPaid;
public function __construct(string $email, Transaction $transaction, bool $isPaid)
{
$this->email = $email;
$this->transaction = $transaction;
$this->isPaid = $isPaid;
}
/**
* @return string
*/
public function getEmail(): string
{
return $this->email;
}
/**
* @return Transaction
*/
public function getTransaction(): Transaction
{
return $this->transaction;
}
/**
* @return bool
*/
public function getIsPaid(): bool
{
return $this->isPaid;
}
}
@@ -0,0 +1,128 @@
<?php
namespace App\Classes\Modules\PerfexCRM\DataTransferObjects;
use Illuminate\Http\Request;
use App\Classes\General\Interfaces\DataTransferObject;
class UpdatePerfexCRMObject implements DataTransferObject
{
/** @var string */
private $companyName;
/** @var string */
private $companyReference;
/** @var string */
private $contactName;
/** @var string */
private $contactEmail;
/** @var string */
private $bookingMarking;
/** @var string */
private $projectName;
/** @var int */
private $projectStatus;
/** @var array */
private $milestoneNames;
/** @var array */
private $tasks;
public function __construct(string $companyName, string $companyReference, string $contactName, string $contactEmail, string $bookingMarking, string $projectName, int $projectStatus, array $milestoneNames, array $tasks)
{
$this->companyName = $companyName;
$this->companyReference = $companyReference;
$this->contactName = $contactName;
$this->contactEmail = $contactEmail;
$this->bookingMarking = $bookingMarking;
$this->projectName = $projectName;
$this->projectStatus = $projectStatus;
$this->milestoneNames = $milestoneNames;
$this->tasks = $tasks;
}
/**
* @return string
*/
public function getCompanyName(): string
{
return $this->companyName;
}
/**
* @return string
*/
public function getCompanyReference(): string
{
return $this->companyReference;
}
/**
* @return string
*/
public function getContactName(): string
{
return $this->contactName;
}
/**
* @return string
*/
public function getContactEmail(): string
{
return $this->contactEmail;
}
/**
* @return string
*/
public function getBookingMarking(): string
{
return $this->bookingMarking;
}
/**
* @return string
*/
public function getProjectName(): string
{
return $this->projectName;
}
/**
* @return int
*/
public function getProjectStatus(): int
{
return $this->projectStatus;
}
/**
* @return array
*/
public function getMilestoneNames(): array
{
return $this->milestoneNames;
}
/**
* @return array
*/
public function getTasks(): array
{
return $this->tasks;
}
public function setTasks($tasks)
{
$this->tasks = $tasks;
}
}
@@ -0,0 +1,178 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Processors;
use App\Models\Transaction;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMInvoice;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMInvoicePayment;
use App\Classes\Modules\PerfexCRM\Services\ConvertsPerfexCRMLeadToCustomer;
use App\Classes\Modules\PerfexCRM\Services\FetchesPerfexCRMProject;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\InvoicePerfexCRMObject;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\InvoicePaymentPerfexCRMObject;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\InvoiceSingleItemPerfexCRMObject;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMCustomerProject;
use App\Classes\ValueObjects\Constants\PerfexCRMProjectStatus;
use App\Models\PackingList;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
class CreatePerfexCRMInvoiceProcessor
{
/** @var CreatesPerfexCRMInvoice */
private $createsPerfexCRMInvoice;
/** @var CreatesPerfexCRMInvoicePayment */
private $createsPerfexCRMInvoicePayment;
/** @var ConvertsPerfexCRMLeadToCustomer */
private $convertsPerfexCRMLeadToCustomer;
/** @var FetchesPerfexCRMProject */
private $fetchesPerfexCRMProject;
/** @var CreatesPerfexCRMCustomerProject */
private $createsPerfexCRMCustomerProject;
/**
* CreatePerfexCRMInvoiceProcessor constructor.
* @param CreatesPerfexCRMInvoice $createsPerfexCRMInvoice
*/
public function __construct(CreatesPerfexCRMInvoice $createsPerfexCRMInvoice,
CreatesPerfexCRMInvoicePayment $createsPerfexCRMInvoicePayment,
ConvertsPerfexCRMLeadToCustomer $convertsPerfexCRMLeadToCustomer,
FetchesPerfexCRMProject $fetchesPerfexCRMProject,
CreatesPerfexCRMCustomerProject $createsPerfexCRMCustomerProject)
{
$this->createsPerfexCRMInvoice = $createsPerfexCRMInvoice;
$this->createsPerfexCRMInvoicePayment = $createsPerfexCRMInvoicePayment;
$this->convertsPerfexCRMLeadToCustomer = $convertsPerfexCRMLeadToCustomer;
$this->fetchesPerfexCRMProject = $fetchesPerfexCRMProject;
$this->createsPerfexCRMCustomerProject = $createsPerfexCRMCustomerProject;
}
/**
* @param Transaction $transaction
* @param bool $isPaid, default: false
* @return null|object
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(Transaction $transaction, bool $isPaid = false) {
$clientId = "";
$number = $transaction->bill_no;
$prefix = "INV-";
//This will remove the prefix if prefix already exist in the string
if (substr($number, 0, strlen($prefix)) == $prefix) {
$number = substr($number, strlen($prefix));
}
$date = Carbon::parse($transaction->created_at)->format('Y-m-d');
$dueDate = Carbon::parse($transaction->created_at)->addDays(6)->startOfDay()->format('Y-m-d');
$currency = 1;
$subTotal = 0.00;
$total = 0.00;
$companyModule = $transaction->owner->owner->companyModule;
$billingStreet = "";
$addresses = $companyModule
->addresses()
->where('status', '=', \App\Classes\ValueObjects\Constants\ApprovalStatus::APPROVED)
->where('type', '=', \App\Classes\ValueObjects\Constants\AddressType::BILLING)->first();
if ($addresses !== null) {
$billingStreet = $billingStreet.$addresses->street_one;
$billingStreet = $billingStreet.$addresses->street_two.',';
$billingStreet = $billingStreet.$addresses->district()->first()->name.',';
$billingStreet = $billingStreet.$addresses->postcode;
$billingStreet = $billingStreet.$addresses->state()->first()->name.',';
$billingStreet = $billingStreet.$addresses->country()->first()->name;
}
else{
$billingStreet = "[Pending Billing Details by user]";
}
$allowedPaymentModes = [];
$invoiceItems = [];
$employee = $companyModule->employees()->first();
$email = $employee->email;
$result = $this->convertsPerfexCRMLeadToCustomer->execute($email);
if(isset($result->payload)){
$clientId = $result->payload['client_id'];
}
//get project
$projectId = ""; //Project only exist in CRM if the customer already made payment
$projectName = "";
if($isPaid){
if($transaction->owner instanceof PackingList){
$orderReference = $transaction->owner->owner->reference;
$packingListReference = $transaction->owner->reference;
$projectName = 'IZYIM | X1 Shipping | '.$orderReference.' | '.$packingListReference;
$result = $this->fetchesPerfexCRMProject->execute($projectName, $clientId);
if(isset($result->payload)){
$project = $result->payload[0];
$projectId = $project['id'];
}
else{
$result = $this->createsPerfexCRMCustomerProject->execute($projectName, PerfexCRMProjectStatus::NOT_STARTED, $clientId);
if(isset($result->payload)){ //Here means project creation successful
$projectId = $result->payload['project_id'];
}
}
}
if($projectId == ""){
Log::error(json_encode('CreatePerfexCRMInvoiceProcessor debug: '.$projectName));
Log::error(json_encode($transaction->owner));
}
}
//newitems
foreach ($transaction->transactionDetails as $key => $transaction_detail){
$order = $key + 1;
$description = $transaction_detail->name;
$quantity = $transaction_detail->quantity;
$unitPrice = $transaction_detail->price;
$subTotal = $subTotal + $transaction_detail->amount;
//string $description, string $longDescription, int $qty, int $rate, int $order, string $unit
$invoiceSingleItem = new InvoiceSingleItemPerfexCRMObject(
$description,
"",
$quantity,
$unitPrice,
$order,
""
);
array_push($invoiceItems, $invoiceSingleItem);
}
$total = $transaction->amount;
//This setting is similar to Setup > Leads > Sources, Setup > Leads > Statuses
//Can be found at Finance > Payment Modes
array_push($allowedPaymentModes, 1, 2);
$invoicePerfexCRMObject = new InvoicePerfexCRMObject(
$clientId,
$number,
$date,
$dueDate,
$currency,
$subTotal,
$total,
$billingStreet,
$projectId,
$allowedPaymentModes,
$invoiceItems
);
$result = $this->createsPerfexCRMInvoice->execute($invoicePerfexCRMObject);
return $result;
}
}
@@ -0,0 +1,36 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Processors;
// use App\Classes\Modules\PerfexCRM\DataTransferObjects\ContactObject;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMLead;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CreateLeadPerfexCRMObject;
class CreatePerfexCRMLeadProcessor
{
/** @var CreatesPerfexCRMLead */
private $createsPerfexCRMLead;
/**
* CreatePerfexCRMLeadProcessor constructor.
* @param CreatesPerfexCRMLead $createsPerfexCRMLead
*/
public function __construct(CreatesPerfexCRMLead $createsPerfexCRMLead)
{
$this->createsPerfexCRMLead = $createsPerfexCRMLead;
}
/**
* @param CreateLeadPerfexCRMObject $createLeadPerfexCRMObject
* @return null|object
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(CreateLeadPerfexCRMObject $createLeadPerfexCRMObject) {
return $this->createsPerfexCRMLead->execute($createLeadPerfexCRMObject);
}
}
@@ -0,0 +1,44 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Processors;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMTask;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CreateTaskPerfexCRMObject;
class CreatePerfexCRMTaskProcessor
{
/** @var CreatesPerfexCRMTask */
private $createsPerfexCRMTask;
/**
* @param CreatesPerfexCRMTask $createsPerfexCRMTask
*/
public function __construct(CreatesPerfexCRMTask $createsPerfexCRMTask)
{
$this->createsPerfexCRMTask = $createsPerfexCRMTask;
}
/**
* @param CreateTaskPerfexCRMObject $createTaskPerfexCRMObject
* @return true
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(CreateTaskPerfexCRMObject $createTaskPerfexCRMObject) {
$this->createsPerfexCRMTask->execute(
$createTaskPerfexCRMObject->getName(),
$createTaskPerfexCRMObject->getDescription(),
$createTaskPerfexCRMObject->getLeadId(),
$createTaskPerfexCRMObject->getMilestoneId(),
$createTaskPerfexCRMObject->getProjectId(),
$createTaskPerfexCRMObject->getReference(),
$createTaskPerfexCRMObject->getOnTaskCompletion(),
$createTaskPerfexCRMObject->getDepartment(),
$createTaskPerfexCRMObject->getStatus(),
$createTaskPerfexCRMObject->getPriority(),
$createTaskPerfexCRMObject->getDuedate()
);
return true;
}
}
@@ -0,0 +1,43 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Processors;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CreateTaskPerfexCRMObject;
use App\Classes\Jobs\CreatePerfexCRMSingleTask;
use App\Classes\ValueObjects\Constants\PerfexCRMTaskPriority;
use App\Classes\ValueObjects\Constants\PerfexCRMTasks;
use App\Models\Company;
class NewLeadTaskToPerfexCRMProcessor
{
/**
* @param Company $company
* @return true
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(Company $company)
{
$companyModule = $company->companyModules()->first();
$employee = $companyModule->employees()->first();
$contactEmail = $employee->email;
$createTaskPerfexCRMObject = new CreateTaskPerfexCRMObject(
$contactEmail,
PerfexCRMTasks::TASK_IDENTIFICATION_1['name'],
PerfexCRMTasks::TASK_IDENTIFICATION_1['description'],
"",
"",
"",
"",
"",
PerfexCRMTasks::TASK_IDENTIFICATION_1['status'],
PerfexCRMTasks::TASK_IDENTIFICATION_1['department'],
PerfexCRMTaskPriority::DEFAULT,
"0"
);
CreatePerfexCRMSingleTask::dispatch($createTaskPerfexCRMObject);
return true;
}
}
@@ -0,0 +1,60 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Processors;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMObject;
use App\Classes\ValueObjects\Constants\PerfexCRMTasks;
use App\Classes\Jobs\UpdatePerfexCRM;
use App\Classes\Jobs\UpdatePerfexCRMPrelude;
use App\Models\PackingList;
use App\Classes\ValueObjects\Constants\PerfexCRMProjectStatus;
use Illuminate\Support\Facades\Log;
class PackingListToPerfexCRMProcessor
{
/**
* @param PackingList $packingList
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(PackingList $packingList)
{
try {
if($packingList->owner instanceof \App\Models\Order) {
$order = $packingList->owner;
$companyModule = $order->companyModule()->first();
$connection = $companyModule->inviters()->withPivot('invitee_reference')->first();
$companyName = $companyModule->name;
$companyReference = $connection ? $connection->pivot->invitee_reference:'';
$employee = $companyModule->employees()->first();
$contactEmail = $employee->email;
$contactName = $employee->name;
$orderReference = $packingList->owner->reference;
$packingListReference = $packingList->reference;
$projectName = 'IZYIM | X1 Shipping | '.$orderReference.' | '.$packingListReference;
$updatePerfexCRMObject = new UpdatePerfexCRMObject(
$companyName,
$companyReference,
$contactName,
$contactEmail,
"",
$projectName,
PerfexCRMProjectStatus::NOT_STARTED,
[],
[
PerfexCRMTasks::TASK_LOADED_CONTAINER_1,
PerfexCRMTasks::TASK_LOADED_CONTAINER_2,
]
);
UpdatePerfexCRMPrelude::dispatch($packingList, null, $updatePerfexCRMObject, UpdatePerfexCRM::class);
}
} catch (\Exception $exception){
Log::error(json_encode('PackingListToPerfexCRMProcessor debug:'));
Log::error(json_encode($packingList));
Log::error($exception);
}
return true;
}
}
@@ -0,0 +1,107 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Processors;
use App\Classes\Modules\PerfexCRM\Processors\UpdatePerfexCRMProcessor;
use App\Classes\Modules\PerfexCRM\Services\Init;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMObject;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMInvoiceObject;
use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\ValueObjects\Constants\PerfexCRMMilestones;
use App\Classes\ValueObjects\Constants\PerfexCRMTasks;
use App\Classes\ValueObjects\Constants\PerfexCRMProjectStatus;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\Jobs\UpdatePerfexCRMInvoice;
use App\Classes\Jobs\UpdatePerfexCRM;
use App\Classes\Jobs\UpdatePerfexCRMPrelude;
use App\Classes\Jobs\CreatePerfexCRMInvoice;
use App\Models\Transaction;
use Illuminate\Support\Facades\Log;
class TransactionToPerfexCRMProcessor
{
/** @var FetchesCompany */
private $fetchesCompany;
/** @var UpdatePerfexCRMProcessor */
private $updatePerfexCRMProcessor;
/**
* TransactionToPerfexCRMProcessor constructor.
* @param UpdatePerfexCRMProcessor $updatePerfexCRMProcessor
* @param FetchesCompany $fetchesCompany
*/
public function __construct(UpdatePerfexCRMProcessor $updatePerfexCRMProcessor, FetchesCompany $fetchesCompany)
{
$this->updatePerfexCRMProcessor = $updatePerfexCRMProcessor;
$this->fetchesCompany = $fetchesCompany;
}
/**
* @param Transaction $model
* @param int $status
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(Transaction $model, int $status)
{
try
{
if($model->owner instanceof \App\Models\Transaction && $status == ApprovalStatus::APPROVED)
{
$packingList = $model->owner->owner;
$order = $packingList->owner()->first();
$companyModule = $order->companyModule()->first();
$companyName = $companyModule->name;
$companyReference = $companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
$employee = $companyModule->employees()->first();
$contactEmail = $employee->email;
$contactName = $employee->name;
$orderReference = $order->reference;
$packingListReference = $packingList->reference;
$projectName = 'IZYIM | X1 Shipping | '.$orderReference.' | '.$packingListReference;
$bookingMarking = $packingList->id."-".$packingList->owner->id;
$updatePerfexCRMObject = new UpdatePerfexCRMObject(
$companyName,
$companyReference,
$contactName,
$contactEmail,
$bookingMarking,
$projectName,
PerfexCRMProjectStatus::IN_PROGRESS,
[],
[
PerfexCRMTasks::TASK_1,
PerfexCRMTasks::TASK_POST_PAYMENT_1,
PerfexCRMTasks::TASK_POST_PAYMENT_2,
PerfexCRMTasks::TASK_POST_PAYMENT_3,
PerfexCRMTasks::TASK_POST_PAYMENT_4,
]
);
UpdatePerfexCRMPrelude::dispatch(null, $model, $updatePerfexCRMObject, UpdatePerfexCRM::class);
$updatePerfexCRMInvoiceOject = new UpdatePerfexCRMInvoiceObject(
$contactEmail,
$model,
true
);
UpdatePerfexCRMInvoice::dispatch($updatePerfexCRMInvoiceOject)->delay(6);
}
else if($model->owner instanceof \App\Models\PackingList && $model->status == ApprovalStatus::PENDING_SUBMISSION && $status == ApprovalStatus::APPROVED)
{
CreatePerfexCRMInvoice::dispatch($model);
}
}
catch (\Exception $exception) {
Log::error('TransactionToPerfexCRMProcessor debug:');
Log::error($exception);
}
return true;
}
}
@@ -0,0 +1,227 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Processors;
use App\Classes\Modules\PerfexCRM\Services\ConvertsPerfexCRMLeadToCustomer;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMCustomerProject;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMMilestone;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMTask;
use App\Classes\Modules\PerfexCRM\Services\FetchesPerfexCRMProject;
use App\Classes\Modules\PerfexCRM\Services\FetchesPerfexCRMMilestone;
use App\Classes\Modules\PerfexCRM\Services\FetchesPerfexCRMTask;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMCustomer;
use App\Classes\Modules\PerfexCRM\Services\CreatesPerfexCRMCustomerContact;
use App\Classes\Modules\PerfexCRM\Services\UpdatesPerfexCRMTask;
use App\Classes\Modules\PerfexCRM\Services\UpdatesPerfexCRMCustomer;
use App\Classes\Modules\PerfexCRM\Services\UpdatesPerfexCRMProject;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CustomerContactObject;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMObject;
use App\Classes\ValueObjects\Constants\PerfexCRMTaskStatus;
use App\Classes\ValueObjects\Constants\PerfexCRMProjectStatus;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Illuminate\Http\Request;
class UpdatePerfexCRMProcessor
{
/** @var ConvertsPerfexCRMLeadToCustomer */
private $convertsPerfexCRMLeadToCustomer;
/** @var CreatesPerfexCRMCustomerProject */
private $createsPerfexCRMCustomerProject;
/** @var CreatesPerfexCRMMilestone */
private $createsPerfexCRMMilestone;
/** @var CreatesPerfexCRMTask */
private $createsPerfexCRMTask;
/** @var FetchesPerfexCRMProject */
private $fetchesPerfexCRMProject;
/** @var FetchesPerfexCRMMilestone */
private $fetchesPerfexCRMMilestone;
/** @var FetchesPerfexCRMTask */
private $fetchesPerfexCRMTask;
/** @var CreatesPerfexCRMCustomer */
private $createsPerfexCRMCustomer;
/** @var CreatesPerfexCRMCustomerContact */
private $createsPerfexCRMCustomerContact;
/** @var UpdatesPerfexCRMTask */
private $updatesPerfexCRMTask;
/** @var UpdatesPerfexCRMCustomer */
private $updatesPerfexCRMCustomer;
/** @var UpdatesPerfexCRMProject */
private $updatesPerfexCRMProject;
/**
* @param ConvertsPerfexCRMLeadToCustomer $convertsPerfexCRMLeadToCustomer
* @param CreatesPerfexCRMCustomerProject $createsPerfexCRMCustomerProject
* @param CreatesPerfexCRMMilestone $createsPerfexCRMMilestone
* @param CreatesPerfexCRMTask $createsPerfexCRMTask
* @param FetchesPerfexCRMProject $fetchesPerfexCRMProject
* @param FetchesPerfexCRMMilestone $fetchesPerfexCRMMilestone
* @param FetchesPerfexCRMTask $fetchesPerfexCRMTask
* @param CreatesPerfexCRMCustomer $createsPerfexCRMCustomer
* @param CreatesPerfexCRMCustomerContact $createsPerfexCRMCustomerContact
* @param UpdatesPerfexCRMTask $updatesPerfexCRMTask
* @param UpdatesPerfexCRMCustomer $updatesPerfexCRMCustomer
* @param UpdatesPerfexCRMProject $updatesPerfexCRMProject
*/
public function __construct(ConvertsPerfexCRMLeadToCustomer $convertsPerfexCRMLeadToCustomer,
CreatesPerfexCRMCustomerProject $createsPerfexCRMCustomerProject,
CreatesPerfexCRMMilestone $createsPerfexCRMMilestone,
CreatesPerfexCRMTask $createsPerfexCRMTask,
FetchesPerfexCRMProject $fetchesPerfexCRMProject,
FetchesPerfexCRMMilestone $fetchesPerfexCRMMilestone,
FetchesPerfexCRMTask $fetchesPerfexCRMTask,
CreatesPerfexCRMCustomer $createsPerfexCRMCustomer,
CreatesPerfexCRMCustomerContact $createsPerfexCRMCustomerContact,
UpdatesPerfexCRMTask $updatesPerfexCRMTask,
UpdatesPerfexCRMCustomer $updatesPerfexCRMCustomer,
UpdatesPerfexCRMProject $updatesPerfexCRMProject)
{
$this->convertsPerfexCRMLeadToCustomer = $convertsPerfexCRMLeadToCustomer;
$this->createsPerfexCRMCustomerProject = $createsPerfexCRMCustomerProject;
$this->createsPerfexCRMMilestone = $createsPerfexCRMMilestone;
$this->createsPerfexCRMTask = $createsPerfexCRMTask;
$this->fetchesPerfexCRMProject = $fetchesPerfexCRMProject;
$this->fetchesPerfexCRMMilestone = $fetchesPerfexCRMMilestone;
$this->fetchesPerfexCRMTask = $fetchesPerfexCRMTask;
$this->createsPerfexCRMCustomer = $createsPerfexCRMCustomer;
$this->createsPerfexCRMCustomerContact = $createsPerfexCRMCustomerContact;
$this->updatesPerfexCRMTask = $updatesPerfexCRMTask;
$this->updatesPerfexCRMCustomer = $updatesPerfexCRMCustomer;
$this->updatesPerfexCRMProject = $updatesPerfexCRMProject;
}
/**
* @param UpdatePerfexCRMObject $updatePerfexCRMObject
* @return null|object
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(UpdatePerfexCRMObject $updatePerfexCRMObject) {
// Customer has to exist first before Project can appear under it
// Check with Perfex CRM, if this user (email) was previously a lead, should automatically now become a customer
$crmCompany = $updatePerfexCRMObject->getCompanyName();
$result = $this->convertsPerfexCRMLeadToCustomer->execute($updatePerfexCRMObject->getContactEmail());
if(isset($result->payload)){
$crmClientId = $result->payload['client_id'];
if (isset($result->payload['company'])) {
$crmCompany = $result->payload['company'];
}
}
else{
//if reach this point, this means this user is not a official customer nor is a lead in crm
//Create Customer has 2 parts: Create Company (client), Create Contact
$result = $this->createsPerfexCRMCustomer->execute($crmCompany);
if(is_null($result)){
$crmCompany = $crmCompany." 2";
$result = $this->createsPerfexCRMCustomer->execute($crmCompany);
}
$crmClientId = $result->payload['clientId'];
$customerContactObject = new CustomerContactObject(
$crmClientId,
$updatePerfexCRMObject->getContactName(),
$updatePerfexCRMObject->getContactName(),
$updatePerfexCRMObject->getContactEmail(),
"pU^T@sC#9Q",
"on",
"on"
);
$result = $this->createsPerfexCRMCustomerContact->execute($customerContactObject);
}
//Update custom fields to identify company reference from exchange or shipping portal
$value_exists = false;
if (isset($result->payload['customfields'])) {
foreach ($result->payload['customfields'] as $element) {
if ($element['value'] === $updatePerfexCRMObject->getCompanyReference()) {
$value_exists = true;
break;
}
}
}
if(!$value_exists);
{
$result = $this->updatesPerfexCRMCustomer->execute($crmClientId, $crmCompany, $updatePerfexCRMObject->getCompanyReference());
}
// Get existing or create project, project has to exist first before milestone can appear under it
$result = $this->fetchesPerfexCRMProject->execute($updatePerfexCRMObject->getProjectName(), $crmClientId);
if(isset($result->payload)){
$project = $result->payload[0];
$projectId = $project['id'];
//if the project status is anything but PerfexCRMProjectStatus::NOT_STARTED, update the project
if($updatePerfexCRMObject->getProjectStatus() != PerfexCRMProjectStatus::NOT_STARTED && $project['status'] == PerfexCRMProjectStatus::NOT_STARTED)
{
$this->updatesPerfexCRMProject->execute($project, $updatePerfexCRMObject->getProjectStatus());
}
}
else{
$result = $this->createsPerfexCRMCustomerProject->execute($updatePerfexCRMObject->getProjectName(), $updatePerfexCRMObject->getProjectStatus(), $crmClientId);
if(isset($result->payload)){ //Here means project creation successful
$projectId = $result->payload['project_id'];
}
}
$tasks = $updatePerfexCRMObject->getTasks();
if(count($tasks) > 0){
//Create tasks with milestone
for($count=0; $count < count($tasks); $count++) {
$milestoneId = 0; //By default milestoneId is 0, having this set at individual task is optional
if($tasks[$count]['milestone'] != "") //Create milestone only if it is defined
{
// Get existing or create milestone, milestone has to exist first before task can appear under it
$result = $this->fetchesPerfexCRMMilestone->execute($tasks[$count]['milestone'], $projectId);
if(isset($result->payload)){
$array = json_decode(json_encode($result->payload[0]), true);
$milestoneId = $array['id'];
}
else{
$result = $this->createsPerfexCRMMilestone->execute($tasks[$count]['milestone'], $projectId, $count);
if(isset($result->payload)){
$milestoneId = $result->payload['milestone_id'];
}
}
}
$taskStatus = PerfexCRMTaskStatus::NOT_STARTED;
if($tasks[$count]['status'] != ''){
$taskStatus = $tasks[$count]['status'];
}
// Get existing or create task
$result = $this->fetchesPerfexCRMTask->execute($tasks[$count]['name'], $milestoneId, 'project', $projectId);
if(isset($result->payload)){
break; //Breaking the rest of the tasks in array assuming that they are all created as a batch previously
//The following are code not needed at Shipping Portal, Exchange need certain task's status to be updated dynamically
// if($taskStatus != PerfexCRMTaskStatus::NOT_STARTED && $result->payload[0]['status'] == PerfexCRMTaskStatus::NOT_STARTED)
// {
// $task = $result->payload[0];
// $result = $this->updatesPerfexCRMTask->execute($task['id'], $task['name'], $task['milestone'], $task['rel_id'], $taskStatus, $task['startdate'], is_null($task['duedate']) ? '': $task['duedate']);
// }
}
else{
$result = $this->createsPerfexCRMTask->execute($tasks[$count]['name'], $tasks[$count]['description'], '', $milestoneId, $projectId, $tasks[$count]['reference'], $tasks[$count]['on_task_completion'], $tasks[$count]['department'], $taskStatus, $tasks[$count]['priority'], $tasks[$count]['duedate']);
}
}
}
return true;
}
}
@@ -0,0 +1,34 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class ConvertsPerfexCRMLeadToCustomer
{
/**
* @param string $email
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $email) {
try{
$response = Http::withHeaders([
'authtoken' => config('perfexcrm.api_key'),])
->get(config('perfexcrm.base_url').'/api/leads/convertocustomer/'.$email);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,37 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class CreatesPerfexCRMCustomer
{
/**
* @param string $companyName
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $companyName) {
try{
$data = [
'company' => $companyName
];
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/customers',$data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,44 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CustomerContactObject;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class CreatesPerfexCRMCustomerContact
{
/**
* @param CustomerContactObject $customerContactObject
* @return null|object
* @throws MalformedRequestException
*/
public function execute(CustomerContactObject $customerContactObject) {
try{
$data = [
'customer_id' => $customerContactObject->getCustomerId(),
'firstname' => $customerContactObject->getFirstName(),
'lastname' => $customerContactObject->getLastName(),
'email' => $customerContactObject->getEmail(), //$email
'password' => $customerContactObject->getPassword(),
'is_primary' => $customerContactObject->getIsPrimary(),
//'send_set_password_email' => $customerContactObject->getSendSetPasswordEmail(),
];
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/contacts',$data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,43 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class CreatesPerfexCRMCustomerProject
{
/**
* @param string $projectName
* @param string $clientId
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $projectName, int $status, string $clientId) {
try{
$data = [
'name' => $projectName,
'rel_type' => 'customer',
'billing_type' => 1,
'clientid' => $clientId,
'start_date' => date('Y-m-d'),
'status' => $status
];
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/projects',$data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,63 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\InvoicePerfexCRMObject;
class CreatesPerfexCRMInvoice
{
/**
* @param InvoicePerfexCRMObject $invoicePerfexCRMObject
* @return null|object
* @throws MalformedRequestException
*/
public function execute(InvoicePerfexCRMObject $invoicePerfexCRMObject) {
try{
$subtotal = floor($invoicePerfexCRMObject->getSubTotal() * 100) / 100;
$total = floor($invoicePerfexCRMObject->getTotal() * 100) / 100;
$data = [
'clientid' => $invoicePerfexCRMObject->getClientId(),
'number' => $invoicePerfexCRMObject->getNumber(),
'date' => $invoicePerfexCRMObject->getDate(),
'duedate' => $invoicePerfexCRMObject->getDueDate(),
'currency' => $invoicePerfexCRMObject->getCurrency(),
'subtotal' => number_format($subtotal, 2, '.', ''),
'total' => number_format($total, 2, '.', ''),
'billing_street' => $invoicePerfexCRMObject->getBillingStreet(),
'project_id' => $invoicePerfexCRMObject->getProjectId(),
'allowed_payment_modes[0]' => 1,
'allowed_payment_modes[1]' => 2,
];
for($count=0; $count < count($invoicePerfexCRMObject->getInvoiceItems()); $count++) {
$oneItem = [
"newitems[".$count."][description]" => $invoicePerfexCRMObject->getInvoiceItems()[$count]->description,
"newitems[".$count."][long_description]" => $invoicePerfexCRMObject->getInvoiceItems()[$count]->longDescription,
"newitems[".$count."][qty]" => $invoicePerfexCRMObject->getInvoiceItems()[$count]->qty,
"newitems[".$count."][rate]" => $invoicePerfexCRMObject->getInvoiceItems()[$count]->rate,
"newitems[".$count."][order]" => $invoicePerfexCRMObject->getInvoiceItems()[$count]->order,
"newitems[".$count."][unit]" => $invoicePerfexCRMObject->getInvoiceItems()[$count]->unit,
];
$data = array_merge($data, $oneItem);
}
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/invoices',$data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,43 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\InvoicePaymentPerfexCRMObject;
class CreatesPerfexCRMInvoicePayment
{
/**
* @param InvoicePaymentPerfexCRMObject $invoicePaymentPerfexCRMObject
* @return null|object
* @throws MalformedRequestException
*/
public function execute(InvoicePaymentPerfexCRMObject $invoicePaymentPerfexCRMObject) {
try{
$data = [
'invoiceid' => $invoicePaymentPerfexCRMObject->getInvoiceId(),
'amount' => number_format($invoicePaymentPerfexCRMObject->getAmount(), 2, '.', ''),
'date' => $invoicePaymentPerfexCRMObject->getDate(),
'paymentmode' => $invoicePaymentPerfexCRMObject->getPaymentMode(),
'transactionid' => $invoicePaymentPerfexCRMObject->getTransactionId(),
'note' => $invoicePaymentPerfexCRMObject->getNote(),
];
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/invoices/recordpayment',$data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,50 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CreateLeadPerfexCRMObject;
class CreatesPerfexCRMLead
{
/**
* @param CreateLeadPerfexCRMObject $createLeadPerfexCRMObject
* @return null|object
* @throws MalformedRequestException
*/
public function execute(CreateLeadPerfexCRMObject $createLeadPerfexCRMObject) {
try{
$custom_fields = [
"leads" => [
4 => $createLeadPerfexCRMObject->getCompanyReference()
]
];
$data = [
'name' => $createLeadPerfexCRMObject->getName(),
'email' => $createLeadPerfexCRMObject->getEmail(),
'phonenumber' => $createLeadPerfexCRMObject->getPhone(),
'company' => $createLeadPerfexCRMObject->getCompanyName(),
'source' => 2, //1: Exchange, 2: Shipping Portal
'status' => 2, //2: Lead, 1: Customer
'custom_fields' => $custom_fields
];
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/leads/byemail',$data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server ' . $exception->getMessage());
}
}
}
@@ -0,0 +1,46 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class CreatesPerfexCRMMilestone
{
/**
* @param string $$milestoneName
* @param string $projectId
* @param string $milestoneOrder
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $milestoneName, string $projectId, string $milestoneOrder = "") {
try{
$data = [
'name' => $milestoneName,
'project_id' => $projectId,
'due_date' => date('Y-m-d'),
'start_date' => date('Y-m-d')
];
if($milestoneOrder != ""){
$data['milestone_order'] = $milestoneOrder;
}
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/milestones',$data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,87 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
use App\Classes\ValueObjects\Constants\PerfexCRMCustomFields;
class CreatesPerfexCRMTask
{
/**
* @param string $taskName
* @param string $taskDescription
* @param string $leadId
* @param string $milestoneId
* @param string $projectId
* @param string $reference
* @param string $on_task_completion
* @param string $department
* @param string $status
* @param string $priority
* @param string $duedate
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $taskName, string $taskDescription, string $leadId, string $milestoneId, string $projectId, string $reference, string $on_task_completion, string $department, string $status, string $priority, string $duedate) {
try{
$custom_fields = [];
if($department != ""){
$custom_fields = [
"tasks" => [
PerfexCRMCustomFields::TASKS_DEPARTMENT => $department
]
];
}
$data = [
'name' => $taskName,
'description' => $taskDescription,
'milestone' => $milestoneId,
'startdate' => date('Y-m-d'),
'rel_type' => 'project',
'rel_id' => $projectId,
'status' => $status,
'is_system_created' => 1,
'reference' => $reference,
'on_task_completion' => $on_task_completion,
'custom_fields' => $custom_fields,
'priority' => $priority,
'duedate' => date('Y-m-d', strtotime('+' . $duedate . ' days')),
];
if($leadId != '') {
$data = [
'name' => $taskName,
'description' => $taskDescription,
'milestone' => $milestoneId,
'startdate' => date('Y-m-d'),
'rel_type' => 'lead',
'rel_id' => $leadId,
'status' => $status,
'is_system_created' => 1,
'reference' => $reference,
'on_task_completion' => $on_task_completion,
'custom_fields' => $custom_fields,
'priority' => $priority,
'duedate' => date('Y-m-d', strtotime('+' . $duedate . ' days')),
];
}
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/tasks',$data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,34 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class FetchesPerfexCRMCustomer
{
/**
* @param string $email
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $email) {
try{
$response = Http::withHeaders([
'authtoken' => config('perfexcrm.api_key'),])
->get(config('perfexcrm.base_url').'/api/customers/byemail/'.$email);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server: ' . $exception->getMessage());
}
}
}
@@ -0,0 +1,36 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class FetchesPerfexCRMInvoice
{
/**
* @param string $clientId
* @param string $invoicePrefix
* @param string $invoiceNumber
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $clientId, string $invoicePrefix, string $invoiceNumber) {
try{
$response = Http::withHeaders([
'authtoken' => config('perfexcrm.api_key'),])
->get(config('perfexcrm.base_url').'/api/invoices/customsearch/'.$clientId.'/'.$invoicePrefix.'/'.$invoiceNumber);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server: ' . $exception->getMessage());
}
}
}
@@ -0,0 +1,34 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class FetchesPerfexCRMLead
{
/**
* @param string $email
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $email) {
try{
$response = Http::withHeaders([
'authtoken' => config('perfexcrm.api_key'),])
->get(config('perfexcrm.base_url').'/api/leads/byemail/'.$email);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server: ' . $exception->getMessage());
}
}
}
@@ -0,0 +1,40 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class FetchesPerfexCRMMilestone
{
/**
* @param string $milestoneName
* @param string $projectId
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $milestoneName, string $projectId) {
try{
$data = [
'name' => $milestoneName,
'project_id' => $projectId,
];
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/milestones/bynameandprojectid', $data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,40 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class FetchesPerfexCRMProject
{
/**
* @param string $projectName
* @param string $clientId
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $projectName, string $clientId) {
try{
$data = [
'name' => $projectName,
'clientid' => $clientId,
];
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/projects/bynameandclientid', $data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,48 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class FetchesPerfexCRMTask
{
/**
* @param string $taskName
* @param string $milestoneId
* @param string $relType
* @param string $relId
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $taskName, string $milestoneId, string $relType, string $relId) {
try{
$data = [
'name' => $taskName,
'rel_type' => $relType,
'rel_id' => $relId,
];
if($milestoneId != '') {
$newItem = ['milestone' => $milestoneId ];
$data = array_merge($data, $newItem);
}
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/tasks/customsearch', $data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,47 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
use App\Classes\ValueObjects\Constants\PerfexCRMCustomFields;
class UpdatesPerfexCRMCustomer
{
/**
* @param string $customerId
* @param string $companyReference
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $customerId, string $companyName, string $companyReference) {
try{
$custom_fields = [
"customers" => [
PerfexCRMCustomFields::CUSTOMERS_SHIPPING_PORTAL_REFERENCE => $companyReference
]
];
$data = [
'company' => $companyName,
'custom_fields' => $custom_fields
];
$response = Http::asJson()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->put(config('perfexcrm.base_url').'/api/customers/'.$customerId, $data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -0,0 +1,70 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class UpdatesPerfexCRMInvoice
{
/**
* @param $invoice
* @param string $projectId
* @return null|object
* @throws MalformedRequestException
*/
public function execute($invoice, string $projectId) {
try{
// <p>The Invoice number field is required.<\/p>
// <p>The Invoice date field is required.<\/p>
// <p>The Currency field is required.<\/p>
// <p>The Items field is required.<\/p>
// <p>The Allow Payment Mode field is required.<\/p>
// <p>The Billing Street field is required.<\/p>
// <p>The Sub Total field is required.<\/p>
// <p>The Total field is required.<\/p>
$newInvoiceItems = [];
foreach ($invoice->items as $item) {
$item['itemid'] = $item['id'];
unset($item['id']);
$item['order'] = $item['item_order'];
unset($item['item_order']);
array_push($newInvoiceItems,$item);
}
$allowedPaymentModes = [];
array_push($allowedPaymentModes, 1, 2);
$data = [
'number' => $invoice->number,
'date' => $invoice->date,
'duedate' => $invoice->duedate,
'currency' => $invoice->currency,
'subtotal' => $invoice->subtotal,
'total' => $invoice->total,
'billing_street' => $invoice->billing_street,
'shipping_street' => $invoice->billing_street,
'project_id' => $projectId,
'items' => $newInvoiceItems,
'allowed_payment_modes' => $allowedPaymentModes,
];
$response = Http::asJson()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->put(config('perfexcrm.base_url').'/api/invoices/'.$invoice->id, $data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server: ' . $exception->getMessage());
}
}
}
@@ -0,0 +1,51 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
use App\Classes\ValueObjects\Constants\PerfexCRMCustomFields;
class UpdatesPerfexCRMLead
{
/**
* @param $lead
* @param string $companyReference
* @return null|object
* @throws MalformedRequestException
*/
public function execute($lead, string $companyReference) {
try{
$custom_fields = [
"leads" => [
PerfexCRMCustomFields::LEADS_SHIPPING_PORTAL_REFERENCE => $companyReference
]
];
$data = [
'name' => $lead->name,
'email' => $lead->email,
'phonenumber' => $lead->phonenumber,
'company' => $lead->company,
'custom_fields' => $custom_fields,
'source' => $lead->source,
'status' => $lead->status,
];
$response = Http::asJson()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->put(config('perfexcrm.base_url').'/api/leads/'.$lead->id, $data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server: ' . $exception->getMessage());
}
}
}
@@ -0,0 +1,43 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class UpdatesPerfexCRMProject
{
/**
* @param $project
* @param int $status
* @return null|object
* @throws MalformedRequestException
*/
public function execute($project, int $status) {
try{
$data = [
'name' => $project['name'],
'clientid' => $project['clientid'],
// 'rel_type' => 'customer',
'billing_type' => 1,
'start_date' => $project['start_date'],
'status' => $status
];
$response = Http::asJson()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->put(config('perfexcrm.base_url').'/api/projects/'.$project['íd'], $data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server: ' . $exception->getMessage());
}
}
}
@@ -0,0 +1,48 @@
<?php
namespace App\Classes\Modules\PerfexCRM\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class UpdatesPerfexCRMTask
{
/**
* @param string $taskName
* @param string $milestoneId
* @param string $projectId
* @param string $status, default: 1
* @return null|object
* @throws MalformedRequestException
*/
public function execute(string $taskId, string $taskName, string $milestoneId, string $projectId, string $status = "1") {
try{
$data = [
'name' => $taskName,
'milestone' => $milestoneId,
'startdate' => date('Y-m-d'),
'duedate' => date('Y-m-d'),
'rel_type' => 'project',
'rel_id' => $projectId,
'status' => $status,
'repeat_every' => '',
];
$response = Http::asJson()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->put(config('perfexcrm.base_url').'/api/tasks/'.$taskId, $data);
if($response->successful()){
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server' . $exception->getMessage());
}
}
}
@@ -3,12 +3,13 @@
namespace App\Classes\Modules\Transactions\ControllersLogic;
use App\Classes\Modules\Transactions\Processors\ApproveShippingInvoiceTransactionProcessor;
use App\Classes\Notifications\InvoiceIssuedEmail;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Meneses\LaravelMpdf\Facades\LaravelMpdf;
use Mccarlosen\LaravelMpdf\Facades\LaravelMpdf;
use App\Classes\ValueObjects\Constants\DocumentType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\TransactionType;
@@ -36,29 +37,17 @@ class ApproveShippingInvoiceTransactionLogic extends AbstractControllerLogic
/** @var FetchesPackingList */
private $fetchesPackingList;
/** @var UpdatesTransactionStatus */
private $updatesTransactionStatus;
/** @var CreatesDocument */
private $createsDocument;
/** @var CreatesFiles */
private $createsFiles;
/** @var ApproveShippingInvoiceTransactionProcessor */
private $approveShippingInvoiceTransactionProcessor;
/**
* ApprovePaymentVerificationLogic constructor.
* @param FetchesPackingList $fetchesPackingList
* @param UpdatesTransactionStatus $updatesTransactionStatus
* @param CreatesDocument $createsDocument
* @param CreatesFiles $createsFiles
* @param CreateInvoiceTransactionProcessor $createInvoiceTransactionProcessor
* @param ApproveShippingInvoiceTransactionProcessor $approveShippingInvoiceTransactionProcessor
*/
public function __construct(FetchesPackingList $fetchesPackingList, UpdatesTransactionStatus $updatesTransactionStatus, CreatesDocument $createsDocument, CreatesFiles $createsFiles)
public function __construct(FetchesPackingList $fetchesPackingList, ApproveShippingInvoiceTransactionProcessor $approveShippingInvoiceTransactionProcessor)
{
$this->fetchesPackingList = $fetchesPackingList;
$this->updatesTransactionStatus = $updatesTransactionStatus;
$this->createsDocument = $createsDocument;
$this->createsFiles = $createsFiles;
$this->approveShippingInvoiceTransactionProcessor = $approveShippingInvoiceTransactionProcessor;
}
/**
@@ -69,29 +58,8 @@ class ApproveShippingInvoiceTransactionLogic extends AbstractControllerLogic
public function logic(Request $request) : JsonResponse
{
$packing_list = $this->fetchesPackingList->execute(['id' => $request->route('id')]);
$this->approveShippingInvoiceTransactionProcessor->execute($packing_list);
$invoice_transaction = $packing_list->transactions()->where('transactions.type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::PENDING_SUBMISSION])->first();
$this->updatesTransactionStatus->execute($invoice_transaction, ApprovalStatus::APPROVED);
$transaction_invoice_pdf = LaravelMpdf::loadView('pages.pdfs.shipping_invoice', ['invoice_transaction' => $invoice_transaction]);
$document_object = new DocumentObject(
DocumentType::SHIPPING_INVOICE,
[chunk_split('data:application/pdf;base64,'.base64_encode($transaction_invoice_pdf->output()))],
'',
ApprovalStatus::COMPLETED,
'shipping_invoice'
);
/** @var Document $document */
$document = $this->createsDocument->execute($invoice_transaction, $document_object);
$this->createsFiles->execute($document, $document_object);
$user = $packing_list->owner->companyModule->employees()->first();
if(app()->environment(['production'])) {
$user->notify(new InvoiceIssuedEmail($user, $packing_list));
}
return $this->response([]);
}
@@ -23,7 +23,7 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Meneses\LaravelMpdf\Facades\LaravelMpdf;
use Mccarlosen\LaravelMpdf\Facades\LaravelMpdf;
class CreatePaymentTransactionLogic extends AbstractControllerLogic
{
@@ -5,40 +5,15 @@ namespace App\Classes\Modules\Transactions\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
use App\Classes\Modules\SegmentConstants\Services\FetchesSegmentConstant;
use App\Classes\Modules\Transactions\Services\GeneratesTransactionBillNumber;
use App\Classes\Modules\Transactions\Services\CreatesTransaction;
use App\Classes\Modules\Transactions\Services\CreatesTransactionDetail;
use App\Classes\Modules\Documents\Services\CreatesDocument;
use App\Classes\Modules\Documents\Services\CreatesFiles;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionObject;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionDetailObject;
use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\ValueObjects\Constants\PaymentMethodType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\DocumentType;
use App\Classes\ValueObjects\Constants\PackageType;
use App\Classes\ValueObjects\Constants\SegmentConstants;
use App\Classes\ValueObjects\Constants\TransactionDetailType;
use App\Models\Document;
use App\Models\PackingList;
use App\Models\Transaction;
use Carbon\Carbon;
use App\Classes\Modules\Transactions\Processors\CreateInvoiceTransactionProcessor;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Meneses\LaravelMpdf\Facades\LaravelMpdf;
class CreateShippingInvoiceTransactionLogic extends AbstractControllerLogic
{
/**
* @return array
*/
@@ -52,217 +27,26 @@ class CreateShippingInvoiceTransactionLogic extends AbstractControllerLogic
/** @var FetchesPackingList */
private $fetchesPackingList;
/** @var FetchesSegmentConstant */
private $fetchesSegmentConstant;
/** @var CreateInvoiceTransactionProcessor */
private $createInvoiceTransactionProcessor;
/** @var GeneratesTransactionBillNumber */
private $generatesTransactionBillNumber;
/** @var CreatesTransaction */
private $createsTransaction;
/** @var CreatesTransactionDetail */
private $createsTransactionDetail;
/** @var CreatesDocument */
private $createsDocument;
/** @var CreatesFiles */
private $createsFile;
public function __construct(
FetchesPackingList $fetchesPackingList,
FetchesSegmentConstant $fetchesSegmentConstant,
GeneratesTransactionBillNumber $generatesTransactionBillNumber,
CreatesTransaction $createsTransaction,
CreatesTransactionDetail $createsTransactionDetail,
CreatesDocument $createsDocument,
CreatesFiles $createsFile
)
/**
* @param FetchesPackingList $fetchesPackingList
* @param CreateInvoiceTransactionProcessor $createInvoiceTransactionProcessor
*/
public function __construct(FetchesPackingList $fetchesPackingList, CreateInvoiceTransactionProcessor $createInvoiceTransactionProcessor)
{
$this->fetchesPackingList = $fetchesPackingList;
$this->fetchesSegmentConstant = $fetchesSegmentConstant;
$this->generatesTransactionBillNumber = $generatesTransactionBillNumber;
$this->createsTransaction = $createsTransaction;
$this->createsTransactionDetail = $createsTransactionDetail;
$this->createsDocument = $createsDocument;
$this->createsFile = $createsFile;
$this->createInvoiceTransactionProcessor = $createInvoiceTransactionProcessor;
}
public function logic(Request $request) : JsonResponse
{
$packing_list = $this->fetchesPackingList->execute(['id' => $request->input('packing_list_id')]);
$packing_list = PackingList::where('reference', $packing_list->reference)->where('type', PackingListType::SHIPPING_PACKING_LIST)->first();
$billable_packing_list = $packing_list->packingLists()->first();
$billable_packing_list = $billable_packing_list ? $billable_packing_list : $packing_list;
$cbm = round($billable_packing_list->packages->where('type', '!=', PackageType::OVER_WEIGHT)->sum(function($package) {
return ($package->width / 100) * ($package->height / 100) *($package->length / 100) * ($package->quantity);
}), 3);
$over_weight_cbm = round($billable_packing_list->packages->where('type', PackageType::OVER_WEIGHT)->sum(function($package) {
return ($package->width / 100) * ($package->height / 100) *($package->length / 100) * ($package->quantity);
}), 3);
$order = $packing_list->owner;
$companyModule = $order->companyModule;
$connection = $companyModule->connections()->first();
$address = $order->addresses()->first();
$base_price_constant = $this->fetchesSegmentConstant->execute(['segment_id' => 1, 'reference' => SegmentConstants::BASE_PRICE]);
$warehouse_rate_constant = $this->fetchesSegmentConstant->execute(['segment_id' => 1, 'reference' => SegmentConstants::WAREHOUSE_RATE]);
$state_rate_constant = $this->fetchesSegmentConstant->execute(['segment_id' => 1, 'reference' => SegmentConstants::STATE_RATE]);
$center_postcode_constant = $this->fetchesSegmentConstant->execute(['segment_id' => 1, 'reference' => SegmentConstants::CENTER_POSTCODE]);
$outstation_postcode_constant = $this->fetchesSegmentConstant->execute(['segment_id' => 1, 'reference' => SegmentConstants::OUTSTATION_POSTCODE]);
$noMinimumCharge = $connection->segments()->where('segments.id', 2)->first();
$base_price = 0;
$warehouse_rate = 0;
$state_rate = 0;
$minimum_cbm = 0.3;
$segment_price = 0;
$state_select = '';
$segment_price = $connection->segments()->whereHas('constants', function($query){
return $query->where('reference', SegmentConstants::CUSTOM_PRICE);
})->get()->map(function($segment){
return (float) $segment->constants()->first()->value[0];
})->sort()->first();
$segment_price = $segment_price ? $segment_price : 0;
$packing_list_drop_date = PackingList::where('reference', $packing_list->reference)->where('type', 1)->first()->transports->first()->drop_date->format('Y-m-d');
$base_price = $this->getConstantByKey($base_price_constant, $packing_list_drop_date);
$warehouseId = $order->orderRoles()->where('role_id', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->company_module_id;
$selected_warehouse_rate = $this->getConstantByKey($warehouse_rate_constant, $warehouseId);
$warehouse_rate = is_object($selected_warehouse_rate) ? $selected_warehouse_rate->amount : 0;
$stateId = $address->state_id;
$state_rate_constant = $this->getConstantByKey($state_rate_constant, $stateId);
// get $state_rate
$postcode = $address->postcode;
$this->checkPostcodeExistInConstant($center_postcode_constant, $postcode) === true ? $state_select = 'center' : '' ;
$this->checkPostcodeExistInConstant($outstation_postcode_constant, $postcode) === true ? $state_select = 'outstation' : '' ;
$state_rate_constant = (array)$state_rate_constant;
$state_rate = $state_select == '' ? 0 : $state_rate_constant[$state_select];
$container = $packing_list->containers()->first();
$containerPackingLists = collect();
$hasMinimumCharge = null;
foreach ($container->packingLists as $packingList){
if($packingList->owner->companyModule->id !== $companyModule->id) continue;
$containerPackingLists->push($packingList);
if(!$hasMinimumCharge) {
$hasMinimumCharge = $packingList->transactions()->whereHas('transactionDetails', function ($query){
$query->where('reference', 'MIN_CBM_CHARGES');
})->first();
}
}
$totalContainerCbm = $containerPackingLists->sum(function($packingList){
$billable_packing_list = $packingList->packingLists()->first();
$billable_packing_list = $billable_packing_list ? $billable_packing_list : $packingList;
return $billable_packing_list->packages->where('type', '!=', PackageType::OVER_WEIGHT)->sum(function($package) {
return ($package->width / 100) * ($package->height / 100) *($package->length / 100) * ($package->quantity);
});
});
$minimum_charge = $minimum_cbm - $totalContainerCbm;
$minimum_charge = $minimum_charge < 0 ? 0 : $minimum_charge;
$minimum_charge = $noMinimumCharge ? 0 : $minimum_charge;
$minimum_charge = $noMinimumCharge ? 0 : round($minimum_charge, 3);
if($hasMinimumCharge) {
$minimum_charge = 0;
}
$price_cbm = $base_price + $segment_price + $warehouse_rate + $state_rate;
$total_cbm = $price_cbm * ($cbm + $minimum_charge + $over_weight_cbm);
$billNumber = $this->generatesTransactionBillNumber->execute('SHIP-');
$object = new TransactionObject(
$billNumber,
TransactionType::SHIPPING_INVOICE,
1,
$order->company_module_id,
1,
PaymentMethodType::CASH,
$total_cbm,
$total_cbm,
1,
1,
0,
0,
0,
null,
ApprovalStatus::PENDING_SUBMISSION
);
/** @var Transaction $invoice_transaction */
$invoice_transaction = $this->createsTransaction->execute($packing_list, $object);
$object_detail = new TransactionDetailObject(
'SHIPPING_FEE',
TransactionDetailType::SHIPPING_FEE.'<br>'.round($packing_list->packages->where('type', '!=', PackageType::OVER_WEIGHT)->sum('quantity'), 3).' CTNS - '.round($cbm, 3).' CBM',
$cbm,
$price_cbm
);
$this->createsTransactionDetail->execute($invoice_transaction, $object_detail);
if ($over_weight_cbm > 0) {
$object_detail = new TransactionDetailObject(
'OVER_WEIGHT_CHARGES',
TransactionDetailType::OVER_WEIGHT_CHARGES,
$over_weight_cbm,
$price_cbm
);
$this->createsTransactionDetail->execute($invoice_transaction, $object_detail);
}
if ($minimum_charge > 0) {
$object_detail = new TransactionDetailObject(
'MIN_CBM_CHARGES',
TransactionDetailType::MIN_CBM_CHARGES,
$minimum_charge,
$price_cbm
);
$this->createsTransactionDetail->execute($invoice_transaction, $object_detail);
}
$this->createInvoiceTransactionProcessor->execute($packing_list);
return $this->response([]);
}
function getConstantByKey($segmentConstantObject, $key) {
if ($segmentConstantObject) {
$base_rate = (array) $segmentConstantObject->value;
$base_rate = array_key_exists($key, $base_rate) === true ? $base_rate[$key] : 0;
return $base_rate;
}
}
function checkPostcodeExistInConstant($segmentConstantObject, $postcode) {
$segmentConstantObject = $segmentConstantObject->value;
if (!empty($segmentConstantObject)) {
return in_array($postcode, $segmentConstantObject);
} else {
return false;
}
}
}
@@ -27,7 +27,7 @@ use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Meneses\LaravelLaravelMpdf\Facades\LaravelLaravelMpdf;
use Meneses\LaravelMpdf\Facades\LaravelMpdf;
use Mccarlosen\LaravelMpdf\Facades\LaravelMpdf;
class CreateSupplierTransactionLogic extends AbstractControllerLogic
{
@@ -7,7 +7,7 @@ use App\Models\Transaction;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Storage;
use Meneses\LaravelMpdf\Facades\LaravelMpdf;
use Mccarlosen\LaravelMpdf\Facades\LaravelMpdf;
use App\Classes\ValueObjects\Constants\DocumentType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\TransactionType;
@@ -1,204 +0,0 @@
<?php
namespace App\Classes\Modules\Transactions\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Transactions\Standards\Rules\CanCreateTransaction;
use App\Classes\Modules\Transactions\Standards\Rules\CanCreateTransactionDetail;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionObject;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionDetailObject;
use App\Classes\Modules\Transactions\Services\CreatesTransaction;
use App\Classes\Modules\Transactions\Services\CreatesTransactionDetail;
use App\Classes\Modules\Transactions\Services\GeneratesTransactionBillNumber;
use App\Http\Resources\TransactionResource;
use App\Http\Resources\TransactionDetailResource;
use App\Classes\Modules\Receipts\Standards\Rules\CanCreateReceipt;
use App\Classes\Modules\Receipts\Standards\Rules\CanCreateReceiptDetail;
use App\Classes\Modules\Receipts\DataTransferObjects\ReceiptObject;
use App\Classes\Modules\Receipts\DataTransferObjects\ReceiptDetailObject;
use App\Classes\Modules\Receipts\Services\CreatesReceipt;
use App\Classes\Modules\Receipts\Services\CreatesReceiptDetail;
use App\Classes\Modules\Receipts\Services\GeneratesReceiptBillNo;
use App\Classes\Modules\Currencies\Services\FetchesCurrency;
use App\Classes\Modules\Currencies\Services\RateCalculatesCurrency;
use App\Classes\Modules\Transactions\Services\FetchesTransaction;
use App\Classes\Modules\Transactions\Services\FetchesTransactionDetail;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Models\Transaction;
use App\Models\multipleInvoicesWithOnePayment;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\Modules\Wallets\Services\UpdatesWalletBalance;
use App\Classes\ValueObjects\Constants\PaymentMethodType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\Modules\Billplzs\Services\CreatesBillplzBill;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Wallets\Services\GeneratesWalletCode;
use App\Classes\Modules\Wallets\Services\CreatesWallet;
use APP\models\PackingList;
class multipleInvoicesWithOnePaymentLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Created Transaction',
'message' => 'You have successfully created a transaction'
];
}
/** @var GeneratesTransactionBillNumber */
private $generatesTransactionBillNo;
/** @var CanCreateTransaction */
private $canCreateTransaction;
private $fetchesCurrency;
private $rateCalculatesCurrency;
private $fetchesCompany;
private $createsTransaction;
private $canCreateTransactionDetail;
private $createsTransactionDetail;
private $fetchesTransaction;
private $fetchesTransactionDetail;
private $generatesReceiptBillNo;
/** @var CanCreateReceipt */
private $canCreateReceipt;
private $createsReceipt;
private $canCreateReceiptDetail;
private $createsReceiptDetail;
public function __construct(
GeneratesTransactionBillNumber $generatesTransactionBillNo, CanCreateTransaction $canCreateTransaction,
FetchesCurrency $fetchesCurrency, RateCalculatesCurrency $rateCalculatesCurrency, FetchesCompany $fetchesCompany,
CreatesTransaction $createsTransaction,
CanCreateTransactionDetail $canCreateTransactionDetail, CreatesTransactionDetail $createsTransactionDetail,
FetchesTransaction $fetchesTransaction , FetchesTransactionDetail $fetchesTransactionDetail,
GeneratesReceiptBillNo $generatesReceiptBillNo, CanCreateReceipt $canCreateReceipt,
CreatesReceipt $createsReceipt,
CanCreateReceiptDetail $canCreateReceiptDetail, CreatesReceiptDetail $createsReceiptDetail
){
$this->generatesTransactionBillNo = $generatesTransactionBillNo;
$this->canCreateTransaction = $canCreateTransaction;
$this->fetchesCurrency = $fetchesCurrency;
$this->rateCalculatesCurrency = $rateCalculatesCurrency;
$this->fetchesCompany = $fetchesCompany;
$this->createsTransaction =$createsTransaction;
$this->canCreateTransactionDetail =$canCreateTransactionDetail;
$this->createsTransactionDetail = $createsTransactionDetail;
$this->fetchesTransaction = $fetchesTransaction;
$this->fetchesTransactionDetail = $fetchesTransactionDetail;
$this->generatesReceiptBillNo = $generatesReceiptBillNo;
$this->canCreateReceipt = $canCreateReceipt;
$this->createsReceipt =$createsReceipt;
$this->canCreateReceiptDetail =$canCreateReceiptDetail;
$this->createsReceiptDetail = $createsReceiptDetail;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic( $transactionsArray) : JsonResponse
{
// dd($request);
try {
// dd(json_decode($transactionsArray));
$transactions = Transaction::whereIn('id', json_decode($transactionsArray))->where('type', TransactionType::SHIPPING_INVOICE)->get();
$total = $transactions->sum('amount');
$packingList =$transactions[1]->owner;
$order = $packingList->owner;
$companyModule = $order->companyModule;
$company = $companyModule->company;
$wallet = $company->wallets()->first();
if (!$wallet) {
$object = new WalletObject($company->id, 1, (App()->make(GeneratesWalletCode::class))->execute());
/** @var Wallet $wallet */
$wallet = (App()->make(CreatesWallet::class))->execute($object, $company);
}
$billNumber = (App()->make(GeneratesTransactionBillNumber::class))->execute('TOPUP-');
if($total < 0) {
throw new MalformedRequestException('Top up credit value must be greater than zero.');
}
$billPlzBill = (App()->make(CreatesBillplzBill::class))->execute($company->name, 'example@gmail.com', 'This payment is credit topup for company ref. ' . $company->reference, $total, $billNumber, 'bank code', true);
$transaction_object = new TransactionObject($billNumber, TransactionType::TOP_UP, 1, $company->id, 1, PaymentMethodType::PAYMENT_GATEWAY, $total, $total, 1, 1, 1, 0, 0, null, ApprovalStatus::PENDING_SUBMISSION, [], 'test');
// $transaction = $this->createsTransaction->execute($wallet, $transaction_object);
$transaction = (App()->make(CreatesTransaction::class))->execute($wallet, $transaction_object);
$result= (App()->make(UpdatesWalletBalance::class))->execute($wallet, $total);
foreach ($transactions as $key => $value) {
multipleInvoicesWithOnePayment::create([ 'topUp_request_id' => $transaction->id, 'transaction_id' => $value->id ]);
}
return $this->response([]); ;
} catch (\Exception $exception) {
throw new ErrorException($exception->getMessage(), $exception->getCode());
}
}
public function verifypayment( $topUp_transaction_id, $amount) : JsonResponse
{
$totalamount =0;
$topup = multipleInvoicesWithOnePayment::where('topUp_request_id',$topUp_transaction_id)->get();
foreach ($topup as $key => $value) {
$transaction = Transaction::where('id',$value->transaction_id)->frist();
$totalamount += $transaction->amount;
(App()->make(updatesTransactionStatus::class))->execute($transaction, ApprovalStatus::APPROVED);
$transaction_object = new TransactionObject($transaction->bill_no, TransactionType::PAYMENT, 1, $topUp_transaction_id, 1, PaymentMethodType::PAYMENT_GATEWAY, $transaction->amount, $transaction->amount, 1, 1, 1, 0, 0, null, ApprovalStatus::APPROVED, [], 'test');
$transaction = (App()->make(CreatesTransaction::class))->execute($transaction, $transaction_object);
}
$amount = $amount - $totalamount;
Transaction::where('id', $topUp_transaction_id)->update(['amount'=> $amount]);
}
}
@@ -0,0 +1,81 @@
<?php
namespace App\Classes\Modules\Transactions\Processors;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\Notifications\InvoiceIssuedEmail;
use App\Models\Document;
use App\Models\PackingList;
use App\Models\Transaction;
use Mccarlosen\LaravelMpdf\Facades\LaravelMpdf;
use App\Classes\ValueObjects\Constants\DocumentType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\Modules\Documents\Services\CreatesFiles;
use App\Classes\Modules\Documents\Services\CreatesDocument;
use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
use App\Classes\Jobs\CreatePerfexCRMInvoice;
class ApproveShippingInvoiceTransactionProcessor
{
/** @var UpdatesTransactionStatus */
private $updatesTransactionStatus;
/** @var CreatesDocument */
private $createsDocument;
/** @var CreatesFiles */
private $createsFiles;
/**
* @param UpdatesTransactionStatus $updatesTransactionStatus
* @param CreatesDocument $createsDocument
* @param CreatesFiles $createsFiles
*/
public function __construct(UpdatesTransactionStatus $updatesTransactionStatus, CreatesDocument $createsDocument, CreatesFiles $createsFiles)
{
$this->updatesTransactionStatus = $updatesTransactionStatus;
$this->createsDocument = $createsDocument;
$this->createsFiles = $createsFiles;
}
/**
* @param PackingList $packingList
* @throws MalformedRequestException
*/
public function execute(PackingList $packingList)
{
/** @var Transaction $invoice_transaction */
$invoice_transaction = $packingList->transactions()->where('transactions.type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::PENDING_SUBMISSION])->first();
$this->updatesTransactionStatus->execute($invoice_transaction, ApprovalStatus::APPROVED);
$transaction_invoice_pdf = LaravelMpdf::loadView('pages.pdfs.shipping_invoice', ['invoice_transaction' => $invoice_transaction]);
$document_object = new DocumentObject(
DocumentType::SHIPPING_INVOICE,
[chunk_split('data:application/pdf;base64,'.base64_encode($transaction_invoice_pdf->output()))],
'',
ApprovalStatus::COMPLETED,
'shipping_invoice'
);
/** @var Document $document */
$document = $this->createsDocument->execute($invoice_transaction, $document_object);
$this->createsFiles->execute($document, $document_object);
$user = $packingList->owner->companyModule->employees()->first();
if(app()->environment(['production'])) {
$user->notify(new InvoiceIssuedEmail($user, $packingList));
}
return;
}
}
@@ -1,229 +1,247 @@
<?php
namespace App\Classes\Modules\Transactions\Processors;
use App\Classes\Modules\Bookings\Services\CalculatesBookingTransferredAmount;
use App\Classes\Modules\ServiceTypes\Services\FetchesServiceConfigurations;
use App\Classes\Modules\Transactions\Services\ListsTransactions;
use App\Classes\Modules\Transactions\Services\CreatesTransaction;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
use App\Classes\Modules\SegmentConstants\Services\FetchesSegmentConstant;
use App\Classes\Modules\Transactions\Services\GeneratesTransactionBillNumber;
use App\Classes\Modules\Bookings\Services\CalculatesBookingPaidAmount;
use App\Classes\Modules\Bookings\Services\CalculatesBookingCurrencyAverageRate;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Transactions\Services\CreatesTransaction;
use App\Classes\Modules\Transactions\Services\CreatesTransactionDetail;
use App\Classes\Modules\Documents\Services\CreatesDocument;
use App\Classes\Modules\Documents\Services\CreatesFiles;
use App\Classes\Modules\Bookings\Services\UpdatesBookingStatus;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionObject;
use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\SegmentConstants;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionDetailObject;
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
use App\Classes\ValueObjects\Constants\PackingListType;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\ValueObjects\Constants\DocumentType;
use App\Models\Booking;
use App\Classes\ValueObjects\Constants\PaymentMethodType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\PackageType;
use App\Classes\ValueObjects\Constants\SegmentConstants;
use App\Classes\ValueObjects\Constants\TransactionDetailType;
use App\Models\CompanyModule;
use App\Models\Document;
use App\Models\SegmentConstant;
use Meneses\LaravelMpdf\Facades\LaravelMpdf;
use App\Models\PackingList;
use App\Models\Transaction;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Mccarlosen\LaravelMpdf\Facades\LaravelMpdf;
class CreateInvoiceTransactionProcessor
{
/** @var ListsTransactions */
private $listsTransactions;
/** @var CreatesTransaction */
private $createsTransaction;
/** @var FetchesPackingList */
private $fetchesPackingList;
/** @var FetchesSegmentConstant */
private $fetchesSegmentConstant;
/** @var GeneratesTransactionBillNumber */
private $generatesTransactionBillNumber;
/** @var CalculatesBookingPaidAmount */
private $calculatesBookingPaidAmount;
/** @var CreatesTransaction */
private $createsTransaction;
/** @var CalculatesBookingTransferredAmount */
private $calculatesBookingTransferredAmount;
/** @var FetchesServiceConfigurations */
private $fetchesServiceConfigurations;
/** @var CalculatesBookingCurrencyAverageRate */
private $calculatesBookingCurrencyAverageRate;
/** @var FetchesCompany */
private $fetchesCompany;
/** @var CreatesDocument */
private $createsDocument;
/** @var CreatesFiles */
private $createsFile;
/** @var UpdatesBookingStatus */
private $updatesBookingStatus;
/** @var CreatesTransactionDetail */
private $createsTransactionDetail;
/**
* CreateInvoiceTransactionProcessor constructor.
* @param ListsTransactions $listsTransactions
* @param CreatesTransaction $createsTransaction
* @param FetchesPackingList $fetchesPackingList
* @param FetchesSegmentConstant $fetchesSegmentConstant
* @param GeneratesTransactionBillNumber $generatesTransactionBillNumber
* @param CalculatesBookingPaidAmount $calculatesBookingPaidAmount
* @param CalculatesBookingTransferredAmount $calculatesBookingTransferredAmount
* @param FetchesServiceConfigurations $fetchesServiceConfigurations
* @param CalculatesBookingCurrencyAverageRate $calculatesBookingCurrencyAverageRate
* @param FetchesCompany $fetchesCompany
* @param CreatesDocument $createsDocument
* @param CreatesFiles $createsFile
* @param UpdatesBookingStatus $updatesBookingStatus
* @param CreatesTransaction $createsTransaction
* @param CreatesTransactionDetail $createsTransactionDetail
*/
public function __construct(ListsTransactions $listsTransactions, CreatesTransaction $createsTransaction, GeneratesTransactionBillNumber $generatesTransactionBillNumber, CalculatesBookingPaidAmount $calculatesBookingPaidAmount, CalculatesBookingTransferredAmount $calculatesBookingTransferredAmount, FetchesServiceConfigurations $fetchesServiceConfigurations, CalculatesBookingCurrencyAverageRate $calculatesBookingCurrencyAverageRate, FetchesCompany $fetchesCompany, CreatesDocument $createsDocument, CreatesFiles $createsFile, UpdatesBookingStatus $updatesBookingStatus)
public function __construct(FetchesPackingList $fetchesPackingList, FetchesSegmentConstant $fetchesSegmentConstant, GeneratesTransactionBillNumber $generatesTransactionBillNumber, CreatesTransaction $createsTransaction, CreatesTransactionDetail $createsTransactionDetail)
{
$this->listsTransactions = $listsTransactions;
$this->createsTransaction = $createsTransaction;
$this->fetchesPackingList = $fetchesPackingList;
$this->fetchesSegmentConstant = $fetchesSegmentConstant;
$this->generatesTransactionBillNumber = $generatesTransactionBillNumber;
$this->calculatesBookingPaidAmount = $calculatesBookingPaidAmount;
$this->calculatesBookingTransferredAmount = $calculatesBookingTransferredAmount;
$this->fetchesServiceConfigurations = $fetchesServiceConfigurations;
$this->calculatesBookingCurrencyAverageRate = $calculatesBookingCurrencyAverageRate;
$this->fetchesCompany = $fetchesCompany;
$this->createsDocument = $createsDocument;
$this->createsFile = $createsFile;
$this->updatesBookingStatus = $updatesBookingStatus;
$this->createsTransaction = $createsTransaction;
$this->createsTransactionDetail = $createsTransactionDetail;
}
/**
* @param Booking $booking
* @return void
* @throws \App\Classes\Exceptions\MalformedRequestException
* @throws MalformedRequestException
*/
public function execute(Booking $booking)
public function execute(PackingList $packingList)
{
$payment_amount = $this->calculatesBookingTransferredAmount->execute($booking, $booking->fix_currency_id);
$booking_amount = $booking->fix_amount;
$packing_list = PackingList::where('reference', $packingList->reference)->where('type', PackingListType::SHIPPING_PACKING_LIST)->first();
$billable_packing_list = $packing_list->packingLists()->first();
$billable_packing_list = $billable_packing_list ? $billable_packing_list : $packing_list;
$cbm = round($billable_packing_list->packages->where('type', '!=', PackageType::OVER_WEIGHT)->sum(function($package) {
return ($package->width / 100) * ($package->height / 100) *($package->length / 100) * ($package->quantity);
}), 3);
$over_weight_cbm = round($billable_packing_list->packages->where('type', PackageType::OVER_WEIGHT)->sum(function($package) {
return ($package->width / 100) * ($package->height / 100) *($package->length / 100) * ($package->quantity);
}), 3);
$order = $packing_list->owner;
$companyModule = $order->companyModule;
$connection = $companyModule->connections()->first();
$address = $order->addresses()->first();
$base_price_constant = $this->fetchesSegmentConstant->execute(['segment_id' => 1, 'reference' => SegmentConstants::BASE_PRICE]);
$warehouse_rate_constant = $this->fetchesSegmentConstant->execute(['segment_id' => 1, 'reference' => SegmentConstants::WAREHOUSE_RATE]);
$state_rate_constant = $this->fetchesSegmentConstant->execute(['segment_id' => 1, 'reference' => SegmentConstants::STATE_RATE]);
$center_postcode_constant = $this->fetchesSegmentConstant->execute(['segment_id' => 1, 'reference' => SegmentConstants::CENTER_POSTCODE]);
$outstation_postcode_constant = $this->fetchesSegmentConstant->execute(['segment_id' => 1, 'reference' => SegmentConstants::OUTSTATION_POSTCODE]);
$noMinimumCharge = $connection->segments()->where('segments.id', 2)->first();
$minimum_cbm = 0.3;
$state_select = '';
$segment_price = $connection->segments()->whereHas('constants', function($query){
return $query->where('reference', SegmentConstants::CUSTOM_PRICE);
})->get()->map(function($segment){
return (float) $segment->constants()->first()->value[0];
})->sort()->first();
$segment_price = $segment_price ? $segment_price : 0;
$arrivalTransport = PackingList::where('reference', $packing_list->reference)->where('type', 1)->first()->transports->first();
if(!$arrivalTransport) {
throw new MalformedRequestException('Arrival date is unknow can\'t generate invoice');
}
$packing_list_drop_date = $arrivalTransport->drop_date->format('Y-m-d');
$base_price = $this->getConstantByKey($base_price_constant, $packing_list_drop_date);
$warehouseId = $order->orderRoles()->where('role_id', OrderRoleTypes::ORIGIN_WAREHOUSE)->first()->company_module_id;
$selected_warehouse_rate = $this->getConstantByKey($warehouse_rate_constant, $warehouseId);
$warehouse_rate = is_object($selected_warehouse_rate) ? $selected_warehouse_rate->amount : 0;
$stateId = $address->state_id;
$state_rate_constant = $this->getConstantByKey($state_rate_constant, $stateId);
// get $state_rate
$postcode = $address->postcode;
$this->checkPostcodeExistInConstant($center_postcode_constant, $postcode) === true ? $state_select = 'center' : '' ;
$this->checkPostcodeExistInConstant($outstation_postcode_constant, $postcode) === true ? $state_select = 'outstation' : '' ;
$state_rate_constant = (array)$state_rate_constant;
$state_rate = $state_select == '' ? 0 : $state_rate_constant[$state_select];
$container = $packing_list->containers()->first();
$containerPackingLists = collect();
$hasMinimumCharge = null;
foreach ($container->packingLists as $packingList){
if($packingList->owner instanceof CompanyModule) continue;
if($packingList->owner->companyModule->id !== $companyModule->id) continue;
$containerPackingLists->push($packingList);
if(!$hasMinimumCharge) {
$hasMinimumCharge = $packingList->transactions()->whereHas('transactionDetails', function ($query){
$query->where('reference', 'MIN_CBM_CHARGES');
})->first();
}
if ((float) $booking_amount !== (float) $payment_amount) {
return;
}
$po_order_transaction = $booking->transactions()
->where('type', TransactionType::PURCHASE_ORDER)
->complete()
->first();
$totalContainerCbm = $containerPackingLists->sum(function($packingList){
$billable_packing_list = $packingList->packingLists()->first();
$billable_packing_list = $billable_packing_list ? $billable_packing_list : $packingList;
return $billable_packing_list->packages->sum(function($package) {
return ($package->width / 100) * ($package->height / 100) *($package->length / 100) * ($package->quantity);
});
});
$constants = SegmentConstant::where('reference', SegmentConstants::SERVICE_TYPE)->where('detail->id', $booking->service->id)->first();
$minimum_charge = $minimum_cbm - $totalContainerCbm;
$minimum_charge = ($minimum_charge < 0) ? 0 : $minimum_charge;
$minimum_charge = $noMinimumCharge ? 0 : $minimum_charge;
if($constants->detail->is_billable && !$po_order_transaction) {
return;
$minimum_charge = $noMinimumCharge ? 0 : round($minimum_charge, 3);
if($hasMinimumCharge) {
$minimum_charge = 0;
}
$transaction = $booking->transactions()
->where('type', TransactionType::PAYMENT)
->first();
$price_cbm = $base_price + $segment_price + $warehouse_rate + $state_rate;
$billNumber = $this->generatesTransactionBillNumber->execute('INV-');
$total_cbm = $price_cbm * ($cbm + $minimum_charge + $over_weight_cbm);
$booking_currency_average_rate = $this->calculatesBookingCurrencyAverageRate->execute($booking, TransactionType::PAYMENT);
$billNumber = $this->generatesTransactionBillNumber->execute('SHIP-');
$total_service_charge = $booking->transactions()
->where('type', TransactionType::PAYMENT)
->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])
->sum('service_charge');
$total_tax = $booking->transactions()
->where('type', TransactionType::PAYMENT)
->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])
->sum('tax');
$transaction_object = new TransactionObject(
$object = new TransactionObject(
$billNumber,
TransactionType::INVOICE,
$transaction->issuer,
$transaction->receiver,
$transaction->recipient_bank_account_id,
$transaction->payment_method,
$payment_amount,
$booking_amount,
$transaction->currency_id,
$transaction->original_currency_id,
$booking_currency_average_rate,
$total_tax,
$total_service_charge,
TransactionType::SHIPPING_INVOICE,
1,
$order->company_module_id,
1,
PaymentMethodType::CASH,
$total_cbm,
$total_cbm,
1,
1,
0,
0,
0,
null,
ApprovalStatus::APPROVED
);
$invoice_transaction = $this->createsTransaction->execute($po_order_transaction->booking, $transaction_object);
$supplier = $this->fetchesCompany->execute(['id' => $transaction->receiver]);
$purchase_order_pdf = LaravelMpdf::loadView('pages.pdfs.purchase_order', ['invoice_transaction' => $invoice_transaction, 'po_order_transaction' => $po_order_transaction, 'supplier' => $supplier]);
$document_object = new DocumentObject(
DocumentType::PURCHASE_ORDER,
[chunk_split('data:application/pdf;base64,'.base64_encode($purchase_order_pdf->output()))],
'',
ApprovalStatus::COMPLETED,
'purchase_orders'
);
$document = $this->createsDocument->execute($po_order_transaction->booking, $document_object);
$this->createsFile->execute($document, $document_object);
$deliver_order_pdf = LaravelMpdf::loadView('pages.pdfs.deliver_order', ['invoice_transaction' => $invoice_transaction, 'po_order_transaction' => $po_order_transaction, 'supplier' => $supplier]);
$document_object = new DocumentObject(
DocumentType::DELIVER_ORDER,
[chunk_split('data:application/pdf;base64,'.base64_encode($deliver_order_pdf->output()))],
'',
ApprovalStatus::COMPLETED,
'delivery_orders'
ApprovalStatus::PENDING_SUBMISSION
);
/** @var Document $document */
$document = $this->createsDocument->execute($po_order_transaction->booking, $document_object);
$this->createsFile->execute($document, $document_object);
/** @var Transaction $invoice_transaction */
$invoice_transaction = $this->createsTransaction->execute($packing_list, $object);
$invoice_pdf = LaravelMpdf::loadView('pages.pdfs.invoice', ['invoice_transaction' => $invoice_transaction, 'po_order_transaction' => $po_order_transaction, 'supplier' => $supplier]);
$document_object = new DocumentObject(
DocumentType::INVOICE,
[chunk_split('data:application/pdf;base64,'.base64_encode($invoice_pdf->output()))],
'',
ApprovalStatus::COMPLETED,
'invoices'
$object_detail = new TransactionDetailObject(
'SHIPPING_FEE',
TransactionDetailType::SHIPPING_FEE.'<br>'.round($packing_list->packages->where('type', '!=', PackageType::OVER_WEIGHT)->sum('quantity'), 3).' CTNS - '.round($cbm, 3).' CBM',
$cbm,
$price_cbm
);
$document = $this->createsDocument->execute($po_order_transaction->booking, $document_object);
$this->createsFile->execute($document, $document_object);
$billNumber = $this->generatesTransactionBillNumber->execute('SPDO-');
$this->createsTransactionDetail->execute($invoice_transaction, $object_detail);
$booking_currency_average_rate = $this->calculatesBookingCurrencyAverageRate->execute($booking, TransactionType::BILL);
if ($over_weight_cbm > 0) {
$object_detail = new TransactionDetailObject(
'OVER_WEIGHT_CHARGES',
TransactionDetailType::OVER_WEIGHT_CHARGES,
$over_weight_cbm,
$price_cbm
);
$transaction_object = new TransactionObject(
$billNumber,
TransactionType::SUPPLIER_DELIVER,
$transaction->issuer,
$transaction->receiver,
$transaction->recipient_bank_account_id,
$transaction->payment_method,
$payment_amount,
$booking_amount,
$transaction->currency_id,
$transaction->original_currency_id,
$booking_currency_average_rate,
$total_tax,
$total_service_charge,
null,
ApprovalStatus::APPROVED
);
$supplier_deliver_order_transaction = $this->createsTransaction->execute($po_order_transaction->booking, $transaction_object);
$this->createsTransactionDetail->execute($invoice_transaction, $object_detail);
}
$supplier_order_pdf = LaravelMpdf::loadView('pages.pdfs.supplier_deliver_order', ['supplier_deliver_order_transaction' => $supplier_deliver_order_transaction, 'po_order_transaction' => $po_order_transaction, 'supplier' => $supplier]);
$document_object = new DocumentObject(
DocumentType::SUPPLIER_DELIVER_ORDER,
[chunk_split('data:application/pdf;base64,'.base64_encode($supplier_order_pdf->output()))],
'',
ApprovalStatus::COMPLETED,
'supplier_delivery_orders'
);
$document = $this->createsDocument->execute($po_order_transaction->booking, $document_object);
$this->createsFile->execute($document, $document_object);
if ($minimum_charge > 0) {
$object_detail = new TransactionDetailObject(
'MIN_CBM_CHARGES',
TransactionDetailType::MIN_CBM_CHARGES,
$minimum_charge,
$price_cbm
);
$this->updatesBookingStatus->execute($booking, ApprovalStatus::COMPLETED);
$this->createsTransactionDetail->execute($invoice_transaction, $object_detail);
}
return;
}
function getConstantByKey($segmentConstantObject, $key) {
if ($segmentConstantObject) {
$base_rate = (array) $segmentConstantObject->value;
$base_rate = array_key_exists($key, $base_rate) === true ? $base_rate[$key] : 0;
return $base_rate;
}
}
function checkPostcodeExistInConstant($segmentConstantObject, $postcode) {
$segmentConstantObject = $segmentConstantObject->value;
if (!empty($segmentConstantObject)) {
return in_array($postcode, $segmentConstantObject);
} else {
return false;
}
}
}
@@ -15,7 +15,7 @@ class CreatesTransaction extends AbstractUpdateRelationshipRecord
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute( $packing_list, TransactionObject $object) {
public function execute(PackingList $packing_list, TransactionObject $object) {
$model = new Transaction();
$model->bill_no = $object->getBillNo();
$model->type = $object->getTransactionType();
@@ -4,9 +4,21 @@ namespace App\Classes\Modules\Transactions\Services;
use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Models\Transaction;
use App\Classes\Modules\PerfexCRM\Processors\TransactionToPerfexCRMProcessor;
class UpdatesTransactionStatus extends AbstractUpdateRecord
{
/** @var TransactionToPerfexCRMProcessor */
private $transactionToPerfexCRMProcessor;
/**
* UpdatesTransactionStatus constructor.
* @param TransactionToPerfexCRMProcessor $transactionToPerfexCRMProcessor
*/
public function __construct(TransactionToPerfexCRMProcessor $transactionToPerfexCRMProcessor)
{
$this->transactionToPerfexCRMProcessor = $transactionToPerfexCRMProcessor;
}
/**
* @param Transaction $model
@@ -16,7 +28,13 @@ class UpdatesTransactionStatus extends AbstractUpdateRecord
*/
public function execute(Transaction $model, int $status)
{
$transaction = clone($model);
$model->status = $status;
return $this->handler($model);
$result = $this->handler($model);
if(config('perfexcrm.is_enabled') == 'true'){
$this->transactionToPerfexCRMProcessor->execute($transaction, $status);
}
return $result;
}
}
}
@@ -1,76 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Wallets\Services\CreatesWallet;
use App\Classes\Modules\Wallets\Services\GeneratesWalletCode;
use App\Classes\Modules\Wallets\Standards\Rules\CanCreateCompanyWallet;
use App\Http\Resources\WalletResource;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class CreateWalletLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Created Company Wallet',
'message' => 'You have successfully created a company wallet'
];
}
/** @var CreatesWallet */
private $createsWallet;
/** @var GeneratesWalletCode */
private $generatesWalletCode;
/** @var CanCreateCompanyWallet */
private $canCreateCompanyWallet;
/** @var FetchesCompany */
private $fetchesCompany;
/**
* CreateWalletLogic constructor.
* @param CreatesWallet $createsWallet
* @param GeneratesWalletCode $generatesWalletCode
* @param CanCreateCompanyWallet $canCreateCompanyWallet
*/
public function __construct(CreatesWallet $createsWallet, GeneratesWalletCode $generatesWalletCode, CanCreateCompanyWallet $canCreateCompanyWallet, FetchesCompany $fetchesCompany)
{
$this->fetchesCompany = $fetchesCompany;
$this->createsWallet = $createsWallet;
$this->generatesWalletCode = $generatesWalletCode;
$this->canCreateCompanyWallet = $canCreateCompanyWallet;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic(Request $request) : JsonResponse
{
$object = new WalletObject($request->input('company_id'), $request->input('currency_id'), $this->generatesWalletCode->execute());
$this->canCreateCompanyWallet->passes($object);
$company = $this->fetchesCompany->execute(['id' => $request->input('company_id')]);
$wallet = $this->createsWallet->execute($object, $company);
return $this->resourceResponse(new WalletResource($wallet));
}
}
@@ -1,132 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Wallets\Standards\Rules\CanCreateWalletTransaction;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletTransactionObject;
use App\Classes\Modules\Wallets\Services\CreatesWalletTransaction;
use App\Classes\Modules\Wallets\Services\GeneratesWalletTransactionBillNo;
use App\Http\Resources\WalletTransactionResource;
use App\Classes\Modules\Wallets\Services\FetchesWallet;
use App\Classes\Modules\Currencies\Services\FetchesCurrency;
use App\Classes\Modules\Currencies\Services\RateCalculatesCurrency;
/*
use App\Classes\Modules\Accounts\Standards\Rules\CanCreateUser;
use App\Classes\Modules\Accounts\Services\CreatesUser;
use App\Classes\Modules\Accounts\DataTransferObjects\UserObject;
use App\Http\Resources\UserResource;
use App\Classes\Modules\Companies\Standards\Rules\CanCreateCompany;
use App\Classes\Modules\Companies\Services\CreatesCompany;
use App\Classes\Modules\Companies\DataTransferObjects\CompanyObject;
use App\Classes\Modules\Contacts\Standards\Rules\CanCreateContact;
use App\Classes\Modules\Contacts\Services\CreatesContact;
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
use App\Classes\Modules\Companies\Standards\Rules\CanCreateCompanyEmployee;
use App\Classes\Modules\Companies\Services\CreatesCompanyEmployee;
use App\Classes\Modules\Companies\DataTransferObjects\CompanyEmployeeObject;
use App\Classes\Modules\SegmentCompanies\Standards\Rules\CanCreateSegmentCompany;
use App\Classes\Modules\SegmentCompanies\Services\CreatesSegmentCompany;
use App\Classes\Modules\SegmentCompanies\DataTransferObjects\SegmentCompanyObject;
*/
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class CreateWalletTransactionLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Created Wallet Transaction',
'message' => 'You have successfully created a wallet transaction'
];
}
/** @var CreatesWalletTransaction */
private $createsWalletTransaction;
/** @var GeneratesWalletTransactionBillNo */
private $generatesWalletTransactionBillNo;
/** @var CanCreateWalletTransaction */
private $canCreateWalletTransaction;
private $fetchesCurrency;
private $rateCalculatesCurrency;
private $fetchesWallet;
/**
* CreateWalletLogic constructor.
* @param CreatesWalletTransaction $createsWalletTransaction
* @param GeneratesWalletTransactionBillNo $generatesWalletTransactionBillNo
* @param CanCreateWalletTransaction $canCreateWalletTransaction
* @param FetchesCurrency $fetchesCurrency
* @param RateCalculatesCurrency $rateCalculatesCurrency
* @param FetchesWallet $fetchesWallet
*/
public function __construct(
CreatesWalletTransaction $createsWalletTransaction, GeneratesWalletTransactionBillNo $generatesWalletTransactionBillNo, CanCreateWalletTransaction $canCreateWalletTransaction,
FetchesCurrency $fetchesCurrency,RateCalculatesCurrency $rateCalculatesCurrency, FetchesWallet $fetchesWallet
)
{
$this->createsWalletTransaction = $createsWalletTransaction;
$this->generatesWalletTransactionBillNo = $generatesWalletTransactionBillNo;
$this->canCreateWalletTransaction = $canCreateWalletTransaction;
$this->fetchesCurrency = $fetchesCurrency;
$this->rateCalculatesCurrency = $rateCalculatesCurrency;
$this->fetchesWallet = $fetchesWallet;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic(Request $request) : JsonResponse
{
try {
DB::beginTransaction();
$wallet = $this->fetchesWallet->execute(['id' => $request->route('id')]);
$conversion_currency = $this->fetchesCurrency->execute(['id' => $request->input('currency_id')]);
$convertable_currency = $this->fetchesCurrency->execute(['id' => $wallet->currency_id]);//MYR
$convert_amount = $this->rateCalculatesCurrency->execute($conversion_currency, $convertable_currency, $request->input('amount'));
$convert_rate = $this->rateCalculatesCurrency->execute_rate($conversion_currency, $convertable_currency);
$object = new WalletTransactionObject(
$wallet->id, $this->generatesWalletTransactionBillNo->execute(),$request->input('trans_type'),
number_format( (float) $convert_amount, 5, '.', ''), $wallet->currency_id , number_format( (float) $request->input('amount'), 5, '.', ''),
$request->input('currency_id'),number_format( (float) $convert_rate, 5, '.', '')
);
$this->canCreateWalletTransaction->passes($object);
$wallet_transaction = $this->createsWalletTransaction->execute($object);
DB::commit();
return $this->resourceResponse(new WalletTransactionResource($wallet_transaction));
} catch (\Exception $exception) {
throw new ErrorException($exception->getMessage(), $exception->getCode());
}
}
}
@@ -1,101 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\ControllersLogic;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use App\Http\Resources\WalletResource;
use App\Classes\Modules\Wallets\Services\CreatesWallet;
use App\Classes\Modules\Wallets\Services\UpdatesWallet;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Wallets\Services\GeneratesWalletCode;
use App\Classes\Modules\Transactions\Services\CreatesTransaction;
use App\Classes\Modules\Wallets\Processors\CreditWalletProcessor;
use App\Classes\Modules\Transactions\Services\GeneratesTransactionBillNumber;
class CreditWalletLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Credit into Company Wallet',
'message' => 'You have successfully credit company wallet'
];
}
/** @var FetchesCompany */
private $fetchesCompany;
/** @var GeneratesWalletCode */
private $generatesWalletCode;
/** @var CreatesWallet */
private $createsWallet;
/** @var GeneratesTransactionBillNumber */
private $generatesTransactionBillNumber;
/** @var CreatesTransaction */
private $createsTransaction;
/** @var UpdatesWallet */
private $updatesWallet;
/** @var CreditWalletProcessor */
private $creditWalletProcessor;
/**
* CreateWalletLogic constructor.
* @param FetchesCompany $fetchesCompany
* @param GeneratesWalletCode $generatesWalletCode
* @param CreatesWallet $createsWallet
* @param GeneratesTransactionBillNumber $generatesTransactionBillNumber
* @param CreatesTransaction $createsTransaction
* @param UpdatesWallet $updatesWallet
* @param CreditWalletProcessor $creditWalletProcessor
*/
public function __construct(
FetchesCompany $fetchesCompany,
GeneratesWalletCode $generatesWalletCode,
CreatesWallet $createsWallet,
GeneratesTransactionBillNumber $generatesTransactionBillNumber,
CreatesTransaction $createsTransaction,
UpdatesWallet $updatesWallet,
CreditWalletProcessor $creditWalletProcessor
)
{
$this->fetchesCompany = $fetchesCompany;
$this->generatesWalletCode = $generatesWalletCode;
$this->createsWallet = $createsWallet;
$this->generatesTransactionBillNumber = $generatesTransactionBillNumber;
$this->createsTransaction = $createsTransaction;
$this->updatesWallet = $updatesWallet;
$this->creditWalletProcessor = $creditWalletProcessor;
}
/**
* @param Request $request
* @return JsonResponse
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function logic(Request $request) : JsonResponse
{
$amount = floatval(str_replace(',', '', $request->input('amount')));
$company = $this->fetchesCompany->execute(['id' => $request->input('company_id')]);
$reference = $request->input('reference');
$type = $request->input('transaction_type');
$wallet = $this->creditWalletProcessor->execute($company, $type, $amount, $reference);
return $this->resourceResponse(new WalletResource($wallet));
}
}
@@ -1,117 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionObject;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Transactions\Services\GeneratesTransactionBillNumber;
use App\Classes\Modules\Transactions\Services\CreatesTransaction;
use App\Classes\Modules\Wallets\Services\UpdatesWallet;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\ValueObjects\Constants\PaymentMethodType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Http\Resources\WalletResource;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class DebitWalletLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Debit into Company Wallet',
'message' => 'You have successfully debit company wallet'
];
}
/** @var FetchesCompany */
private $fetchesCompany;
/** @var GeneratesTransactionBillNumber */
private $generatesTransactionBillNumber;
/** @var CreatesTransaction */
private $createsTransaction;
/** @var UpdatesWallet */
private $updatesWallet;
/**
* CreateWalletLogic constructor.
* @param FetchesCompany $fetchesCompany
* @param GeneratesTransactionBillNumber $generatesTransactionBillNumber
* @param CreatesTransaction $createsTransaction
* @param UpdatesWallet $updatesWallet
*/
public function __construct(
FetchesCompany $fetchesCompany,
GeneratesTransactionBillNumber $generatesTransactionBillNumber,
CreatesTransaction $createsTransaction,
UpdatesWallet $updatesWallet
)
{
$this->fetchesCompany = $fetchesCompany;
$this->generatesTransactionBillNumber = $generatesTransactionBillNumber;
$this->createsTransaction = $createsTransaction;
$this->updatesWallet = $updatesWallet;
}
/**
* @param Request $request
* @return JsonResponse
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function logic(Request $request) : JsonResponse
{
$amount = floatval(str_replace(',', '', $request->input('amount')));
$company = $this->fetchesCompany->execute(['id' => $request->input('company_id')]);
$reference = $request->input('reference');
if (!$company->wallets()->first()) {
$object = new WalletObject($company->id, 1, $this->generatesWalletCode->execute());
$wallet = $this->createsWallet->execute($object, $company);
}
$wallet = $company->wallets()->first();
$billNumber = $this->generatesTransactionBillNumber->execute('DEBIT-NOTE-');
$transaction_object = new TransactionObject(
$billNumber,
TransactionType::DEBIT_NOTE,
1,
$wallet->company->id,
1,
PaymentMethodType::CASH,
$amount,
$amount,
1,
1,
1,
0,
0,
null,
ApprovalStatus::APPROVED,
[],
$reference
);
$transaction = $this->createsTransaction->execute($wallet, $transaction_object);
$updateWalletAmount = $wallet->amount - $transaction->amount;
$walletOject = new WalletObject($wallet->company->id, $wallet->currency_id, $wallet->code, $updateWalletAmount);
$wallet = $this->updatesWallet->execute($wallet, $walletOject);
return $this->resourceResponse(new WalletResource($wallet));
}
}
@@ -1,60 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Wallets\Services\ListsWallet;
use App\Classes\Modules\Wallets\Standards\Rules\CanListWallet;
use App\Http\Resources\WalletResource;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class ListWalletLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'List Company Wallet',
'message' => 'You have successfully list company wallet'
];
}
/** @var ListWallet */
private $listsWallet;
/** @var CanCreateCompanyWallet */
private $canListWallet;
/**
* CreateWalletLogic constructor.
* @param CreatesWallet $createsWallet
* @param GeneratesWalletCode $generatesWalletCode
* @param CanCreateCompanyWallet $canCreateCompanyWallet
*/
public function __construct(CanListWallet $canListWallet, ListsWallet $listsWallet)
{
$this->canListWallet = $canListWallet;
$this->listsWallet = $listsWallet;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic(Request $request) : JsonResponse
{
//$this->canListWallet->passes();
$query = $this->listsWallet->execute($this->listsWallet->deserializeFilters($request->input('filters')));
return $this->collectionResponse(WalletResource::collection($query));
}
}
@@ -1,113 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\ControllersLogic;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionObject;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Wallets\Services\CreatesWallet;
use App\Classes\Modules\Wallets\Services\CreatesWalletTransaction;
use App\Classes\Modules\Wallets\Services\GeneratesWalletCode;
use App\Classes\Modules\Transactions\Services\GeneratesTransactionBillNumber;
use App\Classes\Modules\Billplzs\Services\CreatesBillplzBill;
use App\Classes\Modules\Transactions\Services\CreatesTransaction;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\ValueObjects\Constants\PaymentMethodType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Http\Resources\WalletResource;
use App\Http\Resources\WalletTransactionResource;
use App\Models\Wallet;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class TopUpWalletLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'TopUp into Company Wallet',
'message' => 'You have successfully created a topup request for company\'s wallet'
];
}
/** @var FetchesCompany */
private $fetchesCompany;
/** @var GeneratesWalletCode */
private $generatesWalletCode;
/** @var CreatesWallet */
private $createsWallet;
/** @var GeneratesTransactionBillNumber */
private $generatesTransactionBillNumber;
/** @var CreatesBillplzBill */
private $createsBillplzBill;
/** @var CreatesTransaction */
private $createsTransaction;
/**
* TopUpWalletLogic constructor.
* @param FetchesCompany $fetchesCompany
* @param GeneratesWalletCode $generatesWalletCode
* @param CreatesWallet $createsWallet
* @param GeneratesTransactionBillNumber $generatesTransactionBillNumber
* @param CreatesBillplzBill $createsBillplzBill
* @param CreatesTransaction $createsTransaction
*/
public function __construct(FetchesCompany $fetchesCompany, GeneratesWalletCode $generatesWalletCode, CreatesWallet $createsWallet, GeneratesTransactionBillNumber $generatesTransactionBillNumber, CreatesBillplzBill $createsBillplzBill, CreatesTransaction $createsTransaction)
{
$this->fetchesCompany = $fetchesCompany;
$this->generatesWalletCode = $generatesWalletCode;
$this->createsWallet = $createsWallet;
$this->generatesTransactionBillNumber = $generatesTransactionBillNumber;
$this->createsBillplzBill = $createsBillplzBill;
$this->createsTransaction = $createsTransaction;
}
/**
* @param Request $request
* @return JsonResponse
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function logic(Request $request) : JsonResponse
{
$amount = floatval(str_replace(',', '', $request->input('amount')));
$company = $this->fetchesCompany->execute(['id' => $request->input('company_id')]);
/** @var Wallet $wallet */
$wallet = $company->wallets()->first();
if (!$wallet) {
$object = new WalletObject($company->id, 1, $this->generatesWalletCode->execute());
/** @var Wallet $wallet */
$wallet = $this->createsWallet->execute($object, $company);
}
$user = $company->employees()->first();
$billNumber = $this->generatesTransactionBillNumber->execute('TOPUP-');
if($amount < 0) {
throw new MalformedRequestException('Top up credit value must be greater than zero.');
}
$billPlzBill = $this->createsBillplzBill->execute($company->name, $user->email, 'This payment is credit topup for company ref. ' . $company->reference, $amount, $billNumber, $request->input('bank_code'), true);
$transaction_object = new TransactionObject($billNumber, TransactionType::TOP_UP, 1, $company->id, 1, PaymentMethodType::PAYMENT_GATEWAY, $amount, $amount, 1, 1, 1, 0, 0, null, ApprovalStatus::PENDING_SUBMISSION, [], $billPlzBill->id);
$transaction = $this->createsTransaction->execute($wallet, $transaction_object);
return $this->resourceResponse(new WalletTransactionResource($transaction));
}
}
@@ -1,69 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Wallets\Services\ListsWallet;
use App\Classes\Modules\Wallets\Services\FetchesWallet;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\Modules\Wallets\Standards\Rules\CanListWallet;
use App\Http\Resources\WalletResource;
use App\Classes\Modules\Transactions\Processors\UpdateWalletTransactionProcessor;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class UpdateStatusWalletLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Update Status Transaction Company Wallet',
'message' => 'You have successfully status transaction company wallet'
];
}
/** @var ListWallet */
private $fetchesWallet;
/** @var CanCreateCompanyWallet */
private $canListWallet;
/** @var UpdateWalletTransactionProcessor */
private $updateWalletTransactionProcessor;
/**
* CreateWalletLogic constructor.
* @param CreatesWallet $createsWallet
* @param GeneratesWalletCode $generatesWalletCode
* @param CanCreateCompanyWallet $canCreateCompanyWallet
*/
public function __construct(FetchesWallet $fetchesWallet, UpdateWalletTransactionProcessor $updateWalletTransactionProcessor)
{
$this->fetchesWallet = $fetchesWallet;
$this->updateWalletTransactionProcessor = $updateWalletTransactionProcessor;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic(Request $request) : JsonResponse
{
$status = ($request->route('status')=='approve') ? 2 : 4;
$wallet = $this->updateWalletTransactionProcessor->execute($request->route('transaction_id'), $status);
return $this->resourceResponse(new WalletResource($wallet));
}
}
@@ -1,72 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Wallets\Services\ListsWallet;
use App\Classes\Modules\Wallets\Services\FetchesWallet;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\Modules\Wallets\Standards\Rules\CanWithdrawWallet;
use App\Http\Resources\WalletResource;
use App\Classes\Modules\Transactions\Processors\CreateWalletTransactionProcessor;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class WithdrawWalletLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Withdraw from Company Wallet',
'message' => 'You have successfully withdraw company wallet'
];
}
/** @var FetchesWallet */
private $fetchesWallet;
/** @var CanWithdrawWallet */
private $canWithdrawWallet;
/** @var CreateWalletTransactionProcessor */
private $createWalletTransactionProcessor;
/**
* CreateWalletLogic constructor.
* @param CreatesWallet $createsWallet
* @param GeneratesWalletCode $generatesWalletCode
* @param CanCreateCompanyWallet $canCreateCompanyWallet
*/
public function __construct(CanWithdrawWallet $canWithdrawWallet, FetchesWallet $fetchesWallet, CreateWalletTransactionProcessor $createWalletTransactionProcessor)
{
$this->canWithdrawWallet = $canWithdrawWallet;
$this->fetchesWallet = $fetchesWallet;
$this->createWalletTransactionProcessor = $createWalletTransactionProcessor;
}
/**
* @param Request $request
* @return JsonResponse
* @throws ErrorException
*/
public function logic(Request $request) : JsonResponse
{
$wallet = $this->fetchesWallet->execute(['id' => $request->input('wallet_id')]);
$walletOject = new WalletObject( $wallet->company->id, $wallet->currency_id, $wallet->code, $request->input('amount'));
$this->canWithdrawWallet->passes($walletOject);
$transaction = $this->createWalletTransactionProcessor->execute($wallet, $walletOject, TransactionType::WITHDRAW);
return $this->resourceResponse(new WalletResource($wallet));
}
}
@@ -1,65 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
class WalletObject implements DataTransferObject
{
/** @var int */
private $company_id;
/** @var int */
private $currency_id;
/** @var int */
private $code;
private $amount;
/**
* WalletObject constructor.
* @param int $company_id
* @param int $currency
* @param int $code
*/
public function __construct(int $company_id, int $currency, int $code, float $amount=0)
{
$this->company_id = $company_id;
$this->currency_id = $currency;
$this->code = $code;
$this->amount = $amount;
}
/**
* @return int
*/
public function getCompanyId(): int
{
return $this->company_id;
}
/**
* @return int
*/
public function getCurrency(): int
{
return $this->currency_id;
}
/**
* @return int
*/
public function getCode(): int
{
return $this->code;
}
public function getAmount(): float
{
return $this->amount;
}
}
@@ -1,94 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
class WalletTransactionObject implements DataTransferObject
{
private $wallet_id;
private $bill_no;
private $trans_type;
private $amount;
private $currency_id;
private $original_amount;
private $original_currency_id;
private $currency_rate;
public function __construct(
int $wallet_id, int $bill_no,int $trans_type,
float $amount, int $currency_id, int $original_amount,
int $original_currency_id, float $currency_rate
){
$this->wallet_id = $wallet_id;
$this->bill_no = $bill_no;
$this->trans_type = $trans_type;
$this->amount= $amount;
$this->currency_id = $currency_id;
$this->original_amount = $original_amount;
$this->original_currency_id = $original_currency_id;
$this->currency_rate = $currency_rate;
}
/**
* @return int
*/
public function getWalletId(): int
{
return $this->wallet_id;
}
/**
* @return int
*/
public function getBillNo(): int
{
return $this->bill_no;
}
/**
* @return int
*/
public function getTransType(): int
{
return $this->trans_type;
}
public function getAmount(): float
{
return $this->amount;
}
/**
* @return int
*/
public function getCurrency(): int
{
return $this->currency_id;
}
public function getOriginalAmount(): float
{
return $this->original_amount;
}
public function getOriginalCurrency(): int
{
return $this->original_currency_id;
}
public function getCurrencyRate(): float
{
return $this->currency_rate;
}
}
@@ -1,90 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\Processors;
use App\Models\Wallet;
use App\Models\Company;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\Modules\Wallets\Services\CreatesWallet;
use App\Classes\Modules\Wallets\Services\UpdatesWallet;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\ValueObjects\Constants\PaymentMethodType;
use App\Classes\Modules\Wallets\Services\GeneratesWalletCode;
use App\Classes\Modules\Transactions\Services\CreatesTransaction;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionObject;
use App\Classes\Modules\Transactions\Services\GeneratesTransactionBillNumber;
class CreditWalletProcessor
{
/** @var GeneratesWalletCode */
private $generatesWalletCode;
/** @var CreatesWallet */
private $createsWallet;
/** @var GeneratesTransactionBillNumber */
private $generatesTransactionBillNumber;
/** @var CreatesTransaction */
private $createsTransaction;
/** @var UpdatesWallet */
private $updatesWallet;
/**
* CreateWalletLogic constructor.
* @param GeneratesWalletCode $generatesWalletCode
* @param CreatesWallet $createsWallet
* @param GeneratesTransactionBillNumber $generatesTransactionBillNumber
* @param CreatesTransaction $createsTransaction
* @param UpdatesWallet $updatesWallet
*/
public function __construct(
GeneratesWalletCode $generatesWalletCode,
CreatesWallet $createsWallet,
GeneratesTransactionBillNumber $generatesTransactionBillNumber,
CreatesTransaction $createsTransaction,
UpdatesWallet $updatesWallet
)
{
$this->generatesWalletCode = $generatesWalletCode;
$this->createsWallet = $createsWallet;
$this->generatesTransactionBillNumber = $generatesTransactionBillNumber;
$this->createsTransaction = $createsTransaction;
$this->updatesWallet = $updatesWallet;
}
/**
* @param Company $company
* @param int $transactionType
* @param float $amount
* @param string $reference
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(Company $company, int $transactionType, float $amount, string $reference)
{
if (!$company->wallets()->first()) {
$object = new WalletObject($company->id, 1, $this->generatesWalletCode->execute());
$this->createsWallet->execute($object, $company);
}
/** @var Wallet $wallet */
$wallet = $company->wallets()->first();
$billNumber = $this->generatesTransactionBillNumber->execute($transactionType === 2 ? 'DEBIT-NOTE-' : 'CREDIT-NOTE-');
$transaction_object = new TransactionObject($billNumber, $transactionType === 2 ? TransactionType::DEBIT_NOTE : TransactionType::CREDIT_NOTE, 1, $wallet->owner->id, 1, PaymentMethodType::CASH, $amount, $amount, 1, 1, 1, 0, 0, null, ApprovalStatus::APPROVED, [], $reference);
$transaction = $this->createsTransaction->execute($wallet, $transaction_object);
$updateWalletAmount = $transactionType === 2 ? ($wallet->amount - $transaction->amount) : ($wallet->amount + $transaction->amount);
$walletObject = new WalletObject($wallet->owner->id, $wallet->currency_id, $wallet->code, $updateWalletAmount);
$wallet = $this->updatesWallet->execute($wallet, $walletObject);
return $wallet;
}
}
@@ -1,28 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\Services;
use App\Models\Wallet;
class ChecksIfWalletCodeExists
{
/** @var wallet */
private $repository;
/**
* ChecksIfWalletCodeExists constructor.
* @param Wallet $repository
*/
public function __construct(wallet $repository)
{
$this->repository = $repository;
}
public function execute(int $code): bool {
return $this->repository->where('code', $code)->exists();
}
}
@@ -1,22 +0,0 @@
<?php
namespace App\Classes\Modules\Wallets\Services;
use App\Models\WalletTransaction;
class ChecksIfWalletTransactionBillNoExists
{
private $repository;
public function __construct(WalletTransaction $repository)
{
$this->repository = $repository;
}
public function execute(int $bill_no): bool {
return $this->repository->where('bill_no', $bill_no)->exists();
}
}

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