fix: fourge_error revisions always bill $0 to client

Fourge's own error revisions should never be charged to the client.
getRevisionChargeQuantity now returns 0 for revision_type=fourge_error
regardless of version number. Applied at all 4 invoice picker call sites.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Krao Hasanee
2026-06-11 23:09:53 -04:00
parent 1784af909d
commit aff3d98929
4 changed files with 9 additions and 6 deletions
+3 -1
View File
@@ -12,7 +12,9 @@ export function isInitialVersionEligible(task) {
return isCompletedVersionEligible(task, 0);
}
export function getRevisionChargeQuantity(versionNumber) {
export function getRevisionChargeQuantity(versionNumber, revisionType) {
// Fourge's own error revisions are never billed to the client.
if (revisionType === 'fourge_error') return 0;
const version = Number(versionNumber || 0);
return version >= 2 ? 1 : 0;
}