Compare commits

...

559 Commits

Author SHA1 Message Date
Aqqil Azman 6094bf03ca added vue multi-select component "address-extra-details-component" 2024-06-21 10:41:45 +08:00
Aqqil Azman c58886eeff initial commit, vue multi-select for Address extra details 2024-06-21 10:41:10 +08:00
edmondlang 4a9ac3de02 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into address-extra-fields 2024-06-20 10:03:57 +08:00
edmondlang 1e6fafef28 make address line 2 required 2024-06-20 10:02:15 +08:00
Dillon Ngo fd75da5778 Merge branch 'dillon/51.5-vue-store-update' into 'master'
A minor fix to not allow non-admin user to see admin data by navigating to the...

See merge request CIEFWorldwideSdnBhd/shipping-portal!229
2024-06-17 00:58:05 +00:00
Dillon Ngo b593605c72 A minor fix to not allow non-admin user to see admin data by navigating to the url /payment-and-billing-2 2024-06-17 08:51:09 +08:00
Dillon Ngo 8d75012390 Merge branch 'dillon/62.1-fixes' into 'master'
Reinstate original code after data patch

See merge request CIEFWorldwideSdnBhd/shipping-portal!228
2024-06-16 06:14:47 +00:00
Dillon Ngo 2d98757c1c Data patch meant to fix a group payment with group id 609 and transaction id 16803 that got stuck after making paying 2024-06-16 14:13:09 +08:00
Dillon Ngo b329f232f2 Merge branch 'dillon/62.1-fixes' into 'master'
Data patch meant to fix a group payment with group id 609 and transaction id...

See merge request CIEFWorldwideSdnBhd/shipping-portal!227
2024-06-16 06:06:54 +00:00
Dillon Ngo 713922d2ee Data patch meant to fix a group payment with group id 609 and transaction id 16803 that got stuck after making paying 2024-06-16 14:04:16 +08:00
Dillon Ngo 74d11f8305 Merge branch 'dillon/62.1-fixes' into 'master'
Fix a rounding problem in group payment which will result in goods cannot be...

See merge request CIEFWorldwideSdnBhd/shipping-portal!226
2024-06-14 21:58:25 +00:00
Dillon Ngo ea920717a1 Fix a rounding problem in group payment which will result in goods cannot be released through CallbackBillplzLogic 2024-06-15 05:56:23 +08:00
Dillon Ngo e1b49f6be0 Merge branch 'dillon/46.13-missing-payment-proof-feature' into 'master'
Restore missing payment proof feature

See merge request CIEFWorldwideSdnBhd/shipping-portal!224
2024-06-14 21:45:15 +00:00
edmondlang 1be405ca93 fix error message in admin dashbaord 2024-06-13 23:47:43 +08:00
edmondlang 9d0924c674 address extra fields 2024-06-12 12:02:31 +08:00
Dillon Ngo e63e3e707f 'Your Payment Proof' feature missing for order with storage invoices through group payment 2024-06-09 12:44:19 +08:00
Dillon Ngo aeaec32dcb 'Your Payment Proof' feature missing for order with storage invoices through group payment 2024-06-09 12:16:18 +08:00
Dillon Ngo b000c25e66 'Your Payment Proof' feature missing for order with storage invoices through group payment 2024-06-09 12:00:19 +08:00
edmondlang 1e9af59b91 test gtag 2024-06-07 17:40:48 +08:00
edmondlang a392b8a5eb test ga4 2024-06-07 17:35:57 +08:00
edmondlang 30edc3eaba updates RescheduleContainerLogic delete all the previous container transport schedule, then create a new one 2024-05-30 23:08:05 +08:00
edmondlang b0eca18343 show packinglist reference for admin only 2024-05-27 00:53:48 +08:00
Dillon Ngo 88e1b43f19 Merge branch 'dillon/46.11-warehouse-storage-related-fixes' into 'master'
Inserted logs for monitoring warehouse storage charges

See merge request CIEFWorldwideSdnBhd/shipping-portal!223
2024-05-26 08:58:20 +00:00
omair saleh fc9f6d6dde Merge branch 'fulfilment-banner' into 'master'
fix segment requried contact bug

See merge request CIEFWorldwideSdnBhd/shipping-portal!222
2024-05-24 06:52:53 +00:00
Jia Sheng 141dab15b6 fix segment requried contact bug 2024-05-23 11:44:18 +08:00
edmondlang c9ac435e37 update confirmation message 2024-05-21 01:33:24 +08:00
edmondlang 6d01bdfb60 Merge branch 'fulfilment-banner' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2024-05-21 01:27:47 +08:00
edmondlang e2dc83e441 add segments in the menu bar. 2024-05-21 01:26:09 +08:00
Jia Sheng e9daadaf60 not interested confirmation 2024-05-21 01:25:14 +08:00
edmondlang 7cace7e800 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into fulfilment-banner 2024-05-21 00:54:21 +08:00
Jia Sheng 64fa56c02f fulfilment banner flow update, segment user index list 2024-05-20 22:51:22 +08:00
Dillon Ngo 3f962e774d Merge branch 'dillon/51.5-vue-store-update' into 'master'
Vue Polling - Fix minor typo error

See merge request CIEFWorldwideSdnBhd/shipping-portal!221
2024-05-19 19:14:56 +00:00
Dillon Ngo 4ba2144f02 Vue Polling - Fix minor typo error 2024-05-20 02:28:49 +08:00
Dillon Ngo 69f2b384cf Merge branch 'dillon/51.5-vue-store-update' into 'master'
Vue Polling - Refactor code to use vuex

See merge request CIEFWorldwideSdnBhd/shipping-portal!220
2024-05-19 16:06:00 +00:00
Dillon Ngo f1a35299e6 Vue Polling - Remove unnecessary code 2024-05-19 23:48:40 +08:00
Dillon Ngo b15866ea16 Vue Polling - Remove comments in code 2024-05-19 23:47:00 +08:00
Dillon Ngo bd42f7213a Vue Polling - Refactor code to use vuex 2024-05-18 18:55:21 +08:00
jiasheng224 2d92b1a8ab fulfilment banner module 2024-05-08 18:30:12 +08:00
Dillon Ngo 06e3049e50 Debugging 2024-05-08 03:03:58 +08:00
Dillon Ngo b0fa73a12b Debugging 2024-05-08 01:52:51 +08:00
Dillon Ngo 5d66761465 Merge branch 'dillon/60-shipping-portal-fixes' into 'master'
Deleted a file that should no longer be used

See merge request CIEFWorldwideSdnBhd/shipping-portal!219
2024-05-07 16:53:13 +00:00
Dillon Ngo 1ac4615c99 Delete a file that should no longer be used 2024-05-08 00:52:33 +08:00
Dillon Ngo 590960b5fd Merge branch 'dillon/60-shipping-portal-fixes' into 'master'
Move a file that should no longer be used (deprecated)

See merge request CIEFWorldwideSdnBhd/shipping-portal!218
2024-05-07 16:50:42 +00:00
Dillon Ngo 5f24f58480 Move a file that should no longer be used 2024-05-08 00:48:15 +08:00
edmondlang 4dec576aa0 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2024-05-08 00:31:22 +08:00
edmondlang 4a41c89024 fix MappableTransactionWithDetailsResource.php 2024-05-08 00:30:01 +08:00
Dillon Ngo a0997a4649 Merge branch 'dillon/60-shipping-portal-fixes' into 'master'
Fix a problem with inefficient query discovered from Laravel Vapor integration (payment and billing page, pending payment tab)

See merge request CIEFWorldwideSdnBhd/shipping-portal!217
2024-05-07 16:27:55 +00:00
Dillon Ngo b90dae882e Fix a problem with inefficient query discovered from Laravel Vapor integration 2024-05-08 00:26:12 +08:00
edmondlang f361a7e185 fix MappableTransactionWithDetailsResource.php 2024-05-08 00:24:22 +08:00
Dillon Ngo 29619625d1 Merge branch 'dillon/46.11-warehouse-storage-related-fixes' into 'master'
Fix multipe interface user experience (UX) problem originally reported by Yien

See merge request CIEFWorldwideSdnBhd/shipping-portal!216
2024-05-07 16:15:11 +00:00
Dillon Ngo 1705b5c2e5 Fix a front end UX problem reported by Yien 2024-05-06 13:19:23 +08:00
Dillon Ngo 1813783d87 Merge branch 'dillon/60-shipping-portal-fixes' into 'master'
Fix emails cannot be sent with attachment

See merge request CIEFWorldwideSdnBhd/shipping-portal!215
2024-05-04 09:53:01 +00:00
Dillon Ngo 46a0e670ba Fix emails cannot be sent with attachment 2024-05-04 17:51:57 +08:00
Omair Saleh dcec8cb33b update payment export itemization 2024-04-18 02:27:35 +08:00
Omair Saleh 75037f6192 update payment export itemization 2024-04-18 02:22:30 +08:00
Omair Saleh 675324081b update payment export itemization 2024-04-18 02:21:30 +08:00
Omair Saleh a959e83f5b update payment export itemization 2024-04-18 02:19:05 +08:00
Omair Saleh 2802e3c366 update payment export itemization 2024-04-18 02:17:43 +08:00
Omair Saleh aac2a0666a update payment export itemization 2024-04-18 02:16:13 +08:00
Omair Saleh 19efba4b89 update payment export itemization 2024-04-18 02:13:43 +08:00
Omair Saleh 7d70c800db update payment export itemization 2024-04-18 02:12:55 +08:00
Omair Saleh 863dc94dad Revert "Revert "Merge branch 'dillon/58-shipping-portal-sst' into 'master'""
This reverts commit a49920973e.
2024-04-18 02:09:16 +08:00
Omair Saleh 98e45e27e3 update payment export itemization 2024-04-18 02:04:56 +08:00
Omair Saleh df2916594b remove invoice date adjuster 2024-04-18 01:14:39 +08:00
Omair Saleh a49920973e Revert "Merge branch 'dillon/58-shipping-portal-sst' into 'master'"
This reverts commit 7cd376a9b5, reversing
changes made to 6176135f85.
2024-04-16 13:21:07 +08:00
Omair Saleh d129f8f6bd clear wrong date invoice from april to march 2024-04-16 13:17:23 +08:00
Omair Saleh 55a82e52a4 Merge remote-tracking branch 'origin/master' 2024-04-16 13:02:53 +08:00
Omair Saleh 1d4ac80b8f change sst invoice format 2024-04-16 13:02:40 +08:00
omair saleh 7cd376a9b5 Merge branch 'dillon/58-shipping-portal-sst' into 'master'
Dillon/58 shipping portal sst

See merge request CIEFWorldwideSdnBhd/shipping-portal!213
2024-04-16 04:51:39 +00:00
Omair Saleh c7e3091f9b change sst invoice format 2024-04-16 12:49:46 +08:00
Omair Saleh 28feba2ae9 change sst invoice format 2024-04-16 12:39:44 +08:00
edmondlang 6176135f85 fix qr api issue 2024-04-10 23:17:05 +08:00
edmondlang 5f529965da Merge branch 'qr-api-issue' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2024-04-10 22:27:29 +08:00
edmondlang 924f4f2ace fix qr api issue 2024-04-10 22:27:09 +08:00
edmondlang 6369282b38 update qr code config 2024-04-10 18:22:11 +08:00
jiasheng224 1991cf2c57 fix qr api issue 2024-04-09 17:42:10 +08:00
jiasheng224 5f5bbe0c8c update wallet balance when credit or debit to wallet balance 2024-04-09 16:58:12 +08:00
Dillon Ngo a809aec9a7 SST Impelemtation 2024-04-07 10:22:12 +08:00
Dillon Ngo 68ce8373e9 SST Impelemtation 2024-04-07 09:27:09 +08:00
Omair Saleh e5347f56b7 change bank in details 2024-04-04 08:22:47 +08:00
Omair Saleh 6673a44137 fix invoice date for april 2024-04-03 12:22:32 +08:00
Omair Saleh 4d3345f613 Merge remote-tracking branch 'origin/master' 2024-04-03 12:17:54 +08:00
Omair Saleh 60b8657773 fix invoice date for april 2024-04-03 12:17:40 +08:00
edmondlang 9f7a8d0d4b hide deletePaidGroupTransaction 2024-03-31 23:12:38 +08:00
edmondlang a87ab6c27f logging delete paid group transaction 2024-03-31 21:41:42 +08:00
edmondlang 462a4776cd delete paid group transaction 2024-03-31 17:36:12 +08:00
edmondlang 7e029c5610 delete paid group transaction 2024-03-30 00:49:55 +08:00
edmondlang 0719285286 show all extra payments from customer 2024-03-29 00:59:30 +08:00
edmondlang 64400d1524 fix ExportsCustomersWalletTransactionHistory 2024-03-29 00:06:22 +08:00
edmondlang be0279f56b fix ExportsCustomersWalletTransactionHistory 2024-03-29 00:02:13 +08:00
Dillon Ngo e15170bc7f Merge branch 'dillon/46.9-warehouse-storage-charges-fixes' into 'master'
Multiple fixes related to storage invoices

See merge request CIEFWorldwideSdnBhd/shipping-portal!212
2024-03-26 00:44:33 +00:00
Dillon Ngo 59f527aee7 Enable back manual payment that was temporary disable at order page for invoices with storage fee 2024-03-26 08:10:34 +08:00
Dillon Ngo d7aa248972 Merge branch 'dillon/55-billplz-fix' into 'master'
Update info log location for vue polling related stuff + perfexcrm integration

See merge request CIEFWorldwideSdnBhd/shipping-portal!211
2024-03-18 12:17:11 +00:00
Dillon Ngo 8e4ff6093e Update info log location for VuePolling JobResourceNotFoundException and PerfexCRM 2024-03-18 14:06:30 +08:00
Dillon Ngo 584169e173 Update info log location for VuePolling JobResourceNotFoundException and PerfexCRM 2024-03-18 13:54:09 +08:00
Dillon Ngo 1679d1ecf4 Fix a problem of unsuccessful payment when shipping invoice is paid first before storage invoice appear 2024-03-16 15:49:02 +08:00
Dillon Ngo 7ca48e9638 Fix a problem in info display inaccurate in payment history for manual payment 2024-03-16 15:17:28 +08:00
Dillon Ngo 14278a888a Merge branch 'dillon/55-billplz-fix' into 'master'
Long term solution to prevent customer making payment to a shipping invoice...

See merge request CIEFWorldwideSdnBhd/shipping-portal!210
2024-03-16 05:52:58 +00:00
Dillon Ngo 5de2554d63 Fix a problem with storage invoice checking when a payment related transaction is deleted at order page 2024-03-15 03:33:58 +08:00
edmondlang 033a835fce update SendPermitsReminderEmails logging 2024-03-14 12:48:25 +08:00
edmondlang 66ddb5da23 update send permits reminder 2024-03-14 12:46:47 +08:00
Dillon Ngo 65782ebf8a Long term solution to prevent customer making payment to a shipping invoice when there is a ongoing dispute 2024-03-14 12:43:58 +08:00
Dillon Ngo 96a089df16 Long term solution to prevent customer making payment to a shipping invoice when there is a ongoing dispute 2024-03-14 12:32:03 +08:00
edmondlang f95545a985 update container remark in order page 2024-03-13 00:20:39 +08:00
edmondlang 9e8685bd02 update container remark in order page 2024-03-13 00:02:52 +08:00
edmondlang 1224735ba8 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2024-03-12 23:52:22 +08:00
edmondlang 11e2390059 update container and container remarks 2024-03-12 23:52:07 +08:00
Dillon Ngo c280da36d7 Merge branch 'dillon/55-billplz-fix' into 'master'
Fix a problem reported by Yien where order shipping invoice pending payment despite payment made

See merge request CIEFWorldwideSdnBhd/shipping-portal!209
2024-03-12 06:32:13 +00:00
Dillon Ngo 27529e90ca Fix a problem reported by Yien where order shipping invoice pending payment despite payment made 2024-03-12 14:20:19 +08:00
Dillon Ngo 2e9b0f918c Merge branch 'dillon/46.8-warehouse-storage-charges-fixes' into 'master'
Change log location, 404 page

