90 Commits

Author SHA1 Message Date
961c281c02 Update dependency althinect/filament-spatie-roles-permissions to v4
Some checks failed
renovate/artifacts Artifact file update failure
Gemini PR Review / Gemini PR Review (pull_request) Failing after 22s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Laravel Larastan / larastan (pull_request) Failing after 2m31s
Laravel Pint / pint (pull_request) Failing after 2m45s
2026-07-26 00:00:53 +00:00
62e577a87f Merge pull request 'Changed batch length validation in weight validation' (#861) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Reviewed-on: #861
2026-07-24 11:57:14 +00:00
dhanabalan
dbd7c2860f Changed batch length validation in weight validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m58s
Laravel Larastan / larastan (pull_request) Failing after 3m49s
2026-07-24 17:26:59 +05:30
651f25b8de Merge pull request 'Changed name of the label for weight validation in exporter' (#860) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #860
2026-07-24 11:24:18 +00:00
dhanabalan
8bf3bfc3f8 Changed name of the label for weight validation in exporter
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Larastan / larastan (pull_request) Failing after 3m43s
Laravel Pint / pint (pull_request) Successful in 3m37s
2026-07-24 16:54:04 +05:30
7106d2aa13 Merge pull request 'changed the label name in bundle numberin weight validation' (#859) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #859
2026-07-24 11:22:31 +00:00
dhanabalan
0561a2443e changed the label name in bundle numberin weight validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 22s
Laravel Larastan / larastan (pull_request) Failing after 3m32s
Laravel Pint / pint (pull_request) Successful in 4m7s
2026-07-24 16:52:17 +05:30
ad35a64869 Merge pull request 'changed name of the obd number' (#858) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Reviewed-on: #858
2026-07-24 11:18:03 +00:00
dhanabalan
6d4ed2a384 changed name of the obd number
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m36s
Laravel Larastan / larastan (pull_request) Failing after 6m1s
2026-07-24 16:47:22 +05:30
4b06a32893 Merge pull request 'ranjith-dev' (#857) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #857
2026-07-24 06:28:18 +00:00
dhanabalan
692a114f4b Added three column in panel box model file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m41s
Laravel Larastan / larastan (pull_request) Failing after 5m3s
2026-07-24 11:57:45 +05:30
dhanabalan
b6ea3b87ca Added three columns in panel box validations table
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-07-24 11:56:46 +05:30
02c3a9aff0 Merge pull request 'Added panel gr master logic and quantity logic in panel box validation' (#856) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #856
2026-07-24 05:15:40 +00:00
dhanabalan
8009117456 Added panel gr master logic and quantity logic in panel box validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m30s
Laravel Larastan / larastan (pull_request) Failing after 4m12s
2026-07-24 10:45:18 +05:30
8bba768cb3 Merge pull request 'Added import and export permissions in seeder for panel box seeder' (#855) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #855
2026-07-24 04:54:15 +00:00
dhanabalan
d1eaa86fe1 Added import and export permissions in seeder for panel box seeder
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 25s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 22s
Laravel Pint / pint (pull_request) Successful in 2m28s
Laravel Larastan / larastan (pull_request) Failing after 3m36s
2026-07-24 10:23:55 +05:30
5ddf314503 Merge pull request 'added ref of panel gr master in item model' (#854) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #854
2026-07-24 04:49:03 +00:00
dhanabalan
fb8016d374 added ref of panel gr master in item model
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 20s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m59s
Laravel Larastan / larastan (pull_request) Failing after 4m39s
2026-07-24 10:18:37 +05:30
c8638db7a6 Merge pull request 'ranjith-dev' (#853) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #853
2026-07-24 04:44:22 +00:00
dhanabalan
3f697d67f5 Added panel gr master importer and exporter
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 29s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 23s
Laravel Pint / pint (pull_request) Successful in 3m5s
Laravel Larastan / larastan (pull_request) Failing after 4m10s
2026-07-24 10:14:06 +05:30
dhanabalan
cd1c8ff957 Added panel gr master policy file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Laravel Pint / pint (pull_request) Successful in 2m31s
Laravel Larastan / larastan (pull_request) Failing after 4m6s
2026-07-24 10:12:20 +05:30
dhanabalan
4916d622bd Added panel gr master resource pages
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
2026-07-24 10:11:30 +05:30
dhanabalan
118ca4d7a9 Added panel gr master model file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
2026-07-24 10:07:11 +05:30
dhanabalan
c1f9534465 added panel gr master migration file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
2026-07-24 10:05:03 +05:30
631c2f4095 Merge pull request 'solved bug in notification attempt null in wire master packing' (#852) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #852
2026-07-23 06:57:26 +00:00
dhanabalan
edbbe138a3 solved bug in notification attempt null in wire master packing
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Laravel Pint / pint (pull_request) Successful in 2m14s
Laravel Larastan / larastan (pull_request) Failing after 3m48s
2026-07-23 12:27:04 +05:30
38a6395530 Merge pull request 'Added auto focus logic in guard patrol entry' (#851) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #851
2026-07-22 09:33:18 +00:00
dhanabalan
6f9b19289a Added auto focus logic in guard patrol entry
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m38s
Laravel Larastan / larastan (pull_request) Failing after 4m32s
2026-07-22 15:03:03 +05:30
10092bef65 Merge pull request 'issues solved in customer po filter in wire master packing' (#850) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #850
2026-07-22 07:03:18 +00:00
dhanabalan
d467543e67 issues solved in customer po filter in wire master packing
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 3m19s
Laravel Larastan / larastan (pull_request) Failing after 3m59s
2026-07-22 12:32:57 +05:30
414e51b4bf Merge pull request 'altered logic for total quantity in wire master' (#849) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Reviewed-on: #849
2026-07-22 06:30:06 +00:00
dhanabalan
aa4a9f68fa altered logic for total quantity in wire master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Larastan / larastan (pull_request) Failing after 3m47s
Laravel Pint / pint (pull_request) Successful in 4m34s
2026-07-22 11:59:52 +05:30
3c8fd7b3d6 Merge pull request 'commented unwanted msg in panel' (#848) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #848
2026-07-21 07:07:36 +00:00
dhanabalan
d6a683b9c1 commented unwanted msg in panel
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m51s
Laravel Larastan / larastan (pull_request) Failing after 4m32s
2026-07-21 12:37:23 +05:30
a41756f819 Merge pull request 'allowed for typing in production order in panel box' (#847) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Reviewed-on: #847
2026-07-21 06:54:10 +00:00
dhanabalan
1d3411e033 allowed for typing in production order in panel box
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 3m51s
Laravel Larastan / larastan (pull_request) Failing after 5m42s
2026-07-21 12:23:56 +05:30
73616984b3 Merge pull request 'Added label name for panel box' (#846) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #846
2026-07-21 06:51:22 +00:00
dhanabalan
59eae005eb Added label name for panel box
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Laravel Pint / pint (pull_request) Successful in 2m34s
Laravel Larastan / larastan (pull_request) Failing after 5m13s
2026-07-21 12:20:52 +05:30
906b6c2a83 Merge pull request 'modified logic in loading inter unit staff codes' (#845) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #845
2026-07-20 03:21:18 +00:00
dhanabalan
f6179a0143 modified logic in loading inter unit staff codes
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m19s
Laravel Larastan / larastan (pull_request) Failing after 3m36s
2026-07-20 08:50:53 +05:30
32b213a464 Merge pull request 'added employee visit logic in out mail' (#844) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #844
2026-07-19 06:04:48 +00:00
dhanabalan
aea402cd4c added employee visit logic in out mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m44s
Laravel Larastan / larastan (pull_request) Failing after 4m51s
2026-07-19 11:34:30 +05:30
7fbeead3dd Merge pull request 'ranjith-dev' (#843) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 22s
Reviewed-on: #843
2026-07-19 04:59:22 +00:00
dhanabalan
a6b29e07bb removed unwanted codes in visitor page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Laravel Pint / pint (pull_request) Successful in 3m36s
Laravel Larastan / larastan (pull_request) Failing after 4m24s
2026-07-19 10:28:58 +05:30
dhanabalan
8f32671db6 Added employee visitor logic in mail page
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
2026-07-19 10:28:07 +05:30
b39c298fb4 Merge pull request 'Added inter unit staff logic in visitor entry page' (#842) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #842
2026-07-19 04:35:23 +00:00
dhanabalan
fe5630e7b0 Added inter unit staff logic in visitor entry page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 2m4s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 1m3s
Laravel Pint / pint (pull_request) Successful in 3m0s
Laravel Larastan / larastan (pull_request) Failing after 4m25s
2026-07-19 10:05:01 +05:30
cb12cec5af Merge pull request 'Added export serial numbers for production order' (#841) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #841
2026-07-18 12:13:42 +00:00
dhanabalan
107d356745 Added export serial numbers for production order
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Laravel Pint / pint (pull_request) Successful in 2m57s
Laravel Larastan / larastan (pull_request) Failing after 4m3s
2026-07-18 17:43:15 +05:30
dca11f0349 Merge pull request 'Added export serial method in production order controller' (#840) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #840
2026-07-18 10:09:52 +00:00
dhanabalan
dd56cd7aae Added export serial method in production order controller
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Larastan / larastan (pull_request) Failing after 3m39s
Laravel Pint / pint (pull_request) Failing after 13m10s
2026-07-18 15:39:37 +05:30
835a928ff3 Merge pull request 'added route for production serial excel report' (#839) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #839
2026-07-18 10:08:27 +00:00
dhanabalan
d275fb9407 added route for production serial excel report
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 25s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 23s
Laravel Pint / pint (pull_request) Successful in 2m45s
Laravel Larastan / larastan (pull_request) Failing after 3m59s
2026-07-18 15:38:13 +05:30
7aee42cc5d Merge pull request 'Added serial export excel page' (#838) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #838
2026-07-18 10:07:16 +00:00
dhanabalan
1f1b690515 Added serial export excel page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Failing after 32s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 24s
Laravel Pint / pint (pull_request) Successful in 2m27s
Laravel Larastan / larastan (pull_request) Failing after 4m30s
2026-07-18 15:36:57 +05:30
0de8916f02 Merge pull request 'Added export serial excel button in production order page' (#837) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #837
2026-07-18 10:06:18 +00:00
dhanabalan
56ae97d2a3 Added export serial excel button in production order page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Laravel Pint / pint (pull_request) Successful in 2m48s
Laravel Larastan / larastan (pull_request) Failing after 4m17s
2026-07-18 15:35:46 +05:30
105295350b Merge pull request 'corrected alignment for item pdf' (#836) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #836
2026-07-17 06:20:52 +00:00
dhanabalan
41d31fcf3d corrected alignment for item pdf
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 2m24s
Laravel Larastan / larastan (pull_request) Failing after 4m18s
2026-07-17 11:50:38 +05:30
ac1ca537ef Merge pull request 'changed logic in order pdf' (#835) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #835
2026-07-17 06:16:02 +00:00
dhanabalan
5e86a51fa5 changed logic in order pdf
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Larastan / larastan (pull_request) Failing after 4m45s
Laravel Pint / pint (pull_request) Successful in 3m52s
2026-07-17 11:45:47 +05:30
207527491e Merge pull request 'reversed logic in production order pdf' (#834) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #834
2026-07-17 06:11:37 +00:00
dhanabalan
188cfdac4d reversed logic in production order pdf
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 4m22s
Laravel Larastan / larastan (pull_request) Failing after 7m3s
2026-07-17 11:41:21 +05:30
7aa244886b Merge pull request 'Adjusted align issue in print blade file' (#833) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #833
2026-07-17 05:44:21 +00:00
dhanabalan
8f3dfbc290 Adjusted align issue in print blade file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Laravel Pint / pint (pull_request) Successful in 4m23s
Laravel Larastan / larastan (pull_request) Failing after 6m32s
2026-07-17 11:14:07 +05:30
5189ece56b Merge pull request 'changed size of the wire pallet' (#832) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 19s
Reviewed-on: #832
2026-07-17 04:10:30 +00:00
dhanabalan
a294ca3ef0 changed size of the wire pallet
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 21s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 24s
Laravel Pint / pint (pull_request) Successful in 4m28s
Laravel Larastan / larastan (pull_request) Failing after 5m10s
2026-07-17 09:40:06 +05:30
bbecb86dc3 Merge pull request 'added logic in cycle count' (#831) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #831
2026-07-16 10:09:46 +00:00
dhanabalan
fdc0aed31c added logic in cycle count
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 3m36s
Laravel Larastan / larastan (pull_request) Failing after 3m59s
2026-07-16 15:39:29 +05:30
a3cec9db06 Merge pull request 'Changed logic in cycle count' (#830) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 22s
Reviewed-on: #830
2026-07-16 09:56:51 +00:00
dhanabalan
947aacb074 Changed logic in cycle count
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 2m22s
Laravel Larastan / larastan (pull_request) Failing after 3m44s
2026-07-16 15:26:36 +05:30
0c6331282e Merge pull request 'uncommented doc no update logic' (#829) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 18s
Reviewed-on: #829
2026-07-16 06:54:01 +00:00
dhanabalan
b7b5db068b uncommented doc no update logic
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m25s
Laravel Larastan / larastan (pull_request) Failing after 4m55s
2026-07-16 12:23:44 +05:30
7d8b2d8632 Merge pull request 'ranjith-dev' (#828) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Reviewed-on: #828
2026-07-16 04:19:45 +00:00
dhanabalan
d42ae70e46 added item code api route php
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Laravel Larastan / larastan (pull_request) Failing after 4m9s
Laravel Pint / pint (pull_request) Successful in 4m20s
2026-07-16 09:48:50 +05:30
dhanabalan
be2e7b00d7 added get item code method in plant controller
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 20s
2026-07-16 09:47:06 +05:30
7276765aa4 Merge pull request 'removed inspection status column in production characteristic' (#827) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #827
2026-07-13 08:33:47 +00:00
dhanabalan
1ce7995105 removed inspection status column in production characteristic
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 58s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 2m4s
Laravel Pint / pint (pull_request) Successful in 2m59s
Laravel Larastan / larastan (pull_request) Failing after 4m20s
2026-07-13 14:03:27 +05:30
164a1becac Merge pull request 'Removed afterStateUpdated method in actions control' (#826) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 21s
Reviewed-on: #826
2026-07-09 07:11:12 +00:00
dhanabalan
d5cd1437fe Removed afterStateUpdated method in actions control
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Laravel Pint / pint (pull_request) Successful in 2m22s
Laravel Larastan / larastan (pull_request) Failing after 4m6s
2026-07-09 12:40:13 +05:30
6ad91c8c96 Merge pull request 'Added searchable method for plant and work center and updated_by name on every change and deleted_at column added at the end and Enhance EquipmentMasterResource form' (#825) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #825
2026-07-08 13:15:29 +00:00
dhanabalan
d4d101c5c9 Added searchable method for plant and work center and updated_by name on every change and deleted_at column added at the end and Enhance EquipmentMasterResource form
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Laravel Pint / pint (pull_request) Successful in 3m1s
Laravel Larastan / larastan (pull_request) Failing after 5m2s
2026-07-08 18:44:17 +05:30
a6496b59c1 Merge pull request 'Added number of person in visitor mail' (#824) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #824
2026-07-08 10:48:37 +00:00
dhanabalan
b8cb0aa237 Added number of person in visitor mail
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 20s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m45s
Laravel Larastan / larastan (pull_request) Failing after 3m17s
2026-07-08 16:18:22 +05:30
027bacbce8 Merge pull request 'changed logic in pallet print controller' (#823) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #823
2026-07-08 05:59:33 +00:00
dhanabalan
eef42d9736 changed logic in pallet print controller
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 1m48s
Laravel Larastan / larastan (pull_request) Failing after 3m5s
2026-07-08 11:29:21 +05:30
6a87067387 Merge pull request 'issue solved undefined column error in wire' (#822) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 24s
Reviewed-on: #822
2026-07-08 05:50:39 +00:00
dhanabalan
3316c11036 issue solved undefined column error in wire
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 25s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 19s
Laravel Pint / pint (pull_request) Successful in 1m56s
Laravel Larastan / larastan (pull_request) Failing after 3m9s
2026-07-08 11:20:24 +05:30
4ac1e9f7c7 Merge pull request 'changed logic in wire pallet print' (#821) from ranjith-dev into master
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Reviewed-on: #821
2026-07-08 05:49:11 +00:00
dhanabalan
bf22ef5af0 changed logic in wire pallet print
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 1m47s
Laravel Larastan / larastan (pull_request) Failing after 3m28s
2026-07-08 11:18:50 +05:30
42 changed files with 2026 additions and 136 deletions

View File

@@ -0,0 +1,68 @@
<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Illuminate\Support\Collection;
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
use Maatwebsite\Excel\Concerns\WithColumnFormatting;
use PhpOffice\PhpSpreadsheet\Cell\Cell;
use PhpOffice\PhpSpreadsheet\Cell\DataType;
use PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder;
use Maatwebsite\Excel\Concerns\WithCustomValueBinder;
class SerialExport extends DefaultValueBinder implements FromCollection, WithHeadings, WithCustomValueBinder
, WithColumnFormatting
{
/**
* @return \Illuminate\Support\Collection
*/
protected $itemCode;
protected $fromSerial;
protected $toSerial;
public function __construct($itemCode, $fromSerial, $toSerial)
{
$this->itemCode = $itemCode;
$this->fromSerial = $fromSerial;
$this->toSerial = $toSerial;
}
public function bindValue(Cell $cell, $value)
{
$cell->setValueExplicit((string) $value, DataType::TYPE_STRING);
return true;
}
public function collection()
{
$rows = [];
for ($i = $this->fromSerial; $i <= $this->toSerial; $i++) {
$rows[] = [
'item_code' => $this->itemCode,
'serial_number' => str_pad($i, 6, '0', STR_PAD_LEFT),
];
}
return new Collection($rows);
}
public function columnFormats(): array
{
return [
'B' => NumberFormat::FORMAT_TEXT,
];
}
public function headings(): array
{
return [
'Item Code',
'Serial Number',
];
}
}

View File

@@ -0,0 +1,60 @@
<?php
namespace App\Filament\Exports;
use App\Models\PanelGrMaster;
use Filament\Actions\Exports\ExportColumn;
use Filament\Actions\Exports\Exporter;
use Filament\Actions\Exports\Models\Export;
class PanelGrMasterExporter extends Exporter
{
protected static ?string $model = PanelGrMaster::class;
public static function getColumns(): array
{
static $rowNumber = 0;
return [
ExportColumn::make('no')
->label('NO')
->state(function ($record) use (&$rowNumber) {
// Increment and return the row number
return ++$rowNumber;
}),
ExportColumn::make('plant.name')
->label('PLANT NAME'),
ExportColumn::make('item.code')
->label('ITEM CODE'),
ExportColumn::make('document_number')
->label('DOCUMENT NUMBER'),
ExportColumn::make('invoice_number')
->label('INVOICE NUMBER'),
ExportColumn::make('supplier_number')
->label('SUPPLIER NUMBER'),
ExportColumn::make('quantity')
->label('QUANTITY'),
ExportColumn::make('created_at')
->label('CREATED AT'),
ExportColumn::make('updated_at')
->label('UPDATED AT'),
ExportColumn::make('created_by')
->label('CREATED BY'),
ExportColumn::make('updated_by')
->label('UPDATED BY'),
ExportColumn::make('deleted_at')
->label('DELETED AT')
->enabledByDefault(false),
];
}
public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your panel gr master export has completed and ' . number_format($export->successful_rows) . ' ' . str('row')->plural($export->successful_rows) . ' exported.';
if ($failedRowsCount = $export->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to export.';
}
return $body;
}
}

View File

@@ -39,8 +39,6 @@ class ProductionCharacteristicExporter extends Exporter
->label('OBSERVED VALUE'), ->label('OBSERVED VALUE'),
ExportColumn::make('status') ExportColumn::make('status')
->label('STATUS'), ->label('STATUS'),
ExportColumn::make('inspection_status')
->label('INSPECTION STATUS'),
ExportColumn::make('remark') ExportColumn::make('remark')
->label('REMARK'), ->label('REMARK'),
ExportColumn::make('created_at') ExportColumn::make('created_at')

View File

@@ -29,7 +29,7 @@ class WeightValidationExporter extends Exporter
ExportColumn::make('item.code') ExportColumn::make('item.code')
->label('ITEM CODE'), ->label('ITEM CODE'),
ExportColumn::make('obd_number') ExportColumn::make('obd_number')
->label('OBD NUMBER'), ->label('OBD / GR NUMBER'),
ExportColumn::make('line_number') ExportColumn::make('line_number')
->label('LINE NUMBER'), ->label('LINE NUMBER'),
ExportColumn::make('batch_number') ExportColumn::make('batch_number')
@@ -41,7 +41,7 @@ class WeightValidationExporter extends Exporter
ExportColumn::make('vehicle_number') ExportColumn::make('vehicle_number')
->label('VEHICLE NUMBER'), ->label('VEHICLE NUMBER'),
ExportColumn::make('bundle_number') ExportColumn::make('bundle_number')
->label('BUNDLE NUMBER'), ->label('BUNDLE / COIL NUMBER'),
ExportColumn::make('picked_weight') ExportColumn::make('picked_weight')
->label('PICKED WEIGHT'), ->label('PICKED WEIGHT'),
ExportColumn::make('scanned_by') ExportColumn::make('scanned_by')

View File

@@ -0,0 +1,146 @@
<?php
namespace App\Filament\Imports;
use App\Models\Item;
use App\Models\PanelGrMaster;
use App\Models\Plant;
use Filament\Actions\Imports\ImportColumn;
use Filament\Actions\Imports\Importer;
use Filament\Actions\Imports\Models\Import;
use Filament\Facades\Filament;
use Str;
use Filament\Actions\Imports\Exceptions\RowImportFailedException;
class PanelGrMasterImporter extends Importer
{
protected static ?string $model = PanelGrMaster::class;
public static function getColumns(): array
{
return [
ImportColumn::make('plant')
->requiredMapping()
->exampleHeader('Plant Code')
->example('1000')
->label('Plant Code')
->relationship(resolveUsing: 'code')
->rules(['required']),
ImportColumn::make('item')
->requiredMapping()
->exampleHeader('Item Code')
->example('630214')
->label('Item Code')
->relationship(resolveUsing: 'code')
->rules(['required']),
ImportColumn::make('document_number')
->requiredMapping()
->exampleHeader('Document Number')
->example('11023567')
->label('Document Number')
->rules(['required']),
ImportColumn::make('invoice_number')
->requiredMapping()
->exampleHeader('Invoice Number')
->example('3RAW0012345')
->label('Invoice Number')
->rules(['required']),
ImportColumn::make('supplier_number')
->requiredMapping()
->exampleHeader('Supplier Number')
->example('154564564')
->label('Supplier Number')
->rules(['required']),
ImportColumn::make('quantity')
->requiredMapping()
->exampleHeader('Quantity')
->example('10')
->label('Quantity')
->rules(['required']),
];
}
public function resolveRecord(): ?PanelGrMaster
{
$warnMsg = [];
$plantCod = $this->data['plant'];
$plant = null;
$item = null;
$userName = Filament::auth()->user()?->name;
if (Str::length($plantCod) < 4 || ! is_numeric($plantCod) || ! preg_match('/^[1-9]\d{3,}$/', $plantCod)) {
$warnMsg[] = 'Invalid plant code found';
} else {
$plant = Plant::where('code', $plantCod)->first();
if (! $plant) {
$warnMsg[] = 'Plant not found';
} else {
$item = Item::where('code', $this->data['item'])->where('plant_id', $plant->id)->first();
}
if (! $item) {
$warnMsg[] = 'Item not found';
}
}
if (empty($this->data['document_number'])) {
$warnMsg[] = 'Document Number cannot be empty.';
}
if (Str::length($this->data['invoice_number']) < 7 || ! ctype_alnum($this->data['invoice_number'])) {
$warnMsg[] = 'Invalid invoice number found';
}
if (empty($this->data['supplier_number'])) {
$warnMsg[] = 'Supplier Number cannot be empty.';
}
if (empty($this->data['quantity'])) {
$warnMsg[] = 'Quantity cannot be empty.';
}
elseif (!is_numeric($this->data['quantity'])) {
$warnMsg[] = 'Quantity must be a valid number.';
} elseif ((float) $this->data['quantity'] <= 0) {
$warnMsg[] = 'Quantity must be greater than 0.';
}
$existingRecord = PanelGrMaster::where('document_number', $this->data['document_number'])->where('plant_id', $this->data['plant'])->first();
if ($existingRecord && $existingRecord->invoice_number != $this->data['invoice_number'])
{
$warnMsg[] = "Document Number '{$this->data['document_number']}' is already associated with Invoice Number '{$existingRecord->invoice_number}'.";
}
if (! empty($warnMsg)) {
throw new RowImportFailedException(implode(', ', $warnMsg));
}
PanelGrMaster::updateOrCreate(
[
'plant_id' => $plant->id,
'item_id' => $item->id,
'document_number' => $this->data['document_number'],
'invoice_number' => $this->data['invoice_number'],
'supplier_number' => $this->data['supplier_number'] ?? null,
],
[
'quantity' => $this->data['quantity'] ?? null,
'updated_by' => $userName,
'created_by' => $userName, // Only used when creating
]
);
return null;
// return new PanelGrMaster();
}
public static function getCompletedNotificationBody(Import $import): string
{
$body = 'Your panel gr master import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.';
if ($failedRowsCount = $import->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.';
}
return $body;
}
}

View File

@@ -128,7 +128,8 @@ class CycleCount extends Page
$operatorName = $user->name; $operatorName = $user->name;
$pattern1 = '/^[^#]*#[^#]*#[^#]*#[^#]*#$/'; $pattern1 = '/^[^#]*#[^#]*#[^#]*#[^#]*#$/';
$pattern2 = '/^[^|]*\|[^|]*\|[^|]*$/'; // $pattern2 = '/^[^|]*\|[^|]*\|[^|]*$/';
$pattern2 = '/^[^|]+\|[^|]+(?:\|[^|]*)?$/';
$pattern3 = '/^([a-zA-Z0-9]{6,})\|([1-9][a-zA-Z0-9]{8,})(?:\/[MmPp])?\|?$/'; $pattern3 = '/^([a-zA-Z0-9]{6,})\|([1-9][a-zA-Z0-9]{8,})(?:\/[MmPp])?\|?$/';
// $pattern2 = '/^[^|]+\|[^|]+\|[^|]+\|?$/'; Optional Pipeline at end // $pattern2 = '/^[^|]+\|[^|]+\|[^|]+\|?$/'; Optional Pipeline at end
@@ -678,7 +679,7 @@ class CycleCount extends Page
$stock->update([ $stock->update([
'bin' => $bin, 'bin' => $bin,
'batch' => $this->batch, 'batch' => $this->batch,
// 'doc_no' =>$this->docNo, 'doc_no' =>$this->docNo,
'scanned_quantity' => $newScannedQty, 'scanned_quantity' => $newScannedQty,
'scanned_status' => $status, 'scanned_status' => $status,
]); ]);
@@ -721,6 +722,13 @@ class CycleCount extends Page
$parts = explode('|', $value); $parts = explode('|', $value);
$this->itemCode = $parts[0] ?? null; $this->itemCode = $parts[0] ?? null;
if (count($parts) == 2) {
// Format: itemcode|serialnumber
$this->sNo = $parts[1];
$this->batch = null;
} else {
// Format: itemcode|value1|value2
if (strlen($parts[1]) > strlen($parts[2])) { if (strlen($parts[1]) > strlen($parts[2])) {
$this->sNo = $parts[1]; $this->sNo = $parts[1];
$this->batch = $parts[2]; $this->batch = $parts[2];
@@ -728,6 +736,14 @@ class CycleCount extends Page
$this->batch = $parts[1]; $this->batch = $parts[1];
$this->sNo = $parts[2]; $this->sNo = $parts[2];
} }
}
// if (strlen($parts[1]) > strlen($parts[2])) {
// $this->sNo = $parts[1];
// $this->batch = $parts[2];
// } else {
// $this->batch = $parts[1];
// $this->sNo = $parts[2];
// }
if (strlen($this->itemCode) < 6) { if (strlen($this->itemCode) < 6) {
Notification::make() Notification::make()
@@ -759,7 +775,7 @@ class CycleCount extends Page
]); ]);
return; return;
} elseif (strlen($this->batch) < 5) { } elseif (count($parts) !== 2 && strlen($this->batch) < 5) {
Notification::make() Notification::make()
->title('Unknown Batch') ->title('Unknown Batch')
->body("Batch should contain minimum 5 digits '$this->batch'") ->body("Batch should contain minimum 5 digits '$this->batch'")
@@ -927,7 +943,7 @@ class CycleCount extends Page
'bin' => $bin, 'bin' => $bin,
'serial_number' => $this->sNo, 'serial_number' => $this->sNo,
'stickerMasterId' => $stickerMasterId, 'stickerMasterId' => $stickerMasterId,
'batch' => $this->batch, 'batch' => $this->batch ?? null,
'docNo' => $this->docNo, 'docNo' => $this->docNo,
'quantity' => $this->quantity, 'quantity' => $this->quantity,
]), ]),
@@ -1240,7 +1256,7 @@ class CycleCount extends Page
return; return;
} }
if ($serialAgaPlant->batch != '' || $serialAgaPlant->batch != null) { if (count($parts) !== 2 && ($serialAgaPlant->batch != '' || $serialAgaPlant->batch != null)){
if ($serialAgaPlant->batch != $this->batch) { if ($serialAgaPlant->batch != $this->batch) {
@@ -1396,7 +1412,7 @@ class CycleCount extends Page
'bin' => $bin, 'bin' => $bin,
'serial_number' => $this->sNo, 'serial_number' => $this->sNo,
'stickerMasterId' => $stickerMasterId, 'stickerMasterId' => $stickerMasterId,
'batch' => $this->batch, 'batch' => $this->batch ?? null,
'docNo' => $this->docNo, 'docNo' => $this->docNo,
'quantity' => $this->quantity, 'quantity' => $this->quantity,
]), ]),
@@ -1415,8 +1431,8 @@ class CycleCount extends Page
$serial->update([ $serial->update([
'bin' => $bin ?? null, 'bin' => $bin ?? null,
'batch' => $this->batch ?? null, 'batch' => count($parts) !== 2 ? $this->batch : $serial->batch,
'doc_no' => $this->docNo ?? null, // 'doc_no' => $this->docNo ?? null,
'scanned_status' => 'Scanned', 'scanned_status' => 'Scanned',
'scanned_quantity' => '1', 'scanned_quantity' => '1',
'updated_at' => now(), 'updated_at' => now(),
@@ -2132,6 +2148,7 @@ class CycleCount extends Page
} }
} }
} }
} }
protected function getHeaderActions(): array protected function getHeaderActions(): array

View File

@@ -12,6 +12,7 @@ use Filament\Facades\Filament;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Components\Actions\Action; use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Form; use Filament\Forms\Form;
use Filament\Forms\Get;
use Filament\Notifications\Notification; use Filament\Notifications\Notification;
use Filament\Resources\Resource; use Filament\Resources\Resource;
use Filament\Tables; use Filament\Tables;
@@ -39,18 +40,32 @@ class EquipmentMasterResource extends Resource
return $form return $form
->schema([ ->schema([
Forms\Components\Select::make('plant_id') Forms\Components\Select::make('plant_id')
->label('Plant') ->label('Plant Name')
->reactive()
->relationship('plant', 'name') ->relationship('plant', 'name')
->required()
->searchable()
->reactive()
->options(function (callable $get) { ->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id; $userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray(); return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
}) })
->required(), ->disabled(fn (Get $get) => ! empty($get('id')))
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('machine_id', null);
$set('updated_by', Filament::auth()->user()?->name);
})
->default(function () {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? $userHas : optional(EquipmentMaster::latest()->first())->plant_id;
}),
Forms\Components\Select::make('machine_id') Forms\Components\Select::make('machine_id')
// ->relationship('machine', 'name') // ->relationship('machine', 'name')
->label('Work Center') ->label('Work Center')
->required()
->searchable()
->reactive() ->reactive()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('plant_id'); $plantId = $get('plant_id');
@@ -60,15 +75,30 @@ class EquipmentMasterResource extends Resource
return \App\Models\Machine::where('plant_id', $plantId)->pluck('work_center', 'id'); return \App\Models\Machine::where('plant_id', $plantId)->pluck('work_center', 'id');
}) })
->required(), ->disabled(fn (Get $get) => ! empty($get('id')))
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('name') Forms\Components\TextInput::make('name')
->label('Name'), ->label('Name')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('description') Forms\Components\TextInput::make('description')
->label('Description'), ->label('Description')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('make') Forms\Components\TextInput::make('make')
->label('Make'), ->label('Make')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('model') Forms\Components\TextInput::make('model')
->label('Model'), ->label('Model')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('equipment_number') Forms\Components\TextInput::make('equipment_number')
->label('Equipment Number') ->label('Equipment Number')
->reactive() ->reactive()
@@ -82,6 +112,8 @@ class EquipmentMasterResource extends Resource
]; ];
}) })
->afterStateUpdated(function ($state, callable $set) { ->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
if (! $state) { if (! $state) {
return; return;
} }
@@ -108,7 +140,10 @@ class EquipmentMasterResource extends Resource
// } // }
// }), // }),
Forms\Components\TextInput::make('instrument_serial_number') Forms\Components\TextInput::make('instrument_serial_number')
->label('Instrument Serial Number'), ->label('Instrument Serial Number')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
// Forms\Components\DateTimePicker::make('calibrated_on') // Forms\Components\DateTimePicker::make('calibrated_on')
// ->label('Calibrated On') // ->label('Calibrated On')
// ->required(), // ->required(),
@@ -128,6 +163,7 @@ class EquipmentMasterResource extends Resource
$frequency = $get('frequency') ?? '1'; $frequency = $get('frequency') ?? '1';
$nextDate = self::calculateNextCalibrationDate($state, $frequency); $nextDate = self::calculateNextCalibrationDate($state, $frequency);
$set('next_calibration_date', $nextDate); $set('next_calibration_date', $nextDate);
$set('updated_by', Filament::auth()->user()?->name);
}), }),
// ->afterStateUpdated(function ($state, callable $get, callable $set) { // ->afterStateUpdated(function ($state, callable $get, callable $set) {
// $frequency = (int) $get('frequency'); // $frequency = (int) $get('frequency');
@@ -152,6 +188,7 @@ class EquipmentMasterResource extends Resource
$calibratedOn = $get('calibrated_on'); $calibratedOn = $get('calibrated_on');
$nextDate = self::calculateNextCalibrationDate($calibratedOn, $state); $nextDate = self::calculateNextCalibrationDate($calibratedOn, $state);
$set('next_calibration_date', $nextDate); $set('next_calibration_date', $nextDate);
$set('updated_by', Filament::auth()->user()?->name);
}), }),
// ->afterStateUpdated(function ($state, callable $get, callable $set) { // ->afterStateUpdated(function ($state, callable $get, callable $set) {
// $calibratedOn = $get('calibrated_on'); // $calibratedOn = $get('calibrated_on');
@@ -171,12 +208,21 @@ class EquipmentMasterResource extends Resource
Forms\Components\DateTimePicker::make('next_calibration_date') Forms\Components\DateTimePicker::make('next_calibration_date')
->label('Next Calibration Date') ->label('Next Calibration Date')
->readOnly() ->readOnly()
->required(), ->required()
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('calibrated_by') Forms\Components\TextInput::make('calibrated_by')
->label('Calibrated By'), ->label('Calibrated By')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\Textarea::make('calibration_certificate') Forms\Components\Textarea::make('calibration_certificate')
->label('Calibration Certificate'), ->label('Calibration Certificate')
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\FileUpload::make('attachment') Forms\Components\FileUpload::make('attachment')
->label('PDF Upload') ->label('PDF Upload')
@@ -185,7 +231,10 @@ class EquipmentMasterResource extends Resource
->disk('local') ->disk('local')
->directory('uploads/temp') ->directory('uploads/temp')
->preserveFilenames() ->preserveFilenames()
->reactive(), ->reactive()
->afterStateUpdated(function ($state, callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
// Forms\Components\Actions::make([ // Forms\Components\Actions::make([
// Action::make('uploadNow') // Action::make('uploadNow')
@@ -341,7 +390,11 @@ class EquipmentMasterResource extends Resource
->label('Created By') ->label('Created By')
->default(Filament::auth()->user()?->name), ->default(Filament::auth()->user()?->name),
Forms\Components\Hidden::make('updated_by') Forms\Components\Hidden::make('updated_by')
->label('Updated By'), ->label('Updated By')
->default(Filament::auth()->user()?->name),
Forms\Components\TextInput::make('id')
->hidden()
->readOnly(),
]); ]);
} }
@@ -359,7 +412,7 @@ class EquipmentMasterResource extends Resource
return ($currentPage - 1) * $perPage + $rowLoop->iteration; return ($currentPage - 1) * $perPage + $rowLoop->iteration;
}), }),
Tables\Columns\TextColumn::make('plant.name') Tables\Columns\TextColumn::make('plant.name')
->label('Plant') ->label('Plant Name')
->alignCenter() ->alignCenter()
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('machine.work_center') Tables\Columns\TextColumn::make('machine.work_center')
@@ -413,24 +466,30 @@ class EquipmentMasterResource extends Resource
->alignCenter() ->alignCenter()
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('created_by') Tables\Columns\TextColumn::make('created_by')
->label('Created Bys') ->label('Created By')
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('updated_by')
->label('Updated By')
->alignCenter() ->alignCenter()
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('created_at') Tables\Columns\TextColumn::make('created_at')
->label('Created At') ->label('Created At')
->dateTime() ->dateTime()
->alignCenter() ->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('updated_by')
->label('Updated By')
->alignCenter()
->sortable() ->sortable()
->toggleable(isToggledHiddenByDefault: true), ->toggleable(isToggledHiddenByDefault: false),
Tables\Columns\TextColumn::make('updated_at') Tables\Columns\TextColumn::make('updated_at')
->label('Updated At') ->label('Updated At')
->dateTime() ->dateTime()
->alignCenter() ->alignCenter()
->sortable() ->sortable()
->toggleable(isToggledHiddenByDefault: false),
Tables\Columns\TextColumn::make('deleted_at')
->label('Deleted At')
->dateTime()
->alignCenter()
->sortable()
->toggleable(isToggledHiddenByDefault: true), ->toggleable(isToggledHiddenByDefault: true),
]) ])
->filters([ ->filters([

View File

@@ -179,6 +179,7 @@ class GuardPatrolEntryResource extends Resource
Forms\Components\TextInput::make('check_point_name') Forms\Components\TextInput::make('check_point_name')
->label('Check Point Name') ->label('Check Point Name')
->required() ->required()
->autofocus()
->reactive() ->reactive()
->disabled(fn (Get $get) => ! empty($get('id'))) ->disabled(fn (Get $get) => ! empty($get('id')))
->afterStateUpdated(function ($state, callable $set, callable $get) { ->afterStateUpdated(function ($state, callable $set, callable $get) {
@@ -202,7 +203,7 @@ class GuardPatrolEntryResource extends Resource
} }
$set('check_point_name_id', $checkPoint->id); $set('check_point_name_id', $checkPoint->id);
$set('patrol_time', now()->format('Y-m-d H:i:s')); $set('patrol_time', now());
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
$set('gPeCheckPointNameError', null); $set('gPeCheckPointNameError', null);
}) })
@@ -221,11 +222,11 @@ class GuardPatrolEntryResource extends Resource
} }
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}), }),
Forms\Components\DateTimePicker::make('patrol_time') Forms\Components\Hidden::make('patrol_time')
->label('Patrol Time') ->label('Patrol Time')
->reactive() ->reactive()
->default(fn () => now()) ->default(fn () => now())
->readOnly(fn (Get $get) => ! $get('id')) // ->readOnly(fn (Get $get) => ! $get('id'))
->afterStateUpdated(function ($state, callable $set, callable $get) { ->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}) })

