|
|
@@ -2,9 +2,9 @@ const { Integer, Checkbox, Text, Decimal, DateTime, Uuid, Relationship } = requi
|
|
|
|
|
|
module.exports = {
|
|
|
fields: {
|
|
|
- items_id: { type: Uuid, isRequired: true, label: 'Egzemplarz' },
|
|
|
+ id: { type: Uuid, isRequired: true, label: 'Egzemplarz' },
|
|
|
article_id: { type: Uuid, many: false, label: 'article' },
|
|
|
- productsguid_id: { type: Relationship, ref: 'products', many: false, label: 'productsguid' },
|
|
|
+ productsguid_id: { type: Relationship, ref: 'products', many: false, label: 'productsguid', filters: { products: ':productsguid_id' } },
|
|
|
itype: { type: Integer, isRequired: true, label: 'itype' },
|
|
|
sold: { type: Checkbox, isRequired: true, label: 'sold' },
|
|
|
deficiency: { type: Checkbox, isRequired: true, label: 'deficiency' },
|
|
|
@@ -39,13 +39,13 @@ module.exports = {
|
|
|
modified_at: { type: DateTime, format: 'DD.MM.YYYY h:mm', isRequired: true, label: 'Zmieniono' },
|
|
|
sup_id: { type: Relationship, ref: 'suppliers', many: false, label: 'suppliers_id' },
|
|
|
//pzdoc_id: { type: Relationship, ref: 'pzdoc.pzdoc_id', many: false, label: 'pzdoc' }, todo: spr. czy istotne
|
|
|
- kinds_id: { type: Relationship, ref: 'kinds', many: true, label: 'kinds' },
|
|
|
+ kinds_id: { type: Relationship, ref: 'kinds', many: false, label: 'kinds' },
|
|
|
uom_id: { type: Relationship, ref: 'uom', many: false, label: 'uom' },
|
|
|
- materials_id: { type: Relationship, ref: 'materials', many: true, label: 'materials' },
|
|
|
+ materials_id: { type: Relationship, ref: 'materials', many: false, label: 'materials' },
|
|
|
vat_id: { type: Relationship, ref: 'vat', many: false, isRequired: true, label: 'VAT' },
|
|
|
- locations_id: { type: Relationship, ref: 'locations', many: true, label: 'locations' },
|
|
|
- deliveryitems_id: { type: Relationship, ref: 'deliveryitems', many: true, label: 'deliveryitems' },
|
|
|
- shops_id: { type: Relationship, ref: 'shops', many: true, isRequired: true, label: 'Magazyn' },
|
|
|
+ locations_id: { type: Relationship, ref: 'locations', many: false, label: 'locations' },
|
|
|
+ deliveryitems_id: { type: Relationship, ref: 'deliveryitems', many: false, label: 'deliveryitems' },
|
|
|
+ shops_id: { type: Relationship, ref: 'shops', many: false, isRequired: true, label: 'Magazyn' },
|
|
|
tagsoper_id: { type: Relationship, ref: 'operators', many: false, label: 'tagsoper' }, // todo: spr czy o to chodzilo w foregin keys orgyinalnej bazy
|
|
|
price_delivery_before_discount: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Koszt dostawy przed rabatem' },
|
|
|
fifo_value: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'fifo_value' },
|