stocktaking_items.js 1005 B

1234567891011121314
  1. const { Decimal, Uuid, Relationship } = require('@keystonejs/fields');
  2. module.exports = {
  3. fields: {
  4. stocktaking_items_id: { type: Uuid, isRequired: true, label: 'stocktaking_items' },
  5. stocktaking_id: { type: Relationship, ref: 'stocktaking', many: false, isRequired: true, label: 'stocktaking' },
  6. quantity: { type: Decimal, knexOptions: { precision: 14, scale: 3 }, label: 'Ilosc' },
  7. quantity2: { type: Decimal, knexOptions: { precision: 14, scale: 3 }, label: 'quantity2' },
  8. value_purchase: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Wartosc zakupu' },
  9. price: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'Cena' },
  10. items_id: { type: Relationship, ref: 'items', many: true, isRequired: true, label: 'Egzemplarz' },
  11. shops_id: { type: Relationship, ref: 'shops', many: true, isRequired: true, label: 'Magazyn' },
  12. }, label: 'Stocktaking_item'//, plural: 'Stocktaking_itemss'
  13. };