View File

@@ -17,6 +17,7 @@ use App\Models\Item;
use App\Models\Line; use App\Models\Line;
use App\Models\Plant; use App\Models\Plant;
use App\Models\StickerMaster; use App\Models\StickerMaster;
use App\Models\PanelGrMaster;
use Filament\Notifications\Notification; use Filament\Notifications\Notification;
use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Mail;
use App\Mail\InvalidQualityMail; use App\Mail\InvalidQualityMail;
@@ -134,6 +135,7 @@ class PanelBoxValidationResource extends Resource
// ->relationship('stickerMaster', 'id') // ->relationship('stickerMaster', 'id')
->required(), ->required(),
Forms\Components\TextInput::make('production_order') Forms\Components\TextInput::make('production_order')
->label('Production Order\Doc No')
->placeholder('Scan the valid Production Order') ->placeholder('Scan the valid Production Order')
->minLength(7) ->minLength(7)
->maxLength(14) ->maxLength(14)
@@ -142,7 +144,7 @@ class PanelBoxValidationResource extends Resource
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
if (! is_numeric($get('production_order')) || ! preg_match('/^[1-9][0-9]{6,13}$/', $get('production_order'))) { if (! is_numeric($get('production_order')) || ! preg_match('/^[1-9][0-9]{6,13}$/', $get('production_order'))) {
$set('prodOrdError', 'Must be a numeric value with 7 to 14 digits.'); $set('prodOrdError', 'Must be a numeric value with 7 to 14 digits.');
$set('production_order', null); // $set('production_order', null);
$set('item_id', null); $set('item_id', null);
$set('sticker_master_id', null); $set('sticker_master_id', null);
$set('uom', null); $set('uom', null);
@@ -185,6 +187,7 @@ class PanelBoxValidationResource extends Resource
$set('validation1_image_url', null); $set('validation1_image_url', null);
$set('serialPanelConfirmed', false); $set('serialPanelConfirmed', false);
if (! $pId) { if (! $pId) {
$set('pqLineError', 'Please select a line.'); $set('pqLineError', 'Please select a line.');
} else { } else {
@@ -227,7 +230,6 @@ class PanelBoxValidationResource extends Resource
// Proceed with validation logic for new scanned QR code // Proceed with validation logic for new scanned QR code
if (! $state || trim($state) == '') { if (! $state || trim($state) == '') {
$set('validationError', null); $set('validationError', null);
return; return;
} }
@@ -275,48 +277,105 @@ class PanelBoxValidationResource extends Resource
return; return;
} }
// }
$existInMasterPo = PanelGrMaster::where('document_number', $pOrder)->where('plant_id', $plantId)->first();
if(!$existInMasterPo){
Notification::make()
->title('Panel GR Record')
->body("Production Order (Or) Doc No'{$pOrder}' not found against plant code '{$plaCode}' in Panel Gr master.")
->danger()
->send();
$set('item_id', null);
return;
}
$iId = Item::where('code', $iCode)->where('plant_id', $plantId)->first();
if(!$iId){
Notification::make()
->title('Item not found')
->body("Item code'{$iCode}' not found against plant code '{$plaCode}' in item master.")
->danger()
->send();
$set('item_id', null);
return;
}
$existInMaster = PanelGrMaster::where('document_number', $pOrder)->where('item_id', $iId->id)->where('plant_id', $plantId)->first();
if(!$existInMaster){
Notification::make()
->title('Panel GR Record Not Found')
->body("No Panel GR record found for Production Order (Or) Doc No'{$pOrder}' and for Item '{$iCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
else if($existInMaster->supplier_number == '' || $existInMaster->supplier_number == null){
Notification::make()
->title('Panel GR Found')
->body("Supplier Number cannot be empty Panel GR record found for Production Order '{$pOrder}' and Item '{$iCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
// else if($existInMaster->supplier_number != $supplier){
// Notification::make()
// ->title('Panel GR Found')
// ->body("Supplier code not match for Production Order (Or) Doc No'{$pOrder}' and Item '{$iCode}'.")
// ->danger()
// ->send();
// $set('item_id', null);
// return;
// }
else if($existInMaster->quantity == '' || $existInMaster->quantity == null){
Notification::make()
->title('Panel GR Found')
->body("Quantity cannot be empty Panel GR record found for Production Order '{$pOrder}' and Item '{$iCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
else if($existInMaster->invoice_number == '' || $existInMaster->invoice_number == null){
Notification::make()
->title('Panel GR Found')
->body("Invoice Number cannot be empty Panel GR record found for Production Order '{$pOrder}' and Item '{$iCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
$sticker = StickerMaster::where('plant_id', $plantId)->where('item_id', $iId->id)->first();
if(!$sticker){
Notification::make()
->title('Unknown Item Code')
->body("Item code not found '{$iId->code}' in sticker master.")
->danger()
->send();
$set('item_id', null);
}
$existQuanInPanel = PanelBoxValidation::where('plant_id', $plantId)->where('production_order', $pOrder)->where('sticker_master_id', $sticker->id)->count();
if ($existQuanInPanel >= (int) $existInMaster->quantity) {
Notification::make()
->title('Quantity Completed')
->body("Panel box quantity '{$existQuanInPanel}' exceeds the available quantity '{$existInMaster->quantity}' in Panel GR Master for Production Order '{$pOrder}' and Item '{$iCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
} else { } else {
$set('validationError', null); $set('validationError', null);
} }
} }
// if ($state && str_contains($state, '|')) {
// $parts = explode('|', $state);
// $itemCode = trim($parts[0]); // Extract item code // 123456|123456789
// $serialNumber = trim($parts[1]);
// }
// else
// {
// // $parts = explode('/', $state);
// // $itemCode = trim($parts[1] ?? ''); // item code
// // $serialNumber = trim($parts[2] ?? ''); // serial number
// $parts = array_map('trim', explode('/', $state));
// // Expected format: 121245/165467/2606/1002634
// if (count($parts) != 4) {
// Notification::make()
// ->title('Invalid QR Format')
// ->body('Expected format: plantcode/itemcode/yearmm/serialnumber')
// ->danger()
// ->send();
// return;
// }
// $serialNumber = end($parts); // last part
// $itemCode = $parts[1] ?? '';
// }
// Store serial number before resetting fields
if (str_contains($state, '|')) { if (str_contains($state, '|')) {
$parts = array_map('trim', explode('|', $state)); $parts = array_map('trim', explode('|', $state));
@@ -350,6 +409,101 @@ class PanelBoxValidationResource extends Resource
return; return;
} }
$existInMasterPo = PanelGrMaster::where('document_number', $pOrder)->where('plant_id', $plantId)->first();
if(!$existInMasterPo){
Notification::make()
->title('Panel GR Record')
->body("Production Order (Or) Doc No'{$pOrder}' not found against plant code '{$plaCode}' in Panel Gr master.")
->danger()
->send();
$set('item_id', null);
return;
}
$iId = Item::where('code', $itemCode)->where('plant_id', $plantId)->first();
if(!$iId){
Notification::make()
->title('Item not found')
->body("Item code'{$itemCode}' not found against plant code '{$plaCode}' in item master.")
->danger()
->send();
$set('item_id', null);
return;
}
$existInMaster = PanelGrMaster::where('document_number', $pOrder)->where('item_id', $iId->id)->where('plant_id', $plantId)->first();
if(!$existInMaster){
Notification::make()
->title('Panel GR Record Not Found')
->body("No Panel GR record found for Production Order (Or) Doc No'{$pOrder}' and for Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
else if($existInMaster->supplier_number == '' || $existInMaster->supplier_number == null){
Notification::make()
->title('Panel GR Found')
->body("Supplier Number cannot be empty Panel GR record found for Production Order '{$pOrder}' and Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
// else if($existInMaster->supplier_number != $supplier){
// Notification::make()
// ->title('Panel GR Found')
// ->body("Supplier code not match for Production Order (Or) Doc No'{$pOrder}' and Item '{$iCode}'.")
// ->danger()
// ->send();
// $set('item_id', null);
// return;
// }
else if($existInMaster->quantity == '' || $existInMaster->quantity == null){
Notification::make()
->title('Panel GR Found')
->body("Quantity cannot be empty Panel GR record found for Production Order '{$pOrder}' and Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
else if($existInMaster->invoice_number == '' || $existInMaster->invoice_number == null){
Notification::make()
->title('Panel GR Found')
->body("Invoice Number cannot be empty Panel GR record found for Production Order '{$pOrder}' and Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
$sticker = StickerMaster::where('plant_id', $plantId)->where('item_id', $iId->id)->first();
if(!$sticker){
Notification::make()
->title('Unknown Item Code')
->body("Item code not found '{$iId->code}' in sticker master.")
->danger()
->send();
$set('item_id', null);
}
$existQuanInPanel = PanelBoxValidation::where('plant_id', $plantId)->where('production_order', $pOrder)->where('sticker_master_id', $sticker->id)->count();
if ($existQuanInPanel >= (int) $existInMaster->quantity) {
Notification::make()
->title('Quantity Completed')
->body("Panel box quantity '{$existQuanInPanel}' exceeds the available quantity '{$existInMaster->quantity}' in Panel GR Master for Production Order '{$pOrder}' and Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
} }
elseif (str_contains($state, '/')) elseif (str_contains($state, '/'))
{ {
@@ -371,6 +525,12 @@ class PanelBoxValidationResource extends Resource
$yearMonth = $parts[2]; $yearMonth = $parts[2];
$serialNumber = $parts[3]; $serialNumber = $parts[3];
$supplier = $parts[0];
$panelBoxCode = $parts[1];
$yearMonth = $parts[2];
$serialNumber = $parts[3];
$panelBoxSerialNo = $parts[2] . $parts[3];
if($serialNumber == '' || $serialNumber == null){ if($serialNumber == '' || $serialNumber == null){
Notification::make() Notification::make()
->title('Unknown Serial number') ->title('Unknown Serial number')
@@ -381,20 +541,110 @@ class PanelBoxValidationResource extends Resource
$set('item_id', null); $set('item_id', null);
return; return;
} }
elseif (! ctype_alnum($serialNumber)) { if (! ctype_alnum($serialNumber)) {
$set('validationError', 'Serial Number should contain alpha-numeric values.'); $set('validationError', 'Serial Number should contain alpha-numeric values.');
$set('item_id', null); $set('item_id', null);
return; return;
} }
else if($plantCode != $plaCode){
$existInMasterPo = PanelGrMaster::where('document_number', $pOrder)->where('plant_id', $plantId)->first();
if(!$existInMasterPo){
Notification::make() Notification::make()
->title('Invalid Plant Code') ->title('Panel GR Record')
->body("Scanned plant code doesn't match the selected plant.") ->body("Production Order (Or) Doc No'{$pOrder}' not found against plant code '{$plaCode}' in Panel Gr master.")
->danger() ->danger()
->send(); ->send();
$set('item_id', null); $set('item_id', null);
return; return;
} }
$iId = Item::where('code', $itemCode)->where('plant_id', $plantId)->first();
if(!$iId){
Notification::make()
->title('Item not found')
->body("Item code'{$itemCode}' not found against plant code '{$plaCode}' in item master.")
->danger()
->send();
$set('item_id', null);
return;
}
$existInMaster = PanelGrMaster::where('document_number', $pOrder)->where('item_id', $iId->id)->where('plant_id', $plantId)->first();
if(!$existInMaster){
Notification::make()
->title('Panel GR Record Not Found')
->body("No Panel GR record found for Production Order (Or) Doc No'{$pOrder}' and for Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
else if($existInMaster->supplier_number == '' || $existInMaster->supplier_number == null){
Notification::make()
->title('Panel GR Found')
->body("Supplier Number cannot be empty Panel GR record found for Production Order '{$pOrder}' and Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
else if($existInMaster->supplier_number != $supplier){
Notification::make()
->title('Panel GR Found')
->body("Supplier code not match for Production Order (Or) Doc No'{$pOrder}' and Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
else if($existInMaster->quantity == '' || $existInMaster->quantity == null){
Notification::make()
->title('Panel GR Found')
->body("Quantity cannot be empty Panel GR record found for Production Order '{$pOrder}' and Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
else if($existInMaster->invoice_number == '' || $existInMaster->invoice_number == null){
Notification::make()
->title('Panel GR Found')
->body("Invoice Number cannot be empty Panel GR record found for Production Order '{$pOrder}' and Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
$sticker = StickerMaster::where('plant_id', $plantId)->where('item_id', $iId->id)->first();
if(!$sticker){
Notification::make()
->title('Unknown Item Code')
->body("Item code not found '{$iId->code}' in sticker master.")
->danger()
->send();
$set('item_id', null);
}
$existQuanInPanel = PanelBoxValidation::where('plant_id', $plantId)->where('production_order', $pOrder)->where('sticker_master_id', $sticker->id)->count();
if ($existQuanInPanel >= (int) $existInMaster->quantity) {
Notification::make()
->title('Quantity Completed')
->body("Panel box quantity '{$existQuanInPanel}' exceeds the available quantity '{$existInMaster->quantity}' in Panel GR Master for Production Order '{$pOrder}' and Item '{$itemCode}'.")
->danger()
->send();
$set('item_id', null);
return;
}
$set('panel_box_supplier', $supplier);
$set('panel_box_serial_number', $panelBoxSerialNo);
$set('panel_box_code', $panelBoxCode);
} }
else { else {
@@ -430,9 +680,6 @@ class PanelBoxValidationResource extends Resource
$set('validationError', null); $set('validationError', null);
} }
$plantId = $get('plant_id'); // Get selected plant
if (! $plantId) { if (! $plantId) {
$set('validationError', 'Please select a plant first.'); $set('validationError', 'Please select a plant first.');
$set('item_id', null); $set('item_id', null);
@@ -592,6 +839,7 @@ class PanelBoxValidationResource extends Resource
// } // }
$set('serial_number', $serialNumber); $set('serial_number', $serialNumber);
// Find item based on scanned code // Find item based on scanned code
$item = Item::where('code', $itemCode) $item = Item::where('code', $itemCode)
->where('plant_id', $plantId)->first(); ->where('plant_id', $plantId)->first();
@@ -676,6 +924,12 @@ class PanelBoxValidationResource extends Resource
->reactive(), ->reactive(),
Forms\Components\Hidden::make('serial_number') Forms\Components\Hidden::make('serial_number')
->reactive(), ->reactive(),
Forms\Components\Hidden::make('panel_box_supplier')
->reactive(),
Forms\Components\Hidden::make('panel_box_serial_number')
->reactive(),
Forms\Components\Hidden::make('panel_box_code')
->reactive(),
Forms\Components\TextInput::make('serial_number_motor_qr') Forms\Components\TextInput::make('serial_number_motor_qr')
->label('Serial Number') ->label('Serial Number')
->reactive() ->reactive()
@@ -721,6 +975,29 @@ class PanelBoxValidationResource extends Resource
$set('serialPanelError', null); $set('serialPanelError', null);
$set('serial_number_panel_qr', $extracted); $set('serial_number_panel_qr', $extracted);
$set('serial_number_panel', '1'); $set('serial_number_panel', '1');
$panelParts = array_map('trim', explode('/', $state));
if (count($panelParts) != 4) {
Notification::make()
->title('Invalid QR Format')
->body('Expected format: plantcode/itemcode/yearmm/serialnumber')
->danger()
->send();
$set('item_id', null);
return;
}
$supplier = $panelParts[0];
$panelBoxCode = $panelParts[1];
$yearMonth = $panelParts[2];
$serialNumber = $panelParts[3];
$panelBoxSerialNo = $yearMonth . $serialNumber;
$set('panel_box_supplier', $supplier);
$set('panel_box_serial_number', $panelBoxSerialNo);
$set('panel_box_code', $panelBoxCode);
return; return;
} }
}) })
@@ -773,6 +1050,28 @@ class PanelBoxValidationResource extends Resource
$set('packSlipPanelError', null); $set('packSlipPanelError', null);
$set('pack_slip_panel_qr', $extracted); $set('pack_slip_panel_qr', $extracted);
$set('pack_slip_panel', '1'); $set('pack_slip_panel', '1');
$panelParts = array_map('trim', explode('/', $state));
if (count($panelParts) != 4) {
Notification::make()
->title('Invalid QR Format')
->body('Expected format: plantcode/itemcode/yearmm/serialnumber')
->danger()
->send();
$set('item_id', null);
return;
}
$supplier = $panelParts[0];
$panelBoxCode = $panelParts[1];
$yearMonth = $panelParts[2];
$serialNumber = $panelParts[3];
$panelBoxSerialNo = $yearMonth . $serialNumber;
$set('panel_box_supplier', $supplier);
$set('panel_box_serial_number', $panelBoxSerialNo);
$set('panel_box_code', $panelBoxCode);
return; return;
} }
}) })
@@ -826,6 +1125,28 @@ class PanelBoxValidationResource extends Resource
$set('namePlatePanelError', null); $set('namePlatePanelError', null);
$set('name_plate_panel_qr', $extracted); $set('name_plate_panel_qr', $extracted);
$set('name_plate_panel', '1'); $set('name_plate_panel', '1');
$panelParts = array_map('trim', explode('/', $state));
if (count($panelParts) != 4) {
Notification::make()
->title('Invalid QR Format')
->body('Expected format: plantcode/itemcode/yearmm/serialnumber')
->danger()
->send();
$set('item_id', null);
return;
}
$supplier = $panelParts[0];
$panelBoxCode = $panelParts[1];
$yearMonth = $panelParts[2];
$serialNumber = $panelParts[3];
$panelBoxSerialNo = $yearMonth . $serialNumber;
$set('panel_box_supplier', $supplier);
$set('panel_box_serial_number', $panelBoxSerialNo);
$set('panel_box_code', $panelBoxCode);
return; return;
} }
}) })
@@ -879,6 +1200,28 @@ class PanelBoxValidationResource extends Resource
$set('tubeStickerPanelError', null); $set('tubeStickerPanelError', null);
$set('tube_sticker_panel_qr', $extracted); $set('tube_sticker_panel_qr', $extracted);
$set('tube_sticker_panel', '1'); $set('tube_sticker_panel', '1');
$panelParts = array_map('trim', explode('/', $state));
if (count($panelParts) != 4) {
Notification::make()
->title('Invalid QR Format')
->body('Expected format: plantcode/itemcode/yearmm/serialnumber')
->danger()
->send();
$set('item_id', null);
return;
}
$supplier = $panelParts[0];
$panelBoxCode = $panelParts[1];
$yearMonth = $panelParts[2];
$serialNumber = $panelParts[3];
$panelBoxSerialNo = $yearMonth . $serialNumber;
$set('panel_box_supplier', $supplier);
$set('panel_box_serial_number', $panelBoxSerialNo);
$set('panel_box_code', $panelBoxCode);
return; return;
} }
}) })
@@ -933,6 +1276,28 @@ class PanelBoxValidationResource extends Resource
$set('warrantyCardPanelError', null); $set('warrantyCardPanelError', null);
$set('warranty_card_qr', $extracted); $set('warranty_card_qr', $extracted);
$set('warranty_card_panel', '1'); $set('warranty_card_panel', '1');
$panelParts = array_map('trim', explode('/', $state));
if (count($panelParts) != 4) {
Notification::make()
->title('Invalid QR Format')
->body('Expected format: plantcode/itemcode/yearmm/serialnumber')
->danger()
->send();
$set('item_id', null);
return;
}
$supplier = $panelParts[0];
$panelBoxCode = $panelParts[1];
$yearMonth = $panelParts[2];
$serialNumber = $panelParts[3];
$panelBoxSerialNo = $yearMonth . $serialNumber;
$set('panel_box_supplier', $supplier);
$set('panel_box_serial_number', $panelBoxSerialNo);
$set('panel_box_code', $panelBoxCode);
return; return;
} }
}) })
@@ -1265,6 +1630,11 @@ class PanelBoxValidationResource extends Resource
->alignCenter() ->alignCenter()
->searchable() ->searchable()
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('production_order')
->label('Production Order/Doc No')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('serial_number') Tables\Columns\TextColumn::make('serial_number')
->label('Serial Number') ->label('Serial Number')
->alignCenter() ->alignCenter()
@@ -1320,6 +1690,21 @@ class PanelBoxValidationResource extends Resource
->alignCenter() ->alignCenter()
->searchable() ->searchable()
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('panel_box_supplier')
->label('Panel Box Supplier')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('panel_box_serial_number')
->label('Panel Box Serial Number')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('panel_box_code')
->label('Panel Box Code')
->alignCenter()
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('created_at') Tables\Columns\TextColumn::make('created_at')
->label('Created At') ->label('Created At')
->alignCenter() ->alignCenter()

