Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
H
haiyen-payment
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Giang Tran
  • haiyen-payment
  • Repository

Switch branch/tag
  • haiyen-payment
  • app
  • libs
  • productComboPicker.js
Find file
BlameHistoryPermalink
  • tdgiang's avatar
    Only combine products with the same VAT rate in one order · 052622b2
    Real catalog has 3 different VAT rates (5%, 8%, 10%) - the algorithm
    previously mixed products across rates freely within one combo. Each
    attempt now picks a random pivot product to fix that attempt's tax rate,
    then only combines within that same-rate subset. Pivot selection is
    weighted naturally by group size (uniform draw over all candidates), so
    larger rate groups are proportionally more likely to be tried first.
    
    Verified against the real catalog: all previously-working target amounts
    still succeed, every returned combo uses exactly one VAT rate.
    Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_017KPzWwuTEeX2vXGXvyGn4q
    tdgiang authored Sep 03, 2026
    052622b2
productComboPicker.js 2.59 KB
EditWeb IDE
×

Replace productComboPicker.js

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.