begin;
-- Chart of Account for Poland
-- From: Peter Dabrowski <meritage@mail.com>
-- Sun, 23 March 2003
SELECT account_heading_save(NULL,'000000000','Aktywa Trwa³e', NULL);
SELECT account__save(NULL,'001000000','¦rodki Trwa³e','A','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'001010000','Grunty w³asne i prawa wieczystego u¿ytkowania gruntów','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'001020000','Budynki, locale i obiekty in¿ynierii l±dowej i wodnej','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'001030000','Urz±dzenia techniczne i maszyny','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'001040000','¦rodki transportu','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'001050000','Inne ¶rodki trwa³e','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'002000000','Warto¶ci niematerialne i prawne','A','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'002010000','Koszty zakoñczonych prac rozwojowych','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'002020000','Nabyta warto¶æ firmy','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'002080000','Inne warto¶ci niematerialne i prawne','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'002090000','Zaliczki na warto¶ci niematerialne i prawne','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003000000','D³ugoterminowe aktywa finansowe','A','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'003010000','W jednostkach powi±zanych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003010100','Udzia³y lub akcje','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003010200','Inne papiery warto¶ciowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003010300','Udzielone porzyczki','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'003010400','Inne d³ugoterminowe aktywa finansowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003020000','W pozosta³ych jednostkach','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003020100','Udzia³y lub akcje','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003020200','Inne papiery warto¶ciowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003020300','Udzielone po¿yczki','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003020400','Inne d³ugoterminowe aktywa finansowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003090000','Inne investycje d³ugoterminowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'003090100','Inne rodzaje d³ugoterminowych aktywów finansowych','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'004000000','Investycje w nieruchomo¶ci i prawa','A','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'004010000','Nieruchomo¶ci','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'004020000','Warto¶ci niematerialne i prawne','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'005000000','D³ugoterminowe rozliczenia miêdzyokresowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'005010000','Aktywa z tytu³u odroczonego podatku dochodowego','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'005020000','Inne rozliczenia miêdzyokresowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'006000000','Nale¿no¶ci d³ugoterminowe','A','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'006010000','Od jednostek powi±zanych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'006020000','Od pozosta³ych jednostek','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'007000000','Odpisy umorzeniowe ¶rodków trwa³ych oraz warto¶ci niematerialnych i prawnych','A','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'007010000','Odpisy umorzeniowe warto¶ci gruntów i prawa wieczystego u¿ytkowania gruntów','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'007020000','Odpisy umorzeniowe budynków, lokali i obiektów in¿ynierii l±dowej i wodnej','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'007030000','Odpisy umorzeniowe urz±dzeñ technicznych i maszyn','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'007040000','Odpisy umorzeniowe ¶rodków transportu','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'007050000','Odpisy umorzeniowe ulepszeñ obcych ¶rodków trwa³ych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'007090000','Odpisy umorzeniowe innych ¶rodków trwa³ych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'008000000','¦rodki trwa³e w budowie','A','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'008010000','Inwestycje budowy ¶rodka trwa³ego','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'008020000','Ulepszenia ¶rodka trwa³ego','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'008030000','Nak³ady na budowê ¶rodka trwa³ego','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'008040000','Zaliczki na ¶rodki trwa³e w budowie','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'008050000','Ulepszenia obcych ¶rodków trwa³ych','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'009000000','Odpisy aktualizuj±ce d³ugoterminowe aktywa finansowe','A','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'009010000','Odpisy aktualizuj±ce udzia³y i akcje w obcych jednostkach','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'009020000','Odpisy aktualizuj±ce lokaty','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'009030000','Odpisy aktualizuj±ce udzielone porzyczki d³ugoterminowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'009090000','Odpisy aktualizuj±ce inne rodzaje d³ugoterminowych aktywów finansowych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account_heading_save(NULL,'100000000','¦rodki pieniê¿ne, rachunki bankowe oraz inne krótkoterminowe aktywa finansowe', NULL);
SELECT account__save(NULL,'110000000','¦rodki pieniê¿ne w kasie','A','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'110010000','Kasa krajowych ¶rodków pieniê¿nych','A','', NULL, false, false, string_to_array('AR_paid:AP_paid', ':'), false, false);
SELECT account__save(NULL,'110020000','Kasa zagranicznych ¶rodków pieniê¿nych','A','', NULL, false, false, string_to_array('AR_paid:AP_paid', ':'), false, false);
SELECT account__save(NULL,'113000000','Rachunki i kredyty bankowe','A','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'113010000','Rachunek bie¿±cy','A','', NULL, false, false, string_to_array('AR_paid:AP_paid', ':'), false, false);
SELECT account__save(NULL,'113020000','Rachunek ¶rodków wyodrêbnionych i zablokowanych','A','', NULL, false, false, string_to_array('AR_paid:AP_paid', ':'), false, false);
SELECT account__save(NULL,'113030000','Rachunki kredytów bankowych','A','', NULL, false, false, string_to_array('AR_paid:AP_amount:AP_paid', ':'), false, false);
SELECT account__save(NULL,'113040000','Rachunek ¶rodków walutowych','A','', NULL, false, false, string_to_array('AR_paid:AP_paid', ':'), false, false);
SELECT account__save(NULL,'114000000','Krótkoterminowe aktywa finansowe','A','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'114010000','Krótkoterminowe aktywa finansowe w jednostkach powi±zanych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'114010100','Udzia³y lub akcje','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'114010200','Inne papiery warto¶ciowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'114010300','Udzielone po¿yczki','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'114010400','Inne krótkoterminowe aktywa finansowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'114020000','Krótkoterminowe aktywa finansowe w pozosta³ych jednostkach','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'114020100','Udzia³y lub akcje','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'114020200','Inne papiery warto¶ciowe','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'114020400','Inne krótkoterminowe aktywa finansowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'115000000','Inne ¶rodki pieniê¿ne','A','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'116000000','Inne aktywa pieniê¿ne','A','', NULL, false, false, string_to_array('AR_paid:AP_paid', ':'), false, false);
SELECT account__save(NULL,'117000000','Inne inwestycje krótkoterminowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'118000000','Krótkoterminowe rozliczenia miêdzyokresowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account_heading_save(NULL,'200000000','Rozrachunki i roszczenia', NULL);
SELECT account__save(NULL,'220000000','Nale¿no¶ci krótkoterminowe','L','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'220010000','Nale¿no¶ci od jednostek powi±zanych','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'220010100','Nale¿no¶ci z tytu³u dostaw i us³ug','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'220010110','Nale¿no¶ci z tytu³u dostaw i us³ug, o okresie sp³aty do 12 miesiêcy','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'220010120','Nale¿no¶ci z tytu³u dostaw i us³ug, o okresie sp³aty powy¿ej 12 miesiêcy','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'220010200','Inne nale¿no¶ci','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'220010210','Zobowi±zania z tytu³u pokrycia kosztów ogólnego zarz±du','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'220010220','Zobowi±zania z tytu³u rozliczeñ VAT','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'221010000','Nale¿no¶ci od pozosta³ych jednostek','L','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'221020100','Nale¿no¶ci z tytu³u dostaw i us³ug','L','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'221020110','Nale¿no¶ci z tytu³u dostaw i us³ug, o okresie sp³aty do 12 miesiêcy','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'221020120','Nale¿no¶ci z tytu³u dostaw i us³ug, o okresie sp³aty powy¿ej 12 miesiêcy','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'221020200','Nale¿no¶ci z tytu³u podatków, dotacji, ce³, ubezpieczeñ spo³ecznych i zdrowotnych oraz innych ¶wiadczeñ','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'221020300','Zaliczki przekazane dostawcom','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'221020400','Nale¿no¶ci dochodzone na drodze s±dowej','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'221020500','Inne nale¿no¶ci','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'222000000','Zobowi±zania krótkoterminowe','L','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'222010000','Zobowi±zania wobec jednostek powiazanych','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'222010100','Zobowi±zania z tytu³u dostaw i us³ug','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'222010200','Zobowi±zania o okresie wymagalno¶ci do 12 miesiêcy','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'222010300','Zobowi±zania o okresie wymagalno¶ci powy¿ej 12 miesiêcy','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'222010400','Inne zobowi±zania','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'222020000','Zobowi±zania wobec pozosta³ych jednostek','L','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'222020100','Kredyty i po¿yczki','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'222020200','Zobowi±zania z tytu³u emisji d³u¿nych papierów warto¶ciowych','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'222020300','Inne zobowi±zania finasowe','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'222020400','Zobowiazania z tytu³u dostaw i us³ug','L','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'222020500','Zobowi±zania o okresie wymagalno¶ci do 12 miesiêcy ','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'222020600','Zobowi±zania o okresie wymagalno¶ci powy¿ej 12 miesiêy','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'222020700','Zaliczki otrzmane na dostawy','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'222020800','Zobowi±zania wekslowe','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'222020900','Zobowi±zania z tytu³u podatków, ce³, ubezpieczeñ i innych ¶wiadczeñ','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'222021000','Zobowi±zania z tytu³u wynagrodzeñ','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'222021100','Inne zobowi±zania','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'223000000','Rozrachunki publicznoprawne','L','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'223010000','Rozrachunki z urzêdem skarbowym z tytu³u VAT','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'223020000','Rozliczenie nale¿nego VAT','L','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'223020100','Rozliczenie nale¿nego VAT-22%','L','', NULL, false, false, string_to_array('AR_tax:IC_taxpart:IC_taxservice', ':'), false, false);
SELECT account__save(NULL,'223020200','Rozliczenie nale¿nego VAT-7%','L','', NULL, false, false, string_to_array('AR_tax:IC_taxpart:IC_taxservice', ':'), false, false);
SELECT account__save(NULL,'223020300','Rozliczenie nale¿nego VAT-0%','L','', NULL, false, false, string_to_array('AR_tax:IC_taxpart:IC_taxservice', ':'), false, false);
SELECT account__save(NULL,'223030000','Rozliczenie naliczonego VAT','L','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'223030100','Rozliczenie naliczonego VAT-22%','L','', NULL, false, false, string_to_array('AP_tax:IC_taxpart:IC_taxservice', ':'), false, false);
SELECT account__save(NULL,'223030200','Rozliczenie naliczonego VAT-7%','L','', NULL, false, false, string_to_array('AP_tax:IC_taxpart:IC_taxservice', ':'), false, false);
SELECT account__save(NULL,'223030300','Rozliczenie naliczonego VAT-0%','L','', NULL, false, false, string_to_array('AP_tax:IC_taxpart:IC_taxservice', ':'), false, false);
SELECT account__save(NULL,'223040000','Korekty naliczonego VAT','L','', NULL, false, false, string_to_array('AP_paid', ':'), false, false);
SELECT account__save(NULL,'223050000','Rozrachunki z Urzêdem Celnym','L','', NULL, false, false, string_to_array('AP_paid', ':'), false, false);
SELECT account__save(NULL,'223060000','Rozrachunki z Urzêdem Skarbowym z tytu³u znaków akcyzy','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'223070000','Rozrachunki z Urzêdem Skarbowym z tytu³u podatku akcyzowego','L','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'223080000','Rozliczenie znaków akcyzy','L','', NULL, false, false, string_to_array('AP_paid', ':'), false, false);
SELECT account__save(NULL,'223090000','Rozrachunki z ZUS','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'223100000','Rozrachunki z Urzêdem Skarbowym z tytu³u podatku dochodowego od osób prawnych','L','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'224000000','Rozrachunki z pracownikami','L','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'224010000','Rozrachunki z tytu³u wynagrodzeñ','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'224020000','Rozrachunki z tytu³u po¿yczek udzielonych pracownikom','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'224090000','Inne rozrachunki z pracownikami','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225000000','Zobowi±zania d³ugoterminowe','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225010000','Zobowi±zania wobec jednostek powi±zanych','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225010100','Zobowi±zania z tytu³u wyodrêbnienia sk³adników maj±tkowych','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225010200','Zobowi±zania z tytu³u podzia³u zysku','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225020000','Zobowi±zania wobec pozosta³ych jednostek','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225020100','Kredyty i po¿yczki otrzymane','L','', NULL, false, false, string_to_array('AR_amount:AP_amount', ':'), false, false);
SELECT account__save(NULL,'225020200','Kredyty i po¿yczki udzielone','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225020300','Zobowi±zania z tytu³u emisji d³u¿nych papierów warto¶ciowych','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225020400','Inne zobowi±zania kredytowe','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225020500','Inne zobowi±zania','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225030000','Rozrachunki z tytu³u wp³at na kapita³ zak³adowy','L','', NULL, false, false, string_to_array('AR_amount:AP_amount', ':'), false, false);
SELECT account__save(NULL,'225040000','Rozrachunki z tytu³u wk³adów niepieniê¿nych na kapita³ zak³adowy','L','', NULL, false, false, string_to_array('AR_amount:AP_amount', ':'), false, false);
SELECT account__save(NULL,'225050000','Rozrachunki z tytu³u podwy¿szenia kapita³u ze ¶rodków w³asnych spó³ki','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225060000','Rozrachunki z tytu³u umorzenia udzia³ów w³asnych','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225070000','Rozrachunki z tytu³u dywident','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225080000','Rozrachunki z tytu³u dop³at i zwrotu dop³at','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'225090000','Pozosta³e rozrachunki ze wspólnikami','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'229000000','Odpisy aktualizuj±ce rozrachunki','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account_heading_save(NULL,'300000000','Materia³y i towary', NULL);
SELECT account__save(NULL,'330000000','Rozliczenie zakupu','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'330010000','Rozliczenie warto¶ci materia³ów i towarów w drodze','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'330020000','Warto¶ci dostaw niefakturowanych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'330030000','Przychody wszelkich dostaw i us³ug i ich rozliczanie','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'330040000','Odhylenia cen ewidencyjnych od rzeczywistych cen nabycia lub zakupu','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'330050000','Koszty zakupu zawarte w fakturach dostawców','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'330060000','Op³aty manipulacyjne policzone przez Urz±d Celny','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'330070000','Niedobory, szkody i nadwy¿ki w transporcie','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'330080000','Znaki akcyzy wed³ug dokumentu SAD','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'330090000','Reklamacje faktur dostawców','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'331000000','Materia³y','A','', NULL, false, false, string_to_array('IC', ':'), false, false);
SELECT account__save(NULL,'331010000','Materia³y w magazynach w³asnych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'331020000','Materia³y w magazynach obcych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'331030000','Materia³y w przerobie','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'333000000','Towary','A','', NULL, false, false, string_to_array('IC', ':'), false, false);
SELECT account__save(NULL,'333010000','Towary w magazynach w³asnych','A','', NULL, false, false, string_to_array('IC_sale', ':'), false, false);
SELECT account__save(NULL,'333020000','Towary w magazynach obcych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'333030000','Towary w detalu','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'334000000','Odchylenia od cen ewidencyjnych materia³ów i towarów','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'334010000','Odpisy aktualizuj±ce warto¶æ materia³ów','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'334020000','Odpisy aktualizuj±ce warto¶æ towarów','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account_heading_save(NULL,'400000000','Koszty wed³ug rodzajów i ich rozliczeñ', NULL);
SELECT account__save(NULL,'440000000','Koszty wed³ug rodzajów','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'440010000','Zu¿ycie materia³ów i energii','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440010100','Zu¿ycie materia³ów biurowych','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440020000','Us³ugi obce','E','', NULL, false, false, string_to_array('AP_amount:IC_expense', ':'), false, false);
SELECT account__save(NULL,'440020100','Us³ugi celne','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440020200','Us³ugi telekomunikacyjne','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440020300','Us³ugi pocztowe','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440020400','Us³ugi kurierskie i transportowe','E','', NULL, false, false, string_to_array('AP_amount:IC_cogs', ':'), false, false);
SELECT account__save(NULL,'440020500','Analizy sanitarne','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440020600','Us³ugi graficzne i drukarskie','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440030000','Podatki i op³aty','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440030100','Op³aty i prowizje bankowe','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440030200','Op³aty s±dowe, prawnicze i notarialne','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440030300','Op³aty skarbowe','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440030400','Koncesje','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'440040000','Wynagrodzenia za pracê','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'441000000','¦wiadczenia na rzecz pracowników','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'442000000','Amortyzacja','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'443000000','Pozosta³e','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'449000000','Rozliczenie kosztów','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'449010000','Nie podlegaj±ce rozliczeniu w czasie','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'449020000','Przypadaj±ce na przysz³e okresy','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'449030000','Koszty zgromadzone','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'449040000','Koszty nie wliczane do warto¶ci sprzeda¿y','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account_heading_save(NULL,'500000000','Koszty wed³ug typów dzia³alno¶ci i ich rozliczenie', NULL);
SELECT account__save(NULL,'550000000','Koszty dzia³alno¶ci podstawowej-produkcyjnej','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'550010000','Rozliczone koszta dzia³alno¶ci','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'550020000','Koszty nie zakoñczonych d³ugotrwa³ych us³ug','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'550030000','Straty zwi±zane z wykonaniem d³ugotrwa³ych us³ug','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'552000000','Koszty dzia³alno¶ci podstawowej-handlowej','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'552010000','Koszty utrzymania punktów sprzeda¼y detalicznej','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'550200000','Koszty utrzymania hurtowni','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'552030000','Koszty sprzeda¿y wyrobów','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'552040000','Podatek akcyzowy','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'552050000','Op³aty celne','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'553000000','Koszty dzia³alno¶ci pomocniczej','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'553010000','¦wiadczenia us³ug transportowych','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'555000000','Koszty zarz±du','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'555010000','Koszty zarz±dzania jednostk±','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'555020000','¦wiadczenia us³ug na potrzeby reprezentacji i reklamy','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'558000000','Rozliczenie kosztów dzia³alno¶ci','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account_heading_save(NULL,'600000000','Produkty i rozliczenia miêdzyokresowe', NULL);
SELECT account__save(NULL,'660000000','Pó³produkty i produkty w toku','A','', NULL, false, false, string_to_array('IC', ':'), false, false);
SELECT account__save(NULL,'661000000','Produkty gotowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'661010000','Wyroby gotowe','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'661020000','Wyroby poza jednostk±','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'662000000','Odchylenia od cen ewidencyjnych produktów','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'662010000','Odchylenia od cen evidencyjnych wyrobów gotowych','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'662020000','Odhylenia od cen evidencyjnych pó³fabrykatów','A','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'664000000','Rozliczenia miêdzyokresowe kosztów','L','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'664010000','Czynne rozliczenia miêdzyokresowe kosztów','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'664020000','Bierne rozliczenia miêdzyokresowe kosztów','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'665000000','Pozosta³e rozliczenia miêdzyokresowe','L','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'665010000','Czynne rozliczenia przysz³ych okresów','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'665020000','Bierne rozliczenia przysz³ych okresów','L','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account_heading_save(NULL,'700000000','Przychody i koszty zwi±zane z ich osi±gniêciem', NULL);
SELECT account__save(NULL,'770000000','Sprzeda¿ produktów','I','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'770010000','Sprzeda¿ produktów na kraj','I','', NULL, false, false, string_to_array('AR_amount:IC_sale', ':'), false, false);
SELECT account__save(NULL,'770020000','Sprzeda¿ produktów na eksport','I','', NULL, false, false, string_to_array('AR_amount:IC_sale', ':'), false, false);
SELECT account__save(NULL,'770030000','Sprzeda¿ us³ug na kraj','I','', NULL, false, false, string_to_array('AR_amount:IC_income', ':'), false, false);
SELECT account__save(NULL,'770040000','Sprzeda¿ us³ug na eksport','I','', NULL, false, false, string_to_array('AR_amount:IC_income', ':'), false, false);
SELECT account__save(NULL,'770100000','Koszty sprzedanych produktów','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'770110000','Koszt w³asny sprzeda¿y produktów na kraj','E','', NULL, false, false, string_to_array('IC_cogs', ':'), false, false);
SELECT account__save(NULL,'770120000','Koszt w³asny sprzeda¿y produktów na eksport','E','', NULL, false, false, string_to_array('IC_cogs', ':'), false, false);
SELECT account__save(NULL,'770130000','Koszt w³asny sprzeda¿y us³ug na kraj','E','', NULL, false, false, string_to_array('IC_expense', ':'), false, false);
SELECT account__save(NULL,'770140000','Koszt w³asny sprzeda¿y us³ug na export','E','', NULL, false, false, string_to_array('IC_expense', ':'), false, false);
SELECT account__save(NULL,'773000000','Sprzeda¿ towarów','I','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'773010000','Sprzeda¿ hurtowa towarów','I','', NULL, false, false, string_to_array('AR_amount:IC_sale', ':'), false, false);
SELECT account__save(NULL,'773020000','Sprzeda¿ detaliczna towarów','I','', NULL, false, false, string_to_array('AR_amount:IC_sale', ':'), false, false);
SELECT account__save(NULL,'773030000','Sprzeda¿ wysy³kowa towarów','I','', NULL, false, false, string_to_array('AR_amount:IC_sale', ':'), false, false);
SELECT account__save(NULL,'773040000','Prowizja komisowa','I','', NULL, false, false, string_to_array('AR_amount:IC_income', ':'), false, false);
SELECT account__save(NULL,'773100000','Warto¶æ sprzedanych towarów w cenach zakupu','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'773110000','Warto¶æ sprzedanych towarów w sprzeda¿y hurtowej','E','', NULL, false, false, string_to_array('IC_cogs', ':'), false, false);
SELECT account__save(NULL,'773120000','Warto¶æ sprzedanych towarów w sprzeda¿y detalicznej','E','', NULL, false, false, string_to_array('IC_cogs', ':'), false, false);
SELECT account__save(NULL,'773130000','Warto¶æ sprzedanych towarów w sprzeda¿y wysy³kowej','E','', NULL, false, false, string_to_array('IC_cogs', ':'), false, false);
SELECT account__save(NULL,'773140000','Prowizja komisowa','E','', NULL, false, false, string_to_array('AP_amount:IC_expense', ':'), false, false);
SELECT account__save(NULL,'774000000','Sprzeda¿ materia³ów','I','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'774010000','Materia³y','I','', NULL, false, false, string_to_array('AP_amount:IC_sale', ':'), false, false);
SELECT account__save(NULL,'774020000','Opakowania','I','', NULL, false, false, string_to_array('AR_amount:IC_sale', ':'), false, false);
SELECT account__save(NULL,'774030000','Odpady','I','', NULL, false, false, string_to_array('AR_amount:IC_sale', ':'), false, false);
SELECT account__save(NULL,'774100000','Warto¶æ sprzedanych materia³ów','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'774110000','Warto¶æ w cenach zakupu sprzedanych materia³ów','E','', NULL, false, false, string_to_array('IC_cogs', ':'), false, false);
SELECT account__save(NULL,'774120000','Warto¶æ w cenach zakupu sprzedanych opakowañ','E','', NULL, false, false, string_to_array('IC_cogs', ':'), false, false);
SELECT account__save(NULL,'774130000','Warto¶æ w cenach zakupu sprzedanych odpadów','E','', NULL, false, false, string_to_array('IC_cogs', ':'), false, false);
SELECT account__save(NULL,'775000000','Przychody finansowe','I','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'775010000','Kwoty nale¿ne ze sprzeda¿y aktywów finansowych','I','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'775020000','Kwoty nale¿ne z tytu³u dywident','I','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'775030000','Otrzymane odsetki','I','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'775040000','Przychody ze zbycia investycji','I','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'775050000','Aktualizacja warto¶ci investycji-przychody','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'775060000','Dodatnie ró¿nice kursu walut','I','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'775070000','Pozosta³e przychody finansowe','I','', NULL, false, false, string_to_array('AR_amount', ':'), false, false);
SELECT account__save(NULL,'775100000','Koszty finansowe','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'775110000','Warto¶æ sprzedanych investycji','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'775120000','Odpisy z tytu³u utraty warto¶ci investycji-koszty','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'775130000','Odsetki zap³acone','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'775140000','Ujemne ró¿nice kursu walut','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'775190000','Pozosta³e koszty finansowe','E','', NULL, false, false, string_to_array('AP_amount', ':'), false, false);
SELECT account__save(NULL,'776000000','Pozosta³e przychody operacyjne','I','', NULL, false, false, string_to_array('AR', ':'), false, false);
SELECT account__save(NULL,'776010000','Przychody ze zbycia niefinansowych aktywów trwa³ych','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'776020000','Otrzymane dotacje','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'776030000','Przychody z us³ug socjalnych','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'776040000','Przychody ze wzrostu warto¶ci niefinansowych aktywów trwa³ych','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'776090000','Inne pozosta³e przychody operacyjne','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'776100000','Pozosta³e koszty operacyjne','E','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'776110000','Warto¶æ sprzedanych niefinansowych aktywów trwa³ych','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'776120000','Dotacje przekazane','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'776130000','Odpisy z tytu³u utraty warto¶ci aktywów niefinansowych','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'776140000','Inne pozosta³e koszty operacyjne','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'777000000','Zyski nadzwyczajne','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'777100000','Straty nadzwyczajne','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779000000','Obroty wewnêtrzne','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779010000','Koszt wyrobów w³asnej produkcji wydanych do w³asnych sklepów','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779020000','¦wiadczenia na rzecz ¶rodków trwa³ych w budowie','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779040000','Koszt niedoborów produktów','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779050000','Koszt zaniechania okre¶lonego rodzaju dzia³alno¶ci','I','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779100000','Koszt obrotów wewnêtrznych','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779110000','Koszt wytworzenia wyrobów gotowych wydanych do w³asnych sklepów','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779120000','Koszt wytworzenia ¶wiadczeñ na rzecz ¶rodków trwa³ych w budowie','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779130000','Koszt wytworzenia zakoñczonych prac rozwojowych','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779140000','Koszt wytworzenia produktów uznanych za niedobory','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'779150000','Koszt zaniechania okre¶lonego rodzaju dzia³alno¶ci','E','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account_heading_save(NULL,'800000000','Kapita³y w³asne i wynik finansowy', NULL);
SELECT account__save(NULL,'880000000','Kapita³ podstawowy','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'880010000','Kapita³ zak³adowy','Q','', NULL, false, false, string_to_array('AP', ':'), false, false);
SELECT account__save(NULL,'881000000','Fundusze wydzielone jednostkom zale¿nym','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'882000000','Nale¿ne wp³aty na kapita³ podstawowy','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'883000000','Fundusze wydzielone jednostkom zale¿nym','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'884000000','Kapita³ zapasowy','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'885000000','Kapita³ rezerwowy','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'886000000','Kapita³ z aktualizacji wyceny','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'887000000','Rozliczenia wyniku finansowego','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'888000000','Rezerwy','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'888010000','Rezerwa z tytu³u odroczonego podatku dochodowego','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'888020000','Rezerwa na ¶wiadczenia','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'888020100','Rezerwa d³ugoterminowa na ¶wiadczenia emerytalne i podobne','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'888020200','Rezerwa krótkoterminowa na ¶wiadczenia emerytalne i podobne','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'889090000','Pozosta³e rezerwy','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'889090100','Pozosta³e rezerwy d³ugoterminowe','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'889090200','Pozosta³e rezerwy krótkoterminowe','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'890000000','Rozliczenia miêdzyokresowe','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'890010000','Ujemna warto¶æ firmy','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'890020000','Inne rozliczenia miêdzyokresowe','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'890020100','Inne rozliczenia miêdzyokresowe d³ugoterminowe','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'890020200','Inne rozliczenia miêdzyokresowe krótkoterminowe','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'891000000','Fundusze specjalne','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'892000000','Wynik finansowy','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'893000000','Odpisy z zysku netto w ci±gu roku obrotowego','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'893010000','Podatek dochodowy','Q','', NULL, false, false, string_to_array('', ':'), false, false);
SELECT account__save(NULL,'893020000','Inne obowi±zkowe obci±¿enia wyniku finansowego','Q','', NULL, false, false, string_to_array('', ':'), false, false);

SELECT cr_coa_to_account_save(accno, accno || '--' || description)
FROM account WHERE id IN (select account_id FROM account_link
                           WHERE description = 'AP_paid');
--
insert into tax (chart_id,rate) values ((select id from account where accno = '223020100'),0.22);
insert into tax (chart_id,rate) values ((select id from account where accno = '223020200'),0.07);
insert into tax (chart_id,rate) values ((select id from account where accno = '223020300'),0);
insert into tax (chart_id,rate) values ((select id from account where accno = '223030100'),0.22);
insert into tax (chart_id,rate) values ((select id from account where accno = '223030200'),0.07);
insert into tax (chart_id,rate) values ((select id from account where accno = '223030300'),0);
--
INSERT INTO defaults (setting_key, value) VALUES ('inventory_accno_id', (select id from account where accno = '333000000'));

 INSERT INTO defaults (setting_key, value) VALUES ('income_accno_id', (select id from account where accno = '773010000'));

 INSERT INTO defaults (setting_key, value) VALUES ('expense_accno_id', (select id from account where accno = '773110000'));

 INSERT INTO defaults (setting_key, value) VALUES ('fxgain_accno_id', (select id from account where accno = '775060000'));

INSERT INTO defaults (setting_key, value) VALUES ('fxloss_accno_id', (select id from account where accno = '775140000'));

INSERT INTO defaults (setting_key, value) VALUES ('invnumber', '1000');
INSERT INTO defaults (setting_key, value) VALUES ('curr', 'PLN:USD:EUR');
INSERT INTO defaults (setting_key, value) VALUES ('weightunit', 'kg');

UPDATE defaults SET value = '1000' WHERE setting_key = 'sonumber';
UPDATE defaults SET value = '1000' WHERE setting_key = 'ponumber';
--


commit;
UPDATE account
   SET tax = true
WHERE id
   IN (SELECT account_id
       FROM account_link
       WHERE description LIKE '%_tax');

