suppliers.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334
  1. const { Text, Checkbox, Integer, Decimal, Relationship } = require('@keystonejs/fields');
  2. const { AutoIncrement } = require('@keystonejs/fields-auto-increment');
  3. module.exports = {
  4. fields: {
  5. id: { type: Integer, isRequired: true, label: 'suppliers' },
  6. name: { type: Text, isRequired: true, label: 'Nazwa' },
  7. shortname: { type: Text, label: 'Nazwa Skrocona' },
  8. shortid: { type: Text, label: 'shortid' },
  9. street: { type: Text, label: 'Ulica' },
  10. city: { type: Text, label: 'Miasto' },
  11. zipcode: { type: Text, label: 'Kod pocztowy' },
  12. country: { type: Text, label: 'Kraj' },
  13. phone: { type: Text, label: 'Numer telefonu' },
  14. phone_mb: { type: Text, label: 'phone_mb' },
  15. fax: { type: Text, label: 'FAX' },
  16. email: { type: Text, label: 'Adres e-mail' },
  17. prefixnip: { type: Text, label: 'prefixnip' },
  18. nip: { type: Text, label: 'NIP' },
  19. supcomment: { type: Text, label: 'supcomment' },
  20. supplier: { type: Checkbox, isRequired: true, label: 'Dostawca?' },
  21. payervat: { type: Checkbox, isRequired: true, label: 'Platnik VAT?' },
  22. pesel: { type: Text, label: 'PESEL' },
  23. www: { type: Text, label: 'Adres WWW' },
  24. docidentity_type: { type: Integer, label: 'docidentity_type' },
  25. docidentity_number: { type: Text, label: 'docidentity_number' },
  26. discount: { type: Decimal, knexOptions: { precision: 5, scale: 1 }, label: 'Rabat' },
  27. wsuser: { type: Text, label: 'wsuser' },
  28. wspass: { type: Text, label: 'wspass' },
  29. paytype: { type: Text, label: 'paytype' },
  30. paydays: { type: Integer, label: 'paydays' },
  31. // document_groups_id: { type: Relationship, ref: 'document_groups.document_groups_id', many: false, label: 'document_groups' }, todo: spr. czy to wazne bylo i jaki foregin key i w ogole
  32. }, label: 'Supplier'//, plural: 'Suppliers'
  33. };