| Rev |
Age |
Author |
Path |
Log message |
Diff |
| 37791 |
10 d 7 h |
amit |
/trunk/profitmandi-fofo/src/main/ |
Sale returns: Finance-only B2C settlement after a NIC GSTIN refusal
Once NIC has refused a return because the buyer's GSTIN is cancelled or
invalid, only Finance may act on it - approve, retry or reject. The pending
queue shows the refusal reason and, on the day it happened, a "Refund as
B2C" action; Logistics sees "IRN failed - awaiting Finance" and no buttons.
The B2C screen states NIC's reason and every returned line with its value
including and excluding GST, and fixes the refund at the value net of GST
in whole rupees. Finance types that figure back by hand, enters a remark and
ticks the consent box before the button enables; the server re-checks the
amount, the remark, the consent and the same-day window, so the screen is a
convenience and not the control. Cancelling or finishing returns to the
queue, and a refused approval now reloads the queue so the B2C action
appears without a manual refresh.
jsVersion 438 -> 439 for return.js. |
|
| 37536 |
33 d 22 h |
amit |
/trunk/profitmandi-fofo/src/main/ |
purchase return: order the invoice-return queue by what still needs doing
A return with no debit note sorts first - it is the one still owing an action -
and the screen reflects that ordering. Also refuses the cancel path when any order
on the invoice is in a state that must not be cancelled. |
|
| 37378 |
48 d 7 h |
amit |
/trunk/profitmandi-fofo/src/main/ |
Put the action-pending returns at the top of Sale Returns, and filter by partner
Sorting the received list pending-first changed nothing on screen, because every return
that still needs an action was missing from it. The list was built from purchase return
orders inside the date window, and a return order only exists once the warehouse has
received the goods - so a debit note awaiting receipt had no row to sort, and a return
sitting unrefunded for weeks fell out of the window entirely.
The screen is now two lists:
- Action Pending, on top, with no date bound. It merges the three shapes a pending return
takes - a debit note never received, a return order received but unrefunded, and one
rejected but not yet acknowledged - into a single row type, oldest first, with the age
in days beside it. Each row carries only the action that actually applies to it
- Settled Returns below, refunded and cancelled only, still bound to From/To. The pending
rows were lifted out of it, so nothing is listed twice
Two things worth recording:
- a debit note has no warehouse of its own. It is placed through the item's invoice and
the order that invoice was raised on, and a note that cannot be placed is dropped rather
than shown to a warehouse it may not belong to
- debit notes raised before the receive/refund flow existed were settled the old way and
cannot be worked from this screen. The cutoff is read from the earliest return order in
the database, so it needs no maintenance, and the page says so in a footnote instead of
quietly hiding them
The partner filter reuses the shared /partners typeahead and passes the id down into both
queries. Only a picked suggestion filters, so a half-typed name cannot blank the page. Its
handlers sit inline in the template, next to the markup they drive, following the pattern
add-wallet-request.vm already uses - which leaves the now-unused #invoice-return-date-apply
handler in return.js dead, to be removed with the return.js work already in flight.
Rendered offline through Velocity with the app's own directive.set.null.allowed to confirm
all four action variants emit the right buttons. |
|
| 36477 |
156 d 1 h |
amit |
/trunk/ |
Invoice return: IRN/EWB cancellation on approve, Logistics L2+ permission, DL GST disabled
- approveInvoiceReturn now cancels IRN+EWB when cancellable (path B) before falling back to Credit Note (path A)
- DC/challan EWB cancelled best-effort before Credit Note path
- Added enabled flag to GstEInvoiceUser; DL GSTIN disabled in E_INVOICE_USERS and EWB_USERS
- isGstEnabled guard added to all public GST API methods in GstProService
- Logistics L2+ can now approve/reject invoice returns (not just Finance)
- invoice-return.vm uses canApproveInvoiceReturn for INV-prefix button visibility |
|
| 36447 |
159 d 21 h |
amit |
/trunk/profitmandi-fofo/src/main/ |
DN lifecycle UI: acknowledge rejected return endpoint, status labels, JS handler
- Add PUT /return/debit-note/reject/acknowledge/{debitNoteId} endpoint
- invoice-return.vm: Rejected-Pending Acknowledgment + Cancelled status labels, Acknowledge Receipt button
- return.js: click handler for acknowledge-rejected-return |
|
| 36408 |
164 d 1 h |
amit |
/trunk/profitmandi-fofo/src/main/ |
Sale-return reversal: controller wiring + UI for cancellability gate + INV reject + date filter
PurchaseReturnController:
/return/invoice/process — autoApprove now isIrnCancellable && !isShipped.
!isShipped guard restored: shipped goods route through manual approval
even within 24h, so the physical return goes through CN flow.
/return/invoice/reject/{proId} — new endpoint for finance to reject a
pending INV PRO (sale stands, no inventory/wallet/GST action).
/return/invoice — date filter (fromDate/toDate query params, default
last 30 days) backed by selectByWarehouseIdsAndDateRange. Limit
bumped to 200 to accommodate longer ranges.
receive-debit-note view — passes $requiresFinanceApproval so the
template can render the finance-approval banner when DN's IRN is
past the 24h window.
invoice-return.vm:
Added From/To date inputs + Apply button.
Added Reject button next to Approve & Refund for pending INV PROs.
receive-debit-note.vm:
Added one informational banner (#if $requiresFinanceApproval) above
the receipt form. No layout / JS / submit-URL change.
return.js:
#invoice-return-date-apply handler — POSTs the selected range to
/return/invoice and refreshes the table.
.reject-invoice-return handler — prompts for reason, calls the new
reject endpoint.
dev/staging/prod.properties: feature flag finance.receipt.approval.email.enabled
(default false, flip per env when mail infra is ready). |
|
| 36027 |
203 d 1 h |
amit |
/trunk/profitmandi-fofo/src/main/ |
Sale Returns: finance approval endpoint, invoice links in all views, invoice map for INV: returns, purchase reference check fix |
|
| 36022 |
204 d 2 h |
amit |
/trunk/profitmandi-fofo/src/main/ |
Sale Returns: invoice return flow with auto-approve, rename to Sale Returns, role-based search results, Finance L2+ access |
|
| 35998 |
208 d 2 h |
amit |
/trunk/profitmandi-fofo/src/main/ |
Invoice Return: controller endpoints, UI views (receive/refund/reject/details/search), JS handlers, role-based access, dashboard menu |
|