fifopos.js 1.1 KB

1234567891011121314151617
  1. const { DateTime, Text, Decimal, Uuid, Relationship } = require('@keystonejs/fields');
  2. const { AutoIncrement } = require('@keystonejs/fields-auto-increment');
  3. module.exports = {
  4. fields: {
  5. fifopos_id: { type: AutoIncrement, isRequired: true, label: 'fifopos' },
  6. fifopart_id: { type: Relationship, ref: 'fifopart', many: false, label: 'fifopart' },
  7. pos_id: {type: Relationship, ref: 'positions', many: true, label: 'pos_id' },
  8. date_part: { type: DateTime, isRequired: true, label: 'date_part' },
  9. id: { type: Text, label: 'id' },
  10. items_id: { type: Relationship, ref: 'items', many: true, label: 'Egzemplarz' },
  11. quantity: { type: Decimal, knexOptions: { precision: 14, scale: 3 }, label: 'Ilosc' },
  12. price_purchase: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_purchase' },
  13. value: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'value' },
  14. price_orig: { type: Decimal, knexOptions: { precision: 12, scale: 2 }, label: 'price_orig' },
  15. }, label: 'Fifopo'//, plural: 'Fifoposs'
  16. };