Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Show changed files | Directory listing | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37635 22 d 7 h amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/ feat(pricing): V2 log tag_listing price changes; reference TP instead of vendoritempricing in price drop and tag listing  
37634 22 d 7 h amit /trunk/profitmandi-dao/src/main/ feat(pricing): tag_listing price change log; retire vendoritempricing writes/reads in dao; price drops no longer touch vendor catalog pricing

- New catalog.tag_listing_price_log (sql/create_tag_listing_price_log_20260915.sql, applied on prod 2026-09-15) + TagListingPriceService: the single setter for tag_listing DP/MOP/MRP, logging old/new values, source and user
- Remove applyPriceDrop (r37622): price drops write only price_drop + tag_listing; sql/revert_price_drop_vendor_catalog_pricing_20260915.sql restores the 30 rows it wrote (run on prod)
- VendorCatalogPricingService: reference TP = latest approved external TP (single + batched); internal suppliers rejected on create, bulk upload and approval
- Stop copying pricing into vendoritempricing on approval and item upload; tag listing detail TP from reference TP; indent DP from tag_listing only
 
37633 22 d 7 h ranu /trunk/ preffered app version revert on server side it will be client side  
37632 22 d 10 h aman /trunk/ fix(loi): don't leave an LOI half signed when the signed PDF fails to save

Confirm Sign stores the partner OTP (/validateLoiOtp) before the browser builds and uploads the
signed PDF (/saveLoiDoc). When that second step failed - html2pdf not loaded from cdnjs, upload
rejected, tab closed, server error - nothing was shown, no LOI mail went out, no onboarding was
created, and because loiOtpPresent hid Generate LOI the filler could never re-sign (LOI 734).

- pendingFormList: loiOtpPresent only when OTP AND loiDoc are both saved; new loiSignIncomplete
flag shows a red "signed LOI not saved" note on the Pending LOI list (web + V2 app).
- loi-form.js Confirm Sign: every failure after the OTP says the LOI was NOT saved and how to
retry; checks html2pdf is loaded; success alert only after /saveLoiDoc confirms; no double submit.
- /saveLoiDoc (fofo + V2): refuses a document without a verified OTP; a repeat call for an
already saved LOI is a no-op (no second mail / completion).
- /validateLoiOtp (fofo + V2): clear message when no OTP was sent in 24h; reports the real
rejection reason (e.g. OTP already used) instead of always "wrong".
- sendSignedLoiPdfToPartner: filler without a manager no longer throws and rolls back the save.
- OtpProcessor.generateOtp: never hands back an already verified OTP under the 2-minute throttle.
- AppConfig version 423 for loi-form.js.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhJD2sc6pf3Zd7f4hyGxhH
 
37631 22 d 11 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ feat(mail): wire inactive-recipient filter, clean addresses, remove attendance alerts

Wire MailRecipientFilter into both mail senders. Remove inactive hardcoded recipients, fix typo addresses, send market-share reminder to tech@. Delete sendAttendanceMorningAlert/EveningAlert, sendMailToHR and their CLI options.
 
37630 22 d 11 h amit /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/ feat(mail): wire inactive-recipient filter and clean hardcoded addresses

Wire MailRecipientFilter into googleMailSender and gmailRelaySender. Remove inactive/unknown addresses from recipient and access lists, bulk uploader gate to akhil.kumar.
 
37629 22 d 11 h amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/ feat(mail): wire inactive-recipient filter and clean hardcoded addresses

Wire MailRecipientFilter into googleMailSender and gmailRelaySender. Remove inactive/unknown addresses from recipient and access lists, fix typo addresses, bulk uploader gate to akhil.kumar, V2 brand fee gate to kamini.sharma.
 
37628 22 d 11 h amit /trunk/profitmandi-dao/src/ feat(mail): filter inactive auth users from outgoing mail

InactiveAuthUserRecipientFilter drops @smartdukaan.com recipients whose auth.auth_user is inactive (cached, 5 min refresh, fail-open). Remove inactive hardcoded recipients (sm@, praveen.sharma, tejus.lohani).
 
37627 22 d 11 h amit /trunk/profitmandi-common/src/ feat(mail): drop inactive recipients before send

Add MailRecipientFilter and RecipientFilteringMailSender, which strips To/Cc/Bcc addresses the filter reports inactive and skips a mail left with no recipients instead of failing. AuthenticatedIdentityMailSender now extends it.
 
37626 23 d 5 h amit /trunk/profitmandi-fofo/src/test/java/com/spice/profitmandi/service/warehouse/ test(billing): assert internal transfer and billing resolve the same external origin vendor  
37625 23 d 5 h amit /trunk/profitmandi-dao/src/main/ fix(internal-movement): trace serial origin to the latest external purchase, matching billing

- resolveInternalMovementPrices orders the serial's external purchases newest first (was oldest), so transfers and billing name the same original vendor; no in-stock unit on prod changes (0 of 3,734)
- Restore resolveInternalMovementPrices javadoc onto its own method
- Add drop_internal_vendor_catalog_pricing_20260914.sql, as run on prod 2026-09-14 17:33 (15 New Spice internal suppliers; backups _bak_vcp/_bak_vcpl_internal_20260914)
 
