deliveryitems.js 1.5 KB

12345678910111213141516171819202122
  1. const { Text, Decimal, Integer, Checkbox, Uuid, Relationship } = require('@keystonejs/fields');
  2. const { AutoIncrement } = require('@keystonejs/fields-auto-increment');
  3. module.exports = {
  4. fields: {
  5. id: { type: Uuid, isRequired: true, label: 'deliveryitems' },
  6. catnum: { type: Text, label: 'Numer katalogowy' },
  7. price_netto: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Cena netto' },
  8. value_netto: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Wartosc netto' },
  9. isize: { type: Text, isRequired: true, label: 'isize' },
  10. mass: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Masa' },
  11. quantity: { type: Integer, label: 'Ilosc' },
  12. documents_id: { type: Relationship, ref: 'documents', many: false, isRequired: true, label: 'documents' },
  13. kinds_id: { type: Relationship, ref: 'kinds', many: false, label: 'kinds' },
  14. uom_id: { type: Relationship, ref: 'uom', many: false, label: 'uom' },
  15. materials_id: { type: Relationship, ref: 'materials', many: false, label: 'Surowiec' },
  16. vat_id: { type: Relationship, ref: 'vat', many: false, isRequired: true, label: 'VAT' },
  17. shops_id: { type: Relationship, ref: 'shops', many: false, isRequired: true, label: 'Magazyn' },
  18. fifo: { type: Checkbox, isRequired: true, label: 'fifo' },
  19. itype: { type: Integer, isRequired: true, label: 'itype' },
  20. }, label: 'Deliveryitem'//, plural: 'Deliveryitemss'
  21. };