Compare commits

..

7 commits

4 changed files with 57 additions and 13 deletions

View file

@ -42,6 +42,8 @@ const ROLE_PERMISSIONS: Record<Role, Permission[]> = {
"manage_vessels_accounts",
"manage_products",
"manage_sites",
"confirm_receipt",
"process_payment"
],
SUPERUSER: [
"create_po",

View file

@ -100,13 +100,13 @@ const TRANSITIONS: Partial<Record<POStatus, TransitionMap>> = {
SENT_FOR_PAYMENT: {
mark_paid: {
to: "PAID_DELIVERED",
allowedRoles: ["ACCOUNTS", "SUPERUSER"],
allowedRoles: ["ACCOUNTS", "SUPERUSER", "MANAGER"],
requiresNote: false,
sideEffects: ["EMAIL_SUBMITTER", "EMAIL_MANAGER"],
},
mark_partial_payment: {
to: "PARTIALLY_PAID",
allowedRoles: ["ACCOUNTS", "SUPERUSER"],
allowedRoles: ["ACCOUNTS", "SUPERUSER", "MANAGER"],
requiresNote: false,
sideEffects: [],
},
@ -114,25 +114,25 @@ const TRANSITIONS: Partial<Record<POStatus, TransitionMap>> = {
PARTIALLY_PAID: {
mark_paid: {
to: "PAID_DELIVERED",
allowedRoles: ["ACCOUNTS", "SUPERUSER"],
allowedRoles: ["ACCOUNTS", "SUPERUSER", "MANAGER"],
requiresNote: false,
sideEffects: [],
},
mark_partial_payment: {
to: "PARTIALLY_PAID",
allowedRoles: ["ACCOUNTS", "SUPERUSER"],
allowedRoles: ["ACCOUNTS", "SUPERUSER", "MANAGER"],
requiresNote: false,
sideEffects: [],
},
confirm_receipt: {
to: "CLOSED",
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER"],
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER", "MANAGER"],
requiresNote: false,
sideEffects: [],
},
confirm_partial_receipt: {
to: "PARTIALLY_PAID",
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER"],
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER", "MANAGER"],
requiresNote: false,
sideEffects: [],
},
@ -140,13 +140,13 @@ const TRANSITIONS: Partial<Record<POStatus, TransitionMap>> = {
PAID_DELIVERED: {
confirm_receipt: {
to: "CLOSED",
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER"],
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER", "MANAGER"],
requiresNote: false,
sideEffects: ["EMAIL_MANAGER", "EMAIL_ACCOUNTS"],
},
confirm_partial_receipt: {
to: "PARTIALLY_CLOSED",
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER"],
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER", "MANAGER"],
requiresNote: false,
sideEffects: [],
},
@ -154,13 +154,13 @@ const TRANSITIONS: Partial<Record<POStatus, TransitionMap>> = {
PARTIALLY_CLOSED: {
confirm_receipt: {
to: "CLOSED",
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER"],
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER", "MANAGER"],
requiresNote: false,
sideEffects: ["EMAIL_MANAGER", "EMAIL_ACCOUNTS"],
},
confirm_partial_receipt: {
to: "PARTIALLY_CLOSED",
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER"],
allowedRoles: ["TECHNICAL", "MANNING", "SUPERUSER", "MANAGER"],
requiresNote: false,
sideEffects: [],
},

View file

@ -112,15 +112,15 @@
- mobile version for accounts [open-question]
26/05/2026
- autogeneration and validation of id fields [DONE]
- who assigns vendor?
- do technical/manning get to make po from excel?
- autogeneration and validation of id fields [DONE]
- pincode to geocode in bg. works on initial save
- site edit does not work? location updates but does not save
-- WAIT SAVING WORKS, THE BUTTON JUST SHOWS SAVING FOR SOME REASON
- pincode to geocode in bg. works on initial save
- confirm button while deleting [DONE]
- vessel edit does not save?
- 0 percent gst does not work [DONE]
- who assigns vendor?
- email notification take you to po [DONE]
- po word appears twice in subject [DONE]
- notification overflows on phone for manager [DONE]
@ -136,3 +136,31 @@
- partial payment / advance payment for accounts [DONE]
- please confirm receipt - only for submitter not for manager [DONE]
- rename My Purchase Orders to Closed Purchase Orders [DONE]
30/05/26
- add a string code for company
- imported po should not need to be approved. it can directly be submitted and will show up in closed state in history.
- vendors from imported po should be auto added
- items from imported PO should be auto added
- hide item inventory features under an environment flag. only keep vendor and item list for pos(including cart) outside the flag.
- po number should be in the format - Company_code/Cost_centre/PO_ID/Financial_Year. Start PO_ID from 200 - 201,202, etc this number should also show on mails and on the exported PO
- based on the above format - extract company code, cost centre, po id from the imported pos
10/06:
- Allow the submitter to select a PO date. This should be picked up as the PO date and can be back/forward dated. Optional field - if not selected temporarily use creation date.
- Once approved, PO date should show date of approval, not creation. Also ensure the same is reflected in exported PO.
- For manager, closed purchase orders should show all the POs that are closed.
- For submitter, closed Purchase Order is also showing approved POs. It should only show Closed POs
- Items should get added to inventory as soon as PO is approved. Do not wait for Closed
- Line item Optional description needs to be shown in exported POs
- allow adding attachments at the delivery confirmation screen
- on po details screen show all attachments - submitted, payment and delivery. currently attachments not visible
- work order terms and conditions
- delivery receipt when confirming
- On manager screen - total approved this month is not updating/showing 0
- For Accounts User, have a similar dashboard card for Payments Completed this Month.
- add a email to vendor option once po is approved and full/partial payment is done that exports the PO as pdf and opens it in outlook with vendor email
- revive the reports feature - make it a section on the sidebar. implement the mockup
open questions -
- what granularity in the accounting code(heading, subheading, etc.)

View file

@ -67,3 +67,17 @@ The runner deploys the tag and restarts the app. Watch progress under
`docker exec -u 1000 forgejo forgejo admin user generate-access-token ...`.
- Server-side env for the button lives in `~/pms/App/.env` on pms1
(`FORGEJO_URL=http://127.0.0.1:3001` so it does not depend on the tunnel).
- **Known Forgejo 10 bug:** clicking *Update branch* on a PR (or pushing to its
head branch) can make the page show "This pull request is broken due to
missing fork information" even though the PR is fine (API still reports
`mergeable: true`). Fix: close and reopen the PR — via the UI, or:
```powershell
$h = @{ Authorization = "token <claude-watcher token>" }
Invoke-RestMethod -Method Patch -Headers $h -ContentType application/json `
-Uri https://git.pelagiamarine.com/api/v1/repos/shad0w/pelagia-portal/pulls/<N> -Body '{"state":"closed"}'
Invoke-RestMethod -Method Patch -Headers $h -ContentType application/json `
-Uri https://git.pelagiamarine.com/api/v1/repos/shad0w/pelagia-portal/pulls/<N> -Body '{"state":"open"}'
```
Fixed upstream in newer Gitea/Forgejo — resolves itself if Forgejo is upgraded past v10.