See merge request CIEFWorldwideSdnBhd/shipping-portal!208
2024-03-09 13:26:32 +00:00
Dillon Ngo 5565d0b39b Update log location JobResourceNotFoundException 2024-03-09 21:17:49 +08:00
Dillon Ngo f1b8c6a556 When a pending verification group payment is deleted, do not display the group with no payment transaction(group payment) 2024-03-09 02:20:34 +08:00
Dillon Ngo 6d210d3713 Fix a problem with deleting a pending verification group payment at order page 2024-03-09 02:16:32 +08:00
Dillon Ngo 5dd2df02fd Hide 'Make Payment' button when there is a group payment pending verification from Admin 2024-03-09 01:22:13 +08:00
Dillon Ngo b207b11336 Fix missing group payment info on order page 2024-03-08 23:53:54 +08:00
Dillon Ngo ffd95ee1cc Fix missing group payment info on order page 2024-03-08 23:31:37 +08:00
Dillon Ngo 73b3995367 Merge branch 'dillon/46.9-warehouse-storage-charges-fixes' into 'master'
Temporary disable manual payment at order page for invoices with storage fee

See merge request CIEFWorldwideSdnBhd/shipping-portal!207
2024-03-08 13:12:33 +00:00
Dillon Ngo 45a2544b9d Temporary disable manual payment at order page for invoices with storage fee 2024-03-08 20:43:38 +08:00
Dillon Ngo 252636a7df Fix 404 exception caught at production laravel logs 2024-03-08 08:46:05 +08:00
Dillon Ngo 3e679fef23 Merge branch 'dillon/46.8-warehouse-storage-charges-fixes' into 'master'
UI Update (Payment and Billing 2 page) on Admin view to see shipping invoices...

See merge request CIEFWorldwideSdnBhd/shipping-portal!206
2024-03-03 11:16:07 +00:00
Dillon Ngo 758498f486 Fix a duplication problem in Pending Payment listing as a result of storage invoices 2024-03-02 14:09:06 +08:00
Dillon Ngo b55e32aece Fix missing container info at admin payment and billing page 2024-03-02 13:26:46 +08:00
Dillon Ngo 00bf7c0cf4 Fix when customer isCreditTerm is updated, waive storage invoices instead of deleting it 2024-03-01 11:47:21 +08:00
edmondlang 24a4d269b3 add edmond in the permits reminder email 2024-03-01 11:27:46 +08:00
Dillon Ngo f191979a53 Hide 'Your Payment Proof' at the order page when does not need to appear 2024-02-29 22:28:18 +08:00
Dillon Ngo c9998029b0 Fix a non functioning group payment delete at order page meant for shipping invoice with storage invoice 2024-02-29 21:10:37 +08:00
Dillon Ngo a442c78156 Refresh page after a payment transaction is suspended/deleted 2024-02-29 17:19:17 +08:00
Dillon Ngo 03c5ced77b Remove code no longer necessary - isBackDoorCheck flag 2024-02-29 16:32:37 +08:00
Dillon Ngo 5c6418cb1f When customer isCreditTerm status is updated to true, all existing storage invoices that is not paid but approve will be deleted 2024-02-29 16:30:57 +08:00
edmondlang 5e636862bb check if the address district name is null 2024-02-27 21:31:14 +08:00
Dillon Ngo e97cbfa618 Fix a problem with missing paid storage invoice when customer credit term status is updated 2024-02-26 16:36:43 +08:00
Dillon Ngo a448172521 UI Update (Payment and Billing 2 page) on Admin view to see shipping invoices with storage invoices on Pending Payment tab and Paid Invoice tab 2024-02-26 16:35:17 +08:00
Dillon Ngo 72ac055ec5 Merge branch 'dillon/46.6-warehouse-storage-charges-fixes' into 'master'
UI Update (Payment and Billing page) on Admin view to see shipping invoices...

See merge request CIEFWorldwideSdnBhd/shipping-portal!205
2024-02-25 07:44:39 +00:00
Dillon Ngo 09383a45a6 UI Update (Payment and Billing page) on Admin view to see shipping invoices with storage invoices on Pending Payment tab and Paid Invoice tab 2024-02-25 15:44:03 +08:00
Dillon Ngo bb1540116c Merge branch 'dillon/46.6-warehouse-storage-charges-fixes' into 'master'
UI Update (Payment and Billing page) on Admin view to see shipping invoices...

See merge request CIEFWorldwideSdnBhd/shipping-portal!204
2024-02-25 07:28:15 +00:00
Dillon Ngo 141062a7bf Fix storage invoice not allow to be regenerated if not yet pay 2024-02-25 15:21:04 +08:00
Dillon Ngo 4179706e04 UI Update (Payment and Billing page) on Admin view to see shipping invoices with storage invoices on Pending Payment tab and Paid Invoice tab 2024-02-25 14:26:54 +08:00
Dillon Ngo eaa21beb83 UI Update (Payment and Billing page) on Admin view to see shipping invoices with storage invoices on Pending Payment tab and Paid Invoice tab 2024-02-25 14:04:19 +08:00
Dillon Ngo 1acc02eb93 UI Update (Payment and Billing page) on Admin view to see shipping invoices with storage invoices on Pending Payment tab and Paid Invoice tab 2024-02-25 13:52:22 +08:00
Dillon Ngo 1f2959a5d2 Merge branch 'dillon/46.7-warehouse-storage-charges-fixes' into dillon/46.6-warehouse-storage-charges-fixes 2024-02-25 13:15:49 +08:00
Dillon Ngo 9b7b7068e1 Merge branch 'dillon/46.5-warehouse-storage-charges-fixes' into dillon/46.6-warehouse-storage-charges-fixes 2024-02-25 13:15:35 +08:00
Dillon Ngo 41e1c346f6 Rename a component 2024-02-25 13:13:09 +08:00
Dillon Ngo 74e9b23f91 Merge branch 'dillon/46.7-warehouse-storage-charges-fixes' into 'master'
Create a regenerate storage invoice feature to debug problem in reading and...

See merge request CIEFWorldwideSdnBhd/shipping-portal!203
2024-02-24 03:49:50 +00:00
Dillon Ngo f949877a7f Create a regenerate storage invoice feature to debug problem in reading and downloading storage invoice 2024-02-24 11:40:51 +08:00
Dillon Ngo 1e876dd103 Merge branch 'dillon/46.7-warehouse-storage-charges-fixes' into 'master'
Create a regenerate storage invoice feature to debug problem in reading and...

See merge request CIEFWorldwideSdnBhd/shipping-portal!202
2024-02-24 03:20:17 +00:00
Dillon Ngo 3d79d0f5e5 Merge branch 'dillon/46.5-warehouse-storage-charges-fixes' into 'master'
User interface to allow admin to update company whether is a credit term...

See merge request CIEFWorldwideSdnBhd/shipping-portal!201
2024-02-24 03:17:12 +00:00
Dillon Ngo 2dc037c8fd Create a regenerate storage invoice feature to debug problem in reading and downloading storage invoice 2024-02-24 11:08:19 +08:00
Dillon Ngo aaae8bcafa Create a regenerate storage invoice feature to debug problem in reading and downloading storage invoice 2024-02-24 10:48:26 +08:00
Dillon Ngo b66dfa8649 Implement authorization module for update customer credit term status 2024-02-24 10:08:24 +08:00
Dillon Ngo 2689296a2c Implement authorization module for update customer credit term status 2024-02-23 11:09:30 +08:00
Dillon Ngo 62191c2711 Undo a changes made on previous commit 2024-02-23 10:49:09 +08:00
Dillon Ngo 02cb21bd5a User interface to allow admin to update company whether is a credit term customer for warehoue storage charges 2024-02-18 10:10:57 +08:00
Dillon Ngo 78573db17d User interface to allow admin to update company whether is a credit term customer for warehoue storage charges 2024-02-18 10:00:35 +08:00
Dillon Ngo af1b6ac373 Merge branch 'dillon/46.4-warehouse-storage-charges' into 'master'
User interface to allow admin to waive warehouse storage invoice transaction

See merge request CIEFWorldwideSdnBhd/shipping-portal!200
2024-02-15 13:47:31 +00:00
Dillon Ngo d807e5d4fd User interface to allow admin to waive warehouse storage invoice transaction 2024-02-15 21:21:08 +08:00
Dillon Ngo c427ae42a0 User interface to allow admin to waive warehouse storage invoice transaction 2024-02-15 21:18:02 +08:00
Dillon Ngo 8a7a4ce38a User interface to allow admin to waive warehouse storage invoice transaction 2024-02-15 21:01:50 +08:00
Dillon Ngo 1b6fe7445e User interface to allow admin to waive warehouse storage invoice transaction 2024-02-15 20:45:32 +08:00
Dillon Ngo 7b2d0c4e2b Merge branch 'dillon/51.4-explore-multiple-queues' into 'master'
Vue Polling - Explore multiple laravel queue with priority settings

See merge request CIEFWorldwideSdnBhd/shipping-portal!199
2024-02-13 23:36:24 +00:00
Dillon Ngo 1bcad555a0 Second high priority queue through database 2024-02-13 22:06:38 +08:00
Dillon Ngo 2973547e76 Merge branch 'dillon/51.3-vue-polling-experimental' into 'master'
Vue Polling - Solve a problem where query of packing list with contaienrs and...

See merge request CIEFWorldwideSdnBhd/shipping-portal!198
2024-02-08 10:43:44 +00:00
Dillon Ngo 0b415e2e33 Vue Polling - Solve a problem where query of packing list with contaienrs and packages data is taking too long to complete + pagination problem 2024-02-08 18:41:57 +08:00
edmondlang 1110838e35 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into permits-reminder 2024-02-06 10:55:32 +08:00
edmondlang 9d87987488 code update - permits reminder - send email only at production 2024-02-06 10:55:19 +08:00
Omair Saleh 4c0984c9b8 fix container reschedule component 2024-02-05 15:08:51 +08:00
Omair Saleh 5517f16684 fix container reschedule component 2024-02-05 13:24:25 +08:00
Omair Saleh 4b967981dd fix container reschedule component 2024-02-05 12:56:30 +08:00
Omair Saleh e63b959714 fix container reschedule component 2024-02-05 12:52:07 +08:00
Omair Saleh a1751f274d Merge remote-tracking branch 'origin/master' 2024-02-05 12:48:54 +08:00
Omair Saleh ef6538feca fix container reschedule component 2024-02-05 12:47:51 +08:00
edmondlang de61d9a9fd add anitha email for premits reminder 2024-01-30 12:41:51 +08:00
edmondlang 2c1b857255 update permits reminder view 2024-01-30 12:37:34 +08:00
edmondlang 5b4a3507a3 add cron job to send permits reminder at daily 9.30 am 2024-01-30 00:48:23 +08:00
edmondlang 3d6543e467 add sample file 2024-01-30 00:42:21 +08:00
edmondlang 006a327a5f Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into permits-reminder 2024-01-30 00:34:51 +08:00
edmondlang 295e6454b1 add cron job command to send permits reminder 2024-01-30 00:34:39 +08:00
edmondlang f389efa6af add permits edit 2024-01-30 00:07:31 +08:00
Dillon Ngo f83c89b5f3 Second high priority queue through database 2024-01-26 04:03:06 +08:00
Dillon Ngo 4ea3132334 Merge branch 'dillon/51.3-vue-polling-experimental' into 'master'
Vue Polling - Solve a problem where query of packing list with contaienrs and...

See merge request CIEFWorldwideSdnBhd/shipping-portal!197
2024-01-25 19:19:45 +00:00
Dillon Ngo 8fc3ac1b55 Vue Polling - Solve a problem where query of packing list with contaienrs and packages data is taking too long to complete 2024-01-26 03:18:58 +08:00
Dillon Ngo ed252e630b Merge branch 'dillon/51.3-vue-polling-experimental' into 'master'
Vue Polling - Solve a problem where query of packing list with contaienrs and...

See merge request CIEFWorldwideSdnBhd/shipping-portal!196
2024-01-25 18:21:17 +00:00
Dillon Ngo b6c9c8843d Vue Polling - Solve a problem where query of packing list with contaienrs and packages data is taking too long to complete 2024-01-26 02:19:31 +08:00
Dillon Ngo d80e996d02 Merge branch 'dillon/46.4-warehouse-storage-charges' into 'master'
Implement a solution to selectively waived a selected storage invoice

See merge request CIEFWorldwideSdnBhd/shipping-portal!195
2024-01-25 13:47:10 +00:00
Dillon Ngo 064ee3e41a Implement a solution to selectively waived a selected storage invoice 2024-01-24 06:50:18 +08:00
Dillon Ngo 3bda84dac5 Merge branch 'dillon/51.3-vue-polling-experimental' into 'master'
Vue Polling - Solve a problem where query of packing list with contaienrs and...

See merge request CIEFWorldwideSdnBhd/shipping-portal!194
2024-01-21 14:49:24 +00:00
Dillon Ngo e2b378e197 Vue Polling - Solve a problem where query of packing list with contaienrs and packages data is taking too long to complete 2024-01-21 22:48:48 +08:00
Dillon Ngo 0f2e1297e1 Merge branch 'dillon/51.3-vue-polling-experimental' into 'master'
Vue Polling - Solve a problem where query of packing list with contaienrs and...

See merge request CIEFWorldwideSdnBhd/shipping-portal!193
2024-01-21 14:35:45 +00:00
Dillon Ngo d034a285fc Vue Polling - Solve a problem where query of packing list with contaienrs and packages data is taking too long to complete 2024-01-21 22:31:16 +08:00
Dillon Ngo ee94943d00 Merge branch 'dillon/51.3-vue-polling-experimental' into 'master'
Experimental solution (Vue Polling) to solve an AWS API Gateway problem limitation for Laravel Vapor in the event of a emergency rollback to Google

See merge request CIEFWorldwideSdnBhd/shipping-portal!192
2024-01-21 02:54:47 +00:00
Dillon Ngo a9e89a45bd Experimental solution (Vue Polling) to solve an AWS API Gateway problem limitation for Laravel Vapor in the event of a emergency rollback to Google 2024-01-21 10:53:23 +08:00
Dillon Ngo f6b10b5763 Merge branch 'dillon/51.3-vue-polling-experimental' into 'master'
Experimental solution (Vue Polling) to solve an AWS API Gateway problem limitation for Laravel Vapor in the event of a emergency rollback to Google

See merge request CIEFWorldwideSdnBhd/shipping-portal!191
2024-01-21 02:32:55 +00:00
Dillon Ngo 9b9057ea81 Experimental solution (Vue Polling) to solve an AWS API Gateway problem limitation for Laravel Vapor in the event of a emergency rollback to Google 2024-01-21 10:31:39 +08:00
Dillon Ngo 33d2d02cb0 Merge branch 'dillon/51-vue-polling-experimental-2' into 'master'
Undo Experimental solution (Vue Polling)

See merge request CIEFWorldwideSdnBhd/shipping-portal!190
2024-01-20 19:16:33 +00:00
Dillon Ngo e5be6eaceb Undo Experimental solution (Vue Polling) 2024-01-21 03:15:46 +08:00
edmondlang a545e6bad6 add bill_no in transaction details page 2024-01-17 17:19:37 +08:00
edmondlang b64b25ff05 code update 2024-01-17 17:06:31 +08:00
edmondlang d1426c7f05 all api and ui to create permits reminder 2024-01-17 00:43:17 +08:00
edmondlang 3375934651 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into permits-reminder
# Conflicts:
#	routes/api.php
2024-01-16 21:16:11 +08:00
edmondlang c79f58d246 permits reminder first commit 2024-01-16 21:15:29 +08:00
Dillon Ngo ee17ac0b0c Merge branch 'dillon/51-vue-polling-experimental-2' into 'master'
Experimental solution (Vue Polling) to solve an AWS API Gateway problem limitation for Laravel Vapor in the event of a emergency rollback to Google

See merge request CIEFWorldwideSdnBhd/shipping-portal!189
2024-01-15 16:43:45 +00:00
Dillon Ngo 26742a7335 Merge branch 'dillon/46.3.1-warehouse-storage-charges-fixes' into 'master'
Fix a problem with manual payment options not available when paying for invoices with warehouse storage charges

