Repository navigation
Tax invoice: drawn on the phone, tax total and GST % fixed on web and app - #62
Conversation
The line table and the HSN tax table read the rate out of gst_type, which only ever holds 'Intra-State', 'Inter-State' or 'Union Territory', so the GST % column was blank on every taxable line. The rate now comes from each line's own amounts (invoiceGstRate in src/lib/gst.js): a standard slab prints that slab, a line with no tax prints 0, a hand-typed tax prints the rate it works out to (for example 17.5), and tax on a zero taxable amount prints '-'. The owner confirmed the 0 and the effective-rate choices. The HSN table now groups by HSN and the real rate. gst.js imports now end in .js so the new Node test can load it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…size fixes - The Android app draws a sales order's tax invoice itself: the layout is worked out in Dart exactly as generateTaxInvoice.js does (checked against the web's own helpers' answers), and TaxInvoice.kt draws it onto the same template with the same fonts using PdfBox-Android 2.0.27 (Apache 2.0). Saved to Downloads. Not on the API: one invoice takes about 80 ms of CPU, over the Workers free plan's limit. The template and fonts are copies of public/Temps, kept equal by a test. - Invoice layout, web and app: the HSN table's tax total ended under the template's printed ₹ sign, so 180.00 read as ₹80.00; the Rate column lost its last digit under the column line. - Includes the GST % fix (45ac316): the rate comes from each line's amounts. - APK size: PdfBox without Bouncy Castle, native libraries only for the build's --target-platform, and releases for arm64 only: 16.8 MiB, under the update service's 25 MiB per file (it would have been 27.4 MiB). - Emulator scenarios: orders checks hand-offs without a web page in the drawer and reads the invoice's text back from the saved PDF. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying dikho with
|
| Latest commit: |
f5a6a54
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://486168f4.dikho.pages.dev |
| Branch Preview URL: | https://feat-android-native-2.dikho.pages.dev |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5a6a54b9b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ]; | ||
| const tens = ['', '', 'Twenty', 'Thirty', 'Forty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety']; | ||
| String words(int n) { | ||
| if (n < 0) return words(-n); |
There was a problem hiding this comment.
Preserve the sign when spelling negative invoice totals
When a credit order has a negative total, this branch spells its absolute value, so the invoice can show -1,000.00 numerically but “One Thousand Rupees Only” in words. Preserve the negative sign or use explicit credit wording so the two representations do not conflict.
AGENTS.md reference: AGENTS.md:L8-L12
Useful? React with 👍 / 👎.
For the live website (merging deploys these)
gst_type, which never holds a rate. It now comes from each line's amounts (the earlier fix fromclaude/loving-thompson-05d07c, with the owner's choices for 0 and custom rates).For the Android app (not released yet)
Checked
npm run check: 350 tests, build, secret scan.flutter analyzeclean, 398 tests.orders6 of 6: the invoice is drawn on the phone, and its text (client, line, GST 18, amount in words, tax total ₹ 180.00) is read back from the saved PDF.Not checked
🤖 Generated with Claude Code