feat(affiliates): admin management and convert earnings to account balance - #15
Conversation
|
Nice consolidation, and thanks for updating all the route references and tests. One correctness note: |
|
Fixed — convertToCredit() now runs inside a DB::transaction() with lockForUpdate() on the affiliate row, so the balance/withdrawn/credit updates and the Transaction row are atomic. |
|
Thank you — and thanks for wrapping convertToCredit() in a DB::transaction() with lockForUpdate(), exactly right. We just merged the first clean batch into main: #16 (client delete), #24 (invoice number display), #13 (Tpay), #22 (addon settings framework) and #14 (tax rewrite). This currently conflicts with main because it overlaps the config controller and admin routes we touched. Could you rebase it on the updated main? Then it's good to go. |
ec52932 to
28d7b47
Compare
|
*Zrebasowane na aktualny \main* — czyste, gotowe do merga. Potwierdzam też poprawkę z Twojej uwagi: \convertToCredit()\ od początku tej wersji działa wewnątrz \DB::transaction()\ i blokuje wiersz przez \lockForUpdate()\ (\�pp/Services/AffiliateService.php:85-86), więc update'owanie salda affiliate + withdrawn + kredytu klienta + wpis \Transaction\ jest atomowe. |
28d7b47 to
44cd66b
Compare
|
Thank you — we merged #19 (company lookup, now gated behind the addon) and #17 (billing email). This one now conflicts with main again on the shared admin views/config. One more rebase on the updated main and it is ready to merge. Appreciated, and sorry for the repeated rebases — the invoicing cluster overlaps a lot. |
…lance - Admin: add existing clients as affiliates, fix table columns and balance display - Admin & client: convert affiliate balance to client account credit - Client: fix commission history amounts and referred client names - Remove duplicate config affiliates page and point menu links at /admin/affiliates
44cd66b to
4f910c1
Compare
…affiliate merge The affiliate PR (#15) added zh strings for admin.php, client.php.affiliates and messages.php.success in a different key order/nesting than English, so the Simplified Chinese mirror test failed. Rebuild the zh files to English's exact structure, keeping every existing Chinese translation. Parity stays green.
Admin affiliate management (list, detail, edit) plus converting an affiliate's earnings into account balance.