See merge request CIEFWorldwideSdnBhd/shipping-portal!188
2024-01-15 16:28:47 +00:00
Dillon Ngo 0e822ff1dd UI/UX amendment for order page when paying with storage invoice 2024-01-15 08:38:13 +08:00
Dillon Ngo 085b8b349f UI/UX amendment for order page when paying with storage invoice 2024-01-15 06:41:41 +08:00
edmondlang c1164397e8 fix errors diplaying in console in settings - warehouse 2024-01-14 22:56:45 +08:00
Dillon Ngo 3c16253795 Fix manual payment not showing in single order page when storage invoice is present 2024-01-14 09:33:31 +08:00
edmondlang 18a201611e add bind key for postcode array 2024-01-11 17:50:43 +08:00
edmondlang 7e754a9c7b add search postcode 2024-01-11 17:37:01 +08:00
edmondlang beb200fd6a Merge branch 'steve/account-mapping' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2024-01-11 10:59:40 +08:00
Steve Ng f0cb7828c3 invoice date for shipping portal when export invoice to autocount 2024-01-10 19:10:21 +08:00
Dillon Ngo 1956a4095d Proof of concept - Vue Polling - Performance Improvement and tweaking for better user experience 2024-01-08 17:49:42 +08:00
Dillon Ngo 71559701f4 Merge branch 'dillon/46.3-warehouse-storage-charges-fixes' into 'master'
Fix attempt on storage invoice pdf not able to be downloaded by user

See merge request CIEFWorldwideSdnBhd/shipping-portal!187
2024-01-05 21:55:59 +00:00
Dillon Ngo 9ceba30680 Fix attempt on storage invoice pdf not able to be downloaded by user 2024-01-06 05:53:59 +08:00
Dillon Ngo 3b2d06ed8f Fix attempt on storage invoice pdf not able to be downloaded by user 2024-01-06 05:52:55 +08:00
Dillon Ngo 81e04e9cb0 Fix attempt on storage invoice pdf not able to be downloaded by user 2024-01-06 05:52:26 +08:00
Dillon Ngo 286ca64413 Merge branch 'dillon/46.3-warehouse-storage-charges-fixes' into 'master'
Fix attempt on storage invoice pdf not able to be downloaded by user

See merge request CIEFWorldwideSdnBhd/shipping-portal!186
2024-01-05 21:11:33 +00:00
Dillon Ngo 51a96812fd Fix attempt on storage invoice pdf not able to be downloaded by user 2024-01-06 05:10:50 +08:00
Dillon Ngo 07459b9a1b Merge branch 'dillon/46.3-warehouse-storage-charges-fixes' into 'master'
Fix attempt on storage invoice pdf not able to be downloaded by user

See merge request CIEFWorldwideSdnBhd/shipping-portal!185
2024-01-05 21:08:00 +00:00
Dillon Ngo ee69f9123c Fix attempt on storage invoice pdf not able to be downloaded by user 2024-01-06 05:05:59 +08:00
Steve Ng 7a2ed92147 change posting date to invoice date for shipping portal when export invoice to autocount 2024-01-05 11:10:42 +08:00
Dillon Ngo 894481591d Proof of concept - Vue Polling - Performance Improvement and tweaking for better user experience 2024-01-04 13:52:11 +08:00
Dillon Ngo e5580c2abd Proof of concept - Vue Polling - Performance Improvement and tweaking for better user experience 2024-01-04 02:50:55 +08:00
Dillon Ngo 47ee304da1 Proof of concept - Vue Polling - Performance Improvement and tweaking for better user experience 2024-01-04 02:10:04 +08:00
Steve Ng 6427e2996f change posting date to invoice date for shipping portal when export invoice to autocount 2024-01-03 09:05:07 +08:00
Dillon Ngo f54aae5dc9 Proof of concept - Vue Polling - Performance Improvement and tweaking for better user experience 2024-01-03 05:39:43 +08:00
Dillon Ngo f0ef9a5602 Proof of concept - Vue Polling - Performance Improvement and tweaking for better user experience 2023-12-30 19:13:40 +08:00
Dillon Ngo 4d682c2ac6 Proof of concept - Vue Polling - Performance Improvement and tweaking for better user experience 2023-12-26 04:21:46 +08:00
Dillon Ngo 8ea00e0383 Proof of concept - Vue Polling - Performance Improvement and tweaking for better user experience 2023-12-24 21:59:41 +08:00
Dillon Ngo e0805a9601 Merge branch 'dillon/46-warehouse-storage-charges-2-merge-conflict' into 'master'
Emergency fix problem with group payment (reported by Eileen)

See merge request CIEFWorldwideSdnBhd/shipping-portal!184
2023-12-20 18:19:08 +00:00
Dillon Ngo 6f36c4b7ee Emergency fix problem with group payment (reported by Eileen) 2023-12-21 02:17:04 +08:00
Dillon Ngo 87194794f2 Merge branch 'dillon/46-warehouse-storage-charges-2-merge-conflict' into 'master'
Emergency fix problem with group payment (reported by Eileen)

See merge request CIEFWorldwideSdnBhd/shipping-portal!183
2023-12-20 16:06:34 +00:00
Dillon Ngo b4eca67a2f Emergency fix problem with group payment (reported by Eileen) 2023-12-20 23:58:56 +08:00
Dillon Ngo 1770b06498 Merge branch 'dillon/46-warehouse-storage-charges-2-merge-conflict' into 'master'
Emergency fix problem with group payment (reported by Eileen)

See merge request CIEFWorldwideSdnBhd/shipping-portal!182
2023-12-20 12:58:32 +00:00
Dillon Ngo 5c9fd6e2a6 Emergency fix problem with group payment (reported by Eileen) 2023-12-20 20:52:24 +08:00
Dillon Ngo 18df1c0c7b Proof of concept - Vue Polling a workaround for AWS API Gateway limitation 2023-12-20 14:47:56 +08:00
Dillon Ngo 359c103d01 Code sync from Exchange 2023-12-17 17:23:04 +08:00
Dillon Ngo ed7a636a18 Merge branch 'dillon/46-warehouse-storage-charges-2-merge-conflict' into 'master'
Fix a typo error

See merge request CIEFWorldwideSdnBhd/shipping-portal!181
2023-12-11 17:08:06 +00:00
Dillon Ngo 19bd548127 Fix a typo error 2023-12-12 01:07:06 +08:00
Dillon Ngo 55ac8064b1 Merge branch 'dillon/46-warehouse-storage-charges-2-merge-conflict' into 'master'
Warehouse Storage Charges - Effective From 11/12/2023 onwards

See merge request CIEFWorldwideSdnBhd/shipping-portal!180
2023-12-11 13:36:41 +00:00
Dillon Ngo e7279ec4d0 Merge branch 'master' into dillon/46-warehouse-storage-charges-2-merge-conflict 2023-12-11 21:29:06 +08:00
Dillon Ngo a7d4299897 Fix a typo error 2023-12-10 22:59:49 +08:00
Dillon Ngo 2b507d1006 Fix a typo error 2023-12-10 22:56:05 +08:00
Dillon Ngo 782a5c33ad Merge branch 'dillon/48-feedback-form-improvement' into 'master'
Update title for public feedback form page requested by Omair

See merge request CIEFWorldwideSdnBhd/shipping-portal!179
2023-12-09 04:54:15 +00:00
Dillon Ngo 6d3a2d9259 Update title for public feedback form page requested by Omair 2023-12-09 12:50:12 +08:00
Dillon Ngo 730b3d439a Merge branch 'dillon/48-feedback-form-improvement' into 'master'
Feedback form improvement

See merge request CIEFWorldwideSdnBhd/shipping-portal!178
2023-12-08 12:23:51 +00:00
Dillon Ngo 6b09d5facc Minor update on question text 2023-12-08 13:41:00 +08:00
Dillon Ngo 138a4f1cf6 Deleted some lines of codes 2023-12-07 17:17:39 +08:00
Dillon Ngo b54d897060 Remove <br> from payment transaction exported to excel file 2023-12-07 16:50:05 +08:00
Dillon Ngo c12959b4a8 Deleted some lines of codes 2023-12-07 16:44:06 +08:00
Dillon Ngo f94f380c16 Deleted some lines of codes 2023-12-07 16:42:52 +08:00
Dillon Ngo f46ec19f01 Update effective date for warehouse storage charges + commands to check for storage invoices 2023-12-07 16:35:51 +08:00
Omair Saleh c7a6a5b020 remove the 2 days delay for the ETA 2023-12-06 16:42:22 +08:00
Omair Saleh 8f64769214 remove the 2 days delay for the ETA 2023-12-06 16:38:57 +08:00
Dillon Ngo cb74228a68 Fix a problem reported by Yien where storage invoice number of days kept updated even though storage invoice already paid 2023-12-05 13:19:45 +08:00
Dillon Ngo b22cc0f7e3 Yien requested for some text description in invoice to be updated 2023-11-30 16:00:43 +08:00
Dillon Ngo 2e8ba4f630 Fix an error to export payment transaction in excel file 2023-11-30 13:56:35 +08:00
Dillon Ngo e987838d5a Fix 2 problem with generating storage invoice and export payment transaction in excel by date range 2023-11-30 13:36:38 +08:00
Omair Saleh 4c532deb4d debug yd address update 2023-11-28 22:44:36 +08:00
edmondlang 12f05b7aa6 add paymentUnknownOrderLog 2023-11-28 22:15:36 +08:00
Dillon Ngo 48fa67ae8c Fix a problem with starting date should be done on arrival date of goods to china warehouse 2023-11-27 19:29:13 +08:00
Dillon Ngo 1e9e94b581 Fix a problem with starting date should be done on arrival date of goods to china warehouse 2023-11-27 19:20:45 +08:00
Dillon Ngo 67653b60fb Fix a problem with starting date should be done on arrival date of goods to china warehouse 2023-11-27 19:14:32 +08:00
Dillon Ngo 26fffb8af1 Fix decimal number to lengthy 2023-11-27 09:35:34 +08:00
edmondlang 5cdbc09c5b update packinglist measurement - add order number 2023-11-26 23:45:32 +08:00
edmondlang c9877bb53e update packinglist measurement - change from order number to packinglist number 2023-11-26 22:21:02 +08:00
edmondlang 0bf84fa7b1 update combined invoice and packinglist measurement 2023-11-26 22:01:02 +08:00
Dillon Ngo fb0c74d645 Handling of dispute for warehouse storage fee 2023-11-24 13:44:28 +08:00
Dillon Ngo 53293f26d6 Amendment for Yien to do testing at dev environment 2023-11-24 02:29:05 +08:00
Dillon Ngo 56fe5520ad Amendment for Yien to do testing at dev environment 2023-11-24 00:33:07 +08:00
Dillon Ngo 4c9235cc53 Fix a tiny spelling mistake 2023-11-22 03:22:39 +08:00
Dillon Ngo babd492caa Questions should have order by just like answers 2023-11-22 03:14:36 +08:00
Dillon Ngo 3d1d1cce11 Fix feedback answer text not displaying correctly at admin dashboard 2023-11-21 19:41:30 +08:00
Dillon Ngo 820d96858f Feedback Form Improvement 2023-11-21 19:29:40 +08:00
Dillon Ngo 058ba592bf Merge branch 'dillon/48-feedback-form-improvement' into 'master'
Quick fix for feedback form entries cannot be downloaded

See merge request CIEFWorldwideSdnBhd/shipping-portal!177
2023-11-21 08:41:54 +00:00
Dillon Ngo d950ee3d68 Quick fix for feedback form entries cannot be downloaded 2023-11-21 16:34:32 +08:00
Dillon Ngo 61c801e216 Fix storage invoice with outdated info 2023-11-17 14:43:22 +08:00
Dillon Ngo 6f0acec390 Rename file, function + disable delete function for expired group payment 2023-11-17 14:16:02 +08:00
Dillon Ngo 76e3668563 20231109 Meeting Feedback 1 Fixes for warehouse storage charges 2023-11-16 22:40:26 +08:00
Dillon Ngo ce94dd1393 Fix for invoice status update using common function 2023-11-09 12:08:43 +08:00
Dillon Ngo c1ea087c58 Fix for storage invoice get to be generated even when the packingList not yet have APPROVED status 2023-11-09 08:34:03 +08:00
Dillon Ngo 8595d0987f Typo fix 2023-11-04 17:12:42 +08:00
Dillon Ngo 48d0460eef Debug billplz callback 2023-11-04 16:41:23 +08:00
Dillon Ngo 06751fdc78 New Warehouse Storage Fee 2023-11-04 14:58:50 +08:00
edmondlang da6ec00dbd cleanup 2023-10-27 16:13:43 +08:00
edmondlang 412dbd64d5 fix-payment-status-updated-but-failed-update-invoice 2023-10-27 16:12:31 +08:00
edmondlang 496df549f6 remove code 2023-10-27 10:10:02 +08:00
edmondlang 97eaefa45a regenerate single invoice 2023-10-27 09:16:23 +08:00
edmondlang 68c9e0451a update admin geenrate invoice view 2023-10-27 08:55:54 +08:00
Dillon Ngo b5bcd5c553 Quick test on dev server 2023-10-27 04:18:39 +08:00
JiaSheng 671c7a54fb fix delivery order in shipping invoice 2023-10-26 22:31:10 +08:00
edmondlang 2a28183426 hide wallet result not found 2023-10-24 01:04:41 +08:00
edmondlang 0ebea79750 Merge branch 'wallet-new-feature' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2023-10-24 00:51:16 +08:00
edmondlang a701242646 fix wallet audit 2023-10-24 00:49:07 +08:00
edmondlang 4bdeae997d Merge branch 'wallet-audit' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2023-10-23 23:54:19 +08:00
edmondlang 36809f34cc Merge branch 'steve/aging-listing' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2023-10-23 23:53:35 +08:00
edmondlang 032171bb18 update aging listing 2023-10-23 23:53:10 +08:00
JiaSheng d41bd3db39 fix bug when packing list is deleted 2023-10-23 22:00:31 +08:00
JiaSheng 56bba0eaaf wallet pagination, export 2023-10-22 23:46:09 +08:00
edmondlang af8444e0d9 Merge branch 'wallet-audit' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal 2023-10-20 16:30:33 +08:00
edmondlang b2a7d1f73d update group payment 2023-10-20 16:26:18 +08:00
edmondlang 9d2ff3fafa update cash payment method 2023-10-20 16:22:19 +08:00
edmondlang 487d07e28c update design for approve payment 2023-10-20 16:02:04 +08:00
edmondlang 4176e09ea3 fix bug upload receipt modal not showing 2023-10-20 15:46:59 +08:00
edmondlang c44bf46a42 update web route for active wallet 2023-10-20 15:14:29 +08:00
edmondlang e687dd2b9a deletes payment 2023-10-19 22:54:21 +08:00
edmondlang 59951c4efd updater delete group transaction 2023-10-19 22:02:14 +08:00
edmondlang c00a4712a0 revert 2023-10-19 21:41:48 +08:00
edmondlang 1bb07e9402 revert 2023-10-19 21:38:24 +08:00
edmondlang 683bdec1f7 revert 2023-10-19 21:27:19 +08:00
edmondlang ee53a9438a temporary show all invoice 2023-10-19 21:25:44 +08:00
edmondlang 2e2087f16e temporary show all invoice 2023-10-19 21:23:15 +08:00
edmondlang 998b0b4da5 update delete group transaction 2023-10-19 20:48:22 +08:00
edmondlang dcf5c2e455 show billplz failed callback command 2023-10-19 20:14:59 +08:00
edmondlang 156b1dee07 update logic, for group payment, wallet must be credited first, then make group payment 2023-10-19 13:50:59 +08:00
edmondlang 544d7907c3 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into wallet-audit 2023-10-19 13:43:53 +08:00
edmondlang 5b77f7baa6 add group payment in top up history 2023-10-19 11:44:25 +08:00
Jia Sheng Lee b33016aac4 only super admin can use the manual transfer for group payment 2023-10-18 15:28:12 +08:00
Jia Sheng Lee 2788e349ae manual transfer for admin to upload for bulk invoice payment 2023-10-18 15:06:46 +08:00
Steve Ng 04af87f640 csv download aging report 2023-10-18 08:48:30 +08:00
edmondlang 5b190d5334 revert ExportPendingArrangementPackingListV2Controller 2023-10-16 13:48:58 +08:00
Dillon Ngo 8f32769656 Merge branch 'dillon/44-quick-undo' into 'master'
Quick undo experimental security check

See merge request CIEFWorldwideSdnBhd/shipping-portal!176
2023-10-16 05:33:40 +00:00
Dillon 0e79bbfd6a Quick undo experimental security check 2023-10-16 13:24:30 +08:00
Dillon Ngo 3a411e8b9a Merge branch 'dillon/44-customer-satisfaction-feedback-project-b' into 'master'
Preparation for help menu

