Refactor invoice status terminology and update related logic

- Renamed 'is_processed' fields to 'status' in the InvoiceHeader model and updated corresponding attributes in schemas, services, and frontend components for consistency.
- Adjusted query filters and validation logic to reflect the new 'status' terminology.
- Updated comments and documentation to clarify changes in invoice status handling.
This commit is contained in:
2026-03-13 12:54:58 -05:00
parent 5522fbb0b9
commit 4f200de5ef
14 changed files with 58 additions and 56 deletions

View File

@@ -208,14 +208,14 @@ export interface Invoice {
invoice_date?: string | null;
capture_date: string;
emission_date?: string | null;
is_processed?: boolean | null;
status?: boolean | null;
processed_date?: string | null;
who_processed?: string | null;
capture_user?: string | null;
traffic_light_status?: string | null;
process_log?: string | null;
is_processed_rec?: number | null;
is_processed_rep?: string | null;
status_rec?: number | null;
status_rep?: string | null;
observation_es?: string | null;
observation_en?: string | null;
comments_status?: string | null;
@@ -266,14 +266,14 @@ export interface CreateInvoiceData {
proforma_number?: string | null;
invoice_date?: string | null;
emission_date?: string | null;
is_processed?: boolean | null;
status?: boolean | null;
processed_date?: string | null;
who_processed?: string | null;
capture_user?: string | null;
traffic_light_status?: string | null;
process_log?: string | null;
is_processed_rec?: number | null;
is_processed_rep?: string | null;
status_rec?: number | null;
status_rep?: string | null;
observation_es?: string | null;
observation_en?: string | null;
comments_status?: string | null;
@@ -319,7 +319,7 @@ export interface UpdateInvoiceData {
cfdi_uuid?: string | null;
path_pdf?: string | null;
path_xml?: string | null;
is_processed?: boolean | null;
status?: boolean | null;
compliance_mx?: Partial<InvoiceComplianceMx> | null;
financials?: Partial<InvoiceFinancials> | null;
logistics?: Partial<InvoiceLogistics>[] | null;

View File

@@ -284,10 +284,10 @@ export function createColumns(
}
},
{
accessorKey: "is_processed",
accessorKey: "status",
header: "Actualizado",
cell: ({ row }) => {
const isprocessed = row.original.is_processed;
const isprocessed = row.original.status;
const processedSnippet = createRawSnippet<[{ isprocessed?: boolean | null }]>((getprocessed) => {
const { isprocessed } = getprocessed();

View File

@@ -121,7 +121,7 @@
</div>
<div>
<p class="text-sm font-medium text-muted-foreground">Actualizado</p>
<p class="text-base">{invoice.is_processed ? 'Sí' : 'No'}</p>
<p class="text-base">{invoice.status ? 'Sí' : 'No'}</p>
</div>
<div class="col-span-2">

View File

@@ -679,7 +679,7 @@
const companyId = companyStore.activeCompany.id;
const response = await invoicesApi.update(selectedInvoice.id, companyId, {
id: selectedInvoice.id,
is_processed: status
status: status
});
if (response.error) {