24 lines
718 B
TypeScript
24 lines
718 B
TypeScript
export const SALES_INVOICE_STATUS_LABELS: Record<string, string> = {
|
|
draft: 'مسودة',
|
|
paid: 'مدفوعة',
|
|
voided: 'ملغاة',
|
|
refunded: 'مسترجعة',
|
|
};
|
|
|
|
export const SALES_INVOICE_PAYMENT_METHOD_LABELS: Record<string, string> = {
|
|
cash: 'نقداً',
|
|
card: 'بطاقة',
|
|
transfer: 'تحويل',
|
|
mixed: 'مختلط',
|
|
};
|
|
|
|
export const formatSalesInvoiceStatus = (value?: string | null) => {
|
|
if (!value) return 'لا توجد بيانات';
|
|
return SALES_INVOICE_STATUS_LABELS[value] ?? value;
|
|
};
|
|
|
|
export const formatSalesInvoicePaymentMethod = (value?: string | null) => {
|
|
if (!value) return 'لا توجد بيانات';
|
|
return SALES_INVOICE_PAYMENT_METHOD_LABELS[value] ?? value;
|
|
};
|