See merge request CIEFWorldwideSdnBhd/shipping-portal!175
2023-10-15 17:16:57 +00:00
Dillon bffe438455 Disable help menu 2023-10-16 01:09:24 +08:00
Dillon Ngo d17beda04b Merge branch 'dillon/44-customer-satisfaction-feedback-project' into 'master'
New Feedback Form for gathering feedback from customer

See merge request CIEFWorldwideSdnBhd/shipping-portal!174
2023-10-15 10:19:13 +00:00
Dillon 7acc6932b5 Merge branch 'master' into dillon/44-customer-satisfaction-feedback-project 2023-10-15 18:07:26 +08:00
Jia Sheng Lee 2d175f4acc recalculate wallet balance 2023-10-14 15:57:22 +08:00
edmondlang 31905e56be enable top up for superadmin 2023-10-13 15:00:30 +08:00
edmondlang 6508155aea fix group payment not showing in wallet transaction history 2023-10-12 13:17:24 +08:00
edmondlang 760f8684ea fix group payment not showing in wallet transaction history 2023-10-12 13:12:50 +08:00
edmondlang 979b8b2ef9 show accident-approve-invoice 2023-10-12 13:06:51 +08:00
edmondlang 9a0073e906 add company active wallet web 2023-10-12 12:43:35 +08:00
edmondlang 976e54bb4c temporary disable wallet top up 2023-10-11 17:33:22 +08:00
edmondlang 87226377be update packinglist measurement template 2023-10-09 20:38:53 +08:00
edmondlang 674fd84fa0 update packinglist measurement template 2023-10-09 20:31:02 +08:00
edmondlang da1ed10740 update packinglist measurement template 2023-10-09 20:30:36 +08:00
edmondlang eb73d20b00 update packinglist measurement 2023-10-09 20:27:42 +08:00
Jia Sheng Lee 782aed06e4 add callback processor 2023-10-09 13:51:15 +08:00
edmondlang 158fa2eefe Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into add-delivery-order-to-invoice 2023-10-09 00:26:24 +08:00
edmondlang fa4cfc0d75 debug billplz 2023-10-08 23:53:39 +08:00
edmondlang f87bcff930 update packinglist measurement 2023-10-08 21:48:47 +08:00
Dillon e774962c44 Backend validation for generating feedback url 2023-10-08 18:58:43 +08:00
Dillon f5482a29e4 New exception handling for all PerfexCRM services 2023-10-08 17:23:55 +08:00
Dillon 0a14a64fbb Security Patch - Retrieving list of packing list 2023-10-08 16:56:15 +08:00
Dillon ee5051fc26 Merge branch 'dillon/44-customer-satisfaction-feedback-project-e' into dillon/44-customer-satisfaction-feedback-project 2023-10-08 05:25:57 +08:00
Dillon 034c93091a Security Patch - Exporting packinglist data to excel file 2023-10-08 05:25:38 +08:00
Dillon 8b184313cb Error 500 fix 2023-10-08 05:14:03 +08:00
Dillon c2b097e6d1 Merge branch 'dillon/44-customer-satisfaction-feedback-project-e' into dillon/44-customer-satisfaction-feedback-project 2023-10-08 05:12:58 +08:00
Dillon b0195a9640 Merge branch 'dillon/44-customer-satisfaction-feedback-project-d' into dillon/44-customer-satisfaction-feedback-project 2023-10-08 04:55:39 +08:00
Dillon 38d69434fa Security Patch - Exporting packinglist data to excel file 2023-10-08 04:54:38 +08:00
Dillon 1b559f91a2 Security Patch - Exporting feedback data to excel file 2023-10-08 03:50:19 +08:00
edmondlang 05a21af5a6 add line break on top of the file 2023-10-07 18:58:47 +08:00
edmondlang 3e7fbdbafc update packinglist mearuement in invoice 2023-10-07 17:56:47 +08:00
Dillon 527eca50fe Minor UI Fix 2023-10-07 08:42:53 +08:00
Dillon d010a8f8c7 Function for admin to export feedback data 2023-10-07 08:12:52 +08:00
Dillon 7bc2ca512a Function for admin to export feedback data 2023-10-07 07:33:51 +08:00
Dillon b76e0ebeef Merge branch 'dillon/44-customer-satisfaction-feedback-project-a' into dillon/44-customer-satisfaction-feedback-project 2023-10-07 07:33:07 +08:00
Dillon f595c43f2c Function for admin to export feedback data 2023-10-07 07:24:06 +08:00
Dillon 5584d22376 Improvement to log capture thrown by custom exception (ConnectionErrorException), to evaluate if need to extend to other custom exception as well 2023-10-05 19:58:07 +08:00
Dillon 42b6140df7 UX update when system failed to open a support ticket via help menu 2023-10-05 17:30:29 +08:00
Dillon 619fc25605 Merge branch 'dillon/44-customer-satisfaction-feedback-project' into dillon/44-customer-satisfaction-feedback-project-b 2023-10-05 17:04:41 +08:00
Dillon 8c24c86c77 Extra log to capture when ticket not created from Help Menu 2023-10-05 17:02:34 +08:00
Dillon 822046cc69 Updated comments in code 2023-10-05 16:52:42 +08:00
Dillon d708b8b540 404 page when feedback form not found 2023-10-05 16:41:21 +08:00
Jia Sheng Lee 553d2c44aa add delivery order to shipping invoice 2023-10-04 16:53:11 +08:00
Dillon 0f7f5f7ab9 Shorten feedback url 2023-10-04 01:34:45 +08:00
Dillon a5c1ae14b7 Shorten feedback url 2023-10-04 01:02:19 +08:00
Omair Saleh 8f5aa0a861 change ui for feedback answers to use columns instead of rows 2023-10-03 16:11:46 +08:00
Omair Saleh 1bed7f1cc9 change ui for feedback answers to use columns instead of rows 2023-10-03 14:09:46 +08:00
Omair Saleh 0a16e40a23 change ui for feedback answers to use columns instead of rows 2023-10-03 13:53:21 +08:00
Dillon 5c24b6f81e Relocate help menu and make dynamic questionnaire set generation 2023-10-01 00:32:40 +08:00
Dillon b81f3e50ad Filter out help menu questions and answers from been listed in admin feedback q&a list + disabled help menu 2023-09-30 18:45:35 +08:00
Dillon 3f1a8a6d12 Security patch for generating feedback url (for internal and external api calling) 2023-09-30 17:06:36 +08:00
Dillon 2240c1723d Merge branch 'dillon/44-customer-satisfaction-feedback-project' into dillon/44-customer-satisfaction-feedback-project-a 2023-09-30 15:30:10 +08:00
Dillon 5d07598c5e Meeting feedback Fixes and improvement with new sets of questions for customer feedback 2023-09-29 01:45:24 +08:00
edmondlang c493b3786c update credit_note pdf 2023-09-25 22:34:13 +08:00
Dillon e4f60a7bff Limit access to certain api query to admin only 2023-09-25 10:55:47 +08:00
Dillon fe000b7a6f Minor UI fix on front end 2023-09-23 18:07:46 +08:00
Dillon 707ef9d9f3 Minor UI fix on /feedback admin page 2023-09-23 17:36:46 +08:00
Dillon b5abb04c63 Minor UI fix on /feedback admin page 2023-09-23 16:53:18 +08:00
Dillon 1dbad7d6e5 Minor UI fix on navigation 2023-09-23 16:47:58 +08:00
Dillon 25417ba5be New api for public use to get feedback url 2023-09-21 21:31:25 +08:00
Dillon fe67cc6c5b Rename 2023-09-21 20:35:14 +08:00
Dillon 90b85c0df1 Rename 2023-09-21 20:16:22 +08:00
Dillon 0cdff7c544 Fix a problem customer marking cannot be found 2023-09-21 08:04:33 +08:00
Dillon 42561a7c56 New Customer Satisfaction Feedback Module 2023-09-21 00:19:21 +08:00
edmondlang 99f4699260 update wallet credit note 2023-09-15 18:42:14 +08:00
edmondlang 0ea52048e1 update wallet credit note 2023-09-15 18:37:04 +08:00
edmondlang a47bb95e50 update wallet credit note 2023-09-15 18:32:36 +08:00
edmondlang 431aed18d3 update wallet credit note 2023-09-15 18:03:39 +08:00
edmondlang 6ab289057b wallet credit note 2023-09-15 17:34:16 +08:00
JiaSheng c55a8e7af9 fix account statement mapping issue 2023-09-14 14:59:02 +08:00
Dillon 60fbe77829 Merge branch 'dillon/crisp-help-menu-2' into dillon/44-customer-satisfaction-feedback-project 2023-09-14 10:28:04 +08:00
Omair Saleh fbf097eb62 fix wallet transaction history and top up list bug 2023-09-13 14:22:36 +08:00
Omair Saleh 30c2673fdf fix wallet transaction history and top up list bug 2023-09-13 13:59:49 +08:00
Omair Saleh fd3709e103 fix wallet transaction history and top up list bug 2023-09-13 13:59:08 +08:00
Omair Saleh 08473d85ab fix wallet transaction history and top up list bug 2023-09-13 13:58:29 +08:00
Omair Saleh 489974ca5a fix wallet transaction history and top up list bug 2023-09-13 13:55:21 +08:00
Omair Saleh 6a6a0f0ee7 fix wallet transaction history and top up list bug 2023-09-13 13:46:20 +08:00
Omair Saleh 402f64364b export arrived parcel improvements 2023-09-01 05:27:13 +08:00
Omair Saleh a3bff9d079 export arrived parcel improvements 2023-09-01 05:26:32 +08:00
Omair Saleh 2a7a448059 export arrived parcel improvements 2023-09-01 05:25:41 +08:00
Omair Saleh 7d855064da export arrived parcel improvements 2023-09-01 05:24:47 +08:00
Omair Saleh efc0a3b94e export arrived parcel improvements 2023-09-01 05:24:05 +08:00
Omair Saleh 01654ee0d3 export arrived parcel improvements 2023-09-01 05:22:58 +08:00
Omair Saleh 23c2f92e6d export arrived parcel improvements 2023-09-01 05:21:32 +08:00
Omair Saleh 3945c47f52 export arrived parcel improvements 2023-09-01 05:20:36 +08:00
Omair Saleh 51ab6ce48b export arrived parcel improvements 2023-09-01 05:19:33 +08:00
Omair Saleh ca8140a1ba export arrived parcel improvements 2023-09-01 05:17:35 +08:00
Omair Saleh a84580c1dd export arrived parcel improvements 2023-09-01 05:14:07 +08:00
Omair Saleh 63b212a66c export arrived parcel improvements 2023-09-01 05:13:21 +08:00
Omair Saleh 7979d89997 export arrived parcel improvements 2023-09-01 05:00:36 +08:00
Omair Saleh bc603fc125 Merge remote-tracking branch 'origin/master' 2023-09-01 04:54:17 +08:00
Omair Saleh b55fd49830 export arrived parcel improvements 2023-09-01 04:54:00 +08:00
edmondlang 60ceac645f fix bug invoices/approve 2023-08-24 14:36:47 +08:00
Dillon Ngo 90c599049b Merge branch 'dillon/42-crm-code-sync-with-exchange-b' into 'master'
CRM invoice decimal problem fix + fetch invoice fail fix + debug log update

See merge request CIEFWorldwideSdnBhd/shipping-portal!170
2023-08-23 20:59:33 +00:00
Dillon f538fb7f2f Post Deployment monitoring: CRM invoice decimal problem fix + fetch invoice fail fix + debug log update 2023-08-24 04:52:34 +08:00
Omair Saleh a45105f5ae fix yd api 2023-08-23 14:08:47 +08:00
Omair Saleh 2f1a8ee648 fix yd api 2023-08-23 14:06:43 +08:00
Omair Saleh aacf4ea53d fix yd api 2023-08-23 14:05:15 +08:00
Omair Saleh 1fa2b60871 fix duplicate packages 2023-08-22 15:40:44 +08:00
Omair Saleh 203dc0c230 fix duplicate packages 2023-08-22 15:39:42 +08:00
Omair Saleh fcc4da1a56 fix duplicate packages 2023-08-22 15:24:38 +08:00
Omair Saleh c5a49bbc44 fix duplicate packages 2023-08-22 15:21:47 +08:00
Omair Saleh f8131b3a1e fix duplicate packages 2023-08-22 15:20:06 +08:00
Omair Saleh 336cc0b37f Merge remote-tracking branch 'origin/master' 2023-08-22 15:05:58 +08:00
Omair Saleh 42f096b09c fix duplicate packages 2023-08-22 15:01:44 +08:00
Dillon Ngo 614167cac5 Merge branch 'dillon/42-crm-code-sync-with-exchange-a' into 'master'
Update condition to update CRM task status

See merge request CIEFWorldwideSdnBhd/shipping-portal!169
2023-08-20 08:02:07 +00:00
Dillon e5421f8810 Update condition to update CRM task status 2023-08-20 15:57:51 +08:00
Dillon Ngo 8dc84baee0 Merge branch 'dillon/42-crm-code-sync-with-exchange-a' into 'master'
CRM Integration (Part 2 of code sync with Exchange-2.0)

See merge request CIEFWorldwideSdnBhd/shipping-portal!168
2023-08-19 21:43:07 +00:00
Dillon a413533975 CRM Integration (Part 2 of code sync with Exchange-2.0) 2023-08-20 05:30:54 +08:00
Dillon Ngo 0a98f8a8c6 Merge branch 'dillon/42-crm-code-sync-with-exchange-a' into 'master'
Quick fix

See merge request CIEFWorldwideSdnBhd/shipping-portal!167
2023-08-18 04:14:46 +00:00
Dillon aceed5f754 Quick fix 2023-08-18 12:13:47 +08:00
Dillon Ngo 761d191c1d Merge branch 'dillon/42-crm-code-sync-with-exchange' into 'master'
Exchange-2.0 code sync for crm changes

