feat(web): copiar de / a entre documentos de ventas y compras
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cafe4bc035
commit
29e80181fe
8 files changed
+383
-6
No files matched your search
@@ -91,6 +91,16 @@ describe('createPayload', () => {
|
||||
expect(body['DocumentLines']).toEqual([{ ItemCode: 'A1', Quantity: 1, DiscountPercent: 0 }]);
|
||||
});
|
||||
|
||||
it('envía la referencia al origen solo en las líneas copiadas', () => {
|
||||
const body = createPayload({ CardCode: 'C1' }, [
|
||||
line({ BaseType: 17, BaseEntry: 315, BaseLine: 0 }),
|
||||
line({ BaseType: -1, BaseEntry: null, BaseLine: null }),
|
||||
]);
|
||||
const [copied, own] = body['DocumentLines'] as Record<string, unknown>[];
|
||||
expect(copied).toMatchObject({ BaseType: 17, BaseEntry: 315, BaseLine: 0 });
|
||||
expect(own).not.toHaveProperty('BaseType');
|
||||
});
|
||||
|
||||
it('isBlankLine', () => {
|
||||
expect(isBlankLine({ ItemCode: '' })).toBe(true);
|
||||
expect(isBlankLine({ ItemCode: 'A1' })).toBe(false);
|
||||
|
||||
Reference in new issue
Block a user