fix accounting fails
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
export function tahesabStatusLabel(status?: string, tahesabId?: string | null): string {
|
||||
if (tahesabId) return 'موفق'
|
||||
if (status === 'missing') return 'جاافتاده'
|
||||
if (status === 'failed') return 'ناموفق'
|
||||
if (status === 'success') return 'موفق'
|
||||
// pending = ردیف محلی ساخته شده ولی هنوز در نرمافزار تهحساب ثبت نشده (نه «در صف»)
|
||||
return 'ارسال نشده'
|
||||
}
|
||||
|
||||
export function canRetryTahesab(record: { tahesab_id?: string | null; sync_status?: string }): boolean {
|
||||
return !record.tahesab_id || record.sync_status === 'failed'
|
||||
export function tahesabIssueKindLabel(kind?: string): string {
|
||||
if (kind === 'missing') return 'جاافتاده'
|
||||
return 'خطا خورده'
|
||||
}
|
||||
|
||||
export function canRetryTahesab(record: {
|
||||
tahesab_id?: string | null
|
||||
sync_status?: string
|
||||
}): boolean {
|
||||
return !record.tahesab_id || record.sync_status === 'failed' || record.sync_status === 'missing'
|
||||
}
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
export function zarinStatusLabel(status?: string, zarinId?: string | null): string {
|
||||
if (zarinId) return 'موفق'
|
||||
if (status === 'missing') return 'جاافتاده'
|
||||
if (status === 'failed') return 'ناموفق'
|
||||
if (status === 'success') return 'موفق'
|
||||
// pending = ردیف محلی ساخته شده ولی هنوز در نرمافزار زرین ثبت نشده (نه «در صف»)
|
||||
return 'ارسال نشده'
|
||||
}
|
||||
|
||||
export function canRetryZarin(record: { zarin_id?: string | null; sync_status?: string }): boolean {
|
||||
return !record.zarin_id || record.sync_status === 'failed'
|
||||
export function zarinIssueKindLabel(kind?: string): string {
|
||||
if (kind === 'missing') return 'جاافتاده'
|
||||
return 'خطا خورده'
|
||||
}
|
||||
|
||||
export function canRetryZarin(record: { zarin_id?: string | null; sync_status?: string }): boolean {
|
||||
return !record.zarin_id || record.sync_status === 'failed' || record.sync_status === 'missing'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user