See merge request CIEFWorldwideSdnBhd/shipping-portal!166
2023-08-17 13:58:09 +00:00
Dillon d769be137e Exchange-2.0 code sync for crm changes 2023-08-17 21:49:48 +08:00
Dillon d6a5dd56c6 Exchange-2.0 code sync for crm changes 2023-08-17 21:34:18 +08:00
Omair Saleh f279d39ddb fix yd bug 2023-08-15 13:50:22 +08:00
Omair Saleh 2e1e8875b4 fix yd bug 2023-08-15 13:47:53 +08:00
Omair Saleh c30c5a36f2 fix yd bug 2023-08-15 13:46:24 +08:00
Omair Saleh 7d3901ee48 fix yd bug 2023-08-15 13:41:00 +08:00
Omair Saleh 463398945f fix yd bug 2023-08-15 13:40:18 +08:00
Omair Saleh d619862e63 fix yd bug 2023-08-15 13:38:18 +08:00
Omair Saleh 9665a0e242 fix yd bug 2023-08-14 15:43:02 +08:00
Omair Saleh 7ed6c11f37 fix yd bug 2023-08-14 15:40:40 +08:00
Omair Saleh 3eaee0d122 fix yd bug 2023-08-14 15:35:47 +08:00
Omair Saleh b7816873fe fix yd bug 2023-08-14 15:30:05 +08:00
Omair Saleh 8809caa046 Merge remote-tracking branch 'origin/master' 2023-08-14 14:55:35 +08:00
Omair Saleh b8b6910a45 fix yd quantity is not a number bug 2023-08-14 14:55:21 +08:00
edmondlang 64bfbac4f7 update manual generate warehouse packinglist 2023-08-03 14:30:45 +08:00
edmondlang a5b7e79964 manual generate warehouse packinglist 2023-08-03 13:45:07 +08:00
edmondlang 03c9bec256 fix-duplicate-container-reference cron 2023-08-01 00:04:20 +08:00
edmondlang 06134e006c fix deleted packinglist 2023-07-23 15:42:35 +08:00
Omair Saleh 7563b455ba update yd updates link 2023-07-21 12:40:56 +08:00
Omair Saleh 26edb3bebd Merge remote-tracking branch 'origin/master' 2023-07-21 12:34:35 +08:00
Omair Saleh 55e1a6ad02 remove all customer from vt warehouse list 2023-07-21 12:34:19 +08:00
edmondlang 381425c6bc update export mappable transaction 2023-07-18 12:53:00 +08:00
edmondlang 09ab95faf8 update listing mapping transaction 2023-07-18 11:54:27 +08:00
edmondlang 8bb6f0317a update list mappable transactino details log 2023-07-11 17:59:43 +08:00
edmondlang fe95db2605 update list mappable transactino details log 2023-07-11 17:48:09 +08:00
edmondlang 02640e6ae8 update list mappable transactino details log 2023-07-11 17:39:09 +08:00
Omair Saleh 104dd19a6f Merge remote-tracking branch 'origin/master' 2023-07-10 12:52:35 +08:00
Omair Saleh 89117c0706 debug yd api 2023-07-10 12:51:59 +08:00
edmondlang bc650b0816 update public endpoint for exchange to get transaction data for accounting mapping 2023-07-09 22:01:35 +08:00
edmondlang a6a239c489 add public endpoint for exchange to get transaction data for accounting mapping 2023-07-09 21:54:56 +08:00
edmondlang 45b78465da add debtor code in company module resource for exchange accounting mapping purpose 2023-07-07 00:59:48 +08:00
Omair Saleh 71edeca994 Merge remote-tracking branch 'origin/master' 2023-07-05 14:18:02 +08:00
Omair Saleh cd229c6a8f fix the invoice export format 2023-07-05 14:17:43 +08:00
edmondlang ebc3e588ca update support 2023-06-29 14:35:12 +08:00
edmondlang 80471acc5b update support page 2023-06-28 01:08:31 +08:00
Omair Saleh ea08774111 Merge remote-tracking branch 'origin/master' 2023-06-23 14:43:04 +08:00
Omair Saleh 4a1f05e62a include ref column to payment export for autocount 2023-06-23 14:42:46 +08:00
edmondlang 840fb86192 show bill_no for all payments 2023-06-22 13:41:48 +08:00
Omair Saleh 7a171685f6 create a public api for mappable transactions 2023-06-21 16:34:50 +08:00
Omair Saleh 096e039ffb create a public api for mappable transactions 2023-06-21 16:31:52 +08:00
Omair Saleh 2319393758 create a public api for mappable transactions 2023-06-21 16:30:30 +08:00
Omair Saleh 85ba9d66d5 create a public api for mappable transactions 2023-06-21 16:21:08 +08:00
Omair Saleh 626dff6137 create a public api for mappable transactions 2023-06-21 15:19:45 +08:00
Omair Saleh 99efce22db add owner type column to transaction resource to help with bank mapping function in exchange 2023-06-21 13:25:56 +08:00
Omair Saleh 4a9e89c752 disable accounting task in crm 2023-06-15 06:30:48 +08:00
Omair Saleh 39e3398f8e debug yd api 2023-06-09 17:46:27 +08:00
Omair Saleh 7db77d619b debug yd api 2023-06-09 17:40:59 +08:00
Omair Saleh 8f390311af debug yd api 2023-06-09 15:32:39 +08:00
Omair Saleh 6502957021 debug yd api 2023-06-09 15:21:16 +08:00
Omair Saleh d6ddf6d607 fix invoice email 2023-06-07 10:04:54 +08:00
Omair Saleh b368b1c0d1 debug invoice email 2023-06-07 09:59:21 +08:00
Omair Saleh a2ef3ed1b1 debug invoice email 2023-06-07 09:57:47 +08:00
Omair Saleh e1b712ad10 debug invoice email 2023-06-07 09:54:52 +08:00
Omair Saleh ddbfc5fdfd debug invoice email 2023-06-07 09:51:06 +08:00
Omair Saleh 1cdd511f67 fix bug with invoice showing that doesn't belong to the order 2023-05-25 15:35:56 +08:00
Omair Saleh f7d0fe117e fix bug with invoice showing that doesn't belong to the order 2023-05-25 15:35:11 +08:00
Omair Saleh 4dede50156 fix bug with invoice showing that doesn't belong to the order 2023-05-25 15:34:19 +08:00
Omair Saleh 0d555eedc9 fix bug with invoice showing that doesn't belong to the order 2023-05-25 15:32:19 +08:00
Omair Saleh 7f73ec14a5 fix bug with fetching company module from invoice modal in create payment transaction processor 2023-05-25 15:08:24 +08:00
Omair Saleh 408397e20e Merge remote-tracking branch 'origin/master' 2023-05-25 15:06:36 +08:00
Omair Saleh ef37f1ebbe fix bug with fetching company module from invoice modal in create payment transaction processor 2023-05-25 15:06:17 +08:00
edmondlang 914e9a6f0f add BillNo Filter 2023-05-21 19:20:26 +08:00
edmondlang 525e7a5dd1 deletes group payment 2023-05-19 21:27:26 +08:00
edmondlang a3cad7816c deletes group payment 2023-05-19 21:22:16 +08:00
edmondlang 2100c4a14a update fix_failed_callback_from_billplz log 2023-05-19 20:45:03 +08:00
Omair Saleh 0d090b4eaf update public api for querying transactions and groups 2023-05-16 11:42:57 +08:00
edmondlang 73801a5acd enable generate combine invoice function for unpaid invoice 2023-05-15 20:47:22 +08:00
edmondlang 2c0eeab84e fix duplicated invoice 2023-05-10 23:01:07 +08:00
edmondlang 40c4a39927 revert order resource for debug 2023-05-10 13:47:29 +08:00
edmondlang 866df52e52 fix sending billplz email to customer on development environment 2023-05-10 13:37:50 +08:00
edmondlang b34d909a09 fix order resource returning incorrect invoice 2023-05-10 13:24:10 +08:00
edmondlang 26b3e968e9 fix order resource returning incorrect invoice 2023-05-10 13:22:44 +08:00
edmondlang 7b127b2cba fix order resource returning incorrect invoice 2023-05-10 13:15:57 +08:00
edmondlang 7488313a0e fix order resource returning incorrect invoice 2023-05-10 13:12:56 +08:00
edmondlang 7589b5c553 customer payment and billing menu 2023-05-08 13:14:25 +08:00
edmondlang d8391fe479 fix invoice appearing in PENDING PAYMENT and also GROUP PAYMENT IN PROGRESS 2023-05-08 12:53:52 +08:00
edmondlang c01e8d6eb2 fix retry payment button coverage 2023-05-08 00:28:13 +08:00
edmondlang 5aad5f1729 merge master 2023-05-06 18:51:58 +08:00
edmondlang 485a6e2e82 merge master 2023-05-06 18:45:00 +08:00
Dillon 18579d5c1d Implement help menu on new order profile version 2 component 2023-05-04 15:42:16 +08:00
Dillon 1060401128 Merge branch 'dillon/crisp-help-menu' into dillon/crisp-help-menu-2 2023-05-04 15:39:54 +08:00
Dillon 5b00b7b45f Help Menu prototype v0.1 2023-05-04 15:19:04 +08:00
edmondlang e7c0e17ee4 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final
# Conflicts:
# app/Classes/Modules/Segments/ControllersLogic/UpdateConstantPostcodeLogic.php
# app/Classes/ValueObjects/Constants/TransactionType.php
# routes/api.php
# routes/web.php
2023-04-28 18:20:42 +08:00
edmondlang 569273c058 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final
# Conflicts:
#	app/Classes/Modules/Segments/ControllersLogic/UpdateConstantPostcodeLogic.php
#	app/Classes/ValueObjects/Constants/TransactionType.php
#	routes/api.php
#	routes/web.php
2023-04-28 18:20:21 +08:00
edmondlang 80f229c6ec temporary disable manual trasnfer for group payment 2023-04-28 18:16:48 +08:00
Omair Saleh 56b6b59967 fix small bugs 2023-04-28 15:25:18 +08:00
edmondlang 299d5fd4fe fix bug no contact found 2023-04-27 00:13:51 +08:00
edmondlang d56abc78f7 fix bug no contact found 2023-04-27 00:11:48 +08:00
edmondlang b3b7b67c66 show undefined country code 2023-04-27 00:09:29 +08:00
edmondlang d6f29976c7 change order page list order filter to increase loading speed 2023-04-27 00:04:20 +08:00
edmondlang 2bc43cbc8f list order v2 2023-04-25 23:40:27 +08:00
Omair Saleh e0a02c7051 update foshan map png 2023-04-20 00:01:38 +08:00
Omair Saleh 34a08563f3 Merge remote-tracking branch 'origin/master' 2023-04-19 23:57:31 +08:00
Omair Saleh 9df1e158a4 disable temporary include new columns to invoice export for chasing payment 2023-04-19 23:55:31 +08:00
edmondlang 33cd313950 foshan-warehouse image 2023-04-19 23:53:16 +08:00
EDMOND MING 2af5035e99 Delete foshan-map.png 2023-04-19 15:52:26 +00:00
Omair Saleh acb7337b4a temporary include new columns to invoice export for chasing payment 2023-04-19 15:41:19 +08:00
Omair Saleh 0a9bc29202 temporary include new columns to invoice export for chasing payment 2023-04-19 15:33:16 +08:00
Omair Saleh 1568c7272a temporary include new columns to invoice export for chasing payment 2023-04-19 15:31:12 +08:00
Omair Saleh 14f0560055 Merge remote-tracking branch 'origin/master' 2023-04-19 15:27:06 +08:00
Omair Saleh fc339f1dec temporary include new columns to invoice export for chasing payment 2023-04-19 15:26:45 +08:00
edmondlang 77f7e86a5f fix bug date error in update announcement function in settings page 2023-04-19 12:52:46 +08:00
edmondlang 6970908b75 update generate PDF controller 2023-04-19 12:34:01 +08:00
edmondlang 842614700a multi payment final 2023-03-28 15:38:16 +08:00
edmondlang a0ca37ec16 multi payment final 2023-03-27 23:47:59 +08:00
edmondlang 08b2ba1c63 multi invoice payment 2023-03-27 19:37:31 +08:00
edmondlang c7f8831555 multi payment 2023-03-27 18:11:40 +08:00
edmondlang df31b801f3 multi invoice payment 2023-03-27 18:11:11 +08:00
edmondlang 946c9b6e3d Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final 2023-03-26 22:49:07 +08:00
edmondlang bafc23bf6f Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final 2023-03-26 21:50:33 +08:00
edmondlang 2d13f69be6 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final
# Conflicts:
#	app/Classes/Modules/Billplzs/ControllersLogic/CallbackBillplzLogic.php
2023-03-26 21:39:15 +08:00
edmondlang cb184c8f50 multi payment final 2023-03-26 21:36:52 +08:00
edmondlang b2a986b838 update multi payment bill plz call back 2023-03-21 17:38:12 +08:00
edmondlang 160fa2b2d9 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final 2023-03-21 14:11:59 +08:00
edmondlang e0d0dccb4c multi payment final 2023-03-21 14:11:42 +08:00
edmondlang f47c7ebc50 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final 2023-03-21 11:11:33 +08:00
edmondlang f30a0cf7ee wallet top up logic 2023-03-18 23:34:38 +08:00
edmondlang f2a02230c7 update payment redirect 2023-03-18 23:16:08 +08:00
edmondlang 2978eed61d Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final 2023-03-18 23:06:50 +08:00
edmondlang c76c50466d multi payment final ui 2023-03-13 13:43:28 +08:00
edmondlang b4437c8907 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final
# Conflicts:
#	routes/web.php
2023-03-13 12:12:26 +08:00
edmondlang e7942731ad revert call back bill plz logic 2023-03-13 00:10:26 +08:00
edmondlang 5db9d79cc1 multi payment final - payment fail - redirect and show error 2023-03-12 23:27:21 +08:00
edmondlang dff001c9b5 Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into multi-payment-final 2023-03-12 23:13:21 +08:00
edmondlang 2353c637d7 multi payment final - finish top up and trsanction history 2023-03-12 23:13:03 +08:00
edmondlang eea8708b76 migrate wallets and create function for regenerates invoice 2023-03-11 16:48:54 +08:00
632 changed files with 24287 additions and 1293 deletions
+4
View File
@@ -59,3 +59,7 @@ YD_API_CODE=''
PERFEXCRM_BASE_URL=""
PERFEXCRM_API_KEY=""
PERFEXCRM_IS_ENABLED="false"
STORAGE_FEE_LAUNCH_DATE="2023-12-11 00:00:00"
SST_START_DATE="2024-04-01 00:00:00"
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\Exceptions;
use App\Classes\ValueObjects\Constants\HttpStatus;
use Illuminate\Support\Facades\Log;
final class ConnectionErrorException extends ServiceApiException {
public function __construct(?string $message = null, ?string $exceptionMessage = null, ?string $payload = null, ?string $exceptionTrace = null) {
Log::error($message. ": ". $exceptionMessage);
if($payload){
Log::error('Payload: '.$payload);
}
if($exceptionTrace){
Log::error($exceptionTrace);
}
parent::__construct($message ?? 'A connection error has occurred. Please check application logs for more information.',
HttpStatus::SERVER_ERROR);
}
}
@@ -0,0 +1,11 @@
<?php
namespace App\Classes\Exceptions;
use App\Classes\ValueObjects\Constants\HttpStatus;
final class JobResourceNotFoundException extends ServiceApiException {
public function __construct(?string $message = null) {
parent::__construct($message ?? 'Unable to find the requested resource', HttpStatus::RESOURCE_NOT_FOUND);
}
}
@@ -0,0 +1,97 @@
<?php
namespace App\Classes\General\Abstracts;
use App\Classes\Exceptions\ErrorException;
use App\Classes\Exceptions\InternalServerErrorException;
use App\Classes\ValueObjects\Constants\Notifications;
use App\Classes\ValueObjects\Constants\HttpStatus;
use App\Classes\ValueObjects\Response\ApiResponseObject;
use ErrorException as GeneralExceptions;
use TypeError;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Http\Resources\Json\ResourceCollection;
use Illuminate\Support\Facades\DB;
abstract class Abstract2ControllerLogic
{
/**
* @return array
*/
abstract protected function notification(): array;
/**
* @return string
*/
private function getNotificationTitle():string {
return $this->notification()['title'] ? $this->notification()['title']: Notifications::UNDEFINED['title'];
}
/**
* @return string
*/
private function getNotificationMessage():string {
return $this->notification()['message'] ? $this->notification()['message']: Notifications::UNDEFINED['message'];
}
/**
* @param Request $request
* @return BinaryFileResponse
* @throws ErrorException
*/
abstract protected function logic(Request $request) : BinaryFileResponse;
/**
* @param Request $request
* @return BinaryFileResponse
*/
public function execute(Request $request) : BinaryFileResponse {
try {
DB::beginTransaction();
$response = $this->logic($request);
DB::commit();
return $response;
} catch (ErrorException|GeneralExceptions|TypeError $exception){
abort(404, $exception->getMessage());
}
}
/**
* @param array|null $data
* @return JsonResponse
*/
public function response(?array $data = []) : JsonResponse {
return (new ApiResponseObject($this->getNotificationTitle().' Successful',
$this->getNotificationMessage(),
HttpStatus::OK_WITH_MESSAGE, $data))->handler();
}
/**
* @param JsonResource $resource
* @return JsonResponse
*/
public function resourceResponse(JsonResource $resource){
return $this->response(['data' => $resource]);
}
/**
* @param ResourceCollection $collection
* @return JsonResponse
*/
public function collectionResponse(ResourceCollection $collection){
return $this->response(json_decode($collection->response()->getContent(), true));
}
}
@@ -15,6 +15,8 @@ use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Http\Resources\Json\ResourceCollection;
use Illuminate\Support\Facades\DB;
use App\Classes\Exceptions\JobResourceNotFoundException;
use Illuminate\Support\Facades\Log;
abstract class AbstractControllerLogic
{
@@ -62,6 +64,19 @@ abstract class AbstractControllerLogic
return $response;
} catch (ErrorException|GeneralExceptions|TypeError $exception){
if ($exception instanceof JobResourceNotFoundException) {
Log::channel('vue_polling')->info(sprintf(
"Uncaught exception '%s' with message '%s' in %s:%d",
get_class($exception),
$exception->getMessage(),
$exception->getTrace()[0]['file'],
$exception->getTrace()[0]['line']
));
}
else{
Log::error($exception);
}
return (new ApiResponseObject($this->getNotificationTitle().' failed', $exception->getMessage(),
!in_array($exception->getCode(), [0, 42000]) ? $exception->getCode() : HttpStatus::SERVER_ERROR))->handler();
@@ -10,7 +10,7 @@ use App\Classes\General\Interfaces\DataTransferObject;
abstract class AbstractRule
{
abstract protected function authorized(): bool;
abstract protected function authorized($object): bool;
abstract protected function validators($object): bool;
@@ -26,8 +26,8 @@ abstract class AbstractRule
*/
public function passes(?DataTransferObject $object = null): bool {
try {
if(!$this->authorized()){
throw new AccessForbiddenException('You don\'t have permission to preform this action');
if(!$this->authorized($object)){
throw new AccessForbiddenException('You don\'t have permission to perform this action');
}
$this->validators($object);
@@ -36,11 +36,11 @@ abstract class AbstractRule
return true;
} catch(AccessForbiddenException $exception){
throw new AccessForbiddenException('You don\'t have permission to preform this action');
throw new AccessForbiddenException('You don\'t have permission to perform this action');
} catch(\Exception $exception){
throw new RequestValidationException($exception->getMessage());
}
}
}
}
@@ -6,6 +6,8 @@ namespace App\Classes\General\Eloquent;
use App\Classes\Exceptions\ResourceNotFoundException;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use App\Classes\Exceptions\JobResourceNotFoundException;
abstract class AbstractFetchRecord extends AbstractGetRecord
{
@@ -26,12 +28,18 @@ abstract class AbstractFetchRecord extends AbstractGetRecord
* @return Model
* @throws ResourceNotFoundException
*/
public function getResults(Builder $query): Model {
public function getResults(Builder $query, array $param = []): Model {
if(!$query->exists()){
throw new ResourceNotFoundException('Unable to find any record based on the criteria provided');
$table = $query->getModel()->getTable();
if($table ==='job_results'){
throw new JobResourceNotFoundException('Unable to find any job based on the criteria provided');
}
else{
throw new ResourceNotFoundException('Unable to find any record based on the criteria provided');
}
}
return $query->first();
}
}
}
@@ -50,9 +50,9 @@ abstract class AbstractGetRecord
* @param array $filters
* @return mixed
*/
public function handler(array $filters){
public function handler(array $filters, array $params = []){
$this->filters = collect($filters);
return $this->getResults($this->applyFiltersToQuery());
return $this->getResults($this->applyFiltersToQuery(), $params);
}
@@ -65,6 +65,6 @@ abstract class AbstractGetRecord
* @param Builder $query
* @return mixed
*/
abstract function getResults(Builder $query);
abstract function getResults(Builder $query, array $params = []);
}
}
@@ -16,11 +16,10 @@ abstract class AbstractListRecord extends AbstractGetRecord
* @return mixed
* @throws MalformedRequestException
*/
public function execute(array $filters = []){
public function execute(array $filters = [], array $param = []){
try{
return $this->handler($filters);
return $this->handler($filters, $param);
} catch (QueryException $exception){
throw new MalformedRequestException('Unable to fetch the list of records due to unexpected error');
@@ -32,7 +31,7 @@ abstract class AbstractListRecord extends AbstractGetRecord
* @param Builder $query
* @return mixed
*/
public function getResults(Builder $query) {
public function getResults(Builder $query, array $param = []) {
$filters = $this->getDecorationFilters();
if($filters->has('order_by')){
@@ -44,8 +43,12 @@ abstract class AbstractListRecord extends AbstractGetRecord
}
//dd($query->toSql());
return $filters->has('per_page') ? $query->paginate($filters->get('per_page')) : $query->get();
if(!empty($param)){
return $filters->has('per_page') ? $query->paginate($filters->get('per_page'), ['*'], 'page', $param['page']) : $query->get(); //page data from query parameters e.g ?page=1
}
else{
return $filters->has('per_page') ? $query->paginate($filters->get('per_page')) : $query->get();
}
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class BillNo implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('bill_no', $value);
}
}
@@ -0,0 +1,24 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class CompanySegmentsIn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereHas('companyModules', function ($module) use ($value) {
$module->whereHas('connections', function ($connection) use ($value) {
$connection->whereHas('connectionSegments', function ($segment) use ($value) {
$segment->whereIn('segment_id', $value);
});
});
});
}
}
@@ -0,0 +1,23 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
class CreatedAfterOrEqual implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
$table = $builder->getModel()->getTable();
$startDate = Carbon::createFromFormat('d-m-Y', $value)->startOfDay();
return $builder->where("{$table}.created_at", '>=', $startDate);
}
}
@@ -0,0 +1,22 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
class CreatedBeforeOrEqual implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
$table = $builder->getModel()->getTable();
$endDate = Carbon::createFromFormat('d-m-Y', $value)->endOfDay();
return $builder->where("{$table}.created_at", '<=', $endDate);
}
}
@@ -0,0 +1,18 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class DoesNotHaveGroups implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereDoesntHave('groups');
}
}
@@ -0,0 +1,22 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use App\Classes\ValueObjects\Constants\TransactionType;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
class DoesNotHavePaymentStatusIn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereDoesntHave('transactions', function (Builder $query) use($value) {
$query->where('type', TransactionType::PAYMENT)->whereIn('status', $value);
});
}
}
@@ -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)->whereIn('status', [0,1,2,3]);
$query->where('type', $value)->whereIn('status', [0,1,2,3,5]);
})->whereHas('containers', function ($query){
return $query->whereDate('loading_date', '>=', Carbon::parse('20-09-2022'));
});
@@ -0,0 +1,22 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class HasQuestionnaireGroupIn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereHas('question.questionnaire', function (Builder $query) use ($value) {
$query->whereIn('group', $value);
});
}
}
@@ -0,0 +1,22 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use App\Classes\ValueObjects\Constants\TransactionType;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
class HavePaymentStatusNotIn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereHas('transactions', function (Builder $query) use($value) {
$query->where('type', TransactionType::PAYMENT)->whereNotIn('status', $value);
});
}
}
@@ -0,0 +1,18 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class IdNext implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('id', '>', $value);
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class JobId implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('job_id', $value);
}
}
@@ -0,0 +1,18 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class NextMainQuestion implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('next_main_question', $value);
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class OrderByIdDesc implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->orderBy('id', 'desc');
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class OrderByUpdatedAtDesc implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->orderBy('updated_at', 'desc');
}
}
@@ -14,7 +14,8 @@ class OwnerId implements Filter
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('owner_id', $value);
$table = $builder->getModel()->getTable();
return $builder->where("{$table}.owner_id", $value);
}
}
@@ -0,0 +1,21 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class OwnerType implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
$table = $builder->getModel()->getTable();
return $builder->where("{$table}.owner_type", $value);
}
}
@@ -0,0 +1,32 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\SegmentConstants;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Models\PackingList;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\DB;
class PackingListLimitOneByTypeOrderedByInvoiceDate implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->select('packing_lists.*')->join('transactions', function($join){
$join->on('transactions.owner_id', '=', 'packing_lists.id');
$join->where('transactions.owner_type', '=', PackingList::class);
$join->where('transactions.status', '=', ApprovalStatus::APPROVED);
$join->whereRaw('(transactions.type <> 16 OR transactions.id = (
SELECT id FROM transactions WHERE owner_id = packing_lists.id AND type = 16 LIMIT 1
))');
})->orderBy('transactions.updated_at', 'DESC');
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class PaymentMethodNotIn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereNotIn('payment_method', $value);
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class PostcodeLike implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('postcode', 'LIKE', '%'.$value.'%');
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class QuestionId implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('question_id', $value);
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class QuestionNumber implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('question_number', $value);
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class QuestionnaireSetId implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('questionnaire_set_id', $value);
}
}
@@ -0,0 +1,19 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class RequestSignature implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('request_signature', $value);
}
}
@@ -0,0 +1,18 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class ResultNotNull implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereNotNull('result');
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class ShortUrl implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('short_url', $value);
}
}
@@ -14,7 +14,8 @@ class StatusIn implements Filter
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereIn('status', $value);
$table = $builder->getModel()->getTable();
return $builder->whereIn("{$table}.status", $value);
}
}
@@ -0,0 +1,18 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class UserId implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->where('user_id', $value);
}
}
@@ -0,0 +1,30 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\Builder;
class WithAgingColumn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
$today = Carbon::now();
return $builder->select('packing_lists.*')
->addSelect(DB::raw("DATEDIFF('$today', transactions.updated_at) as days_over_duedate"))
->addSelect(DB::raw("CASE
WHEN DATEDIFF('$today', transactions.updated_at) <= 0 THEN 0
WHEN DATEDIFF('$today', transactions.updated_at) > 0 AND DATEDIFF('$today', transactions.updated_at) <= 30 THEN 1
WHEN DATEDIFF('$today', transactions.updated_at) > 30 AND DATEDIFF('$today', transactions.updated_at) <= 60 THEN 2
WHEN DATEDIFF('$today', transactions.updated_at) > 60 AND DATEDIFF('$today', transactions.updated_at) <= 90 THEN 3
ELSE 4
END AS due_date_number"));
}
}
@@ -0,0 +1,23 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\Log;
class WithContainersPackages implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
// Log::info('WithContainersPackages: '.$value);
// return $builder->with(['containers', 'packages']);
return null;
}
}
@@ -0,0 +1,27 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class WithOrderReferenceLike implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->join('transactions as t2', 't2.payment_reference', '=', 'transactions.bill_no')
->join('transactions as t3', 't3.id', '=', 't2.owner_id')
->join('packing_lists', 'packing_lists.id', '=', 't3.owner_id')
->join('orders', function ($join) use ($value) {
$join->on('orders.id', '=', 'packing_lists.owner_id')
->where('orders.reference', 'LIKE', '%'.$value.'%');
})
->addSelect(['transactions.*', 't2.id as paymentTransactionId', 't3.id as invoiceTransactionId', 'packing_lists.id as packingListId', 'orders.reference as orderReference']);
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class WithTrashed implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->withTrashed();
}
}
+12 -4
View File
@@ -2,6 +2,7 @@
namespace App\Classes\General;
use Illuminate\Http\Resources\Json\ResourceCollection;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Log;
@@ -24,12 +25,11 @@ class Helper
return array_slice(get_class_methods($className), 1);
}
/**
/**
* @param $log
* @return none
*/
static function debugLoggerForPerfexCRM($log){
if($log){
static function debugLogger($log){
if($log && isset($log['message'])){
$message = $log['message'];
$substring = 'No data were found';
if (isset($message)) {
@@ -41,4 +41,12 @@ class Helper
}
}
}
/**
* @param ResourceCollection $collection
* @return array
*/
static function collectionResponse(ResourceCollection $collection){
return json_decode($collection->response()->getContent(), true);
}
}
+45
View File
@@ -0,0 +1,45 @@
<?php
namespace App\Classes\Jobs;
use App\Classes\Modules\PackingLists\Processors\ListPackingListsJobProcessor;
use App\Classes\Modules\Jobs\DataTransferObjects\ListGenericJobObject;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class ListPackingListsJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $timeout = 900;
/** @var ListGenericJobObject */
private $listGenericJobObject;
/**
* ListPackingListsJob constructor.
* @param ListGenericJobObject $listGenericJobObject
*/
public function __construct(ListGenericJobObject $listGenericJobObject)
{
$this->listGenericJobObject = $listGenericJobObject;
}
public function handle()
{
$rawPayload = $this->job->payload();
if(isset($rawPayload['data']['commandName'])){
$this->listGenericJobObject->setJobCommandName($rawPayload['data']['commandName']);
}
if(isset($rawPayload['data']['command'])){
$this->listGenericJobObject->setJobCommand($rawPayload['data']['command']);
}
$result = (App()->make(ListPackingListsJobProcessor::class))->execute($this->listGenericJobObject);
}
}
+28 -10
View File
@@ -3,6 +3,8 @@
namespace App\Classes\Jobs;
use App\Classes\Modules\PerfexCRM\Processors\UpdatePerfexCRMProcessor;
use App\Classes\Modules\PerfexCRM\Processors\FetchPerfexCRMInvoiceProcessor;
use App\Models\Transaction;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@@ -10,6 +12,8 @@ use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMObject;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMInvoiceObject;
use App\Classes\Modules\PerfexCRM\DataTransferObjects\FetchPerfexCRMInvoiceObject;
class UpdatePerfexCRM implements ShouldQueue
{
@@ -18,37 +22,51 @@ class UpdatePerfexCRM implements ShouldQueue
/** @var UpdatePerfexCRMObject */
private $updatePerfexCRMObject;
/** @var UpdatePerfexCRMInvoice */
private $nextJob;
/** @var */
private $transaction;
/** @var bool|null */
private $shouldCreateInvoice;
/**
* UpdatePerfexCRM constructor.
* @param UpdatePerfexCRMObject $updatePerfexCRMObject
* @param UpdatePerfexCRMInvoice $nextJob
* @param $transaction
* @param Transaction $transaction
* @param bool|null $shouldCreateInvoice
*/
public function __construct(UpdatePerfexCRMObject $updatePerfexCRMObject, $transaction, $nextJob)
public function __construct(UpdatePerfexCRMObject $updatePerfexCRMObject, $transaction, ?bool $shouldCreateInvoice = false)
{
$this->updatePerfexCRMObject = $updatePerfexCRMObject;
$this->nextJob = $nextJob;
$this->transaction = $transaction;
$this->shouldCreateInvoice = $shouldCreateInvoice;
}
public function handle()
{
//To use invoice as a reference to decide whether more tasks should be created
$this->updatePerfexCRMObject->setInvoiceId($this->getInvoiceIdOrCreateInvoice());
$result = (App()->make(UpdatePerfexCRMProcessor::class))->execute($this->updatePerfexCRMObject);
if($this->nextJob != null && $this->transaction != null){
if($this->transaction != null && $this->shouldCreateInvoice){
$updatePerfexCRMInvoiceOject = new UpdatePerfexCRMInvoiceObject(
$this->updatePerfexCRMObject->getContactEmail(),
$result->projectId,
$this->transaction,
true
);
/** @var UpdatePerfexCRMInvoice $nextJob */
$this->nextJob::dispatch($updatePerfexCRMInvoiceOject);
UpdatePerfexCRMInvoice::dispatch($updatePerfexCRMInvoiceOject);
}
}
private function getInvoiceIdOrCreateInvoice(){
if($this->transaction != null){
$fetchPerfexCRMInvoiceObject = new FetchPerfexCRMInvoiceObject(
$this->updatePerfexCRMObject->getContactEmail(),
$this->transaction
);
$invoiceId = (App()->make(FetchPerfexCRMInvoiceProcessor::class))->execute($fetchPerfexCRMInvoiceObject);
return $invoiceId;
}
return 0;
}
}
+3 -4
View File
@@ -30,7 +30,7 @@ class UpdatePerfexCRMInvoice implements ShouldQueue
/**
* CreatePerfexCRMSingleTask constructor.
* @param UpdatePerfexCRMInvoiceObject $createTaskPerfexCRMObject
* @param UpdatePerfexCRMInvoiceObject $updatePerfexCRMInvoiceObject
*/
public function __construct(UpdatePerfexCRMInvoiceObject $updatePerfexCRMInvoiceObject)
{
@@ -47,7 +47,7 @@ class UpdatePerfexCRMInvoice implements ShouldQueue
$invoiceId = 0;
$invoiceStatus = 0;
$invoice = (App()->make(FetchesPerfexCRMInvoice::class))->execute($customer->userid,"INV-", $transaction->owner->bill_no);
Log::error(json_encode('UpdatePerfexCRMInvoice debug $transaction->owner->bill_no: '.$transaction->owner->bill_no));
Log::channel('perfex_crm')->info('UpdatePerfexCRMInvoice debug bill_no: ' . $transaction->owner->bill_no . ', Project Id: ' . $this->updatePerfexCRMInvoiceObject->getProjectId());
if(is_null($invoice)){
$result = (App()->make(CreatePerfexCRMInvoiceProcessor::class))->execute($transaction->owner, $this->updatePerfexCRMInvoiceObject->getIsPaid());
@@ -55,7 +55,7 @@ class UpdatePerfexCRMInvoice implements ShouldQueue
$invoiceId = $result->payload['id'];
} else {
// Log::error(json_encode('UpdatePerfexCRMInvoice CreatePerfexCRMInvoiceProcessor failed'));
Helper::debugLoggerForPerfexCRM('UpdatePerfexCRMInvoice CreatePerfexCRMInvoiceProcessor failed');
Log::channel('perfex_crm')->info('UpdatePerfexCRMInvoice CreatePerfexCRMInvoiceProcessor failed');
}
}
else{
@@ -64,7 +64,6 @@ class UpdatePerfexCRMInvoice implements ShouldQueue
//This only run when invoice already exist and the invoice does not have a PAID status
if($invoiceStatus != PerfexCRMInvoiceStatus::PAID){
Log::error(json_encode('UpdatePerfexCRMInvoice debug $this->updatePerfexCRMInvoiceObject->getProjectId(): '.$this->updatePerfexCRMInvoiceObject->getProjectId()));
//update invoice
(App()->make(UpdatesPerfexCRMInvoice::class))->execute($invoice, $this->updatePerfexCRMInvoiceObject->getProjectId());
}
+7 -14
View File
@@ -27,27 +27,22 @@ class UpdatePerfexCRMPrelude implements ShouldQueue
/** @var UpdatePerfexCRMObject */
private $updatePerfexCRMObject;
/** @var UpdatePerfexCRM */
private $nextJob1;
/** @var UpdatePerfexCRMInvoice */
private $nextJob2;
/** @var bool|null */
private $shouldCreateInvoice;
/**
* UpdatePerfexCRMPrelude constructor.
* @param $packingList
* @param $transaction
* @param Transaction $transaction
* @param UpdatePerfexCRMObject $updatePerfexCRMObject
* @param UpdatePerfexCRM $nextJob1
* @param UpdatePerfexCRMInvoice $nextJob2
* @param bool|null $shouldCreateInvoice
*/
public function __construct($packingList, $transaction, UpdatePerfexCRMObject $updatePerfexCRMObject, $nextJob1, $nextJob2)
public function __construct($packingList, $transaction, UpdatePerfexCRMObject $updatePerfexCRMObject, ?bool $shouldCreateInvoice = false)
{
$this->packingList = $packingList;
$this->transaction = $transaction;
$this->updatePerfexCRMObject = $updatePerfexCRMObject;
$this->nextJob1 = $nextJob1;
$this->nextJob2 = $nextJob2;
$this->shouldCreateInvoice = $shouldCreateInvoice;
}
public function handle()
@@ -69,9 +64,7 @@ class UpdatePerfexCRMPrelude implements ShouldQueue
$result = $this->replacePlaceholders($this->updatePerfexCRMObject->getTasks(), $data);
$this->updatePerfexCRMObject->setTasks($result);
/** @var UpdatePerfexCRM $nextJob1 */
/** @var UpdatePerfexCRMInvoice $nextJob2 */
$this->nextJob1::dispatch($this->updatePerfexCRMObject, $this->transaction, $this->nextJob2);
UpdatePerfexCRM::dispatch($this->updatePerfexCRMObject, $this->transaction, $this->shouldCreateInvoice);
}
function replacePlaceholders($template, $data, $prefix = '')
@@ -26,7 +26,7 @@ class CanAuthenticateUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -54,4 +54,4 @@ class CanAuthenticateUser extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanCreateUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -54,4 +54,4 @@ class CanCreateUser extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanCrossAuthenticateUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -51,4 +51,4 @@ class CanCrossAuthenticateUser extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanDeleteUser extends AbstractRule
return true;
}
}
}
@@ -12,7 +12,7 @@ class CanFetchUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -39,4 +39,4 @@ class CanFetchUser extends AbstractRule
return true;
}
}
}
@@ -33,7 +33,7 @@ class CanGeneratePasswordReset extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -62,4 +62,4 @@ class CanGeneratePasswordReset extends AbstractRule
}
}
}
@@ -13,7 +13,7 @@ class CanListUsers extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -39,4 +39,4 @@ class CanListUsers extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanRegisterUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanRegisterUser extends AbstractRule
{
return true;
}
}
}
@@ -34,7 +34,7 @@ class CanResetPassword extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
@@ -62,4 +62,4 @@ class CanResetPassword extends AbstractRule
return $this->passwordResetTokenExists->execute($object->getToken());
}
}
}
@@ -26,7 +26,7 @@ class CanUpdateUser extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -54,4 +54,4 @@ class CanUpdateUser extends AbstractRule
return true;
}
}
}
@@ -15,6 +15,7 @@ use App\Classes\Modules\Contacts\Processors\CreateContactProcessor;
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
use App\Classes\Modules\Remarks\Processors\CreateRemarkProcessor;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\RemarkTypes;
use App\Http\Resources\AddressResource;
use App\Models\Address;
use ErrorException;
@@ -100,6 +101,16 @@ class CreateAddressLogic extends AbstractControllerLogic
$this->createRemarkProcessor->execute($address, $remarkObject);
}
$addressExtraFields = [
'property_type' => $request->input('property_type'),
'tools_required_unload' => $request->input('tools_required_unload'),
'pickup_time_from' => $request->input('pickup_time_from'),
'pickup_time_to' => $request->input('pickup_time_to'),
];
$addressExtraFieldsObject = new RemarkObject(json_encode($addressExtraFields), Auth()->user()->id, RemarkTypes::ADDRESS_EXTRA_COLUMNS);
$this->createRemarkProcessor->execute($address, $addressExtraFieldsObject);
return $this->resourceResponse(new AddressResource($address));
}
@@ -15,6 +15,7 @@ use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
use App\Classes\Modules\Remarks\Processors\CreateRemarkProcessor;
use App\Classes\ValueObjects\Constants\AddressType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\RemarkTypes;
use App\Http\Resources\AddressResource;
use App\Models\Address;
use Illuminate\Http\JsonResponse;
@@ -102,6 +103,16 @@ class UpdateAddressLogic extends AbstractControllerLogic
$this->createRemarkProcessor->execute($address, $remarkObject);
}
$addressExtraFields = [
'property_type' => $request->input('property_type'),
'tools_required_unload' => $request->input('tools_required_unload'),
'pickup_time_from' => $request->input('pickup_time_from'),
'pickup_time_to' => $request->input('pickup_time_to'),
];
$addressExtraFieldsObject = new RemarkObject(json_encode($addressExtraFields), Auth()->user()->id, RemarkTypes::ADDRESS_EXTRA_COLUMNS);
$this->createRemarkProcessor->execute($address, $addressExtraFieldsObject);
return $this->resourceResponse(new AddressResource($address));
}
@@ -26,7 +26,7 @@ class CanCreateAddress extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -54,4 +54,4 @@ class CanCreateAddress extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanDeleteAddress extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanDeleteAddress extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanFetchAddress extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanFetchAddress extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanListAddresses extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanListAddresses extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanUpdateAddress extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -54,4 +54,4 @@ class CanUpdateAddress extends AbstractRule
return true;
}
}
}
@@ -10,7 +10,7 @@ use App\Classes\Modules\Announcements\Services\FetchesAnnouncement;
use App\Classes\Modules\Announcements\Services\UpdatesAnnouncement;
use App\Http\Resources\AnnouncementResource;
use Carbon\Carbon;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -66,8 +66,8 @@ class UpdateAnnouncementLogic extends AbstractControllerLogic
$annoucement_object = new AnnouncementObject(
$request->input('title'),
$request->input('description'),
$request->input('starting_on'),
$request->input('ending_on')
Carbon::createFromFormat('d-m-Y', $request->input('starting_on'))->format('Y-m-d H:i:s'),
Carbon::createFromFormat('d-m-Y', $request->input('ending_on'))->format('Y-m-d H:i:s')
);
$this->canUpdateAnnouncement->passes($annoucement_object);
@@ -13,7 +13,7 @@ class CanAssignSegment extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanAssignSegment extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateAnnouncement extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
}
@@ -47,4 +47,4 @@ class CanCreateAnnouncement extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteAnnouncement extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanDeleteAnnouncement extends AbstractRule
return true;
}
}
}
@@ -11,7 +11,7 @@ class CanListAnnouncements extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
}
@@ -26,7 +26,7 @@ class CanUpdateAnnouncement extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanUpdateAnnouncement extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateBank extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
}
@@ -47,4 +47,4 @@ class CanCreateBank extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteBank extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanDeleteBank extends AbstractRule
return true;
}
}
}
@@ -12,7 +12,7 @@ class CanListBanks extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
return true;
}
@@ -34,4 +34,4 @@ class CanListBanks extends AbstractRule
{
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanUpdateBank extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanUpdateBank extends AbstractRule
return true;
}
}
}
@@ -4,26 +4,24 @@ namespace App\Classes\Modules\Billplzs\ControllersLogic;
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\Exceptions\ResourceNotFoundException;
use App\Classes\Modules\Wallets\Services\UpdatesWalletBalance;
use App\Http\Resources\TransactionResource;
use App\Models\Booking;
use App\Models\User;
use App\Models\Wallet;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\Modules\Billplzs\Services\GetBillplzBill;
use App\Classes\Modules\Billplzs\DataTransferObjects\BillplzXSignatureObject;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Billplzs\Processors\CallbackBillplzProcessor;
use App\Classes\Modules\Transactions\Services\FetchesTransaction;
use App\Classes\Modules\Transactions\Processors\CreatePaymentTransactionProcessor;
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
use App\Classes\Modules\Transactions\Processors\CheckStorageInvoiceTransactionProcessor;
use App\Classes\ValueObjects\Constants\PaymentMethodType;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Models\Group;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
@@ -45,6 +43,18 @@ class CallbackBillplzLogic
/** @var UpdateDoFromYDPortalProcessor */
private $updateDoFromYDPortalProcessor ;
/** @var UpdatesWalletBalance */
private $updatesWalletBalance;
/** @var CreatePaymentTransactionProcessor */
private $createPaymentTransactionProcessor;
/** @var CallbackBillplzProcessor */
private $callbackBillplzProcessor;
/** @var CheckStorageInvoiceTransactionProcessor */
private $storageInvoiceTransactionProcessor;
/**
* CallbackBillplzLogic constructor.
* @param GetBillplzBill $getBillplzBill
@@ -52,14 +62,21 @@ class CallbackBillplzLogic
* @param UpdatesTransactionStatus $updatesTransactionStatus
* @param UpdateDoFromVTPortalProcessor $updateDoFromVTPortalProcessor
* @param UpdateDoFromYDPortalProcessor $updateDoFromYDPortalProcessor
* @param CreatePaymentTransactionProcessor $createPaymentTransactionProcessor
* @param CallbackBillplzProcessor $callbackBillplzProcessor
* @param CheckStorageInvoiceTransactionProcessor $storageInvoiceTransactionProcessor
*/
public function __construct(GetBillplzBill $getBillplzBill, FetchesTransaction $fetchesTransaction, UpdatesTransactionStatus $updatesTransactionStatus, UpdateDoFromVTPortalProcessor $updateDoFromVTPortalProcessor, UpdateDoFromYDPortalProcessor $updateDoFromYDPortalProcessor)
public function __construct(GetBillplzBill $getBillplzBill, FetchesTransaction $fetchesTransaction, UpdatesTransactionStatus $updatesTransactionStatus, UpdateDoFromVTPortalProcessor $updateDoFromVTPortalProcessor, UpdateDoFromYDPortalProcessor $updateDoFromYDPortalProcessor, UpdatesWalletBalance $updatesWalletBalance, CreatePaymentTransactionProcessor $createPaymentTransactionProcessor, CallbackBillplzProcessor $callbackBillplzProcessor, CheckStorageInvoiceTransactionProcessor $storageInvoiceTransactionProcessor)
{
$this->getBillplzBill = $getBillplzBill;
$this->fetchesTransaction = $fetchesTransaction;
$this->updatesTransactionStatus = $updatesTransactionStatus;
$this->updateDoFromVTPortalProcessor = $updateDoFromVTPortalProcessor;
$this->updateDoFromYDPortalProcessor = $updateDoFromYDPortalProcessor;
$this->updatesWalletBalance = $updatesWalletBalance;
$this->createPaymentTransactionProcessor = $createPaymentTransactionProcessor;
$this->callbackBillplzProcessor = $callbackBillplzProcessor;
$this->storageInvoiceTransactionProcessor = $storageInvoiceTransactionProcessor;
}
@@ -99,28 +116,39 @@ class CallbackBillplzLogic
$status = $billplzXSignatureObject->getStatus() === 'failed' ? ApprovalStatus::REJECTED : ApprovalStatus::PENDING_VERIFICATION;
}
Log::info('Debug billPlz status: '.$status);
$token = Auth::fromUser(User::find(1));
$request->headers->set('Authorization', 'Bearer '.$token);
$this->updatesTransactionStatus->execute($transaction, $status);
$this->storageInvoiceBackDoorPreventionCheck($transaction, $status);
$result = $this->callbackBillplzProcessor->execute($transaction, $status);
$totalPaidAmount = $invoice->transactions->where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount');
$company_module_marking = $transaction->owner->owner->connections? $transaction->owner->owner->connections->first()->invitee_reference: null;
if(($invoice->amount - $totalPaidAmount) < 0.01) {
$this->updatesTransactionStatus->execute($invoice, ApprovalStatus::COMPLETED);
if ($transaction->owner instanceof Wallet) {
$company_module_marking = $transaction->owner->owner->connections? $transaction->owner->owner->connections->first()->invitee_reference: null;
} else {
$packingList->status = ApprovalStatus::APPROVED;
$packingList->save();
if(app()->environment('production')){
$this->updateDoFromVTPortalProcessor->execute($packingList);
$this->updateDoFromYDPortalProcessor->execute($packingList);
}
$company_module_marking = $order->companyModule->connections? $order->companyModule->connections->first()->invitee_reference: null;
}
return $request->method() === 'POST' ? true : view('pages.payments_redirect', ['marking' => $order->reference ?? null, 'company_module_marking' => $company_module_marking ?? null, 'transaction' => $transaction, 'status' => $status, 'result' => $result]);
}
return $request->method() === 'POST' ? true : view('pages.payments_redirect', ['marking' => $order->reference, 'transaction' => $transaction, 'status' => $status]);
private function storageInvoiceBackDoorPreventionCheck($transaction, $status){
if ($transaction->owner instanceof Wallet && $status === ApprovalStatus::APPROVED) {
$group = Group::where('reference', $transaction->payment_reference)->first();
if ($group) {
foreach ($group->groupTransactions as $groupTransaction) {
$invoice = $groupTransaction->transaction;
$pL = $invoice->owner;
$order = $pL->owner;
if($order){
$this->storageInvoiceTransactionProcessor->executeOrder($order);
}
}
}
}
}
}
@@ -0,0 +1,131 @@
<?php
namespace App\Classes\Modules\Billplzs\Processors;
use Illuminate\Http\Request;
use App\Models\Wallet;
use App\Models\Group;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\PaymentMethodType;
use App\Classes\Modules\Transactions\Processors\CreatePaymentTransactionProcessor;
use App\Classes\Modules\Transactions\Processors\ReleaseGoodsToCustomerProcessor;
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
use App\Classes\Modules\Wallets\Services\UpdatesWalletBalance;
use App\Classes\Modules\Orders\Processors\UpdateDoFromVTPortalProcessor;
use App\Classes\Modules\Orders\Processors\UpdateDoFromYDPortalProcessor;
use Illuminate\Support\Facades\Log;
class CallbackBillplzProcessor
{
/** @var UpdatesTransactionStatus */
private $updatesTransactionStatus;
/** @var UpdateDoFromVTPortalProcessor */
private $updateDoFromVTPortalProcessor;
/** @var UpdateDoFromYDPortalProcessor */
private $updateDoFromYDPortalProcessor;
/** @var UpdatesWalletBalance */
private $updatesWalletBalance;
/** @var CreatePaymentTransactionProcessor */
private $createPaymentTransactionProcessor;
/** @var ReleaseGoodsToCustomerProcessor */
private $releaseGoodsToCustomerProcessor;
/**
* CreateUserProcessor constructor.
* @param UpdatesTransactionStatus $updatesTransactionStatus
* @param UpdateDoFromVTPortalProcessor $updateDoFromVTPortalProcessor
* @param UpdateDoFromYDPortalProcessor $updateDoFromYDPortalProcessor
* @param UpdatesWalletBalance $updatesWalletBalance
* @param CreatePaymentTransactionProcessor $createPaymentTransactionProcessor
* @param ReleaseGoodsToCustomerProcessor $releaseGoodsToCustomerProcessor
*/
public function __construct(UpdatesTransactionStatus $updatesTransactionStatus, UpdateDoFromVTPortalProcessor $updateDoFromVTPortalProcessor, UpdateDoFromYDPortalProcessor $updateDoFromYDPortalProcessor, UpdatesWalletBalance $updatesWalletBalance, CreatePaymentTransactionProcessor $createPaymentTransactionProcessor, ReleaseGoodsToCustomerProcessor $releaseGoodsToCustomerProcessor)
{
$this->updatesTransactionStatus = $updatesTransactionStatus;
$this->updateDoFromVTPortalProcessor = $updateDoFromVTPortalProcessor;
$this->updateDoFromYDPortalProcessor = $updateDoFromYDPortalProcessor;
$this->updatesWalletBalance = $updatesWalletBalance;
$this->createPaymentTransactionProcessor = $createPaymentTransactionProcessor;
$this->releaseGoodsToCustomerProcessor = $releaseGoodsToCustomerProcessor;
}
/**
* @param Request $request
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute($transaction, $status)
{
$invoice = $transaction->owner;
$packingList = $invoice->owner;
$proceed = $this->checkForGroupPayment($transaction);
if(!$proceed) return false;
$this->updatesTransactionStatus->execute($transaction, $status);
// check if is wallet top up
if ($transaction->owner instanceof Wallet && $status === ApprovalStatus::APPROVED) {
$this->updatesWalletBalance->execute($transaction->owner, $transaction->amount);
$group = Group::where('reference', $transaction->payment_reference)->first();
// check if is group payment
if ($group) {
foreach ($group->groupTransactions as $groupTransaction) {
$invoice = $groupTransaction->transaction;
if($invoice->status !== ApprovalStatus::COMPLETED){
$paymentTransaction = $this->createPaymentTransactionProcessor->execute($invoice, PaymentMethodType::WALLET, null, false);
if($paymentTransaction && $paymentTransaction->status == ApprovalStatus::APPROVED){
$pL = $invoice->owner;
$this->releaseGoodsToCustomerProcessor->execute($pL, $invoice);
}
}
}
$group->status = $status;
$group->save();
}
}
if (!$transaction->owner instanceof Wallet) {
$this->releaseGoodsToCustomerProcessor->execute($packingList, $invoice);
}
return true;
}
private function checkForGroupPayment($transaction){
//This check is targetting group payment that expired and soft deleted
//command:check-storage-invoices must already run for this part of the code to work properly
$group = Group::withTrashed()->where('reference', $transaction->payment_reference)->first();
if ($group) {
$totalAmountToBePaid = 0;
$actualAmountPaid = $transaction->amount;
foreach ($group->groupTransactions as $groupTransaction) {
$invoice = $groupTransaction->transaction;
if($invoice->status !== ApprovalStatus::COMPLETED){
$totalAmountToBePaid += $invoice->amount;
}
}
if(($totalAmountToBePaid - $actualAmountPaid) < 0.01){
}
else{
Log::channel('storage_invoices')->info('Total amount from current transaction: '.$totalAmountToBePaid); //cief todo: to be removed
Log::channel('storage_invoices')->info('Total amount from paid transaction: '.$transaction->amount); //cief todo: to be removed
return false;
}
}
return true;
}
}
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Billplzs\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\App;
class CreatesBillplzBill
{
@@ -25,7 +26,7 @@ class CreatesBillplzBill
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->post(config('billplz.base_url').'/api/v3/bills', [
'collection_id' => config('billplz.collection_id'),
'name' => $name,
'email' => $email,
'email' => App::environment('production') ? $email : 'development@cief-malaysia.com',
'description' => $description,
'amount' => $this->finalizeAmount($amount),
'redirect_url' => route('online_payment.redirect'),
@@ -0,0 +1,34 @@
<?php
namespace App\Classes\Modules\Billplzs\Services;
use Illuminate\Support\Facades\Http;
use App\Classes\Exceptions\MalformedRequestException;
use Illuminate\Support\Facades\Log;
class DeletesBillplzBill
{
/**
* @param string $billID
* @throws MalformedRequestException
*/
public function execute(string $billID) {
try{
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->delete(config('billplz.base_url').'/api/v3/bills/'.$billID);
Log::channel('storage_invoices')->info('DeletesBillplzBill response: '.json_encode($response));
if($response->successful()){
$data = $response->json();
// $data['url'] = $data['url'].'?auto_submit=true';
return (object) $data;
}else{
return null;
}
}catch(\Exception $exception){
throw new MalformedRequestException('Unable to get correct response from billplz server: ' . $exception->getMessage());
}
}
}
@@ -7,6 +7,8 @@ use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Companies\Processors\AssignConnectionSegmentProcessor;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Companies\Services\FetchesCompanyConnection;
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
use App\Classes\Modules\Contacts\Processors\CreateContactProcessor;
use App\Http\Resources\CompanyResource;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -33,17 +35,22 @@ class AssignCompanyConnectionToConnectionSegmentLogic extends AbstractController
/** @var AssignConnectionSegmentProcessor */
private $assignCompanyConnectionToConnectionSegmentProcessor;
/** @var CreateContactProcessor */
private $createContactProcessor;
/**
* AssignCompanyToSegmentLogic constructor.
* @param FetchesCompany $fetchesCompany
* @param FetchesCompanyConnection $fetchesCompanyConnection
* @param AssignConnectionSegmentProcessor $assignCompanyConnectionToConnectionSegmentProcessor
* @param CreateContactProcessor $createContactProcessor
*/
public function __construct(FetchesCompany $fetchesCompany, FetchesCompanyConnection $fetchesCompanyConnection, AssignConnectionSegmentProcessor $assignCompanyConnectionToConnectionSegmentProcessor)
public function __construct(FetchesCompany $fetchesCompany, FetchesCompanyConnection $fetchesCompanyConnection, AssignConnectionSegmentProcessor $assignCompanyConnectionToConnectionSegmentProcessor, CreateContactProcessor $createContactProcessor)
{
$this->fetchesCompany = $fetchesCompany;
$this->fetchesCompanyConnection = $fetchesCompanyConnection;
$this->assignCompanyConnectionToConnectionSegmentProcessor = $assignCompanyConnectionToConnectionSegmentProcessor;
$this->createContactProcessor = $createContactProcessor;
}
/**
@@ -62,6 +69,11 @@ class AssignCompanyConnectionToConnectionSegmentLogic extends AbstractController
$this->assignCompanyConnectionToConnectionSegmentProcessor->execute($companyConnection, $request->input('segment_id'));
if ($request->input('segment_id') == 10 || $request->input('segment_id') == 11) {
$contactObject = new ContactObject('Whatsapp: ' . $request->input('name'), $request->input('phone'), null, null);
$this->createContactProcessor->execute($contactObject, $company);
}
return $this->resourceResponse(new CompanyResource($company));
}
}
@@ -0,0 +1,121 @@
<?php
namespace App\Classes\Modules\Companies\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Companies\Services\UpdatesCompanyModuleIsCreditTerm;
use App\Classes\Modules\Companies\Standards\Rules\CanUpdateCompanyModule;
use App\Classes\Modules\Transactions\Services\ListsTransactions;
use App\Classes\Modules\Transactions\Services\UpdatesTransactionIsWaived;
use App\Classes\Modules\Transactions\Processors\CheckStorageInvoiceTransactionProcessor;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Models\Order;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
class UpdateCompanyCreditTermStatusLogic extends AbstractControllerLogic
{
/**
* @return array
*/
protected function notification():array {
return [
'title' => 'Update Company Credit Term Status',
'message' => 'You have successfully updated Company Credit Term Status'
];
}
/** @var FetchesCompany */
private $fetchesCompany;
/** @var UpdatesCompanyModuleIsCreditTerm */
private $updatesCompanyModuleIsCreditTerm;
/** @var CanUpdateCompanyModule */
private $canUpdateCompanyModule;
/** @var ListsTransactions */
private $listsTransactions;
/** @var UpdatesTransactionIsWaived */
private $updatesTransactionIsWaived;
/** @var CheckStorageInvoiceTransactionProcessor */
private $storageInvoiceTransactionProcessor;
/**
* UpdateCompanyCreditTermStatusLogic constructor.
* @param FetchesCompany $fetchesCompany
* @param UpdatesCompanyModuleIsCreditTerm $updatesCompanyModuleIsCreditTerm
* @param CanUpdateCompanyModule $canUpdateCompanyModule
* @param UpdatesTransactionIsWaived $updatesTransactionIsWaived
* @param ListsTransactions $listsTransactions
* @param CheckStorageInvoiceTransactionProcessor $storageInvoiceTransactionProcessor
*/
public function __construct(FetchesCompany $fetchesCompany, UpdatesCompanyModuleIsCreditTerm $updatesCompanyModuleIsCreditTerm, CanUpdateCompanyModule $canUpdateCompanyModule, UpdatesTransactionIsWaived $updatesTransactionIsWaived, ListsTransactions $listsTransactions, CheckStorageInvoiceTransactionProcessor $storageInvoiceTransactionProcessor)
{
$this->fetchesCompany = $fetchesCompany;
$this->updatesCompanyModuleIsCreditTerm = $updatesCompanyModuleIsCreditTerm;
$this->canUpdateCompanyModule = $canUpdateCompanyModule;
$this->listsTransactions = $listsTransactions;
$this->updatesTransactionIsWaived = $updatesTransactionIsWaived;
$this->storageInvoiceTransactionProcessor = $storageInvoiceTransactionProcessor;
}
/**
* @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
{
$this->canUpdateCompanyModule->passes();
$company = $this->fetchesCompany->execute(['id' => $request->route('id')]);
$companyModule = $company->companyModules()->first();
$isCreditTerm = $companyModule->connections()->first()->is_credit_term;
if ($isCreditTerm == 1) {
$isCreditTerm = 0;
} else {
$isCreditTerm = 1;
}
if($isCreditTerm === 1){
//{"per_page":10,"order_by":{"column":"id","DESC":true},"status_in":[2],"receiver":190,"type_in":[1],"does_not_have_payment_status_in":[0,1],"does_not_have_groups":1,"check_for_storage_invoice":1}
$filters = [
'status_in' => [2],
'receiver' => $companyModule->id,
'type_in' => [TransactionType::STORAGE_INVOICE]
];
$transactions = $this->listsTransactions->execute($filters);
foreach($transactions as $transaction){
$this->updatesTransactionIsWaived->execute($transaction);
$packingList = $transaction->owner()->first();
if($packingList){
$order = $packingList->owner()->first();
if($order instanceof Order){
$storages = $this->storageInvoiceTransactionProcessor->executeOrder($order);
}
}
}
}
$this->updatesCompanyModuleIsCreditTerm->execute($company->companyModules()->first()->connections()->first(), $isCreditTerm);
Log::info(Auth::user()->email." updated credit term status for customer with id: " .$request->route('id'). " to status " . $isCreditTerm);
$result = ['is_credit_term' => $isCreditTerm];
return $this->response(['data' => $result]);
}
}
@@ -0,0 +1,23 @@
<?php
namespace App\Classes\Modules\Companies\Services;
use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Models\CompanyConnection;
class UpdatesCompanyModuleIsCreditTerm extends AbstractUpdateRecord
{
/**
* @param CompanyConnection $model
* @param int $isCreditTerm
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(CompanyConnection $model, int $isCreditTerm)
{
$model->is_credit_term = $isCreditTerm;
return $this->handler($model);
}
}
@@ -26,7 +26,7 @@ class CanAssignEmployee extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanAssignEmployee extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanAssignSegment extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanAssignSegment extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateCompany extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanCreateCompany extends AbstractRule
{
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateCompanyModule extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -13,7 +13,7 @@ class CanFetchCompany extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanFetchCompany extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanListCompanies extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanListCompanies extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanUpdateCompany extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanUpdateCompany extends AbstractRule
{
return true;
}
}
}
@@ -0,0 +1,53 @@
<?php
namespace App\Classes\Modules\Companies\Standards\Rules;
use App\Classes\General\Abstracts\AbstractRule;
use App\Classes\Modules\Companies\DataTransferObjects\CompanyObject;
use App\Classes\ValueObjects\Constants\RoleTypes;
class CanUpdateCompanyModule extends AbstractRule
{
/**
* CanUpdateCompanyModule constructor.
*/
public function __construct()
{
}
/**
* @return bool
*/
protected function authorized($object): bool
{
$user = Auth()->user();
if($user){
$roleToCheck = Auth()->user()->type;
if (in_array($roleToCheck, RoleTypes::ADMIN_ROLES)) {
return true;
}
}
return false;
}
/**
* @param $object
* @return bool
* @throws \App\Classes\Exceptions\RequestValidationException
*/
protected function validators($object): bool
{
return true;
}
/**
* @param CompanyObject $object
* @return bool
*/
protected function criteria($object): bool
{
return true;
}
}
@@ -26,7 +26,7 @@ class CanCreateContact extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanCreateContact extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateCurrency extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -48,4 +48,4 @@ class CanCreateCurrency extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteCurrency extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -36,4 +36,4 @@ class CanDeleteCurrency extends AbstractRule
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanFetchCurrency extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -37,4 +37,4 @@ class CanFetchCurrency extends AbstractRule
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanListCurrency extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
@@ -38,4 +38,4 @@ class CanListCurrency extends AbstractRule
return true;
}
}
}
@@ -26,7 +26,7 @@ class CanUpdateCurrency extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -51,4 +51,4 @@ class CanUpdateCurrency extends AbstractRule
return true;
}
}
}
@@ -24,7 +24,7 @@ class CanCreateRate extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
if (!\Auth::user()->can('add currency_rate')) {
@@ -52,4 +52,4 @@ class CanCreateRate extends AbstractRule
{
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanDeleteRate extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
@@ -42,4 +42,4 @@ class CanDeleteRate extends AbstractRule
return true;
}
}
}
@@ -13,7 +13,7 @@ class CanFetchRate extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -40,4 +40,4 @@ class CanFetchRate extends AbstractRule
return true;
}
}
}
@@ -10,7 +10,7 @@ class CanListRates extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
@@ -42,4 +42,4 @@ class CanListRates extends AbstractRule
return true;
}
}
}
@@ -25,7 +25,7 @@ class CanUpdateRate extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
@@ -55,4 +55,4 @@ class CanUpdateRate extends AbstractRule
return true;
}
}
}
@@ -0,0 +1,50 @@
<?php
namespace App\Classes\Modules\Documents\Processors;
use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
use App\Classes\Modules\Documents\Services\CreatesDocument;
use App\Classes\Modules\Documents\Services\CreatesFiles;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Models\Document;
use Illuminate\Http\Request;
use App\Models\QAUserAnswerSelected;
class UploadDocumentForHelpMenuProcessor
{
/** @var CreatesDocument */
private $createsDocument;
/** @var CreatesFiles */
private $createsFiles;
/**
* UploadDocumentForHelpMenuProcessor constructor.
* @param CreatesDocument $createsDocument
* @param CreatesFiles $createsFiles
*/
public function __construct(CreatesDocument $createsDocument, CreatesFiles $createsFiles)
{
$this->createsDocument = $createsDocument;
$this->createsFiles = $createsFiles;
}
/**
* @param $filesUpload
* @param QAUserAnswerSelected qaUserAnswerSelected
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute($filesUpload, QAUserAnswerSelected $qaUserAnswerSelected) {
$object = new DocumentObject("HELP_MENU", $filesUpload,
'123456', ApprovalStatus::PENDING_VERIFICATION, 'help_menu'); //cief todo: 123456 cannot be hardcoded
/** @var Document $document */
$document = $this->createsDocument->execute($qaUserAnswerSelected, $object);
$result = $this->createsFiles->execute($document, $object);
return $result;
}
}
@@ -12,7 +12,7 @@ class CanApproveDocument extends AbstractRule
/**
* @return bool
*/
protected function authorized(): bool
protected function authorized($object): bool
{
// TODO Set Authorization rules
return true;
@@ -36,4 +36,4 @@ class CanApproveDocument extends AbstractRule
return true;
}
}
}

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