37624 23 d 7 h amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/ feat(price-drop): auto-approve V2 price drop DP/MOP into external vendor catalog pricing  
37623 23 d 7 h amit /trunk/profitmandi-fofo/src/ feat(price-drop): auto-approve price drop DP/MOP into external vendor catalog pricing

- PriceDropController calls VendorCatalogPricingService.applyPriceDrop with the affected date and logged-in user
- BillingPricingServiceTest: local-DB integration tests (rolled back) for origin-based billing prices, catalog fallback and re-billed orders
 
37622 23 d 7 h amit /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/ feat(billing): price warehouse billing from the external supplier of the billed stock; auto-approve price drop DP/MOP into vendor catalog pricing

- BillingPricingService resolves TP/NLC per order from vendor_catalog_pricing of the most recent external supplier of the units scanned out (serial trace, else own external PO); units reversed by SALE_RET are ignored
- Falls back to the latest approved external catalog price when no supplier can be traced; vendorId stays the warehouse vendor
- addBillingDetailsForGrouppedOrders no longer reads vendoritempricing (removes NPE when the row is missing); order.vendorId set to the origin supplier
- VendorCatalogPricingService.applyPriceDrop writes approved pricing logs for external vendors with the price drop DP/MOP, keeping each vendor's TP on the effective date
 
37621 23 d 7 h amit /trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/ V2 /entity honours activeOnly, defaulting to false

Same defect as the fofo endpoint fixed in profitmandi-fofo r37620: the flag was
accepted and ignored. Defaulting to false keeps callers that omit it unchanged.
 
37620 23 d 7 h amit /trunk/profitmandi-fofo/src/main/ Offer creation suggests only active models unless asked for all

/entity accepted activeOnly but always searched with false, so the offer
screen's model picker listed every catalog of the brand, delisted ones included.
It now honours the flag. The default becomes false so the pages that never pass
it keep their current results; the notification product search, which already
asked for active-only, now gets it.

Each item-criteria block gets an Include inactive checkbox, off by default.
Ticking Exclude ticks it too: a brand-level offer still pays on delisted models
partners hold stock of, and they cannot be excluded if they cannot be picked.
Inactive models are labelled, and reloading the list keeps picks still present.

The reload flag is now per block; the old global one let a brand change in one
block be consumed by opening another, leaving the first with a stale list.
Brand names are URL-encoded so a brand like Ai+ is not sent as 'Ai '.

Requires profitmandi-common r37619 for the inactive label.
 
37619 23 d 7 h amit /trunk/profitmandi-common/src/main/java/com/spice/profitmandi/common/solr/ Return active_b in the unlimited content search

The offer screen's model picker needs to mark delisted models as inactive when
it is asked to include them. The other unlimited-search callers read only
catalogId_i and title_s, so the extra field changes nothing for them.
 
37618 23 d 9 h ranu /trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/service/transaction/ logger added  
37617 23 d 18 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/ Undo an internal GRN so its invoice can be received again

A receipt taken before the serials were split left stock that cannot be corrected in place: a
serialised unit is held one to a row, so an invoice that should have created several rows created one,
and the rows that are missing cannot be added without also unpicking the running figures the receipt
moved. Reversing the receipt and taking it again through the same path is the only way to arrive at
what the invoice actually says.

The reversal removes what receiving created - the scans, the inventory units, the invoice items, the
purchase and the supplier invoice - and gives back the two running figures it moved: the warehouse
availability, and the quantity taken off the purchase order line. Both are worked out from the rows
being deleted rather than recomputed, so whatever the receipt added is exactly what comes off. A
purchase order the receipt closed is opened again. Availability is kept only as a running count with
nothing to rebuild it from, which is why it is adjusted by what is known to have been added rather
than by anything inferred.

An invoice whose stock has moved since is refused, not worked around. A unit that has been scanned out
or partly consumed is no longer the receipt's to remove, and deleting around it would leave the
warehouse holding stock that no record explains. Each invoice is reversed on its own so one refusal
leaves the rest untouched, and a dry run reports everything it would delete and every figure it would
change without writing.

Invoices are named explicitly rather than selected by date, so a reversal can only ever touch what it
was given.
 
37616 23 d 18 h amit /trunk/profitmandi-cron/src/main/java/com/smartdukaan/cron/migrations/ Split a line item's serials into one inventory unit each

A serialised line item carries one serial per unit in serial_number, comma separated. The internal
GRN passed that whole field across as a single serial, so a line of four units became one unit whose
serial was the four serials joined together - a string no scan can ever match. Where the joined
string ran past the 128 characters the inventory column allows, the receipt failed outright; where it
fitted, it was accepted and the stock was quietly understated.

The serials are now split out and each unit is received on its own, which is what grnPoModels expects
- it creates one inventory row per serial.

A serial count that does not match the line's quantity now skips the invoice. Receiving fewer units
than were billed is exactly the failure this had, and it is not something to infer a best guess from:
the invoice is left for someone to look at instead.
 

Show All