ALTER TABLE tulajdonos ADD COLUMN nav_szallitoi_szamla_datum date;

CREATE TABLE nav_invoices_inbound_unfolded_fej
(
  kod serial,
  bizonylatszam character varying(100),
  telj_datum date,
  fiz_hatarido date,
  kelte date,
  adoszam character varying(20),
  partner_neve character varying(200),
  partner_orszag character varying(10),
  partner_iszam character varying(20),
  partner_telepules character varying(200),
  partner_cim character varying(300),
  partner_bankszamla character varying(50),
  fizetesmod character varying(20),
  netto_vegosszeg numeric(16,2),
  afa_vegosszeg numeric(16,2),
  brutto_vegosszeg numeric(16,2),
  netto_vegosszeg_huf numeric(16,2),
  afa_vegosszeg_huf numeric(16,2),
  brutto_vegosszeg_huf numeric(16,2),
  partner_kod integer,
  CONSTRAINT nav_invoices_inbound_unfolded_fej_pkey PRIMARY KEY (kod)
)
WITH (
  OIDS=FALSE
);

CREATE TABLE nav_invoices_inbound_unfolded
(
  kod serial,
  fej_kod integer,
  tetel_nev character(2000),
  mennyiseg numeric(16,4),
  megjegyzes text,
  netto_egysegar numeric(24,8),
  originalinvoicenumber character varying(100),
  mee character varying(20),
  mee_nav character varying(20),
  netto_osszeg numeric(16,2),
  afa_osszeg numeric(16,2),
  afa_szazalek numeric(8,2),
  brutto_osszeg numeric(16,2),
  szallitoi_kod character varying(100),
  vonalkod character varying(50),
  CONSTRAINT nav_invoices_inbound_unfolded_pkey PRIMARY KEY (kod)
)
WITH (
  OIDS=TRUE
);