View File

@@ -0,0 +1,363 @@
<?php
namespace App\Filament\Resources;
use App\Filament\Exports\PanelGrMasterExporter;
use App\Filament\Imports\PanelGrMasterImporter;
use App\Filament\Resources\PanelGrMasterResource\Pages;
use App\Filament\Resources\PanelGrMasterResource\RelationManagers;
use App\Models\Item;
use App\Models\PalletValidation;
use App\Models\PanelGrMaster;
use App\Models\Plant;
use Filament\Facades\Filament;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
use Filament\Tables\Actions\ExportAction;
use Filament\Tables\Actions\ImportAction;
use Filament\Tables\Filters\Filter;
use Filament\Forms\Components\DateTimePicker;
use Filament\Forms\Components\Section;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Closure;
class PanelGrMasterResource extends Resource
{
protected static ?string $model = PanelGrMaster::class;
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
protected static ?string $navigationGroup = 'Panel Box';
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Select::make('plant_id')
->label('Plant')
->reactive()
->searchable()
->relationship('plant', 'name')
->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
})
->afterStateUpdated(function (callable $set) {
$set('item_id', null);
$set('document_number', null);
$set('invoice_number', null);
$set('supplier_number', null);
$set('quantity', '1');
})
->required(),
Forms\Components\Select::make('item_id')
->label('Item Code')
->reactive()
->searchable()
->options(function (callable $get) {
$plantId = $get('plant_id');
if (empty($plantId)) {
return [];
}
return Item::where('plant_id', $plantId)->pluck('code', 'id');
})
->afterStateUpdated(function (callable $set) {
$set('document_number', null);
$set('invoice_number', null);
$set('supplier_number', null);
$set('quantity', '1');
})
->required(),
Forms\Components\TextInput::make('document_number')
->label('Document Number')
->required(),
Forms\Components\TextInput::make('invoice_number')
->label('Invoice Number')
->required(),
Forms\Components\TextInput::make('supplier_number')
->label('Supplier Number')
->required(),
Forms\Components\TextInput::make('quantity')
->label('Quantity')
->numeric()
->default(1)
->minValue(1)
->reactive()
->required()
->afterStateUpdated(function (callable $set, $state) {
if ((float) $state == 0) {
$set('quantity', null);
}
}),
Forms\Components\Hidden::make('created_by')
->label('Created By')
->default(Filament::auth()->user()?->name),
Forms\Components\Hidden::make('updated_by')
->label('Updated By')
->default(Filament::auth()->user()?->name),
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('No.')
->label('No.')
->getStateUsing(function ($record, $livewire, $column, $rowLoop) {
$paginator = $livewire->getTableRecords();
$perPage = method_exists($paginator, 'perPage') ? $paginator->perPage() : 10;
$currentPage = method_exists($paginator, 'currentPage') ? $paginator->currentPage() : 1;
return ($currentPage - 1) * $perPage + $rowLoop->iteration;
}),
Tables\Columns\TextColumn::make('plant.name')
->label('Plant Name')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('item.code')
->label('Item Code')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('document_number')
->label('Document Number')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('invoice_number')
->label('Invoice Number')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('supplier_number')
->label('Supplier Number')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('quantity')
->label('Quantity')
->searchable()
->alignCenter()
->sortable(),
Tables\Columns\TextColumn::make('created_at')
->dateTime()
->alignCenter()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('updated_at')
->dateTime()
->alignCenter()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('deleted_at')
->dateTime()
->sortable()
->toggleable(isToggledHiddenByDefault: true),
])
->filters([
Tables\Filters\TrashedFilter::make(),
Filter::make('advanced_filters')
->label('Advanced Filters')
->form([
Select::make('Plant')
->label('Select Plant')
->nullable()
->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
})
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get): void {
$set('scanned_by', null);
}),
Select::make('item')
->label('Search by Item Code')
->nullable()
->searchable()
->reactive()
->options(function (callable $get) {
$plantId = $get('Plant');
if (empty($plantId)) {
return [];
}
return Item::whereHas('panelGrMasters', function ($query) use ($plantId) {
if ($plantId) {
$query->where('plant_id', $plantId);
}
})->pluck('code', 'id');
})
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('process_order', null);
}),
TextInput::make('document_number')
->label('Document Number')
->reactive()
->placeholder('Enter Document Number')
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('Rework', null);
}),
TextInput::make('invoice_number')
->label('Invoice Number')
->reactive()
->placeholder('Enter Invoice Number')
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('Rework', null);
}),
TextInput::make('supplier_number')
->label('Supplier Number')
->reactive()
->placeholder('Enter Supplier Number')
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('Rework', null);
}),
DateTimePicker::make(name: 'created_from')
->label('Created From')
->placeholder(placeholder: 'Select From DateTime')
->reactive()
->native(false),
DateTimePicker::make('created_to')
->label('Created To')
->placeholder(placeholder: 'Select To DateTime')
->reactive()
->native(false),
])
->query(function ($query, array $data) {
// Hide all records initially if no filters are applied
if (empty($data['Plant']) && empty($data['document_number']) && empty($data['invoice_number']) && empty($data['supplier_number']) && empty($data['created_from']) && empty($data['created_to']) && empty($data['created_by'])) {
return $query->whereRaw('1 = 0');
}
if (! empty($data['Plant'])) { // $plant = $data['Plant'] ?? null
$query->where('plant_id', $data['Plant']);
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return $query->whereRaw('1 = 0');
}
}
if (! empty($data['document_number'])) {
$query->where('document_number', 'like', '%' . $data['document_number'] . '%');
}
if (! empty($data['invoice_number'])) {
$query->where('invoice_number', 'like', '%' . $data['invoice_number'] . '%');
}
if (! empty($data['supplier_number'])) {
$query->where('supplier_number', 'like', '%' . $data['supplier_number'] . '%');
}
if (! empty($data['created_from'])) {
$query->where('created_at', '>=', $data['created_from']);
}
if (! empty($data['created_to'])) {
$query->where('created_at', '<=', $data['created_to']);
}
})
->indicateUsing(function (array $data) {
$indicators = [];
if (! empty($data['Plant'])) {
$indicators[] = 'Plant: '.Plant::where('id', $data['Plant'])->value('name');
} else {
$userHas = Filament::auth()->user()->plant_id;
if ($userHas && strlen($userHas) > 0) {
return 'Plant: Choose plant to filter records.';
}
}
if (! empty($data['document_number'])) {
$indicators[] = 'Doc No: '.$data['document_number'];
}
if (! empty($data['invoice_number'])) {
$indicators[] = 'Invoice No: '.$data['invoice_number'];
}
if (! empty($data['supplier_number'])) {
$indicators[] = 'Supplier No: '.$data['supplier_number'];
}
if (! empty($data['created_from'])) {
$indicators[] = 'From: '.$data['created_from'];
}
if (! empty($data['created_to'])) {
$indicators[] = 'To: '.$data['created_to'];
}
return $indicators;
}),
])
->filtersFormMaxHeight('280px')
->actions([
Tables\Actions\ViewAction::make(),
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
Tables\Actions\ForceDeleteBulkAction::make(),
Tables\Actions\RestoreBulkAction::make(),
]),
])
->headerActions([
ImportAction::make()
->label('Import Panel GR Masters')
->color('warning')
->importer(PanelGrMasterImporter::class)
->visible(function () {
return Filament::auth()->user()->can('view import panel gr master');
}),
ExportAction::make()
->label('Export Panel GR Masters')
->color('warning')
->exporter(PanelGrMasterExporter::class)
->visible(function () {
return Filament::auth()->user()->can('view export panel gr master');
}),
]);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListPanelGrMasters::route('/'),
'create' => Pages\CreatePanelGrMaster::route('/create'),
'view' => Pages\ViewPanelGrMaster::route('/{record}'),
'edit' => Pages\EditPanelGrMaster::route('/{record}/edit'),
];
}
public static function getEloquentQuery(): Builder
{
return parent::getEloquentQuery()
->withoutGlobalScopes([
SoftDeletingScope::class,
]);
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace App\Filament\Resources\PanelGrMasterResource\Pages;
use App\Filament\Resources\PanelGrMasterResource;
use App\Models\PanelGrMaster;
use Filament\Actions;
use Filament\Notifications\Notification;
use Filament\Resources\Pages\CreateRecord;
use Illuminate\Validation\ValidationException;
class CreatePanelGrMaster extends CreateRecord
{
protected static string $resource = PanelGrMasterResource::class;
protected function mutateFormDataBeforeCreate(array $data): array
{
$exists = PanelGrMaster::where('plant_id', $data['plant_id'])
->where('item_id', $data['item_id'])
->where('document_number', $data['document_number'])
->where('invoice_number', $data['invoice_number'])
->where('supplier_number', $data['supplier_number'])
->exists();
if ($exists) {
Notification::make()
->title('Duplicate Record')
->body('This combination already exists in Master.')
->danger()
->send();
throw ValidationException::withMessages([
'item_id' => 'This combination already exists in Master.',
]);
}
return $data;
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Filament\Resources\PanelGrMasterResource\Pages;
use App\Filament\Resources\PanelGrMasterResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;
class EditPanelGrMaster extends EditRecord
{
protected static string $resource = PanelGrMasterResource::class;
protected function getHeaderActions(): array
{
return [
Actions\ViewAction::make(),
Actions\DeleteAction::make(),
Actions\ForceDeleteAction::make(),
Actions\RestoreAction::make(),
];
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Filament\Resources\PanelGrMasterResource\Pages;
use App\Filament\Resources\PanelGrMasterResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
class ListPanelGrMasters extends ListRecords
{
protected static string $resource = PanelGrMasterResource::class;
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
];
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Filament\Resources\PanelGrMasterResource\Pages;
use App\Filament\Resources\PanelGrMasterResource;
use Filament\Actions;
use Filament\Resources\Pages\ViewRecord;
class ViewPanelGrMaster extends ViewRecord
{
protected static string $resource = PanelGrMasterResource::class;
protected function getHeaderActions(): array
{
return [
Actions\EditAction::make(),
];
}
}

View File

@@ -3,6 +3,7 @@
namespace App\Filament\Resources\ProductionOrderResource\Pages; namespace App\Filament\Resources\ProductionOrderResource\Pages;
use App\Filament\Resources\ProductionOrderResource; use App\Filament\Resources\ProductionOrderResource;
use App\Models\Item;
use App\Models\Plant; use App\Models\Plant;
use App\Models\ProductionOrder; use App\Models\ProductionOrder;
use Filament\Facades\Filament; use Filament\Facades\Filament;
@@ -282,6 +283,64 @@ class CreateProductionOrder extends CreateRecord
} }
} }
public function exportSerialNo(){
$pOrder = trim($this->form->getState()['production_order'] ?? '') ?? null;
$plantId = trim($this->form->getState()['plant_id'] ?? '') ?? null;
$itemId = trim($this->form->getState()['item_id'] ?? '') ?? null;
$fromSerNo = trim($this->form->getState()['from_serial_number'] ?? '') ?? null;
$toSerNo = trim($this->form->getState()['to_serial_number'] ?? '') ?? null;
$plantCode = Plant::where('id', $plantId)->value('code');
// $itemCode = Item::where('id', $itemId)->value('code');
if (empty($plantId)) {
Notification::make()
->title('Plant name cannot be empty!')
->danger()
->send();
return;
} elseif (empty($pOrder)) {
Notification::make()
->title('Production order cannot be empty!')
->danger()
->send();
return;
}
elseif (empty($fromSerNo)) {
Notification::make()
->title('From serial number cannot be empty!')
->danger()
->send();
return;
}
elseif (empty($toSerNo)) {
Notification::make()
->title('To serial number cannot be empty!')
->danger()
->send();
return;
}
$pOrderExists = ProductionOrder::where('plant_id', $plantId)->where('production_order', $pOrder)->first();
if (! $pOrderExists) {
Notification::make()
->title("Production Order '{$pOrder}' does not exist to get print!")
->danger()
->send();
return;
} else {
return redirect()->route('production-orders.exportSerial', ['production_order' => $pOrder, 'plant_code' => $plantCode, 'from_serial_no' => $fromSerNo, 'to_serial_no' => $toSerNo]);
}
}
protected function getFormActions(): array protected function getFormActions(): array
{ {
return []; return [];

View File

@@ -157,6 +157,64 @@ class EditProductionOrder extends EditRecord
} }
} }
public function exportSerialNo(){
$pOrder = trim($this->form->getState()['production_order'] ?? '') ?? null;
$plantId = trim($this->form->getState()['plant_id'] ?? '') ?? null;
$itemId = trim($this->form->getState()['item_id'] ?? '') ?? null;
$fromSerNo = trim($this->form->getState()['from_serial_number'] ?? '') ?? null;
$toSerNo = trim($this->form->getState()['to_serial_number'] ?? '') ?? null;
$plantCode = Plant::where('id', $plantId)->value('code');
// $itemCode = Item::where('id', $itemId)->value('code');
if (empty($plantId)) {
Notification::make()
->title('Plant name cannot be empty!')
->danger()
->send();
return;
} elseif (empty($pOrder)) {
Notification::make()
->title('Production order cannot be empty!')
->danger()
->send();
return;
}
elseif (empty($fromSerNo)) {
Notification::make()
->title('From serial number cannot be empty!')
->danger()
->send();
return;
}
elseif (empty($toSerNo)) {
Notification::make()
->title('To serial number cannot be empty!')
->danger()
->send();
return;
}
$pOrderExists = ProductionOrder::where('plant_id', $plantId)->where('production_order', $pOrder)->first();
if (! $pOrderExists) {
Notification::make()
->title("Production Order '{$pOrder}' does not exist to get print!")
->danger()
->send();
return;
} else {
return redirect()->route('production-orders.exportSerial', ['production_order' => $pOrder, 'plant_code' => $plantCode, 'from_serial_no' => $fromSerNo, 'to_serial_no' => $toSerNo]);
}
}
protected function getHeaderActions(): array protected function getHeaderActions(): array
{ {
return [ return [

View File

@@ -3,6 +3,7 @@
namespace App\Filament\Resources\ProductionOrderResource\Pages; namespace App\Filament\Resources\ProductionOrderResource\Pages;
use App\Filament\Resources\ProductionOrderResource; use App\Filament\Resources\ProductionOrderResource;
use App\Models\Item;
use App\Models\Plant; use App\Models\Plant;
use App\Models\ProductionOrder; use App\Models\ProductionOrder;
use Filament\Actions; use Filament\Actions;
@@ -159,6 +160,64 @@ class ViewProductionOrder extends ViewRecord
} }
} }
public function exportSerialNo(){
$pOrder = trim($this->form->getState()['production_order'] ?? '') ?? null;
$plantId = trim($this->form->getState()['plant_id'] ?? '') ?? null;
$itemId = trim($this->form->getState()['item_id'] ?? '') ?? null;
$fromSerNo = trim($this->form->getState()['from_serial_number'] ?? '') ?? null;
$toSerNo = trim($this->form->getState()['to_serial_number'] ?? '') ?? null;
$plantCode = Plant::where('id', $plantId)->value('code');
// $itemCode = Item::where('id', $itemId)->value('code');
if (empty($plantId)) {
Notification::make()
->title('Plant name cannot be empty!')
->danger()
->send();
return;
} elseif (empty($pOrder)) {
Notification::make()
->title('Production order cannot be empty!')
->danger()
->send();
return;
}
elseif (empty($fromSerNo)) {
Notification::make()
->title('From serial number cannot be empty!')
->danger()
->send();
return;
}
elseif (empty($toSerNo)) {
Notification::make()
->title('To serial number cannot be empty!')
->danger()
->send();
return;
}
$pOrderExists = ProductionOrder::where('plant_id', $plantId)->where('production_order', $pOrder)->first();
if (! $pOrderExists) {
Notification::make()
->title("Production Order '{$pOrder}' does not exist to get print!")
->danger()
->send();
return;
} else {
return redirect()->route('production-orders.exportSerial', ['production_order' => $pOrder, 'plant_code' => $plantCode, 'from_serial_no' => $fromSerNo, 'to_serial_no' => $toSerNo]);
}
}
protected function getHeaderActions(): array protected function getHeaderActions(): array
{ {
return [ return [

View File

@@ -8,6 +8,7 @@ use App\Filament\Resources\VisitorEntryResource\Pages;
use App\Filament\Resources\VisitorEntryResource\RelationManagers; use App\Filament\Resources\VisitorEntryResource\RelationManagers;
use App\Models\VisitorEntry; use App\Models\VisitorEntry;
use App\Models\EmployeeMaster; use App\Models\EmployeeMaster;
use App\Models\Plant;
use Filament\Facades\Filament; use Filament\Facades\Filament;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Form; use Filament\Forms\Form;
@@ -63,6 +64,53 @@ class VisitorEntryResource extends Resource
return $prefix . $nextNumber; return $prefix . $nextNumber;
}) })
->readOnly(), ->readOnly(),
Forms\Components\Select::make('inter_unit')
->label('Inter Unit Staff Code')
->options(
EmployeeMaster::distinct()
->orderBy('code')
->get(['code', 'name'])
->mapWithKeys(function ($employee) {
return [
$employee->code => "{$employee->code} ({$employee->name})"
];
})
// ->pluck('code', 'code')
)
->searchable()
->reactive()
->afterStateUpdated(function (callable $set, callable $get, $state) {
$code = $get('inter_unit');
if($code){
$employeeExist = EmployeeMaster::where('code', $code)->first();
$plantId = $employeeExist->plant_id;
$plant = Plant::find($plantId);
if ($employeeExist) {
$set('name', $employeeExist->name);
$set('mobile_number', $employeeExist->mobile_number);
$set('company', $plant->name);
$set('type', 'InterUnitStaff');
} else {
$set('name', null);
$set('mobile_number', null);
$set('company', null);
$set('type', null);
}
}
else
{
$set('name', null);
$set('mobile_number', null);
$set('company', null);
$set('type', null);
}
}),
Forms\Components\TextInput::make('mobile_number') Forms\Components\TextInput::make('mobile_number')
->label('Mobile Number') ->label('Mobile Number')
->length(10) ->length(10)
@@ -72,6 +120,7 @@ class VisitorEntryResource extends Resource
'maxlength' => 10, 'maxlength' => 10,
]) ])
->required() ->required()
->readOnly(fn (callable $get) => filled($get('inter_unit')))
->extraAttributes([ ->extraAttributes([
'id' => 'mobile_number_input', 'id' => 'mobile_number_input',
'x-data' => '{ value: "" }', 'x-data' => '{ value: "" }',
@@ -82,9 +131,14 @@ class VisitorEntryResource extends Resource
->label('Name') ->label('Name')
->required() ->required()
->reactive() ->reactive()
->readOnly(fn (callable $get) => filled($get('inter_unit')))
->extraInputAttributes([ ->extraInputAttributes([
'oninput' => 'this.value = this.value.replace(/[^a-zA-Z\s]/g, "")', 'oninput' => 'this.value = this.value.replace(/[^a-zA-Z\s]/g, "")',
]), ]),
Forms\Components\TextInput::make('company')
->label('Company')
->readOnly(fn (callable $get) => filled($get('inter_unit')))
->required(),
Forms\Components\Select::make('type') Forms\Components\Select::make('type')
->label('Type') ->label('Type')
->reactive() ->reactive()
@@ -92,6 +146,7 @@ class VisitorEntryResource extends Resource
'Student' => 'Student', 'Student' => 'Student',
'Consultant' => 'Consultant', 'Consultant' => 'Consultant',
'Supplier' => 'Supplier', 'Supplier' => 'Supplier',
'InterUnitStaff' => 'Inter Unit Staff',
'InterviewCandidates' => 'Interview Candidates', 'InterviewCandidates' => 'Interview Candidates',
'Customers/Dealers' => 'Customers/Dealers', 'Customers/Dealers' => 'Customers/Dealers',
'Bankers' => 'Bankers', 'Bankers' => 'Bankers',
@@ -104,6 +159,17 @@ class VisitorEntryResource extends Resource
return $state == 'Other' return $state == 'Other'
? $get('other_type') ? $get('other_type')
: $state; : $state;
})
->afterStateUpdated(function (callable $set, callable $get, $state) {
$code = $get('inter_unit');
if($code){
$set('inter_unit', null);
$set('name', null);
$set('mobile_number', null);
$set('company', null);
}
}), }),
Forms\Components\TextInput::make('other_type') Forms\Components\TextInput::make('other_type')
->label('Specify Type') ->label('Specify Type')
@@ -111,9 +177,6 @@ class VisitorEntryResource extends Resource
->visible(fn (callable $get) => $get('type') == 'Other') ->visible(fn (callable $get) => $get('type') == 'Other')
->required(fn (callable $get) => $get('type') == 'Other') ->required(fn (callable $get) => $get('type') == 'Other')
->dehydrated(false), ->dehydrated(false),
Forms\Components\TextInput::make('company')
->label('Company')
->required(),
Forms\Components\Select::make('department') Forms\Components\Select::make('department')
->label('Employee Department') ->label('Employee Department')
->options( ->options(

View File

@@ -62,9 +62,9 @@ class WeightValidationResource extends Resource
->columnSpan(1) ->columnSpan(1)
->required(), ->required(),
Forms\Components\TextInput::make('obd_number') Forms\Components\TextInput::make('obd_number')
->label('OBD Number') ->label('OBD / GR Number')
->minLength(8) ->minLength(8)
->placeholder('Scan the valid OBD Number') ->placeholder('Scan the valid OBD / GR Number')
->columnSpan(1) ->columnSpan(1)
->required(), ->required(),
Forms\Components\TextInput::make('line_number') Forms\Components\TextInput::make('line_number')
@@ -99,11 +99,11 @@ class WeightValidationResource extends Resource
->columnSpan(1) ->columnSpan(1)
->placeholder('Scan the valid Heat Number'), ->placeholder('Scan the valid Heat Number'),
Forms\Components\TextInput::make('bundle_number') Forms\Components\TextInput::make('bundle_number')
->label('Bundle Number') ->label('Bundle / Coil Number')
->minLength(1) ->minLength(1)
->numeric() ->numeric()
->columnSpan(1) ->columnSpan(1)
->placeholder('Scan the valid Bundle Number'), ->placeholder('Scan the valid Bundle / Coil Number'),
Forms\Components\TextInput::make('picked_weight') Forms\Components\TextInput::make('picked_weight')
->label('Picked Weight') ->label('Picked Weight')
->minLength(1) ->minLength(1)
@@ -588,7 +588,7 @@ class WeightValidationResource extends Resource
} else { } else {
$lineNumbers[] = $lineNumber; $lineNumbers[] = $lineNumber;
} }
if (Str::length($batchNumber) < 8 || ! is_numeric($batchNumber)) {// ctype_alnum if (Str::length($batchNumber) < 1 || ! is_numeric($batchNumber)) {// ctype_alnum
$validData = false; $validData = false;
$invalidBatch[] = $materialCode; $invalidBatch[] = $materialCode;
} }
@@ -663,7 +663,7 @@ class WeightValidationResource extends Resource
if (! empty($uniqueInvalidBatch)) { if (! empty($uniqueInvalidBatch)) {
Notification::make() Notification::make()
->title('Invalid: Batch Numbers') ->title('Invalid: Batch Numbers')
->body('Batch number should contain minimum 8 digit numeric values!<br>Following item codes has invalid batch number:<br>'.implode(', ', $uniqueInvalidBatch)) ->body('Batch number should contain minimum 1 digit numeric values!<br>Following item codes has invalid batch number:<br>'.implode(', ', $uniqueInvalidBatch))
->danger() ->danger()
->seconds(2) ->seconds(2)
->send(); ->send();

View File

@@ -401,11 +401,15 @@ class WireMasterPackingResource extends Resource
if (!empty($data['customer_po_master_id'])) { if (!empty($data['customer_po_master_id'])) {
$customerPoId = CustomerPoMaster::where('customer_po', $data['customer_po_master_id']) // $customerPoId = CustomerPoMaster::where('customer_po', $data['customer_po_master_id'])
// ->where('plant_id', $data['Plant'])
// ->value('id');
$customerPoIds = CustomerPoMaster::where('customer_po', $data['customer_po_master_id'])
->where('plant_id', $data['Plant']) ->where('plant_id', $data['Plant'])
->value('id'); ->pluck('id');
$query->where('customer_po_master_id', $customerPoId); // $query->where('customer_po_master_id', $customerPoId);
$query->whereIn('customer_po_master_id', $customerPoIds);
} }
if (! empty($data['wire_packing_status'])) { if (! empty($data['wire_packing_status'])) {

View File

@@ -227,7 +227,7 @@ class CreateWireMasterPacking extends CreateRecord
{ {
Notification::make() Notification::make()
->title("PO Not Found") ->title("PO Not Found")
->body("Customer PO '$customerPoRecord->customer_po' for Item '$materialCode' not found against Plant '$plantcode'") ->body("Customer PO '$customerPo' for Item '$materialCode' not found against Plant '$plantcode'")
->danger() ->danger()
->duration(5000) ->duration(5000)
->send(); ->send();
@@ -250,10 +250,12 @@ class CreateWireMasterPacking extends CreateRecord
->selectRaw('SUM(CAST(weight AS NUMERIC)) as total_weight') ->selectRaw('SUM(CAST(weight AS NUMERIC)) as total_weight')
->value('total_weight'); ->value('total_weight');
$totalQty = (float)$alreadyScannedQty + (float)$weight; $totalQty = round((float)$alreadyScannedQty + (float)$weight, 3);
if($totalQty > (float)$customerPoRecord->quantity)
if($totalQty > round((float)$customerPoRecord->quantity, 3))
{ {
Notification::make() Notification::make()
->title("Scanned Weight Exceeds PO Quantity") ->title("Scanned Weight Exceeds PO Quantity")
->body("Scanned weight '$weight' and already scanned weight '$alreadyScannedQty' exceeds allowed quantity '{$customerPoRecord->quantity}' for PO '$customerPoRecord->customer_po' and Item '$materialCode'") ->body("Scanned weight '$weight' and already scanned weight '$alreadyScannedQty' exceeds allowed quantity '{$customerPoRecord->quantity}' for PO '$customerPoRecord->customer_po' and Item '$materialCode'")

View File

@@ -167,6 +167,16 @@ class PalletPrintController extends Controller
->where('wire_packing_number', $pallet) ->where('wire_packing_number', $pallet)
->value('customer_po_master_id'); ->value('customer_po_master_id');
$masterIds = WireMasterPacking::where('plant_id', $plant)
->where('wire_packing_number', $pallet)
->pluck('customer_po_master_id');
$customerPo = CustomerPoMaster::whereIn('id', $masterIds)
->value('customer_po');
$customerPoMasterIds = CustomerPoMaster::where('customer_po', $customerPo)
->pluck('id');
$items = WireMasterPacking::with('item') $items = WireMasterPacking::with('item')
->where('plant_id', $plant) ->where('plant_id', $plant)
->where('wire_packing_number', $pallet) ->where('wire_packing_number', $pallet)
@@ -185,8 +195,18 @@ class PalletPrintController extends Controller
$customerCode = $customer->customer_po ?? ''; $customerCode = $customer->customer_po ?? '';
$customerName = $customer->customer_name ?? ''; $customerName = $customer->customer_name ?? '';
// $totalBoxes = WireMasterPacking::where('plant_id', $plant)
// ->where('customer_po_master_id', $customerPoMasterId)
// ->select('wire_packing_number')
// ->groupBy('wire_packing_number')
// ->havingRaw(
// 'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)',
// ['Completed']
// )
// ->count();
$totalBoxes = WireMasterPacking::where('plant_id', $plant) $totalBoxes = WireMasterPacking::where('plant_id', $plant)
->where('customer_po_master_id', $customerPoMasterId) ->whereIn('customer_po_master_id', $customerPoMasterIds)
->select('wire_packing_number') ->select('wire_packing_number')
->groupBy('wire_packing_number') ->groupBy('wire_packing_number')
->havingRaw( ->havingRaw(
@@ -195,8 +215,20 @@ class PalletPrintController extends Controller
) )
->count(); ->count();
// $completedPallets = WireMasterPacking::where('plant_id', $plant)
// ->where('customer_po_master_id', $customerPoMasterId)
// ->select('wire_packing_number')
// ->groupBy('wire_packing_number')
// ->havingRaw(
// 'COUNT(*) = COUNT(CASE WHEN wire_packing_status = ? THEN 1 END)',
// ['Completed']
// )
// ->orderBy('wire_packing_number')
// ->pluck('wire_packing_number')
// ->values();
$completedPallets = WireMasterPacking::where('plant_id', $plant) $completedPallets = WireMasterPacking::where('plant_id', $plant)
->where('customer_po_master_id', $customerPoMasterId) ->whereIn('customer_po_master_id', $customerPoMasterIds)
->select('wire_packing_number') ->select('wire_packing_number')
->groupBy('wire_packing_number') ->groupBy('wire_packing_number')
->havingRaw( ->havingRaw(

View File

@@ -2,6 +2,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Models\Item;
use App\Models\Plant; use App\Models\Plant;
use Illuminate\Http\Request; use Illuminate\Http\Request;
@@ -56,6 +57,78 @@ class PlantController extends Controller
]); ]);
} }
public function getItemCode(Request $request){
$expectedUser = env('API_AUTH_USER');
$expectedPw = env('API_AUTH_PW');
$header_auth = $request->header('Authorization');
$expectedToken = $expectedUser.':'.$expectedPw;
if ('Bearer '.$expectedToken != $header_auth) {
return response()->json([
'status_code' => 'ERROR',
'status_description' => 'Invalid authorization token!',
], 403);
}
$plantCode = $request->header('plant-code');
$itemCode = $request->header('item-code');
if (! $plantCode) {
return response()->json([
'status_code' => 'ERROR',
'status_description' => "Plant Code value can't be empty",
], 404);
} elseif (! $itemCode) {
return response()->json([
'status_code' => 'ERROR',
'status_description' => 'Item code cannot be empty!',
], 404);
}
$plant = Plant::where('code', $plantCode)->first();
$plantId = $plant->id;
if (! $plant) {
return response()->json([
'status_code' => 'ERROR',
'status_description' => "Plant Code '{$plantCode}' not found!",
], 404);
}
$itemCodeExist = Item::where('code', $itemCode)->first();
if (! $itemCodeExist) {
return response()->json([
'status_code' => 'ERROR',
'status_description' => 'Item code not found',
], 404);
}
$itemCodePlantExist = Item::where('code', $itemCode)->where('plant_id', $plantId)->first();
if (! $itemCodePlantExist) {
return response()->json([
'status_code' => 'ERROR',
'status_description' => "Item code not found against plant code '$plantCode'",
], 404);
}
if (empty(trim($itemCodePlantExist->description ?? ''))) {
return response()->json([
'status_code' => 'ERROR',
'status_description' => "Description is empty in Item Master against item code '$itemCode'.",
], 404);
}
return response()->json([
'status_code' => 'SUCCESS',
'status_description' => [
'description' => $itemCodePlantExist->description,
],
], 200);
}
/** /**
* Update the specified resource in storage. * Update the specified resource in storage.
*/ */

View File

@@ -11,6 +11,8 @@ use Illuminate\Support\Facades\Log;
use Mpdf\QrCode\QrCode; use Mpdf\QrCode\QrCode;
use Mpdf\QrCode\Output; use Mpdf\QrCode\Output;
use Barryvdh\DomPDF\Facade\Pdf; use Barryvdh\DomPDF\Facade\Pdf;
use App\Exports\SerialExport;
use Maatwebsite\Excel\Facades\Excel;
class ProductionOrderController extends Controller class ProductionOrderController extends Controller
{ {
@@ -62,6 +64,7 @@ class ProductionOrderController extends Controller
]; ];
} }
$pdf = Pdf::loadView('production-orders.print', compact('stickers')) $pdf = Pdf::loadView('production-orders.print', compact('stickers'))
->setPaper([0, 0, 170, 40]); ->setPaper([0, 0, 170, 40]);
@@ -214,6 +217,24 @@ class ProductionOrderController extends Controller
} }
} }
public function exportSerial($production_order, $plantCode, $fromSerialNo, $toSerialNo){
$order = ProductionOrder::where('production_order', $production_order)->first();
if (!$order) {
abort(404, 'Production Order not found');
}
else{
return Excel::download(
new SerialExport(
$order->item->code,
$fromSerialNo,
$toSerialNo
),
'serial_numbers.xlsx'
);
}
}
/** /**
* Store a newly created resource in storage. * Store a newly created resource in storage.
*/ */

View File

@@ -29,7 +29,10 @@ class VisitorMail extends Mailable
public function envelope(): Envelope public function envelope(): Envelope
{ {
return new Envelope( return new Envelope(
subject: 'Visitor Arrival Notification', // subject: 'Visitor Arrival Notification',
subject: $this->visitor->type === 'InterUnitStaff'
? 'Employee Arrival Notification'
: 'Visitor Arrival Notification',
); );
} }

View File

@@ -30,7 +30,10 @@ class VisitorOutMail extends Mailable
public function envelope(): Envelope public function envelope(): Envelope
{ {
return new Envelope( return new Envelope(
subject: 'Visitor Out Notification', // subject: 'Visitor Out Notification',
subject: $this->entry->type === 'InterUnitStaff'
? 'Employee Out Notification'
: 'Visitor Out Notification',
); );
} }

View File

@@ -91,11 +91,22 @@ class Item extends Model
public function tempClassCharacteristics() public function tempClassCharacteristics()
{ {
return $this->hasMany(TempClassCharacteristic::class, 'plant_id', 'id'); return $this->hasMany(TempClassCharacteristic::class, 'item_id', 'id');
} }
public function weightValidations() public function weightValidations()
{ {
return $this->hasMany(WeightValidation::class); return $this->hasMany(WeightValidation::class);
} }
public function locatorValidations()
{
return $this->hasMany(LocatorValidation::class, 'item_id', 'id');
}
public function panelGrMasters()
{
return $this->hasMany(PanelGrMaster::class, 'item_id', 'id');
}
} }

View File

@@ -26,6 +26,10 @@ class PanelBoxValidation extends Model
'part_validation3', 'part_validation3',
'part_validation4', 'part_validation4',
'part_validation5', 'part_validation5',
'panel_box_supplier',
'panel_box_serial_number',
'batch_number',
'panel_box_code',
'created_by', 'created_by',
'updated_by' 'updated_by'
]; ];

View File

@@ -0,0 +1,33 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class PanelGrMaster extends Model
{
use SoftDeletes;
protected $fillable = [
'plant_id',
'item_id',
'document_number',
'invoice_number',
'supplier_number',
'quantity',
'created_by',
'updated_by'
];
public function plant(): BelongsTo
{
return $this->belongsTo(Plant::class);
}
public function item(): BelongsTo
{
return $this->belongsTo(Item::class);
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\PanelGrMaster;
use App\Models\User;
class PanelGrMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any PanelGrMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, PanelGrMaster $panelgrmaster): bool
{
return $user->checkPermissionTo('view PanelGrMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create PanelGrMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, PanelGrMaster $panelgrmaster): bool
{
return $user->checkPermissionTo('update PanelGrMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, PanelGrMaster $panelgrmaster): bool
{
return $user->checkPermissionTo('delete PanelGrMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any PanelGrMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, PanelGrMaster $panelgrmaster): bool
{
return $user->checkPermissionTo('restore PanelGrMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any PanelGrMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, PanelGrMaster $panelgrmaster): bool
{
return $user->checkPermissionTo('replicate PanelGrMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder PanelGrMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, PanelGrMaster $panelgrmaster): bool
{
return $user->checkPermissionTo('force-delete PanelGrMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any PanelGrMaster');
}
}

View File

@@ -8,7 +8,7 @@
"require": { "require": {
"php": "^8.2", "php": "^8.2",
"alperenersoy/filament-export": "^3.0", "alperenersoy/filament-export": "^3.0",
"althinect/filament-spatie-roles-permissions": "^2.3", "althinect/filament-spatie-roles-permissions": "^4.0",
"diogogpinto/filament-auth-ui-enhancer": "^1.0", "diogogpinto/filament-auth-ui-enhancer": "^1.0",
"erag/laravel-pwa": "^1.9", "erag/laravel-pwa": "^1.9",
"filament/filament": "^3.3", "filament/filament": "^3.3",

View File

@@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
$sql1 = <<<'SQL'
ALTER TABLE panel_box_validations
ADD COLUMN panel_box_supplier TEXT DEFAULT NULL
SQL;
DB::statement($sql1);
$sql2 = <<<'SQL'
ALTER TABLE panel_box_validations
ADD COLUMN panel_box_serial_number TEXT DEFAULT NULL
SQL;
DB::statement($sql2);
$sql3 = <<<'SQL'
ALTER TABLE panel_box_validations
ADD COLUMN panel_box_code TEXT DEFAULT NULL
SQL;
DB::statement($sql3);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('panel_box_validations', function (Blueprint $table) {
//
});
}
};

View File

@@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
$sql = <<<'SQL'
CREATE TABLE panel_gr_masters (
id BIGINT GENERATED always AS IDENTITY PRIMARY KEY,
plant_id BIGINT NOT NULL,
item_id BIGINT NOT NULL,
document_number TEXT DEFAULT NULL,
invoice_number TEXT DEFAULT NULL,
supplier_number TEXT DEFAULT NULL,
quantity TEXT DEFAULT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP,
deleted_at TIMESTAMP,
created_by TEXT NULL,
updated_by TEXT NULL,
FOREIGN KEY (plant_id) REFERENCES plants (id),
FOREIGN KEY (item_id) REFERENCES items (id)
);
SQL;
DB::statement($sql);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('panel_gr_masters');
}
};

View File

@@ -239,5 +239,10 @@ class PermissionSeeder extends Seeder
Permission::updateOrCreate(['name' => 'view import locator validation']); Permission::updateOrCreate(['name' => 'view import locator validation']);
Permission::updateOrCreate(['name' => 'view export locator validation']); Permission::updateOrCreate(['name' => 'view export locator validation']);
Permission::updateOrCreate(['name' => 'view import panel gr master']);
Permission::updateOrCreate(['name' => 'view export panel gr master']);
} }
} }

View File

@@ -36,5 +36,14 @@ class="px-2 py-1 border border-primary-500 text-primary-600 rounded hover:bg-pri
Print Item Print Item
</button> </button>
@endcan @endcan
@can('view export serial number button')
<button
type="button"
wire:click="exportSerialNo"
class="px-2 py-1 border border-primary-500 text-primary-600 rounded hover:bg-primary-50 hover:border-primary-700 transition text-sm"
>
Export Serial Number
</button>
@endcan
</div> </div>

View File

@@ -7,14 +7,6 @@
</head> </head>
<body style="margin:0;padding:0;background:#f4f6f9;font-family:Arial,Helvetica,sans-serif;"> <body style="margin:0;padding:0;background:#f4f6f9;font-family:Arial,Helvetica,sans-serif;">
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Visitor Arrival Notification</title>
</head>
<body style="margin:0;padding:0;background:#ffffff;font-family:Arial,Helvetica,sans-serif;">
<table width="100%" cellpadding="0" cellspacing="0" style="background:#ffffff;"> <table width="100%" cellpadding="0" cellspacing="0" style="background:#ffffff;">
<tr> <tr>
@@ -25,8 +17,14 @@
<!-- Header --> <!-- Header -->
<tr> <tr>
<td style="background:#0f766e;padding:20px;text-align:center;"> <td style="background:#0f766e;padding:20px;text-align:center;">
<h2 style="margin:0;color:#ffffff;"> {{-- <h2 style="margin:0;color:#ffffff;">
Visitor Arrival Notification Visitor Arrival Notification
</h2> --}}
<h2 style="margin:0;color:#ffffff;">
{{ $visitor->type === 'InterUnitStaff'
? 'Employee Arrival Notification'
: 'Visitor Arrival Notification'
}}
</h2> </h2>
</td> </td>
</tr> </tr>
@@ -40,7 +38,7 @@
</p> </p>
<p> <p>
A visitor has arrived and is waiting to meet you. A {{ $visitor->type === 'InterUnitStaff' ? 'Employee' : 'Visitor' }} has arrived and is waiting to meet you.
Please find the details below: Please find the details below:
</p> </p>
@@ -48,8 +46,11 @@
style="border-collapse:collapse;margin-top:15px;"> style="border-collapse:collapse;margin-top:15px;">
<tr> <tr>
<td style="border:1px solid #d1d5db;width:30%;font-weight:bold;"> {{-- <td style="border:1px solid #d1d5db;width:30%;font-weight:bold;">
Visitor Name Visitor Name
</td> --}}
<td style="border:1px solid #d1d5db;width:30%;font-weight:bold;">
{{ $visitor->type === 'InterUnitStaff' ? 'Employee Name' : 'Visitor Name' }}
</td> </td>
<td style="border:1px solid #d1d5db;"> <td style="border:1px solid #d1d5db;">
{{ $visitor->name }} {{ $visitor->name }}
@@ -67,7 +68,7 @@
<tr> <tr>
<td style="border:1px solid #d1d5db;font-weight:bold;"> <td style="border:1px solid #d1d5db;font-weight:bold;">
Company {{ $visitor->type === 'InterUnitStaff' ? 'Unit' : 'Company' }}
</td> </td>
<td style="border:1px solid #d1d5db;"> <td style="border:1px solid #d1d5db;">
{{ $visitor->company }} {{ $visitor->company }}
@@ -83,6 +84,15 @@
</td> </td>
</tr> </tr>
<tr>
<td style="border:1px solid #d1d5db;font-weight:bold;">
No of Person
</td>
<td style="border:1px solid #d1d5db;">
{{ $visitor->number_of_person }}
</td>
</tr>
<tr> <tr>
<td style="border:1px solid #d1d5db;font-weight:bold;"> <td style="border:1px solid #d1d5db;font-weight:bold;">
Visit Time Visit Time

View File

@@ -15,8 +15,14 @@
<!-- Header --> <!-- Header -->
<tr> <tr>
<td style="background:#0f766e;padding:20px;text-align:center;"> <td style="background:#0f766e;padding:20px;text-align:center;">
<h2 style="margin:0;color:#ffffff;"> {{-- <h2 style="margin:0;color:#ffffff;">
Visitor Out Notification Visitor Out Notification
</h2> --}}
<h2 style="margin:0;color:#ffffff;">
{{ $entry->type === 'InterUnitStaff'
? 'Employee Out Notification'
: 'Visitor Out Notification'
}}
</h2> </h2>
</td> </td>
</tr> </tr>
@@ -30,15 +36,18 @@
</p> </p>
<p> <p>
A visitor has checked out. Please find the details below: A {{ $entry->type === 'InterUnitStaff' ? 'Employee' : 'Visitor' }} has checked out. Please find the details below:
</p> </p>
<table width="100%" cellpadding="10" cellspacing="0" <table width="100%" cellpadding="10" cellspacing="0"
style="border-collapse:collapse;margin-top:15px;"> style="border-collapse:collapse;margin-top:15px;">
<tr> <tr>
<td style="border:1px solid #d1d5db;width:30%;font-weight:bold;"> {{-- <td style="border:1px solid #d1d5db;width:30%;font-weight:bold;">
Visitor Name Visitor Name
</td> --}}
<td style="border:1px solid #d1d5db;width:30%;font-weight:bold;">
{{ $entry->type === 'InterUnitStaff' ? 'Employee Name' : 'Visitor Name' }}
</td> </td>
<td style="border:1px solid #d1d5db;"> <td style="border:1px solid #d1d5db;">
{{ $entry?->name ?? '-' }} {{ $entry?->name ?? '-' }}
@@ -55,8 +64,11 @@
</tr> </tr>
<tr> <tr>
<td style="border:1px solid #d1d5db;font-weight:bold;"> {{-- <td style="border:1px solid #d1d5db;font-weight:bold;">
Company Company
</td> --}}
<td style="border:1px solid #d1d5db;font-weight:bold;">
{{ $entry->type === 'InterUnitStaff' ? 'Unit' : 'Company' }}
</td> </td>
<td style="border:1px solid #d1d5db;"> <td style="border:1px solid #d1d5db;">
{{ $entry?->company ?? '-' }} {{ $entry?->company ?? '-' }}

View File

@@ -307,7 +307,7 @@
max-width: <?php echo $isilogoMaxWidth; ?>mm; max-width: <?php echo $isilogoMaxWidth; ?>mm;
left: 71mm;"> --}} left: 71mm;"> --}}
<img src="{{ $qrBase64 }}" <img src="{{ $qrBase64 }}"
style="position: absolute; bottom: 1.2mm; right: 2mm; width: 8mm; height: 7.2mm;"> style="position: absolute; bottom: 0.8mm; right: 2mm; width: 8mm; height: 7.8mm;">
</td> </td>
</tr> </tr>

View File

@@ -77,6 +77,17 @@
position: absolute; position: absolute;
right: 5pt; right: 5pt;
top: 8pt; top: 8pt;
/* width: 69pt; */
}
.po-long {
font-size: 8pt;
font-weight: bold;
text-align: left !important;
position: absolute;
right: 5pt;
top: 8pt;
width: 69pt;
} }
/* .desc { /* .desc {
@@ -108,7 +119,10 @@
</td> </td>
<td class="text"> <td class="text">
<div class="serial">{{ $sticker['serial'] }}</div> <div class="serial">{{ $sticker['serial'] }}</div>
<div class="po">{{ $sticker['production_order'] }}</div> {{-- <div class="po">{{ $sticker['production_order'] }}</div> --}}
<div class="{{ strlen($sticker['serial']) > 14 ? 'po-long' : 'po' }}">
{{ $sticker['production_order'] }}
</div>
<div class="desc">{{ $sticker['description'] }}</div> <div class="desc">{{ $sticker['description'] }}</div>
</td> </td>
</tr> </tr>

View File

@@ -79,6 +79,16 @@
top: 8pt; top: 8pt;
} }
.po-long {
font-size: 8pt;
font-weight: bold;
text-align: left !important;
position: absolute;
right: 5pt;
top: 8pt;
width: 45pt;
}
/* .desc { /* .desc {
font-size: 6pt; font-size: 6pt;
margin-left: -5pt; margin-left: -5pt;
@@ -108,7 +118,10 @@
</td> </td>
<td class="text"> <td class="text">
<div class="serial">{{ $sticker['serial'] }}</div> <div class="serial">{{ $sticker['serial'] }}</div>
<div class="po">{{ $sticker['production_order'] }}</div> {{-- <div class="po">{{ $sticker['production_order'] }}</div> --}}
<div class="{{ strlen($sticker['serial']) > 14 ? 'po-long' : 'po' }}">
{{ $sticker['production_order'] }}
</div>
<div class="desc">{{ $sticker['description'] }}</div> <div class="desc">{{ $sticker['description'] }}</div>
</td> </td>
</tr> </tr>

View File

@@ -234,3 +234,7 @@ Route::post('file/store', [SapFileController::class, 'store'])->name('file.store
Route::get('/print-pallet/{pallet}/{plant}', [PalletPrintController::class, 'print'])->name('print.pallet'); Route::get('/print-pallet/{pallet}/{plant}', [PalletPrintController::class, 'print'])->name('print.pallet');
Route::post('vehicle/entry', [VehicleController::class, 'storeVehicleEntry']); Route::post('vehicle/entry', [VehicleController::class, 'storeVehicleEntry']);
//..Item Code
Route::get('item-code', [PlantController::class, 'getItemCode']);

View File

@@ -66,6 +66,10 @@ Route::get('production-orders/{production_order}/{plant_code}/printItemSerial',
[ProductionOrderController::class, 'printItemSerial'] [ProductionOrderController::class, 'printItemSerial']
)->name('production-orders.printItemSerial'); )->name('production-orders.printItemSerial');
Route::get('production-orders/{production_order}/{plant_code}/{from_serial_no}/{to_serial_no}/exportSerial',
[ProductionOrderController::class, 'exportSerial']
)->name('production-orders.exportSerial');
Route::get('/visitor-badge/{id}', [VisitorBadgeController::class, 'show']) Route::get('/visitor-badge/{id}', [VisitorBadgeController::class, 'show'])
->name('visitor.badge'); ->name('visitor.badge');
// Route::get('/characteristic/approve', [CharacteristicApprovalController::class, 'approve']) // Route::get('/characteristic/approve', [CharacteristicApprovalController::class, 'approve'])