ekwo-os 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/README.md +873 -0
  2. package/dist/args.d.ts +57 -0
  3. package/dist/args.d.ts.map +1 -0
  4. package/dist/args.js +134 -0
  5. package/dist/args.js.map +1 -0
  6. package/dist/assets/expected-objects.json +9432 -0
  7. package/dist/assets/migrations/20260911120000_core_companies.sql +260 -0
  8. package/dist/assets/migrations/20260911120100_accounts_journals.sql +211 -0
  9. package/dist/assets/migrations/20260911120200_contacts.sql +90 -0
  10. package/dist/assets/migrations/20260911120300_taxes.sql +146 -0
  11. package/dist/assets/migrations/20260911120400_entries.sql +338 -0
  12. package/dist/assets/migrations/20260911120500_documents.sql +279 -0
  13. package/dist/assets/migrations/20260911120600_payments_reconciliation.sql +251 -0
  14. package/dist/assets/migrations/20260911120700_bank.sql +178 -0
  15. package/dist/assets/migrations/20260911120800_analytics_attachments.sql +128 -0
  16. package/dist/assets/migrations/20260911120900_post_document.sql +279 -0
  17. package/dist/assets/migrations/20260911121000_reporting.sql +235 -0
  18. package/dist/assets/migrations/20260911121100_country_templates.sql +226 -0
  19. package/dist/assets/migrations/20260911121200_fec.sql +71 -0
  20. package/dist/assets/migrations/20260911130000_instance.sql +77 -0
  21. package/dist/assets/migrations/20260911130100_instance_members.sql +224 -0
  22. package/dist/assets/migrations/20260911140000_instance_admins.sql +112 -0
  23. package/dist/assets/migrations/20260911160000_tax_posting_templates_unique.sql +17 -0
  24. package/dist/assets/migrations/20260911170000_document_amount_paid.sql +82 -0
  25. package/dist/assets/migrations/20260911173000_post_payment.sql +122 -0
  26. package/dist/assets/migrations/20260911173100_sequence_counters_under_rls.sql +84 -0
  27. package/dist/assets/migrations/20260911183000_country_journal_defaults.sql +143 -0
  28. package/dist/assets/migrations/20260911193853_line_account_defaults.sql +274 -0
  29. package/dist/assets/migrations/20260911195054_products.sql +221 -0
  30. package/dist/assets/migrations/20260911210131_anon_surface.sql +85 -0
  31. package/dist/assets/migrations/20260912074712_country_packs.sql +318 -0
  32. package/dist/assets/migrations/20260912080311_report_code_and_region.sql +198 -0
  33. package/dist/assets/migrations/20260912081014_pack_certification_maintained.sql +31 -0
  34. package/dist/assets/migrations/20260912081015_pack_certification_backfill.sql +16 -0
  35. package/dist/assets/migrations/20260912090407_tax_report_boxes.sql +329 -0
  36. package/dist/assets/migrations/20260912091917_tax_on_base_value.sql +25 -0
  37. package/dist/assets/migrations/20260912091918_tax_engine_columns.sql +776 -0
  38. package/dist/assets/migrations/20260912094412_opening_and_closing.sql +759 -0
  39. package/dist/assets/migrations/20260912095825_charts_of_accounts.sql +326 -0
  40. package/dist/assets/migrations/20260912100412_financial_statements.sql +632 -0
  41. package/dist/assets/migrations/20260912104719_one_formula_evaluator.sql +209 -0
  42. package/dist/assets/migrations/20260912105720_entry_kind_appropriation.sql +26 -0
  43. package/dist/assets/migrations/20260912105721_appropriation_entry_kind.sql +444 -0
  44. package/dist/assets/migrations/20260912111751_document_rules.sql +274 -0
  45. package/dist/assets/migrations/20260912112132_cash_basis_vat_and_fx.sql +1189 -0
  46. package/dist/assets/migrations/20260913074512_modules.sql +493 -0
  47. package/dist/assets/migrations/20260913075903_asset_disposal_roles.sql +47 -0
  48. package/dist/assets/migrations/20260913083216_capabilities.sql +637 -0
  49. package/dist/assets/migrations/20260913083901_company_invitations.sql +262 -0
  50. package/dist/assets/migrations/20260913084402_user_preferences.sql +376 -0
  51. package/dist/assets/migrations/20260913084847_company_profile.sql +261 -0
  52. package/dist/assets/migrations/20260913085436_numbering_reads_the_pack.sql +235 -0
  53. package/dist/assets/migrations/20260913085932_api_keys.sql +303 -0
  54. package/dist/assets/migrations/20260913090216_fiscal_year_bounds.sql +159 -0
  55. package/dist/assets/migrations/20260913092527_entries_import.sql +219 -0
  56. package/dist/assets/migrations/20260913101536_null_safe_guards.sql +188 -0
  57. package/dist/assets/migrations/20260913102115_installer_is_named.sql +462 -0
  58. package/dist/assets/migrations/20260913102758_no_currency_default.sql +138 -0
  59. package/dist/assets/migrations/20260913103355_cash_basis_needs_a_box.sql +453 -0
  60. package/dist/assets/migrations/20260913104014_aged_balance_named_group.sql +79 -0
  61. package/dist/assets/migrations/20260913104232_foreign_key_indexes.sql +144 -0
  62. package/dist/assets/migrations/20260913105120_declared_no_reader.sql +41 -0
  63. package/dist/assets/migrations/20260913111407_pack_languages.sql +223 -0
  64. package/dist/assets/migrations/20260913112233_schema_comments_for_a_reader.sql +27 -0
  65. package/dist/assets/migrations/20260913114535_fec_opening_balances.sql +307 -0
  66. package/dist/assets/migrations/20260914103412_audit_log.sql +509 -0
  67. package/dist/assets/migrations/20260914111907_pack_upgrade.sql +428 -0
  68. package/dist/assets/migrations/20260914120500_rounding_reads_the_currency.sql +206 -0
  69. package/dist/assets/migrations/20260914121200_amounts_round_at_the_currency.sql +2403 -0
  70. package/dist/assets/migrations/20260914134325_schema_version_0_2_0.sql +36 -0
  71. package/dist/assets/migrations/20260914143915_accounts_in_use.sql +428 -0
  72. package/dist/assets/migrations/20260914144731_account_code_frozen.sql +99 -0
  73. package/dist/assets/migrations/20260914151207_schema_grants_its_own_rights.sql +284 -0
  74. package/dist/assets/migrations/20260914152840_pack_upgrade_records_its_own_line.sql +237 -0
  75. package/dist/assets/migrations/20260914163943_declaration_periodicity.sql +349 -0
  76. package/dist/assets/migrations/20260915094000_foreign_services_received.sql +37 -0
  77. package/dist/assets/migrations/20260915094500_mentions_read_a_foreign_service.sql +72 -0
  78. package/dist/assets/migrations/20260915153000_document_shares.sql +568 -0
  79. package/dist/assets/migrations/20260915160000_ec_sales_list.sql +181 -0
  80. package/dist/assets/migrations/20260915161842_pack_sources.sql +56 -0
  81. package/dist/assets/migrations/20260915170500_schema_version_0_3_0.sql +45 -0
  82. package/dist/assets/migrations/20260915174500_a_vat_category_is_a_code.sql +177 -0
  83. package/dist/assets/migrations/20260915180000_document_rule_references.sql +85 -0
  84. package/dist/assets/migrations/20260915181000_territories.sql +342 -0
  85. package/dist/assets/migrations/20260915181500_ec_sales_list_reads_the_territories.sql +222 -0
  86. package/dist/assets/migrations/20260915182000_intracom_triangular.sql +53 -0
  87. package/dist/assets/migrations/20260915182500_a_triangular_supply_says_reverse_charge.sql +99 -0
  88. package/dist/assets/migrations/20260915191200_a_document_knows_its_language.sql +633 -0
  89. package/dist/assets/migrations/20260915195000_a_price_that_holds_its_tax.sql +649 -0
  90. package/dist/assets/migrations/20260915200000_a_posting_names_its_boxes.sql +1004 -0
  91. package/dist/assets/migrations/20260916094500_a_company_files_more_than_one_declaration.sql +795 -0
  92. package/dist/assets/migrations/20260916103000_a_ledger_line_names_its_posting.sql +902 -0
  93. package/dist/assets/migrations/20260916123000_a_vocabulary_for_a_tax_that_is_not_a_vat.sql +144 -0
  94. package/dist/assets/migrations/20260916124000_a_box_can_be_a_rate_of_a_box.sql +525 -0
  95. package/dist/assets/migrations/20260916125000_a_tax_follows_the_territory.sql +1318 -0
  96. package/dist/assets/migrations/20260916126000_a_tax_point_and_its_exception.sql +1211 -0
  97. package/dist/assets/migrations/20260917090000_a_counterparty_that_learns.sql +561 -0
  98. package/dist/assets/migrations/20260917120000_what_the_money_pays.sql +545 -0
  99. package/dist/assets/migrations/20260917150000_a_filing_is_a_row.sql +488 -0
  100. package/dist/assets/migrations/20260917170000_when_it_is_due.sql +194 -0
  101. package/dist/assets/migrations/20260917180000_a_box_is_a_number_and_a_kind.sql +213 -0
  102. package/dist/assets/migrations/20260917190000_what_a_declaration_owes.sql +486 -0
  103. package/dist/assets/migrations/20260917200000_what_moved_after_it_went.sql +227 -0
  104. package/dist/assets/migrations/20260918090000_a_form_names_its_file.sql +27 -0
  105. package/dist/assets/migrations/20260918110000_a_deposit_and_what_came_back.sql +286 -0
  106. package/dist/assets/migrations/20260918113741_a_fourth_preset_is_named.sql +9 -0
  107. package/dist/assets/migrations/20260918113807_a_client_reads_and_hands_over.sql +96 -0
  108. package/dist/assets/migrations/20260918114322_two_definer_functions_check_their_caller.sql +75 -0
  109. package/dist/assets/migrations/20260918130000_every_company_somebody_keeps.sql +177 -0
  110. package/dist/assets/migrations/20260918140000_a_session_nobody_prepared.sql +40 -0
  111. package/dist/assets/migrations/20260918141107_a_line_keeps_the_tax_it_was_posted_with.sql +256 -0
  112. package/dist/assets/migrations/20260918141342_a_company_has_an_electronic_address.sql +66 -0
  113. package/dist/assets/migrations/20260918141605_an_invoice_reads_whole_from_the_views.sql +313 -0
  114. package/dist/assets/migrations/20260918141627_a_policy_asks_once.sql +132 -0
  115. package/dist/assets/migrations/20260918143352_a_suggestion_reads_the_words_once.sql +204 -0
  116. package/dist/assets/migrations/20260918143417_a_reference_of_the_caller_and_a_rehearsal.sql +115 -0
  117. package/dist/assets/migrations/20260918150712_a_company_leaves_with_its_books.sql +1119 -0
  118. package/dist/assets/migrations/20260918150931_a_statement_is_imported_once.sql +654 -0
  119. package/dist/assets/migrations/20260918161204_a_posted_document_does_not_move.sql +437 -0
  120. package/dist/assets/migrations/20260918161538_a_posted_entry_does_not_move.sql +252 -0
  121. package/dist/assets/migrations/20260918171946_an_entry_is_posted_by_post_entry.sql +289 -0
  122. package/dist/assets/migrations/20260918174312_schema_version_0_4_0.sql +53 -0
  123. package/dist/assets/modules/assets/module.json +13 -0
  124. package/dist/assets/modules/assets/supabase/migrations/20260913081447_assets.sql +1190 -0
  125. package/dist/assets/modules/assets/supabase/migrations/20260913104234_foreign_key_indexes.sql +47 -0
  126. package/dist/assets/modules/assets/supabase/migrations/20260913104500_assets_capabilities.sql +145 -0
  127. package/dist/assets/modules/assets/supabase/migrations/20260914122100_assets_round_at_the_currency.sql +564 -0
  128. package/dist/assets/modules/assets/supabase/migrations/20260914145012_assets_accounts_in_use.sql +37 -0
  129. package/dist/assets/modules/assets/supabase/migrations/20260914151530_assets_grants_its_own_rights.sql +63 -0
  130. package/dist/assets/modules/assets/supabase/migrations/20260918113912_assets_client_reads.sql +20 -0
  131. package/dist/assets/modules/assets/supabase/migrations/20260918150801_assets_leave_with_the_company.sql +41 -0
  132. package/dist/assets/modules/budgets/module.json +12 -0
  133. package/dist/assets/modules/budgets/supabase/migrations/20260913083012_budgets.sql +210 -0
  134. package/dist/assets/modules/budgets/supabase/migrations/20260913104233_foreign_key_indexes.sql +37 -0
  135. package/dist/assets/modules/budgets/supabase/migrations/20260913104501_budgets_capabilities.sql +72 -0
  136. package/dist/assets/modules/budgets/supabase/migrations/20260914122400_budgets_round_at_the_currency.sql +68 -0
  137. package/dist/assets/modules/budgets/supabase/migrations/20260914145048_budgets_accounts_in_use.sql +30 -0
  138. package/dist/assets/modules/budgets/supabase/migrations/20260914151812_budgets_grants_its_own_rights.sql +31 -0
  139. package/dist/assets/modules/budgets/supabase/migrations/20260918113954_budgets_client_reads.sql +20 -0
  140. package/dist/assets/modules/budgets/supabase/migrations/20260918150823_budgets_leave_with_the_company.sql +37 -0
  141. package/dist/assets/modules/schema/module.1.json +69 -0
  142. package/dist/assets/seed/00_currencies.sql +15 -0
  143. package/dist/assets/seed/00_territories.sql +280 -0
  144. package/dist/assets/seed/05_framework_generic.sql +110 -0
  145. package/dist/assets/seed/10_pack_be.sql +1284 -0
  146. package/dist/assets/seed/11_pack_fr.sql +1112 -0
  147. package/dist/assets/seed/12_pack_lu.sql +2484 -0
  148. package/dist/assets/seed/13_pack_ee.sql +733 -0
  149. package/dist/assets/seed/14_pack_gb.sql +796 -0
  150. package/dist/assets/seed/15_pack_us.sql +751 -0
  151. package/dist/assets/seed/90_demo_company.sql +368 -0
  152. package/dist/assets/seed/modules/assets/10_pack_be.sql +58 -0
  153. package/dist/assets/seed/modules/assets/11_pack_fr.sql +57 -0
  154. package/dist/assets/seed/modules/assets/14_pack_gb.sql +58 -0
  155. package/dist/assets/seed/modules/assets/15_pack_us.sql +60 -0
  156. package/dist/auth.d.ts +59 -0
  157. package/dist/auth.d.ts.map +1 -0
  158. package/dist/auth.js +134 -0
  159. package/dist/auth.js.map +1 -0
  160. package/dist/bin.d.ts +6 -0
  161. package/dist/bin.d.ts.map +1 -0
  162. package/dist/bin.js +8 -0
  163. package/dist/bin.js.map +1 -0
  164. package/dist/books.d.ts +60 -0
  165. package/dist/books.d.ts.map +1 -0
  166. package/dist/books.js +168 -0
  167. package/dist/books.js.map +1 -0
  168. package/dist/bootstrap.d.ts +236 -0
  169. package/dist/bootstrap.d.ts.map +1 -0
  170. package/dist/bootstrap.js +459 -0
  171. package/dist/bootstrap.js.map +1 -0
  172. package/dist/bundle.d.ts +27 -0
  173. package/dist/bundle.d.ts.map +1 -0
  174. package/dist/bundle.js +47 -0
  175. package/dist/bundle.js.map +1 -0
  176. package/dist/checklist.d.ts +35 -0
  177. package/dist/checklist.d.ts.map +1 -0
  178. package/dist/checklist.js +64 -0
  179. package/dist/checklist.js.map +1 -0
  180. package/dist/cli.d.ts +14 -0
  181. package/dist/cli.d.ts.map +1 -0
  182. package/dist/cli.js +318 -0
  183. package/dist/cli.js.map +1 -0
  184. package/dist/commands/company.d.ts +59 -0
  185. package/dist/commands/company.d.ts.map +1 -0
  186. package/dist/commands/company.js +287 -0
  187. package/dist/commands/company.js.map +1 -0
  188. package/dist/commands/contact.d.ts +9 -0
  189. package/dist/commands/contact.d.ts.map +1 -0
  190. package/dist/commands/contact.js +82 -0
  191. package/dist/commands/contact.js.map +1 -0
  192. package/dist/commands/demo.d.ts +19 -0
  193. package/dist/commands/demo.d.ts.map +1 -0
  194. package/dist/commands/demo.js +72 -0
  195. package/dist/commands/demo.js.map +1 -0
  196. package/dist/commands/doctor.d.ts +12 -0
  197. package/dist/commands/doctor.d.ts.map +1 -0
  198. package/dist/commands/doctor.js +68 -0
  199. package/dist/commands/doctor.js.map +1 -0
  200. package/dist/commands/document.d.ts +17 -0
  201. package/dist/commands/document.d.ts.map +1 -0
  202. package/dist/commands/document.js +217 -0
  203. package/dist/commands/document.js.map +1 -0
  204. package/dist/commands/init.d.ts +31 -0
  205. package/dist/commands/init.d.ts.map +1 -0
  206. package/dist/commands/init.js +535 -0
  207. package/dist/commands/init.js.map +1 -0
  208. package/dist/commands/login.d.ts +24 -0
  209. package/dist/commands/login.d.ts.map +1 -0
  210. package/dist/commands/login.js +128 -0
  211. package/dist/commands/login.js.map +1 -0
  212. package/dist/commands/migrate.d.ts +30 -0
  213. package/dist/commands/migrate.d.ts.map +1 -0
  214. package/dist/commands/migrate.js +115 -0
  215. package/dist/commands/migrate.js.map +1 -0
  216. package/dist/commands/module.d.ts +32 -0
  217. package/dist/commands/module.d.ts.map +1 -0
  218. package/dist/commands/module.js +285 -0
  219. package/dist/commands/module.js.map +1 -0
  220. package/dist/commands/pack.d.ts +22 -0
  221. package/dist/commands/pack.d.ts.map +1 -0
  222. package/dist/commands/pack.js +481 -0
  223. package/dist/commands/pack.js.map +1 -0
  224. package/dist/commands/payment.d.ts +15 -0
  225. package/dist/commands/payment.d.ts.map +1 -0
  226. package/dist/commands/payment.js +97 -0
  227. package/dist/commands/payment.js.map +1 -0
  228. package/dist/commands/register.d.ts +20 -0
  229. package/dist/commands/register.d.ts.map +1 -0
  230. package/dist/commands/register.js +134 -0
  231. package/dist/commands/register.js.map +1 -0
  232. package/dist/commands/status.d.ts +8 -0
  233. package/dist/commands/status.d.ts.map +1 -0
  234. package/dist/commands/status.js +134 -0
  235. package/dist/commands/status.js.map +1 -0
  236. package/dist/commands/whoami.d.ts +21 -0
  237. package/dist/commands/whoami.d.ts.map +1 -0
  238. package/dist/commands/whoami.js +133 -0
  239. package/dist/commands/whoami.js.map +1 -0
  240. package/dist/company.d.ts +16 -0
  241. package/dist/company.d.ts.map +1 -0
  242. package/dist/company.js +26 -0
  243. package/dist/company.js.map +1 -0
  244. package/dist/config.d.ts +24 -0
  245. package/dist/config.d.ts.map +1 -0
  246. package/dist/config.js +50 -0
  247. package/dist/config.js.map +1 -0
  248. package/dist/connection.d.ts +79 -0
  249. package/dist/connection.d.ts.map +1 -0
  250. package/dist/connection.js +116 -0
  251. package/dist/connection.js.map +1 -0
  252. package/dist/context.d.ts +47 -0
  253. package/dist/context.d.ts.map +1 -0
  254. package/dist/context.js +93 -0
  255. package/dist/context.js.map +1 -0
  256. package/dist/doctor.d.ts +45 -0
  257. package/dist/doctor.d.ts.map +1 -0
  258. package/dist/doctor.js +448 -0
  259. package/dist/doctor.js.map +1 -0
  260. package/dist/grants.d.ts +88 -0
  261. package/dist/grants.d.ts.map +1 -0
  262. package/dist/grants.js +174 -0
  263. package/dist/grants.js.map +1 -0
  264. package/dist/identity.d.ts +54 -0
  265. package/dist/identity.d.ts.map +1 -0
  266. package/dist/identity.js +132 -0
  267. package/dist/identity.js.map +1 -0
  268. package/dist/index.d.ts +44 -0
  269. package/dist/index.d.ts.map +1 -0
  270. package/dist/index.js +43 -0
  271. package/dist/index.js.map +1 -0
  272. package/dist/inventory.d.ts +155 -0
  273. package/dist/inventory.d.ts.map +1 -0
  274. package/dist/inventory.js +303 -0
  275. package/dist/inventory.js.map +1 -0
  276. package/dist/migrations.d.ts +76 -0
  277. package/dist/migrations.d.ts.map +1 -0
  278. package/dist/migrations.js +226 -0
  279. package/dist/migrations.js.map +1 -0
  280. package/dist/module/read.d.ts +91 -0
  281. package/dist/module/read.d.ts.map +1 -0
  282. package/dist/module/read.js +172 -0
  283. package/dist/module/read.js.map +1 -0
  284. package/dist/output.d.ts +110 -0
  285. package/dist/output.d.ts.map +1 -0
  286. package/dist/output.js +173 -0
  287. package/dist/output.js.map +1 -0
  288. package/dist/pack/certification.d.ts +27 -0
  289. package/dist/pack/certification.d.ts.map +1 -0
  290. package/dist/pack/certification.js +38 -0
  291. package/dist/pack/certification.js.map +1 -0
  292. package/dist/pack/compile.d.ts +75 -0
  293. package/dist/pack/compile.d.ts.map +1 -0
  294. package/dist/pack/compile.js +801 -0
  295. package/dist/pack/compile.js.map +1 -0
  296. package/dist/pack/filing.d.ts +48 -0
  297. package/dist/pack/filing.d.ts.map +1 -0
  298. package/dist/pack/filing.js +56 -0
  299. package/dist/pack/filing.js.map +1 -0
  300. package/dist/pack/read.d.ts +766 -0
  301. package/dist/pack/read.d.ts.map +1 -0
  302. package/dist/pack/read.js +2336 -0
  303. package/dist/pack/read.js.map +1 -0
  304. package/dist/pack/schema.d.ts +26 -0
  305. package/dist/pack/schema.d.ts.map +1 -0
  306. package/dist/pack/schema.js +181 -0
  307. package/dist/pack/schema.js.map +1 -0
  308. package/dist/pack/territories.d.ts +98 -0
  309. package/dist/pack/territories.d.ts.map +1 -0
  310. package/dist/pack/territories.js +0 -0
  311. package/dist/pack/territories.js.map +1 -0
  312. package/dist/pack/upgrade.d.ts +86 -0
  313. package/dist/pack/upgrade.d.ts.map +1 -0
  314. package/dist/pack/upgrade.js +76 -0
  315. package/dist/pack/upgrade.js.map +1 -0
  316. package/dist/pack/vat-codes.d.ts +273 -0
  317. package/dist/pack/vat-codes.d.ts.map +1 -0
  318. package/dist/pack/vat-codes.js +513 -0
  319. package/dist/pack/vat-codes.js.map +1 -0
  320. package/dist/profiles.d.ts +67 -0
  321. package/dist/profiles.d.ts.map +1 -0
  322. package/dist/profiles.js +187 -0
  323. package/dist/profiles.js.map +1 -0
  324. package/dist/prompt.d.ts +40 -0
  325. package/dist/prompt.d.ts.map +1 -0
  326. package/dist/prompt.js +120 -0
  327. package/dist/prompt.js.map +1 -0
  328. package/dist/registry.d.ts +84 -0
  329. package/dist/registry.d.ts.map +1 -0
  330. package/dist/registry.js +104 -0
  331. package/dist/registry.js.map +1 -0
  332. package/dist/rest.d.ts +81 -0
  333. package/dist/rest.d.ts.map +1 -0
  334. package/dist/rest.js +245 -0
  335. package/dist/rest.js.map +1 -0
  336. package/dist/schema.d.ts +15 -0
  337. package/dist/schema.d.ts.map +1 -0
  338. package/dist/schema.js +15 -0
  339. package/dist/schema.js.map +1 -0
  340. package/dist/seeds.d.ts +27 -0
  341. package/dist/seeds.d.ts.map +1 -0
  342. package/dist/seeds.js +47 -0
  343. package/dist/seeds.js.map +1 -0
  344. package/dist/session.d.ts +39 -0
  345. package/dist/session.d.ts.map +1 -0
  346. package/dist/session.js +92 -0
  347. package/dist/session.js.map +1 -0
  348. package/dist/sql.d.ts +48 -0
  349. package/dist/sql.d.ts.map +1 -0
  350. package/dist/sql.js +112 -0
  351. package/dist/sql.js.map +1 -0
  352. package/dist/status.d.ts +94 -0
  353. package/dist/status.d.ts.map +1 -0
  354. package/dist/status.js +120 -0
  355. package/dist/status.js.map +1 -0
  356. package/dist/ui.d.ts +55 -0
  357. package/dist/ui.d.ts.map +1 -0
  358. package/dist/ui.js +114 -0
  359. package/dist/ui.js.map +1 -0
  360. package/package.json +29 -0
  361. package/schema/output.1.json +613 -0
@@ -0,0 +1,796 @@
1
+ -- Ekwo OS — United Kingdom: chart of accounts, journals, taxes and defaults.
2
+ --
3
+ -- Generated from packs/gb at version 0.7.0, do not edit.
4
+ -- Change the pack and run `ekwo pack build gb`; `ekwo pack check --all`
5
+ -- refuses a seed that is not the exact output of its pack, and the CI runs it.
6
+ --
7
+ -- Community pack — not reviewed.
8
+ -- Written from:
9
+ -- Value Added Tax Act 1994 (The National Archives — legislation.gov.uk)
10
+ -- https://www.legislation.gov.uk/ukpga/1994/23/contents
11
+ -- The Value Added Tax Regulations 1995 (S.I. 1995/2518) (The National Archives — legislation.gov.uk)
12
+ -- https://www.legislation.gov.uk/uksi/1995/2518/contents
13
+ -- The Value Added Tax (Input Tax) Order 1992 (S.I. 1992/3222) (The National Archives — legislation.gov.uk)
14
+ -- https://www.legislation.gov.uk/uksi/1992/3222/contents/made
15
+ -- The Value Added Tax (Section 55A) (Specified Services and Excepted Supplies) Order 2019 (S.I. 2019/892) (The National Archives — legislation.gov.uk)
16
+ -- https://www.legislation.gov.uk/uksi/2019/892/contents/made
17
+ -- The Value Added Tax (Change of Rate) Order 2008 (S.I. 2008/3020) (The National Archives — legislation.gov.uk)
18
+ -- https://www.legislation.gov.uk/uksi/2008/3020/made
19
+ -- Finance Act 2009, section 9 — Value added tax: change of rate (The National Archives — legislation.gov.uk)
20
+ -- https://www.legislation.gov.uk/ukpga/2009/10/section/9
21
+ -- Finance (No. 2) Act 2010, section 3 — Rate of value added tax (The National Archives — legislation.gov.uk)
22
+ -- https://www.legislation.gov.uk/ukpga/2010/31/section/3
23
+ -- The Value Added Tax (Reduced Rate) (Hospitality and Tourism) (Coronavirus) Order 2020 (S.I. 2020/728) (The National Archives — legislation.gov.uk)
24
+ -- https://www.legislation.gov.uk/uksi/2020/728/made
25
+ -- Finance Act 2021, section 92 — Extension of temporary 5% reduced rate for hospitality and tourism sectors (The National Archives — legislation.gov.uk)
26
+ -- https://www.legislation.gov.uk/ukpga/2021/26/section/92
27
+ -- Finance Act 2021, section 93 — Temporary 12.5% reduced rate for hospitality and tourism sectors (The National Archives — legislation.gov.uk)
28
+ -- https://www.legislation.gov.uk/ukpga/2021/26/section/93
29
+ -- Late Payment of Commercial Debts (Interest) Act 1998 (The National Archives — legislation.gov.uk)
30
+ -- https://www.legislation.gov.uk/ukpga/1998/20/contents
31
+ -- Companies Act 2006 (The National Archives — legislation.gov.uk)
32
+ -- https://www.legislation.gov.uk/ukpga/2006/46/contents
33
+ -- The Small Companies and Groups (Accounts and Directors' Report) Regulations 2008 (S.I. 2008/409), Schedule 1 — Companies Act individual accounts: the balance sheet and profit and loss account formats of the small companies regime (The National Archives — legislation.gov.uk)
34
+ -- https://www.legislation.gov.uk/uksi/2008/409/schedule/1
35
+ -- The Large and Medium-sized Companies and Groups (Accounts and Reports) Regulations 2008 (S.I. 2008/410), Schedule 1 — the formats a company outside the small companies regime reports on (The National Archives — legislation.gov.uk)
36
+ -- https://www.legislation.gov.uk/uksi/2008/410/schedule/1
37
+ -- VAT guide (VAT Notice 700) (HM Revenue & Customs)
38
+ -- https://www.gov.uk/guidance/vat-guide-notice-700
39
+ -- How to fill in and submit your VAT Return (VAT Notice 700/12) (HM Revenue & Customs)
40
+ -- https://www.gov.uk/guidance/how-to-fill-in-and-submit-your-vat-return-vat-notice-70012
41
+ -- Record keeping (VAT Notice 700/21) (HM Revenue & Customs)
42
+ -- https://www.gov.uk/guidance/record-keeping-for-vat-notice-70021
43
+ -- VAT Notice 700/22: Making Tax Digital for VAT (HM Revenue & Customs)
44
+ -- https://www.gov.uk/government/publications/vat-notice-70022-making-tax-digital-for-vat/vat-notice-70022-making-tax-digital-for-vat
45
+ -- Rates of VAT on different goods and services (HM Revenue & Customs)
46
+ -- https://www.gov.uk/guidance/rates-of-vat-on-different-goods-and-services
47
+ -- Complete your VAT Return to account for import VAT — postponed VAT accounting (HM Revenue & Customs)
48
+ -- https://www.gov.uk/guidance/complete-your-vat-return-to-account-for-import-vat
49
+ -- VAT domestic reverse charge for building and construction services (HM Revenue & Customs)
50
+ -- https://www.gov.uk/guidance/vat-domestic-reverse-charge-for-building-and-construction-services
51
+ -- VATREC12010 — Rounding on invoices and rounding at retailers: what is the rounding concession? (HM Revenue & Customs — VAT Trader Records manual)
52
+ -- https://www.gov.uk/hmrc-internal-manuals/vat-trader-records/vatrec12010
53
+ -- VATREC12020 — Rounding on invoices and rounding at retailers: rounding at retailers (HM Revenue & Customs — VAT Trader Records manual)
54
+ -- https://www.gov.uk/hmrc-internal-manuals/vat-trader-records/vatrec12020
55
+ -- Promoting electronic invoicing across UK businesses and the public sector — consultation response, 26 November 2025 (HM Revenue & Customs and HM Treasury)
56
+ -- https://www.gov.uk/government/consultations/promoting-electronic-invoicing-across-uk-businesses-and-the-public-sector/outcome/promoting-electronic-invoicing-across-uk-businesses-and-the-public-sector-consultation-response
57
+ -- FRS 102 The Financial Reporting Standard applicable in the UK and Republic of Ireland, September 2024 edition (Financial Reporting Council)
58
+ -- https://www.frc.org.uk/library/standards-codes-policy/accounting-and-reporting/uk-accounting-standards/frs-102/
59
+ -- FRS 105 The Financial Reporting Standard applicable to the Micro-entities Regime, September 2024 edition (Financial Reporting Council)
60
+ -- https://www.frc.org.uk/library/standards-codes-policy/accounting-and-reporting/uk-accounting-standards/frs-105/
61
+ -- Preparing and filing Companies House accounts — Life of a company, part 1: accounts (Companies House)
62
+ -- https://www.gov.uk/government/publications/life-of-a-company-annual-requirements/life-of-a-company-part-1-accounts
63
+ -- Sending a VAT Return — the VAT online account the return is filed through (HM Revenue & Customs)
64
+ -- https://www.gov.uk/submit-vat-return
65
+ -- EN 16931 compliance — the European standard on electronic invoicing under Directive 2014/55/EU (European Commission — Digital Building Blocks)
66
+ -- https://ec.europa.eu/digital-building-blocks/sites/spaces/DIGITAL/pages/467108950/EN+16931+compliance
67
+ -- UNCL5305 — the VAT category code list of EN 16931 (BT-118 and BT-151), as the OpenPEPPOL subset publishes it (OpenPEPPOL — the list itself is published by the European Commission)
68
+ -- https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/
69
+ -- VATEX — the VAT exemption reason code list of EN 16931 (BT-121) (OpenPEPPOL — the list itself is published by the European Commission)
70
+ -- https://docs.peppol.eu/poacc/billing/3.0/codelist/vatex/
71
+ -- Peppol code list of electronic address schemes (ISO 6523 ICD): 0088 Global Location Number, 9932 United Kingdom VAT number (OpenPEPPOL)
72
+ -- https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/
73
+ --
74
+ -- Reference data: `install_country_template()` copies it into a company,
75
+ -- nothing here belongs to a company.
76
+
77
+ insert into country_packs
78
+ (country, name, version, released_at, schema_min, certification_status,
79
+ certified_by, certified_at, checksum, sources)
80
+ values
81
+ ('GB', 'United Kingdom', '0.7.0', date '2026-09-16', '20260917170000', 'community', null, null, 'ceeb54692329bd8dcf310806b9e3c2356d1d6a57def1d59e7f3056592c358116', '[{"key":"vata-1994","title":"Value Added Tax Act 1994","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/ukpga/1994/23/contents","consulted_on":"2026-09-16","kind":"law"},{"key":"vat-regs-1995","title":"The Value Added Tax Regulations 1995 (S.I. 1995/2518)","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/uksi/1995/2518/contents","consulted_on":"2026-09-15","kind":"regulation"},{"key":"input-tax-order-1992","title":"The Value Added Tax (Input Tax) Order 1992 (S.I. 1992/3222)","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/uksi/1992/3222/contents/made","consulted_on":"2026-09-15","kind":"regulation"},{"key":"drc-order-2019","title":"The Value Added Tax (Section 55A) (Specified Services and Excepted Supplies) Order 2019 (S.I. 2019/892)","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/uksi/2019/892/contents/made","consulted_on":"2026-09-15","kind":"regulation"},{"key":"rate-order-2008","title":"The Value Added Tax (Change of Rate) Order 2008 (S.I. 2008/3020)","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/uksi/2008/3020/made","consulted_on":"2026-09-15","kind":"regulation"},{"key":"fa-2009-s9","title":"Finance Act 2009, section 9 — Value added tax: change of rate","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/ukpga/2009/10/section/9","consulted_on":"2026-09-15","kind":"law"},{"key":"fa2-2010-s3","title":"Finance (No. 2) Act 2010, section 3 — Rate of value added tax","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/ukpga/2010/31/section/3","consulted_on":"2026-09-15","kind":"law"},{"key":"hospitality-order-2020","title":"The Value Added Tax (Reduced Rate) (Hospitality and Tourism) (Coronavirus) Order 2020 (S.I. 2020/728)","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/uksi/2020/728/made","consulted_on":"2026-09-15","kind":"regulation"},{"key":"fa-2021-s92","title":"Finance Act 2021, section 92 — Extension of temporary 5% reduced rate for hospitality and tourism sectors","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/ukpga/2021/26/section/92","consulted_on":"2026-09-15","kind":"law"},{"key":"fa-2021-s93","title":"Finance Act 2021, section 93 — Temporary 12.5% reduced rate for hospitality and tourism sectors","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/ukpga/2021/26/section/93","consulted_on":"2026-09-15","kind":"law"},{"key":"lpcd-1998","title":"Late Payment of Commercial Debts (Interest) Act 1998","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/ukpga/1998/20/contents","consulted_on":"2026-09-15","kind":"law"},{"key":"ca-2006","title":"Companies Act 2006","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/ukpga/2006/46/contents","consulted_on":"2026-09-15","kind":"law"},{"key":"small-companies-regs","title":"The Small Companies and Groups (Accounts and Directors'' Report) Regulations 2008 (S.I. 2008/409), Schedule 1 — Companies Act individual accounts: the balance sheet and profit and loss account formats of the small companies regime","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/uksi/2008/409/schedule/1","consulted_on":"2026-09-15","kind":"regulation"},{"key":"large-medium-regs","title":"The Large and Medium-sized Companies and Groups (Accounts and Reports) Regulations 2008 (S.I. 2008/410), Schedule 1 — the formats a company outside the small companies regime reports on","publisher":"The National Archives — legislation.gov.uk","url":"https://www.legislation.gov.uk/uksi/2008/410/schedule/1","consulted_on":"2026-09-15","kind":"regulation"},{"key":"notice-700","title":"VAT guide (VAT Notice 700)","publisher":"HM Revenue & Customs","url":"https://www.gov.uk/guidance/vat-guide-notice-700","consulted_on":"2026-09-15","kind":"guidance"},{"key":"notice-700-12","title":"How to fill in and submit your VAT Return (VAT Notice 700/12)","publisher":"HM Revenue & Customs","url":"https://www.gov.uk/guidance/how-to-fill-in-and-submit-your-vat-return-vat-notice-70012","consulted_on":"2026-09-15","kind":"form"},{"key":"notice-700-21","title":"Record keeping (VAT Notice 700/21)","publisher":"HM Revenue & Customs","url":"https://www.gov.uk/guidance/record-keeping-for-vat-notice-70021","consulted_on":"2026-09-15","kind":"guidance"},{"key":"notice-700-22","title":"VAT Notice 700/22: Making Tax Digital for VAT","publisher":"HM Revenue & Customs","url":"https://www.gov.uk/government/publications/vat-notice-70022-making-tax-digital-for-vat/vat-notice-70022-making-tax-digital-for-vat","consulted_on":"2026-09-15","kind":"guidance"},{"key":"vat-rates","title":"Rates of VAT on different goods and services","publisher":"HM Revenue & Customs","url":"https://www.gov.uk/guidance/rates-of-vat-on-different-goods-and-services","consulted_on":"2026-09-15","kind":"guidance"},{"key":"pva-guidance","title":"Complete your VAT Return to account for import VAT — postponed VAT accounting","publisher":"HM Revenue & Customs","url":"https://www.gov.uk/guidance/complete-your-vat-return-to-account-for-import-vat","consulted_on":"2026-09-15","kind":"guidance"},{"key":"drc-guidance","title":"VAT domestic reverse charge for building and construction services","publisher":"HM Revenue & Customs","url":"https://www.gov.uk/guidance/vat-domestic-reverse-charge-for-building-and-construction-services","consulted_on":"2026-09-15","kind":"guidance"},{"key":"vatrec-12010","title":"VATREC12010 — Rounding on invoices and rounding at retailers: what is the rounding concession?","publisher":"HM Revenue & Customs — VAT Trader Records manual","url":"https://www.gov.uk/hmrc-internal-manuals/vat-trader-records/vatrec12010","consulted_on":"2026-09-15","kind":"guidance"},{"key":"vatrec-12020","title":"VATREC12020 — Rounding on invoices and rounding at retailers: rounding at retailers","publisher":"HM Revenue & Customs — VAT Trader Records manual","url":"https://www.gov.uk/hmrc-internal-manuals/vat-trader-records/vatrec12020","consulted_on":"2026-09-15","kind":"guidance"},{"key":"einvoicing-response","title":"Promoting electronic invoicing across UK businesses and the public sector — consultation response, 26 November 2025","publisher":"HM Revenue & Customs and HM Treasury","url":"https://www.gov.uk/government/consultations/promoting-electronic-invoicing-across-uk-businesses-and-the-public-sector/outcome/promoting-electronic-invoicing-across-uk-businesses-and-the-public-sector-consultation-response","consulted_on":"2026-09-15","kind":"guidance"},{"key":"frs-102","title":"FRS 102 The Financial Reporting Standard applicable in the UK and Republic of Ireland, September 2024 edition","publisher":"Financial Reporting Council","url":"https://www.frc.org.uk/library/standards-codes-policy/accounting-and-reporting/uk-accounting-standards/frs-102/","consulted_on":"2026-09-15","kind":"standard"},{"key":"frs-105","title":"FRS 105 The Financial Reporting Standard applicable to the Micro-entities Regime, September 2024 edition","publisher":"Financial Reporting Council","url":"https://www.frc.org.uk/library/standards-codes-policy/accounting-and-reporting/uk-accounting-standards/frs-105/","consulted_on":"2026-09-15","kind":"standard"},{"key":"companies-house-accounts","title":"Preparing and filing Companies House accounts — Life of a company, part 1: accounts","publisher":"Companies House","url":"https://www.gov.uk/government/publications/life-of-a-company-annual-requirements/life-of-a-company-part-1-accounts","consulted_on":"2026-09-15","kind":"guidance"},{"key":"hmrc-vat-online","title":"Sending a VAT Return — the VAT online account the return is filed through","publisher":"HM Revenue & Customs","url":"https://www.gov.uk/submit-vat-return","consulted_on":"2026-09-15","kind":"portal"},{"key":"en-16931","title":"EN 16931 compliance — the European standard on electronic invoicing under Directive 2014/55/EU","publisher":"European Commission — Digital Building Blocks","url":"https://ec.europa.eu/digital-building-blocks/sites/spaces/DIGITAL/pages/467108950/EN+16931+compliance","consulted_on":"2026-09-15","kind":"standard"},{"key":"uncl5305","title":"UNCL5305 — the VAT category code list of EN 16931 (BT-118 and BT-151), as the OpenPEPPOL subset publishes it","publisher":"OpenPEPPOL — the list itself is published by the European Commission","url":"https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/","consulted_on":"2026-09-15","kind":"standard"},{"key":"vatex","title":"VATEX — the VAT exemption reason code list of EN 16931 (BT-121)","publisher":"OpenPEPPOL — the list itself is published by the European Commission","url":"https://docs.peppol.eu/poacc/billing/3.0/codelist/vatex/","consulted_on":"2026-09-15","kind":"standard"},{"key":"peppol-eas","title":"Peppol code list of electronic address schemes (ISO 6523 ICD): 0088 Global Location Number, 9932 United Kingdom VAT number","publisher":"OpenPEPPOL","url":"https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/","consulted_on":"2026-09-15","kind":"standard"}]'::jsonb)
82
+ on conflict (country) do update set
83
+ name = excluded.name,
84
+ version = excluded.version,
85
+ released_at = excluded.released_at,
86
+ schema_min = excluded.schema_min,
87
+ certification_status = excluded.certification_status,
88
+ certified_by = excluded.certified_by,
89
+ certified_at = excluded.certified_at,
90
+ checksum = excluded.checksum,
91
+ sources = excluded.sources;
92
+
93
+ insert into chart_templates
94
+ (country, code, name, name_i18n, is_default, audience, statements,
95
+ certification_status, legal_reference, source_key)
96
+ values
97
+ ('GB', 'default', 'United Kingdom reference chart of accounts', '{}'::jsonb, true, 'companies', array['GB-CA-SMALL-BS', 'GB-CA-SMALL-IS']::text[], null, 'There is no legal chart of accounts in the United Kingdom. Companies Act 2006, s. 396(1) and (3) require Companies Act individual accounts to comprise a balance sheet and a profit and loss account complying with regulations as to their form and content, and s. 396(2) that they give a true and fair view; the regulations are S.I. 2008/409, Schedule 1 for a company in the small companies regime and S.I. 2008/410, Schedule 1 otherwise. Neither prescribes a nominal ledger. This chart is original: it follows the four-digit convention British practice shares, and every block of codes maps onto one item of Balance Sheet Format 1 or of Profit and Loss Account Format 1 of S.I. 2008/409, Schedule 1, so that the statements of this pack are readable straight off the chart.', 'ca-2006')
98
+ on conflict (country, code) do update set
99
+ name = excluded.name,
100
+ name_i18n = excluded.name_i18n,
101
+ is_default = excluded.is_default,
102
+ audience = excluded.audience,
103
+ statements = excluded.statements,
104
+ certification_status = excluded.certification_status,
105
+ legal_reference = excluded.legal_reference,
106
+ source_key = excluded.source_key;
107
+
108
+ insert into account_templates
109
+ (country, chart_code, code, name, name_i18n, account_type, reconcilable,
110
+ parent_code, sequence)
111
+ values
112
+ ('GB', 'default', '0000', 'Called up share capital not paid', '{}'::jsonb, 'asset_current', false, null, 10),
113
+ ('GB', 'default', '0010', 'Goodwill', '{}'::jsonb, 'asset_fixed', false, null, 20),
114
+ ('GB', 'default', '0011', 'Goodwill — accumulated amortisation', '{}'::jsonb, 'asset_fixed', false, null, 30),
115
+ ('GB', 'default', '0020', 'Development costs', '{}'::jsonb, 'asset_fixed', false, null, 40),
116
+ ('GB', 'default', '0021', 'Development costs — accumulated amortisation', '{}'::jsonb, 'asset_fixed', false, null, 50),
117
+ ('GB', 'default', '0030', 'Patents, trade marks and licences', '{}'::jsonb, 'asset_fixed', false, null, 60),
118
+ ('GB', 'default', '0031', 'Patents, trade marks and licences — accumulated amortisation', '{}'::jsonb, 'asset_fixed', false, null, 70),
119
+ ('GB', 'default', '0040', 'Other intangible assets', '{}'::jsonb, 'asset_fixed', false, null, 80),
120
+ ('GB', 'default', '0041', 'Other intangible assets — accumulated amortisation', '{}'::jsonb, 'asset_fixed', false, null, 90),
121
+ ('GB', 'default', '0100', 'Freehold land and buildings', '{}'::jsonb, 'asset_fixed', false, null, 100),
122
+ ('GB', 'default', '0101', 'Freehold land and buildings — accumulated depreciation', '{}'::jsonb, 'asset_fixed', false, null, 110),
123
+ ('GB', 'default', '0110', 'Leasehold property and improvements', '{}'::jsonb, 'asset_fixed', false, null, 120),
124
+ ('GB', 'default', '0111', 'Leasehold property and improvements — accumulated depreciation', '{}'::jsonb, 'asset_fixed', false, null, 130),
125
+ ('GB', 'default', '0120', 'Plant and machinery', '{}'::jsonb, 'asset_fixed', false, null, 140),
126
+ ('GB', 'default', '0121', 'Plant and machinery — accumulated depreciation', '{}'::jsonb, 'asset_fixed', false, null, 150),
127
+ ('GB', 'default', '0130', 'Fixtures and fittings', '{}'::jsonb, 'asset_fixed', false, null, 160),
128
+ ('GB', 'default', '0131', 'Fixtures and fittings — accumulated depreciation', '{}'::jsonb, 'asset_fixed', false, null, 170),
129
+ ('GB', 'default', '0140', 'Office equipment', '{}'::jsonb, 'asset_fixed', false, null, 180),
130
+ ('GB', 'default', '0141', 'Office equipment — accumulated depreciation', '{}'::jsonb, 'asset_fixed', false, null, 190),
131
+ ('GB', 'default', '0150', 'Computer equipment', '{}'::jsonb, 'asset_fixed', false, null, 200),
132
+ ('GB', 'default', '0151', 'Computer equipment — accumulated depreciation', '{}'::jsonb, 'asset_fixed', false, null, 210),
133
+ ('GB', 'default', '0160', 'Motor vehicles', '{}'::jsonb, 'asset_fixed', false, null, 220),
134
+ ('GB', 'default', '0161', 'Motor vehicles — accumulated depreciation', '{}'::jsonb, 'asset_fixed', false, null, 230),
135
+ ('GB', 'default', '0200', 'Shares in group undertakings and participating interests', '{}'::jsonb, 'asset_non_current', false, null, 240),
136
+ ('GB', 'default', '0210', 'Loans to group undertakings and undertakings in which the company has a participating interest', '{}'::jsonb, 'asset_non_current', false, null, 250),
137
+ ('GB', 'default', '0220', 'Other investments other than loans', '{}'::jsonb, 'asset_non_current', false, null, 260),
138
+ ('GB', 'default', '0230', 'Other investments', '{}'::jsonb, 'asset_non_current', false, null, 270),
139
+ ('GB', 'default', '1000', 'Stock — raw materials and consumables', '{}'::jsonb, 'asset_current', false, null, 280),
140
+ ('GB', 'default', '1010', 'Stock — work in progress', '{}'::jsonb, 'asset_current', false, null, 290),
141
+ ('GB', 'default', '1020', 'Stock — finished goods and goods for resale', '{}'::jsonb, 'asset_current', false, null, 300),
142
+ ('GB', 'default', '1030', 'Payments on account — stocks', '{}'::jsonb, 'asset_prepayments', false, null, 310),
143
+ ('GB', 'default', '1100', 'Trade debtors', '{}'::jsonb, 'asset_receivable', true, null, 320),
144
+ ('GB', 'default', '1105', 'Provision for doubtful debts', '{}'::jsonb, 'asset_current', false, null, 330),
145
+ ('GB', 'default', '1110', 'Amounts owed by group undertakings and undertakings in which the company has a participating interest', '{}'::jsonb, 'asset_current', false, null, 340),
146
+ ('GB', 'default', '1120', 'Other debtors', '{}'::jsonb, 'asset_current', false, null, 350),
147
+ ('GB', 'default', '1130', 'Directors'' loan account — debit', '{}'::jsonb, 'asset_current', false, null, 360),
148
+ ('GB', 'default', '1140', 'VAT recoverable — input tax', '{}'::jsonb, 'asset_current', false, null, 370),
149
+ ('GB', 'default', '1150', 'Corporation tax recoverable', '{}'::jsonb, 'asset_current', false, null, 380),
150
+ ('GB', 'default', '1160', 'Employee advances and expense claims', '{}'::jsonb, 'asset_current', false, null, 390),
151
+ ('GB', 'default', '1200', 'Shares in group undertakings — held as a current asset', '{}'::jsonb, 'asset_current', false, null, 400),
152
+ ('GB', 'default', '1210', 'Other investments — held as a current asset', '{}'::jsonb, 'asset_current', false, null, 410),
153
+ ('GB', 'default', '1300', 'Bank current account', '{}'::jsonb, 'asset_cash', false, null, 420),
154
+ ('GB', 'default', '1310', 'Bank deposit account', '{}'::jsonb, 'asset_cash', false, null, 430),
155
+ ('GB', 'default', '1320', 'Bank account in a foreign currency', '{}'::jsonb, 'asset_cash', false, null, 440),
156
+ ('GB', 'default', '1330', 'Petty cash', '{}'::jsonb, 'asset_cash', false, null, 450),
157
+ ('GB', 'default', '1340', 'Cash in transit', '{}'::jsonb, 'asset_cash', false, null, 460),
158
+ ('GB', 'default', '1350', 'Card acquirer settlement account', '{}'::jsonb, 'asset_cash', false, null, 470),
159
+ ('GB', 'default', '1400', 'Prepayments', '{}'::jsonb, 'asset_prepayments', false, null, 480),
160
+ ('GB', 'default', '1410', 'Accrued income', '{}'::jsonb, 'asset_prepayments', false, null, 490),
161
+ ('GB', 'default', '1420', 'Payments on account to suppliers', '{}'::jsonb, 'asset_prepayments', false, null, 500),
162
+ ('GB', 'default', '2000', 'Bank loans — due within one year', '{}'::jsonb, 'liability_current', false, null, 510),
163
+ ('GB', 'default', '2010', 'Bank overdraft', '{}'::jsonb, 'liability_current', false, null, 520),
164
+ ('GB', 'default', '2020', 'Credit card account', '{}'::jsonb, 'liability_credit_card', false, null, 530),
165
+ ('GB', 'default', '2100', 'Trade creditors', '{}'::jsonb, 'liability_payable', true, null, 540),
166
+ ('GB', 'default', '2110', 'Amounts owed to group undertakings and undertakings in which the company has a participating interest', '{}'::jsonb, 'liability_current', false, null, 550),
167
+ ('GB', 'default', '2200', 'VAT payable — output tax', '{}'::jsonb, 'liability_current', false, null, 560),
168
+ ('GB', 'default', '2210', 'VAT control account — net due to HMRC', '{}'::jsonb, 'liability_current', true, null, 570),
169
+ ('GB', 'default', '2220', 'PAYE and National Insurance payable', '{}'::jsonb, 'liability_current', false, null, 580),
170
+ ('GB', 'default', '2230', 'Construction Industry Scheme deductions payable', '{}'::jsonb, 'liability_current', false, null, 590),
171
+ ('GB', 'default', '2240', 'Pension contributions payable', '{}'::jsonb, 'liability_current', false, null, 600),
172
+ ('GB', 'default', '2250', 'Net wages payable', '{}'::jsonb, 'liability_current', false, null, 610),
173
+ ('GB', 'default', '2260', 'Directors'' loan account — credit', '{}'::jsonb, 'liability_current', false, null, 620),
174
+ ('GB', 'default', '2270', 'Dividends payable', '{}'::jsonb, 'liability_current', false, null, 630),
175
+ ('GB', 'default', '2280', 'Corporation tax payable', '{}'::jsonb, 'liability_current', false, null, 640),
176
+ ('GB', 'default', '2290', 'Other creditors', '{}'::jsonb, 'liability_current', false, null, 650),
177
+ ('GB', 'default', '2300', 'Obligations under finance leases and hire purchase — due within one year', '{}'::jsonb, 'liability_current', false, null, 660),
178
+ ('GB', 'default', '2400', 'Suspense account', '{}'::jsonb, 'liability_current', false, null, 670),
179
+ ('GB', 'default', '3000', 'Bank loans — due after more than one year', '{}'::jsonb, 'liability_non_current', false, null, 680),
180
+ ('GB', 'default', '3010', 'Other loans — due after more than one year', '{}'::jsonb, 'liability_non_current', false, null, 690),
181
+ ('GB', 'default', '3020', 'Trade creditors — due after more than one year', '{}'::jsonb, 'liability_non_current', false, null, 700),
182
+ ('GB', 'default', '3030', 'Amounts owed to group undertakings and undertakings in which the company has a participating interest — due after more than one year', '{}'::jsonb, 'liability_non_current', false, null, 710),
183
+ ('GB', 'default', '3040', 'Obligations under finance leases and hire purchase — due after more than one year', '{}'::jsonb, 'liability_non_current', false, null, 720),
184
+ ('GB', 'default', '3050', 'Other creditors — due after more than one year', '{}'::jsonb, 'liability_non_current', false, null, 730),
185
+ ('GB', 'default', '3100', 'Provision for deferred taxation', '{}'::jsonb, 'liability_non_current', false, null, 740),
186
+ ('GB', 'default', '3110', 'Other provisions for liabilities', '{}'::jsonb, 'liability_non_current', false, null, 750),
187
+ ('GB', 'default', '3200', 'Accruals', '{}'::jsonb, 'liability_current', false, null, 760),
188
+ ('GB', 'default', '3210', 'Deferred income', '{}'::jsonb, 'liability_current', false, null, 770),
189
+ ('GB', 'default', '3300', 'Called up share capital', '{}'::jsonb, 'equity', false, null, 780),
190
+ ('GB', 'default', '3310', 'Share premium account', '{}'::jsonb, 'equity', false, null, 790),
191
+ ('GB', 'default', '3320', 'Revaluation reserve', '{}'::jsonb, 'equity', false, null, 800),
192
+ ('GB', 'default', '3330', 'Capital redemption reserve', '{}'::jsonb, 'equity', false, null, 810),
193
+ ('GB', 'default', '3340', 'Other reserves', '{}'::jsonb, 'equity', false, null, 820),
194
+ ('GB', 'default', '3400', 'Profit and loss account', '{}'::jsonb, 'equity_retained', false, null, 830),
195
+ ('GB', 'default', '3410', 'Dividends paid', '{}'::jsonb, 'equity_retained', false, null, 840),
196
+ ('GB', 'default', '4000', 'Sales — goods', '{}'::jsonb, 'income', false, null, 850),
197
+ ('GB', 'default', '4010', 'Sales — services', '{}'::jsonb, 'income', false, null, 860),
198
+ ('GB', 'default', '4020', 'Sales — goods at the reduced rate', '{}'::jsonb, 'income', false, null, 870),
199
+ ('GB', 'default', '4030', 'Sales — zero-rated goods', '{}'::jsonb, 'income', false, null, 880),
200
+ ('GB', 'default', '4040', 'Sales — exempt supplies', '{}'::jsonb, 'income', false, null, 890),
201
+ ('GB', 'default', '4050', 'Sales — exports of goods', '{}'::jsonb, 'income', false, null, 900),
202
+ ('GB', 'default', '4060', 'Sales — construction services under the domestic reverse charge', '{}'::jsonb, 'income', false, null, 910),
203
+ ('GB', 'default', '4070', 'Retail takings', '{}'::jsonb, 'income', false, null, 920),
204
+ ('GB', 'default', '4100', 'Sales returns and allowances', '{}'::jsonb, 'income', false, null, 930),
205
+ ('GB', 'default', '4110', 'Discounts allowed', '{}'::jsonb, 'income', false, null, 940),
206
+ ('GB', 'default', '4200', 'Other operating income', '{}'::jsonb, 'income_other', false, null, 950),
207
+ ('GB', 'default', '4210', 'Rental income', '{}'::jsonb, 'income_other', false, null, 960),
208
+ ('GB', 'default', '4220', 'Grants receivable', '{}'::jsonb, 'income_other', false, null, 970),
209
+ ('GB', 'default', '4230', 'Profit on disposal of fixed assets', '{}'::jsonb, 'income_other', false, null, 980),
210
+ ('GB', 'default', '4240', 'Foreign exchange gains', '{}'::jsonb, 'income_other', false, null, 990),
211
+ ('GB', 'default', '4300', 'Income from shares in group undertakings', '{}'::jsonb, 'income_other', false, null, 1000),
212
+ ('GB', 'default', '4310', 'Income from participating interests', '{}'::jsonb, 'income_other', false, null, 1010),
213
+ ('GB', 'default', '4320', 'Income from other fixed asset investments', '{}'::jsonb, 'income_other', false, null, 1020),
214
+ ('GB', 'default', '4330', 'Other interest receivable and similar income', '{}'::jsonb, 'income_other', false, null, 1030),
215
+ ('GB', 'default', '5000', 'Purchases — goods for resale', '{}'::jsonb, 'expense_direct_cost', false, null, 1040),
216
+ ('GB', 'default', '5010', 'Purchases — raw materials and consumables', '{}'::jsonb, 'expense_direct_cost', false, null, 1050),
217
+ ('GB', 'default', '5020', 'Carriage inwards', '{}'::jsonb, 'expense_direct_cost', false, null, 1060),
218
+ ('GB', 'default', '5030', 'Import duty and freight', '{}'::jsonb, 'expense_direct_cost', false, null, 1070),
219
+ ('GB', 'default', '5040', 'Purchase returns and allowances', '{}'::jsonb, 'expense_direct_cost', false, null, 1080),
220
+ ('GB', 'default', '5050', 'Discounts received', '{}'::jsonb, 'expense_direct_cost', false, null, 1090),
221
+ ('GB', 'default', '5100', 'Opening stock', '{}'::jsonb, 'expense_direct_cost', false, null, 1100),
222
+ ('GB', 'default', '5110', 'Closing stock', '{}'::jsonb, 'expense_direct_cost', false, null, 1110),
223
+ ('GB', 'default', '5200', 'Subcontractor costs', '{}'::jsonb, 'expense_direct_cost', false, null, 1120),
224
+ ('GB', 'default', '5210', 'Direct labour', '{}'::jsonb, 'expense_direct_cost', false, null, 1130),
225
+ ('GB', 'default', '5220', 'Direct expenses — plant and equipment hire', '{}'::jsonb, 'expense_direct_cost', false, null, 1140),
226
+ ('GB', 'default', '5230', 'Direct expenses — materials', '{}'::jsonb, 'expense_direct_cost', false, null, 1150),
227
+ ('GB', 'default', '5240', 'Direct expenses — other', '{}'::jsonb, 'expense_direct_cost', false, null, 1160),
228
+ ('GB', 'default', '6000', 'Advertising', '{}'::jsonb, 'expense', false, null, 1170),
229
+ ('GB', 'default', '6010', 'Marketing and promotion', '{}'::jsonb, 'expense', false, null, 1180),
230
+ ('GB', 'default', '6020', 'Website and online advertising', '{}'::jsonb, 'expense', false, null, 1190),
231
+ ('GB', 'default', '6100', 'Carriage outwards', '{}'::jsonb, 'expense', false, null, 1200),
232
+ ('GB', 'default', '6110', 'Packaging', '{}'::jsonb, 'expense', false, null, 1210),
233
+ ('GB', 'default', '6200', 'Distribution staff — wages and salaries', '{}'::jsonb, 'expense', false, null, 1220),
234
+ ('GB', 'default', '6210', 'Distribution staff — employer''s National Insurance', '{}'::jsonb, 'expense', false, null, 1230),
235
+ ('GB', 'default', '6220', 'Distribution staff — employer''s pension contributions', '{}'::jsonb, 'expense', false, null, 1240),
236
+ ('GB', 'default', '6230', 'Sales commission', '{}'::jsonb, 'expense', false, null, 1250),
237
+ ('GB', 'default', '6300', 'Delivery vehicle running costs', '{}'::jsonb, 'expense', false, null, 1260),
238
+ ('GB', 'default', '6310', 'Travelling — distribution', '{}'::jsonb, 'expense', false, null, 1270),
239
+ ('GB', 'default', '6400', 'Warehouse rent and business rates', '{}'::jsonb, 'expense', false, null, 1280),
240
+ ('GB', 'default', '6410', 'Warehouse light and heat', '{}'::jsonb, 'expense', false, null, 1290),
241
+ ('GB', 'default', '6420', 'Warehouse insurance', '{}'::jsonb, 'expense', false, null, 1300),
242
+ ('GB', 'default', '6500', 'Depreciation — distribution assets', '{}'::jsonb, 'expense_depreciation', false, null, 1310),
243
+ ('GB', 'default', '7000', 'Directors'' remuneration', '{}'::jsonb, 'expense', false, null, 1320),
244
+ ('GB', 'default', '7010', 'Wages and salaries', '{}'::jsonb, 'expense', false, null, 1330),
245
+ ('GB', 'default', '7020', 'Employer''s National Insurance', '{}'::jsonb, 'expense', false, null, 1340),
246
+ ('GB', 'default', '7030', 'Employer''s pension contributions', '{}'::jsonb, 'expense', false, null, 1350),
247
+ ('GB', 'default', '7040', 'Staff training', '{}'::jsonb, 'expense', false, null, 1360),
248
+ ('GB', 'default', '7050', 'Staff welfare', '{}'::jsonb, 'expense', false, null, 1370),
249
+ ('GB', 'default', '7060', 'Recruitment costs', '{}'::jsonb, 'expense', false, null, 1380),
250
+ ('GB', 'default', '7070', 'Temporary and agency staff', '{}'::jsonb, 'expense', false, null, 1390),
251
+ ('GB', 'default', '7100', 'Rent', '{}'::jsonb, 'expense', false, null, 1400),
252
+ ('GB', 'default', '7110', 'Business rates', '{}'::jsonb, 'expense', false, null, 1410),
253
+ ('GB', 'default', '7120', 'Light and heat', '{}'::jsonb, 'expense', false, null, 1420),
254
+ ('GB', 'default', '7130', 'Water rates', '{}'::jsonb, 'expense', false, null, 1430),
255
+ ('GB', 'default', '7140', 'Insurance', '{}'::jsonb, 'expense', false, null, 1440),
256
+ ('GB', 'default', '7150', 'Repairs and maintenance', '{}'::jsonb, 'expense', false, null, 1450),
257
+ ('GB', 'default', '7160', 'Cleaning', '{}'::jsonb, 'expense', false, null, 1460),
258
+ ('GB', 'default', '7170', 'Security', '{}'::jsonb, 'expense', false, null, 1470),
259
+ ('GB', 'default', '7200', 'Telephone and internet', '{}'::jsonb, 'expense', false, null, 1480),
260
+ ('GB', 'default', '7210', 'Postage and carriage', '{}'::jsonb, 'expense', false, null, 1490),
261
+ ('GB', 'default', '7220', 'Printing and stationery', '{}'::jsonb, 'expense', false, null, 1500),
262
+ ('GB', 'default', '7230', 'Software and subscriptions', '{}'::jsonb, 'expense', false, null, 1510),
263
+ ('GB', 'default', '7240', 'Computer and IT costs', '{}'::jsonb, 'expense', false, null, 1520),
264
+ ('GB', 'default', '7250', 'Equipment hire', '{}'::jsonb, 'expense', false, null, 1530),
265
+ ('GB', 'default', '7260', 'Sundry expenses', '{}'::jsonb, 'expense', false, null, 1540),
266
+ ('GB', 'default', '7300', 'Motor vehicle running costs', '{}'::jsonb, 'expense', false, null, 1550),
267
+ ('GB', 'default', '7310', 'Motor vehicle leasing and hire', '{}'::jsonb, 'expense', false, null, 1560),
268
+ ('GB', 'default', '7320', 'Travel and subsistence', '{}'::jsonb, 'expense', false, null, 1570),
269
+ ('GB', 'default', '7330', 'Business entertainment', '{}'::jsonb, 'expense', false, null, 1580),
270
+ ('GB', 'default', '7400', 'Accountancy fees', '{}'::jsonb, 'expense', false, null, 1590),
271
+ ('GB', 'default', '7410', 'Legal and professional fees', '{}'::jsonb, 'expense', false, null, 1600),
272
+ ('GB', 'default', '7420', 'Consultancy fees', '{}'::jsonb, 'expense', false, null, 1610),
273
+ ('GB', 'default', '7430', 'Audit fee', '{}'::jsonb, 'expense', false, null, 1620),
274
+ ('GB', 'default', '7440', 'Bank charges', '{}'::jsonb, 'expense', false, null, 1630),
275
+ ('GB', 'default', '7450', 'Card processing charges', '{}'::jsonb, 'expense', false, null, 1640),
276
+ ('GB', 'default', '7460', 'Subscriptions to professional bodies', '{}'::jsonb, 'expense', false, null, 1650),
277
+ ('GB', 'default', '7470', 'Charitable donations', '{}'::jsonb, 'expense', false, null, 1660),
278
+ ('GB', 'default', '7500', 'Bad debts written off', '{}'::jsonb, 'expense', false, null, 1670),
279
+ ('GB', 'default', '7510', 'Movement in the provision for doubtful debts', '{}'::jsonb, 'expense', false, null, 1680),
280
+ ('GB', 'default', '7600', 'Depreciation — freehold land and buildings', '{}'::jsonb, 'expense_depreciation', false, null, 1690),
281
+ ('GB', 'default', '7610', 'Depreciation — leasehold property and improvements', '{}'::jsonb, 'expense_depreciation', false, null, 1700),
282
+ ('GB', 'default', '7620', 'Depreciation — plant and machinery', '{}'::jsonb, 'expense_depreciation', false, null, 1710),
283
+ ('GB', 'default', '7630', 'Depreciation — fixtures and fittings', '{}'::jsonb, 'expense_depreciation', false, null, 1720),
284
+ ('GB', 'default', '7640', 'Depreciation — office equipment', '{}'::jsonb, 'expense_depreciation', false, null, 1730),
285
+ ('GB', 'default', '7650', 'Depreciation — computer equipment', '{}'::jsonb, 'expense_depreciation', false, null, 1740),
286
+ ('GB', 'default', '7660', 'Depreciation — motor vehicles', '{}'::jsonb, 'expense_depreciation', false, null, 1750),
287
+ ('GB', 'default', '7670', 'Amortisation of goodwill', '{}'::jsonb, 'expense_depreciation', false, null, 1760),
288
+ ('GB', 'default', '7680', 'Amortisation of other intangible assets', '{}'::jsonb, 'expense_depreciation', false, null, 1770),
289
+ ('GB', 'default', '7690', 'Loss on disposal of fixed assets', '{}'::jsonb, 'expense', false, null, 1780),
290
+ ('GB', 'default', '7700', 'Foreign exchange losses', '{}'::jsonb, 'expense', false, null, 1790),
291
+ ('GB', 'default', '7710', 'Rounding differences', '{}'::jsonb, 'expense', false, null, 1800),
292
+ ('GB', 'default', '8000', 'Bank interest payable', '{}'::jsonb, 'expense', false, null, 1810),
293
+ ('GB', 'default', '8010', 'Loan interest payable', '{}'::jsonb, 'expense', false, null, 1820),
294
+ ('GB', 'default', '8020', 'Finance lease and hire purchase interest', '{}'::jsonb, 'expense', false, null, 1830),
295
+ ('GB', 'default', '8030', 'Other interest payable and similar expenses', '{}'::jsonb, 'expense', false, null, 1840),
296
+ ('GB', 'default', '8040', 'Statutory interest and recovery costs on late payment', '{}'::jsonb, 'expense', false, null, 1850),
297
+ ('GB', 'default', '8100', 'Amounts written off investments', '{}'::jsonb, 'expense', false, null, 1860),
298
+ ('GB', 'default', '8200', 'Corporation tax on profit or loss', '{}'::jsonb, 'expense', false, null, 1870),
299
+ ('GB', 'default', '8210', 'Corporation tax — adjustment in respect of prior periods', '{}'::jsonb, 'expense', false, null, 1880),
300
+ ('GB', 'default', '8220', 'Deferred taxation charge', '{}'::jsonb, 'expense', false, null, 1890),
301
+ ('GB', 'default', '8300', 'Other taxes not shown under the above items', '{}'::jsonb, 'expense', false, null, 1900)
302
+ on conflict (country, chart_code, code) do update set
303
+ name = excluded.name,
304
+ name_i18n = excluded.name_i18n,
305
+ account_type = excluded.account_type,
306
+ reconcilable = excluded.reconcilable,
307
+ parent_code = excluded.parent_code,
308
+ sequence = excluded.sequence;
309
+
310
+ insert into journal_templates (country, code, name, name_i18n, journal_type, sequence) values
311
+ ('GB', 'BNK', 'Bank', '{}'::jsonb, 'bank', 30),
312
+ ('GB', 'CSH', 'Cash book', '{}'::jsonb, 'cash', 40),
313
+ ('GB', 'GEN', 'General journal', '{}'::jsonb, 'general', 50),
314
+ ('GB', 'OPN', 'Opening balances', '{}'::jsonb, 'opening', 60),
315
+ ('GB', 'PUR', 'Purchase day book', '{}'::jsonb, 'purchase', 20),
316
+ ('GB', 'SAL', 'Sales day book', '{}'::jsonb, 'sales', 10)
317
+ on conflict (country, code) do update set
318
+ name = excluded.name,
319
+ name_i18n = excluded.name_i18n,
320
+ journal_type = excluded.journal_type,
321
+ sequence = excluded.sequence;
322
+
323
+ insert into tax_templates
324
+ (country, code, name, name_i18n, description, amount_type, amount, applies_to, treatment,
325
+ valid_from, valid_to, legal_reference, vat_category, exemption_code, sequence,
326
+ tax_kind, recoverable, conditions, jurisdiction, price_include, cash_basis,
327
+ cash_basis_transition_account_code, source_key,
328
+ applies_seller_territory, applies_buyer_territory, applies_supply_territory)
329
+ values
330
+ ('GB', 'GB-P-00', 'Purchase, zero-rated', '{}'::jsonb, null, 'percent', 0, 'purchase', 'domestic', date '1994-09-01', null, 'Value Added Tax Act 1994, s. 30 and Schedule 8 — no VAT is charged on the supply, so there is none to deduct; the value of the purchase is in box 7 of the return all the same.', 'Z', null, 190, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null),
331
+ ('GB', 'GB-P-05', 'Purchase, reduced rate 5 %', '{}'::jsonb, null, 'percent', 5, 'purchase', 'domestic', date '2001-05-11', null, 'Value Added Tax Act 1994, s. 29A(1) and Schedule 7A for the rate; ss. 24 to 26 for the deduction.', 'S', null, 180, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null),
332
+ ('GB', 'GB-P-05-DRC-CIS', 'Purchase of construction services, domestic reverse charge 5 %', '{}'::jsonb, null, 'percent', 5, 'purchase', 'domestic_reverse_charge', date '2021-03-01', null, 'The same charge as GB-P-20-DRC-CIS, at the reduced rate of s. 29A and Schedule 7A of the Value Added Tax Act 1994 — a qualifying conversion or renovation of a dwelling is a specified service taxed at 5 per cent, and the reverse charge applies to a reduced-rated supply as it does to a standard-rated one.', 'AE', null, 230, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'drc-guidance', null, null, null),
333
+ ('GB', 'GB-P-15', 'Purchase, standard rate 15 %', '{}'::jsonb, null, 'percent', 15, 'purchase', 'domestic', date '2008-12-01', date '2009-12-31', 'The Value Added Tax (Change of Rate) Order 2008 (S.I. 2008/3020), art. 2, as closed on 1 January 2010 by the Finance Act 2009, s. 9. Deduction is ss. 24 to 26 of the Act.', 'S', null, 150, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'rate-order-2008', null, null, null),
334
+ ('GB', 'GB-P-175-1994', 'Purchase, standard rate 17.5 %', '{}'::jsonb, null, 'percent', 17.5, 'purchase', 'domestic', date '1994-09-01', date '2008-11-30', 'Value Added Tax Act 1994, s. 2(1) — VAT is charged at the standard rate on the value of the supply. The rate is a code and a date in this pack, so the four standard rates the Act has carried are four codes: 17.5 % to 30 November 2008, 15 % from 1 December 2008 under S.I. 2008/3020, 17.5 % again from 1 January 2010 when the Finance Act 2009, s. 9 closed that Order, and 20 % from 4 January 2011 under the Finance (No. 2) Act 2010, s. 3. Deduction of the tax so charged is ss. 24 to 26 of the Act.', 'S', null, 140, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null),
335
+ ('GB', 'GB-P-175-2010', 'Purchase, standard rate 17.5 %, second period', '{}'::jsonb, null, 'percent', 17.5, 'purchase', 'domestic', date '2010-01-01', date '2011-01-03', 'Finance Act 2009, s. 9 — the rate of s. 2(1) of the Value Added Tax Act 1994 applies again from 1 January 2010. Deduction is ss. 24 to 26 of the Act.', 'S', null, 160, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'fa-2009-s9', null, null, null),
336
+ ('GB', 'GB-P-20', 'Purchase, standard rate 20 %', '{}'::jsonb, null, 'percent', 20, 'purchase', 'domestic', date '2011-01-04', null, 'Finance (No. 2) Act 2010, s. 3 for the rate; Value Added Tax Act 1994, ss. 24 to 26 for the credit the buyer takes for it, and s. 25(2) for the deduction of input tax from output tax in the return for the period.', 'S', null, 170, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'fa2-2010-s3', null, null, null),
337
+ ('GB', 'GB-P-20-DRC-CIS', 'Purchase of construction services, domestic reverse charge 20 %', '{}'::jsonb, 'The customer''s side: boxes 1, 4 and 7, and deliberately not box 6', 'percent', 20, 'purchase', 'domestic_reverse_charge', date '2021-03-01', null, 'Value Added Tax Act 1994, s. 55A and the Value Added Tax (Section 55A) (Specified Services and Excepted Supplies) Order 2019 (S.I. 2019/892), in force 1 March 2021 — the recipient of a specified construction service accounts for the tax as if they had made the supply. The guidance for the charge puts the tax in box 1 and, where it is deductible, in box 4, and the value of the purchase in box 7 only.', 'AE', null, 220, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'drc-guidance', null, null, null),
338
+ ('GB', 'GB-P-20-ENT', 'Purchase of business entertainment, standard rate 20 % — the tax is not input tax', '{}'::jsonb, 'The VAT follows the account of the line it taxes, because none of it is recoverable', 'percent', 20, 'purchase', 'domestic', date '2011-01-04', null, 'The Value Added Tax (Input Tax) Order 1992 (S.I. 1992/3222), art. 5 — tax charged on goods or services supplied for the purpose of business entertainment is excluded from any credit under ss. 25 and 26 of the Act, except where the entertainment is of employees or, for a body corporate, of its directors, unless that is incidental to entertaining others. A share nobody gets back is part of what the thing cost, so the whole of it lands on the accounts of the lines it taxes and box 4 stays empty.', 'S', null, 210, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'input-tax-order-1992', null, null, null),
339
+ ('GB', 'GB-P-20-PVA', 'Import of goods, postponed VAT accounting 20 %', '{}'::jsonb, 'The import VAT is declared on the return instead of being paid at the frontier', 'percent', 20, 'purchase', 'import', date '2021-01-01', null, 'Value Added Tax Act 1994, s. 1(1)(c) and s. 15 — VAT is charged on the importation of goods into the United Kingdom. Since 1 January 2021 a VAT-registered importer may account for that tax on their return rather than pay it on entry: the guidance puts the VAT due in box 1, the VAT reclaimed in box 4 and the total value of the imported goods in box 7. The return carries no box for the customs value on its own, so the value here is the one on the supplier''s invoice and not the one on the import declaration.', null, null, 240, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'pva-guidance', null, null, null),
340
+ ('GB', 'GB-P-20-RCS', 'Service received from a supplier established outside the United Kingdom, reverse charge 20 %', '{}'::jsonb, null, 'percent', 20, 'purchase', 'foreign_services_received', date '2011-01-04', null, 'Value Added Tax Act 1994, s. 8 — where a relevant service is supplied by a person who belongs in a country other than the United Kingdom to a person who belongs here for the purposes of a business, the recipient is treated as having supplied it and as having received it, and accounts for the tax. The rate is the one the recipient charges themselves, which is the standard rate of the Finance (No. 2) Act 2010, s. 3. VAT Notice 700/12 asks for the value of such a service in box 6 and in box 7 at once, which is why it posts to a box of its own that both totals read.', null, null, 250, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null),
341
+ ('GB', 'GB-P-EXEMPT', 'Exempt purchase', '{}'::jsonb, null, 'percent', 0, 'purchase', 'exempt', date '1994-09-01', null, 'Value Added Tax Act 1994, s. 31 and Schedule 9. No exemption reason code, for the reason given on the sale side: no published list carries one for a British exemption.', 'E', null, 200, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null),
342
+ ('GB', 'GB-S-00', 'Sale, zero-rated', '{}'::jsonb, 'Most food, books, children''s clothing and the rest of Schedule 8', 'percent', 0, 'sale', 'domestic', date '1994-09-01', null, 'Value Added Tax Act 1994, s. 30(1) and (2) and Schedule 8 — a supply of a description specified in Schedule 8 is zero-rated, and no VAT is charged on it although it is a taxable supply. A zero-rated supply is not an exempt one: it carries a right to deduct the input tax attributable to it, which is why this pack keeps the two codes apart although VAT Notice 700/12 puts both values in box 6.', 'Z', null, 90, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null),
343
+ ('GB', 'GB-S-05', 'Sale, reduced rate 5 %', '{}'::jsonb, 'Domestic fuel and power, mobility aids, children''s car seats and the rest of Schedule 7A', 'percent', 5, 'sale', 'domestic', date '2001-05-11', null, 'Value Added Tax Act 1994, s. 29A(1) — VAT on a supply of a description for the time being specified in Schedule 7A is charged at 5 per cent. Section 29A and Schedule 7A were inserted by the Finance Act 2001, s. 99(4), in force 11 May 2001; the Treasury may add to, remove from or vary Schedule 7A, and this pack carries the rate and not the list of Groups.', 'S', null, 60, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null),
344
+ ('GB', 'GB-S-05-HOSP', 'Sale, temporary reduced rate 5 % — hospitality, holiday accommodation and attractions', '{}'::jsonb, null, 'percent', 5, 'sale', 'domestic', date '2020-07-15', date '2021-09-30', 'The Value Added Tax (Reduced Rate) (Hospitality and Tourism) (Coronavirus) Order 2020 (S.I. 2020/728) — Groups 14 to 16 were added to Schedule 7A, so catering, holiday accommodation and admission to attractions were charged at 5 per cent from 15 July 2020. The Finance Act 2021, s. 92 substituted 30 September 2021 for the Order''s own end date.', 'S', null, 70, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'hospitality-order-2020', null, null, null),
345
+ ('GB', 'GB-S-125-HOSP', 'Sale, temporary reduced rate 12.5 % — hospitality, holiday accommodation and attractions', '{}'::jsonb, null, 'percent', 12.5, 'sale', 'domestic', date '2021-10-01', date '2022-03-31', 'Finance Act 2021, s. 93 — the same supplies of Groups 14 to 16 of Schedule 7A are charged at 12.5 per cent for the period beginning with the day after the 5 per cent modifications cease and ending on 31 March 2022.', 'S', null, 80, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'fa-2021-s93', null, null, null),
346
+ ('GB', 'GB-S-15', 'Sale, standard rate 15 %', '{}'::jsonb, 'The temporary standard rate of 1 December 2008 to 31 December 2009', 'percent', 15, 'sale', 'domestic', date '2008-12-01', date '2009-12-31', 'The Value Added Tax (Change of Rate) Order 2008 (S.I. 2008/3020), art. 2 — the standard rate is reduced to 15 per cent from 1 December 2008. The Order was to cease on 30 November 2009; the Finance Act 2009, s. 9 made it cease on 1 January 2010 instead, so the last supply taxed at 15 per cent is one made on 31 December 2009.', 'S', null, 20, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'rate-order-2008', null, null, null),
347
+ ('GB', 'GB-S-175-1994', 'Sale, standard rate 17.5 %', '{}'::jsonb, 'The standard rate from the commencement of the Act to 30 November 2008', 'percent', 17.5, 'sale', 'domestic', date '1994-09-01', date '2008-11-30', 'Value Added Tax Act 1994, s. 2(1) — VAT is charged at the standard rate on the value of the supply. The rate is a code and a date in this pack, so the four standard rates the Act has carried are four codes: 17.5 % to 30 November 2008, 15 % from 1 December 2008 under S.I. 2008/3020, 17.5 % again from 1 January 2010 when the Finance Act 2009, s. 9 closed that Order, and 20 % from 4 January 2011 under the Finance (No. 2) Act 2010, s. 3. This code is the rate in force when the Act came into force on 1 September 1994 (s. 101(1)).', 'S', null, 10, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null),
348
+ ('GB', 'GB-S-175-2010', 'Sale, standard rate 17.5 %, second period', '{}'::jsonb, 'The standard rate restored from 1 January 2010 to 3 January 2011', 'percent', 17.5, 'sale', 'domestic', date '2010-01-01', date '2011-01-03', 'Finance Act 2009, s. 9 — the Value Added Tax (Change of Rate) Order 2008 ceases to be in force on 1 January 2010, so s. 2(1) of the Value Added Tax Act 1994 charges 17.5 per cent again from that day until the Finance (No. 2) Act 2010, s. 3 takes effect.', 'S', null, 30, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'fa-2009-s9', null, null, null),
349
+ ('GB', 'GB-S-20', 'Sale, standard rate 20 %', '{}'::jsonb, 'The standard rate from 4 January 2011', 'percent', 20, 'sale', 'domestic', date '2011-01-04', null, 'Finance (No. 2) Act 2010, s. 3(1) and (3) — 20 per cent is substituted in s. 2(1) of the Value Added Tax Act 1994, with effect for a supply made on or after 4 January 2011.', 'S', null, 40, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'fa2-2010-s3', null, null, null),
350
+ ('GB', 'GB-S-20-INC', 'Retail sale, standard rate 20 %, the price includes the VAT', '{}'::jsonb, 'For a price set with the tax already in it, as a retail price is', 'percent', 20, 'sale', 'domestic', date '2011-01-04', null, 'Finance (No. 2) Act 2010, s. 3 for the rate. A retail price in the United Kingdom is quoted with the VAT in it, and VAT Notice 700 gives the fraction that takes it back out — the rate divided by one hundred plus the rate, one sixth at 20 per cent. price_include records that the unit price of a line carrying this tax is the gross price: the engine takes the tax out of the group''s gross and rounds it once, as §§ 17.5 and 17.6 of the notice allow a retailer to do invoice by invoice and as BR-CO-14 requires of a structured invoice.', 'S', null, 50, 'vat', true, '{}'::tax_condition[], null, true, false, null, 'notice-700', null, null, null),
351
+ ('GB', 'GB-S-DRC-CIS', 'Sale of construction services, domestic reverse charge', '{}'::jsonb, 'The supplier''s side: the value is invoiced and the customer accounts for the tax', 'percent', 0, 'sale', 'domestic_reverse_charge', date '2021-03-01', null, 'Value Added Tax Act 1994, s. 55A, and the Value Added Tax (Section 55A) (Specified Services and Excepted Supplies) Order 2019 (S.I. 2019/892), art. 1 as amended — in force on 1 March 2021 for supplies made on or after that day. The supplier charges no VAT; VAT Notice 700/12 puts the value of the sale in box 6 and nothing in box 1.', 'AE', null, 130, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'drc-order-2019', null, null, null),
352
+ ('GB', 'GB-S-EXEMPT', 'Exempt sale', '{}'::jsonb, 'Insurance, finance, health, education, betting and the rest of Schedule 9', 'percent', 0, 'sale', 'exempt', date '1994-09-01', null, 'Value Added Tax Act 1994, s. 31(1) and Schedule 9 — a supply of a description specified in Schedule 9 is an exempt supply. The line carries no exemption reason code: BT-121 comes from the VATEX list of EN 16931, which names articles of Directive 2006/112/EC and the national codes of Member States, and the United Kingdom is neither, so what an exempt invoice states here is this article.', 'E', null, 100, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null),
353
+ ('GB', 'GB-S-EXPORT', 'Export of goods outside the United Kingdom', '{}'::jsonb, null, 'percent', 0, 'sale', 'export', date '2021-01-01', null, 'Value Added Tax Act 1994, s. 30(6) — a supply of goods is zero-rated where the Commissioners are satisfied that the goods have been or are to be exported, on the conditions they impose. The code is dated from 1 January 2021 because that is the day the word changed meaning: before it, an export was a supply outside the European Union; since it, it is a supply outside the United Kingdom, and a supply to a Member State is one.', 'G', null, 110, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null),
354
+ ('GB', 'GB-S-OUTSIDE', 'Supply outside the scope of United Kingdom VAT', '{}'::jsonb, 'A supply whose place of supply is not the United Kingdom, such as a business-to-business service to an overseas customer', 'percent', 0, 'sale', 'not_subject', date '1994-09-01', null, 'Value Added Tax Act 1994, s. 4(1) — VAT is charged on a supply of goods or services made in the United Kingdom; ss. 7 and 7A place a supply, and a supply placed elsewhere is outside the scope of the charge. VAT Notice 700/12 puts its value in box 6 all the same.', 'O', null, 120, 'vat', true, '{}'::tax_condition[], null, false, false, null, 'vata-1994', null, null, null)
355
+ on conflict (country, code) do update set
356
+ name = excluded.name,
357
+ name_i18n = excluded.name_i18n,
358
+ description = excluded.description,
359
+ amount_type = excluded.amount_type,
360
+ amount = excluded.amount,
361
+ applies_to = excluded.applies_to,
362
+ treatment = excluded.treatment,
363
+ valid_from = excluded.valid_from,
364
+ valid_to = excluded.valid_to,
365
+ legal_reference = excluded.legal_reference,
366
+ vat_category = excluded.vat_category,
367
+ exemption_code = excluded.exemption_code,
368
+ sequence = excluded.sequence,
369
+ tax_kind = excluded.tax_kind,
370
+ recoverable = excluded.recoverable,
371
+ conditions = excluded.conditions,
372
+ jurisdiction = excluded.jurisdiction,
373
+ price_include = excluded.price_include,
374
+ cash_basis = excluded.cash_basis,
375
+ cash_basis_transition_account_code = excluded.cash_basis_transition_account_code,
376
+ source_key = excluded.source_key,
377
+ applies_seller_territory = excluded.applies_seller_territory,
378
+ applies_buyer_territory = excluded.applies_buyer_territory,
379
+ applies_supply_territory = excluded.applies_supply_territory;
380
+
381
+ insert into tax_posting_templates
382
+ (tax_template_id, document_kind, posting_type, factor_percent, account_code,
383
+ declaration_box, declaration_boxes, box_factor_percent, report_code, sequence)
384
+ select t.id,
385
+ v.document_kind::tax_document_kind,
386
+ v.posting_type::tax_posting_type,
387
+ v.factor_percent::numeric,
388
+ v.account_code::text,
389
+ v.declaration_box::text,
390
+ v.declaration_boxes::text[],
391
+ v.box_factor_percent::numeric,
392
+ v.report_code::text,
393
+ v.sequence::integer
394
+ from (values
395
+ ('GB-P-00', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
396
+ ('GB-P-00', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
397
+ ('GB-P-05', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
398
+ ('GB-P-05', 'invoice', 'tax', 100, '1140', '4', array['4']::text[], 100, 'GB-VAT-RETURN', 20),
399
+ ('GB-P-05', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
400
+ ('GB-P-05', 'credit_note', 'tax', 100, '1140', '4', array['4']::text[], -100, 'GB-VAT-RETURN', 20),
401
+ ('GB-P-05-DRC-CIS', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
402
+ ('GB-P-05-DRC-CIS', 'invoice', 'tax', 100, '1140', '4', array['4']::text[], 100, 'GB-VAT-RETURN', 20),
403
+ ('GB-P-05-DRC-CIS', 'invoice', 'tax', -100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 30),
404
+ ('GB-P-05-DRC-CIS', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
405
+ ('GB-P-05-DRC-CIS', 'credit_note', 'tax', 100, '1140', '4', array['4']::text[], -100, 'GB-VAT-RETURN', 20),
406
+ ('GB-P-05-DRC-CIS', 'credit_note', 'tax', -100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 30),
407
+ ('GB-P-15', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
408
+ ('GB-P-15', 'invoice', 'tax', 100, '1140', '4', array['4']::text[], 100, 'GB-VAT-RETURN', 20),
409
+ ('GB-P-15', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
410
+ ('GB-P-15', 'credit_note', 'tax', 100, '1140', '4', array['4']::text[], -100, 'GB-VAT-RETURN', 20),
411
+ ('GB-P-175-1994', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
412
+ ('GB-P-175-1994', 'invoice', 'tax', 100, '1140', '4', array['4']::text[], 100, 'GB-VAT-RETURN', 20),
413
+ ('GB-P-175-1994', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
414
+ ('GB-P-175-1994', 'credit_note', 'tax', 100, '1140', '4', array['4']::text[], -100, 'GB-VAT-RETURN', 20),
415
+ ('GB-P-175-2010', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
416
+ ('GB-P-175-2010', 'invoice', 'tax', 100, '1140', '4', array['4']::text[], 100, 'GB-VAT-RETURN', 20),
417
+ ('GB-P-175-2010', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
418
+ ('GB-P-175-2010', 'credit_note', 'tax', 100, '1140', '4', array['4']::text[], -100, 'GB-VAT-RETURN', 20),
419
+ ('GB-P-20', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
420
+ ('GB-P-20', 'invoice', 'tax', 100, '1140', '4', array['4']::text[], 100, 'GB-VAT-RETURN', 20),
421
+ ('GB-P-20', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
422
+ ('GB-P-20', 'credit_note', 'tax', 100, '1140', '4', array['4']::text[], -100, 'GB-VAT-RETURN', 20),
423
+ ('GB-P-20-DRC-CIS', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
424
+ ('GB-P-20-DRC-CIS', 'invoice', 'tax', 100, '1140', '4', array['4']::text[], 100, 'GB-VAT-RETURN', 20),
425
+ ('GB-P-20-DRC-CIS', 'invoice', 'tax', -100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 30),
426
+ ('GB-P-20-DRC-CIS', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
427
+ ('GB-P-20-DRC-CIS', 'credit_note', 'tax', 100, '1140', '4', array['4']::text[], -100, 'GB-VAT-RETURN', 20),
428
+ ('GB-P-20-DRC-CIS', 'credit_note', 'tax', -100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 30),
429
+ ('GB-P-20-ENT', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
430
+ ('GB-P-20-ENT', 'invoice', 'tax_on_base', 100, null, null, null, 100, null, 20),
431
+ ('GB-P-20-ENT', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
432
+ ('GB-P-20-ENT', 'credit_note', 'tax_on_base', 100, null, null, null, 100, null, 20),
433
+ ('GB-P-20-PVA', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
434
+ ('GB-P-20-PVA', 'invoice', 'tax', 100, '1140', '4', array['4']::text[], 100, 'GB-VAT-RETURN', 20),
435
+ ('GB-P-20-PVA', 'invoice', 'tax', -100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 30),
436
+ ('GB-P-20-PVA', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
437
+ ('GB-P-20-PVA', 'credit_note', 'tax', 100, '1140', '4', array['4']::text[], -100, 'GB-VAT-RETURN', 20),
438
+ ('GB-P-20-PVA', 'credit_note', 'tax', -100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 30),
439
+ ('GB-P-20-RCS', 'invoice', 'base', 100, null, '6', array['6', '7']::text[], 100, 'GB-VAT-RETURN', 10),
440
+ ('GB-P-20-RCS', 'invoice', 'tax', 100, '1140', '4', array['4']::text[], 100, 'GB-VAT-RETURN', 20),
441
+ ('GB-P-20-RCS', 'invoice', 'tax', -100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 30),
442
+ ('GB-P-20-RCS', 'credit_note', 'base', 100, null, '6', array['6', '7']::text[], -100, 'GB-VAT-RETURN', 10),
443
+ ('GB-P-20-RCS', 'credit_note', 'tax', 100, '1140', '4', array['4']::text[], -100, 'GB-VAT-RETURN', 20),
444
+ ('GB-P-20-RCS', 'credit_note', 'tax', -100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 30),
445
+ ('GB-P-EXEMPT', 'invoice', 'base', 100, null, '7', array['7']::text[], 100, 'GB-VAT-RETURN', 10),
446
+ ('GB-P-EXEMPT', 'credit_note', 'base', 100, null, '7', array['7']::text[], -100, 'GB-VAT-RETURN', 10),
447
+ ('GB-S-00', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
448
+ ('GB-S-00', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
449
+ ('GB-S-05', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
450
+ ('GB-S-05', 'invoice', 'tax', 100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 20),
451
+ ('GB-S-05', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
452
+ ('GB-S-05', 'credit_note', 'tax', 100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 20),
453
+ ('GB-S-05-HOSP', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
454
+ ('GB-S-05-HOSP', 'invoice', 'tax', 100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 20),
455
+ ('GB-S-05-HOSP', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
456
+ ('GB-S-05-HOSP', 'credit_note', 'tax', 100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 20),
457
+ ('GB-S-125-HOSP', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
458
+ ('GB-S-125-HOSP', 'invoice', 'tax', 100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 20),
459
+ ('GB-S-125-HOSP', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
460
+ ('GB-S-125-HOSP', 'credit_note', 'tax', 100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 20),
461
+ ('GB-S-15', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
462
+ ('GB-S-15', 'invoice', 'tax', 100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 20),
463
+ ('GB-S-15', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
464
+ ('GB-S-15', 'credit_note', 'tax', 100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 20),
465
+ ('GB-S-175-1994', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
466
+ ('GB-S-175-1994', 'invoice', 'tax', 100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 20),
467
+ ('GB-S-175-1994', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
468
+ ('GB-S-175-1994', 'credit_note', 'tax', 100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 20),
469
+ ('GB-S-175-2010', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
470
+ ('GB-S-175-2010', 'invoice', 'tax', 100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 20),
471
+ ('GB-S-175-2010', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
472
+ ('GB-S-175-2010', 'credit_note', 'tax', 100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 20),
473
+ ('GB-S-20', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
474
+ ('GB-S-20', 'invoice', 'tax', 100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 20),
475
+ ('GB-S-20', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
476
+ ('GB-S-20', 'credit_note', 'tax', 100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 20),
477
+ ('GB-S-20-INC', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
478
+ ('GB-S-20-INC', 'invoice', 'tax', 100, '2200', '1', array['1']::text[], 100, 'GB-VAT-RETURN', 20),
479
+ ('GB-S-20-INC', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
480
+ ('GB-S-20-INC', 'credit_note', 'tax', 100, '2200', '1', array['1']::text[], -100, 'GB-VAT-RETURN', 20),
481
+ ('GB-S-DRC-CIS', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
482
+ ('GB-S-DRC-CIS', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
483
+ ('GB-S-EXEMPT', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
484
+ ('GB-S-EXEMPT', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
485
+ ('GB-S-EXPORT', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
486
+ ('GB-S-EXPORT', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10),
487
+ ('GB-S-OUTSIDE', 'invoice', 'base', 100, null, '6', array['6']::text[], 100, 'GB-VAT-RETURN', 10),
488
+ ('GB-S-OUTSIDE', 'credit_note', 'base', 100, null, '6', array['6']::text[], -100, 'GB-VAT-RETURN', 10)
489
+ ) as v (tax_code, document_kind, posting_type, factor_percent, account_code,
490
+ declaration_box, declaration_boxes, box_factor_percent, report_code, sequence)
491
+ join tax_templates t on t.country = 'GB' and t.code = v.tax_code
492
+ on conflict (tax_template_id, document_kind, posting_type, sequence) do update set
493
+ factor_percent = excluded.factor_percent,
494
+ account_code = excluded.account_code,
495
+ declaration_box = excluded.declaration_box,
496
+ declaration_boxes = excluded.declaration_boxes,
497
+ box_factor_percent = excluded.box_factor_percent,
498
+ report_code = excluded.report_code;
499
+
500
+ insert into tax_report_templates
501
+ (country, code, name, periods, period_default, valid_from, valid_to, legal_reference,
502
+ is_periodic_return, deadline_rule, deadline_day, deadline_plus_days,
503
+ deadline_reference, deadline_source_key, file_format)
504
+ values
505
+ ('GB', 'GB-VAT-RETURN', 'VAT Return', array['month', 'quarter', 'year']::declaration_period[], 'quarter'::declaration_period, date '2021-01-01', null, 'Value Added Tax Act 1994, Schedule 11, paragraph 2 and the Value Added Tax Regulations 1995, reg. 25(1) — every registered person makes a return for each prescribed accounting period, which is a period of three months unless the Commissioners allow or direct another; a month is allowed on application and a year under the annual accounting scheme. So the form is filed on three cadences and the law still gives one of them to everybody, which is what period_default states: a company that has asked the Commissioners for nothing files quarterly. Nine boxes, numbered 1 to 9, and their contents are VAT Notice 700/12, whose wording each box below repeats. The version carried here is the one in force since 1 January 2021, when boxes 2, 8 and 9 stopped being about the United Kingdom and became about Northern Ireland alone.', true,'last_day_of_month_after_period'::filing_deadline_rule, null, 7, 'Value Added Tax Regulations 1995 (SI 1995/2518), reg. 25(1) — the return is made not later than the last day of the month next following the end of the period to which it relates. The seven days added here are the extension HMRC grants to a return made online and paid electronically (VATAC1300), and they do not reach every filer: a business on the annual accounting scheme or on payments on account keeps the regulation''s own date. A pack cannot yet say a deadline that depends on the scheme a company is in, and that is recorded in docs/international.md.', null, null)
506
+ on conflict (country, code) do update set
507
+ name = excluded.name,
508
+ periods = excluded.periods,
509
+ period_default = excluded.period_default,
510
+ valid_from = excluded.valid_from,
511
+ valid_to = excluded.valid_to,
512
+ legal_reference = excluded.legal_reference,
513
+ is_periodic_return = excluded.is_periodic_return,
514
+ deadline_rule = excluded.deadline_rule,
515
+ deadline_day = excluded.deadline_day,
516
+ deadline_plus_days = excluded.deadline_plus_days,
517
+ deadline_reference = excluded.deadline_reference,
518
+ deadline_source_key = excluded.deadline_source_key,
519
+ file_format = excluded.file_format;
520
+
521
+ insert into tax_report_box_templates
522
+ (country, report_code, box, kind, name, name_i18n, sequence, print_sequence,
523
+ plus_boxes, minus_boxes, rate, rate_of_box, floor_zero, hidden, xml_element,
524
+ legal_reference, source_key)
525
+ values
526
+ ('GB', 'GB-VAT-RETURN', '1', 'tax', 'VAT due in the period on sales and other outputs', '{}'::jsonb, 10, null, '{}'::text[], '{}'::text[], null, null, false, false, null, 'VAT Notice 700/12, box 1 — the output tax of the period, and with it the tax the person charges themselves: the VAT due on imports accounted for through postponed VAT accounting, the VAT due on a supply on which s. 55A of the Value Added Tax Act 1994 moves the liability to the customer, and the VAT due under s. 8 on a service received from a supplier established outside the United Kingdom.', 'notice-700-12'),
527
+ ('GB', 'GB-VAT-RETURN', '2', 'tax', 'VAT due in the period on acquisitions of goods made in Northern Ireland from EU member states', '{}'::jsonb, 20, null, '{}'::text[], '{}'::text[], null, null, false, false, null, 'VAT Notice 700/12, box 2 — the acquisition tax on goods brought into Northern Ireland from a member State of the European Union since 1 January 2021. This pack carries no tax that posts here: it is the pack of one registration covering Great Britain and Northern Ireland, and only the second of the two is inside the common system of VAT, for goods, which the core''s `territories` table records as `XI` with the article of the Windsor Framework behind it. Modelling that trade is out of this pack''s scope. The box is declared because the form has nine boxes and a return that omitted one would not be this form.', 'notice-700-12'),
528
+ ('GB', 'GB-VAT-RETURN', '3', 'total', 'Total VAT due (the sum of boxes 1 and 2)', '{}'::jsonb, 30, null, array['1', '2']::text[], '{}'::text[], null, null, false, false, null, 'VAT Notice 700/12, box 3 — the total of boxes 1 and 2, which the notice states as an arithmetic and not as an amount anybody books.', 'notice-700-12'),
529
+ ('GB', 'GB-VAT-RETURN', '4', 'tax', 'VAT reclaimed in the period on purchases and other inputs (including acquisitions in Northern Ireland from EU member states)', '{}'::jsonb, 40, null, '{}'::text[], '{}'::text[], null, null, false, false, null, 'VAT Notice 700/12, box 4 — the input tax the person is entitled to deduct under ss. 24 to 26 of the Value Added Tax Act 1994, including the VAT reclaimed on imports accounted for through postponed VAT accounting and the VAT self-assessed under a reverse charge. Tax the Value Added Tax (Input Tax) Order 1992 excludes from credit never reaches this box.', 'notice-700-12'),
530
+ ('GB', 'GB-VAT-RETURN', '5', 'total', 'Net VAT to pay to HMRC or reclaim', '{}'::jsonb, 50, null, array['3']::text[], array['4']::text[], null, null, false, false, null, 'VAT Notice 700/12, box 5 — deduct the number in box 4 from the number in box 3 and enter the difference. The notice''s own arithmetic is a subtraction and this box is written as one, so a repayment period comes out negative here where the printed form shows a positive figure and says which way it goes.', 'notice-700-12'),
531
+ ('GB', 'GB-VAT-RETURN', '6', 'base', 'Total value of sales and all other outputs excluding any VAT', '{}'::jsonb, 60, null, '{}'::text[], '{}'::text[], null, null, false, false, null, 'VAT Notice 700/12, box 6 — the value, excluding VAT, of everything supplied in the period: standard-rated, reduced-rated, zero-rated, exempt and outside the scope of United Kingdom VAT, and exports. The notice also puts the value of a service received from an overseas supplier in this box as well as in box 7, so the tax on that service names both boxes and the amount is printed in each.', 'notice-700-12'),
532
+ ('GB', 'GB-VAT-RETURN', '7', 'base', 'Total value of purchases and all other inputs excluding any VAT', '{}'::jsonb, 70, null, '{}'::text[], '{}'::text[], null, null, false, false, null, 'VAT Notice 700/12, box 7 — the value, excluding VAT, of everything acquired in the period, including imports of goods and the value of a supply on which the customer accounts for the tax under s. 55A. The value of a service received from an overseas supplier is in this box and in box 6 at once, which is one posting naming two boxes rather than two definitions of one figure.', 'notice-700-12'),
533
+ ('GB', 'GB-VAT-RETURN', '8', 'base', 'Total value of dispatches of goods and related costs (excluding VAT) from Northern Ireland to EU member states', '{}'::jsonb, 80, null, '{}'::text[], '{}'::text[], null, null, false, false, null, 'VAT Notice 700/12, box 8 — goods dispatched from Northern Ireland to a member State of the European Union, with the costs directly related to them. Nothing in this pack posts here, for the same reason as box 2: see `territories` for what `XI` is.', 'notice-700-12'),
534
+ ('GB', 'GB-VAT-RETURN', '9', 'base', 'Total value of acquisitions of goods and related costs (excluding VAT) made in Northern Ireland from EU member states', '{}'::jsonb, 90, null, '{}'::text[], '{}'::text[], null, null, false, false, null, 'VAT Notice 700/12, box 9 — the value that box 2 is the tax on. Nothing in this pack posts here, for the same reason as box 2: see `territories` for what `XI` is.', 'notice-700-12')
535
+ on conflict (country, report_code, box, kind) do update set
536
+ name = excluded.name,
537
+ name_i18n = excluded.name_i18n,
538
+ sequence = excluded.sequence,
539
+ print_sequence = excluded.print_sequence,
540
+ plus_boxes = excluded.plus_boxes,
541
+ minus_boxes = excluded.minus_boxes,
542
+ rate = excluded.rate,
543
+ rate_of_box = excluded.rate_of_box,
544
+ floor_zero = excluded.floor_zero,
545
+ hidden = excluded.hidden,
546
+ xml_element = excluded.xml_element,
547
+ legal_reference = excluded.legal_reference,
548
+ source_key = excluded.source_key;
549
+
550
+ insert into statement_templates
551
+ (code, country, chart_code, name, kind, framework, valid_from, valid_to, legal_reference,
552
+ source_key)
553
+ values
554
+ ('GB-CA-SMALL-BS', 'GB', 'default', 'Balance sheet — Companies Act 2006, small companies regime, Format 1', 'balance_sheet', 'UK-FRS102', date '1970-01-01', null, 'The Small Companies and Groups (Accounts and Directors'' Report) Regulations 2008 (S.I. 2008/409), Schedule 1, Part 1, Section B — Balance sheet Format 1. Companies Act 2006, s. 396(1)(a) and (3): the balance sheet complies with the regulations as to its form and content. Every letter and numeral below is an item of that format and the name is the format''s own wording.', 'small-companies-regs'),
555
+ ('GB-CA-SMALL-IS', 'GB', 'default', 'Profit and loss account — Companies Act 2006, small companies regime, Format 1', 'income_statement', 'UK-FRS102', date '1970-01-01', null, 'The Small Companies and Groups (Accounts and Directors'' Report) Regulations 2008 (S.I. 2008/409), Schedule 1, Part 1, Section B — Profit and loss account Format 1. Items 15 to 18, the extraordinary items of the format as originally made, were removed when the formats were amended, so the numbering runs 1 to 14 and then 19 and 20; this pack keeps the numbers the format keeps rather than closing the gap.', 'small-companies-regs')
556
+ on conflict (code) do update set
557
+ country = excluded.country,
558
+ chart_code = excluded.chart_code,
559
+ name = excluded.name,
560
+ kind = excluded.kind,
561
+ framework = excluded.framework,
562
+ valid_from = excluded.valid_from,
563
+ valid_to = excluded.valid_to,
564
+ legal_reference = excluded.legal_reference,
565
+ source_key = excluded.source_key;
566
+
567
+ insert into statement_line_templates
568
+ (statement_code, code, parent_code, name, name_i18n, sequence, sign, is_total,
569
+ plus_lines, minus_lines, xbrl_element, legal_reference, source_key)
570
+ values
571
+ ('GB-CA-SMALL-BS', 'A', null, 'Called up share capital not paid', '{}'::jsonb, 10, 1, false, '{}'::text[], '{}'::text[], null, null, null),
572
+ ('GB-CA-SMALL-BS', 'B', null, 'Fixed assets', '{}'::jsonb, 20, 1, true, array['B.I', 'B.II', 'B.III']::text[], '{}'::text[], null, null, null),
573
+ ('GB-CA-SMALL-BS', 'B.I', 'B', 'Intangible assets', '{}'::jsonb, 30, 1, true, array['B.I.1', 'B.I.2']::text[], '{}'::text[], null, null, null),
574
+ ('GB-CA-SMALL-BS', 'B.I.1', 'B.I', 'Goodwill', '{}'::jsonb, 40, 1, false, '{}'::text[], '{}'::text[], null, null, null),
575
+ ('GB-CA-SMALL-BS', 'B.I.2', 'B.I', 'Other intangible assets', '{}'::jsonb, 50, 1, false, '{}'::text[], '{}'::text[], null, 'Development costs and patents, trade marks and licences are other intangible assets of Format 1: the format carries two items under B.I and this pack keeps its cost and its accumulated amortisation on adjacent codes so that one range reaches the net figure.', null),
576
+ ('GB-CA-SMALL-BS', 'B.II', 'B', 'Tangible assets', '{}'::jsonb, 60, 1, true, array['B.II.1', 'B.II.2']::text[], '{}'::text[], null, null, null),
577
+ ('GB-CA-SMALL-BS', 'B.II.1', 'B.II', 'Land and buildings', '{}'::jsonb, 70, 1, false, '{}'::text[], '{}'::text[], null, null, null),
578
+ ('GB-CA-SMALL-BS', 'B.II.2', 'B.II', 'Plant and machinery etc.', '{}'::jsonb, 80, 1, false, '{}'::text[], '{}'::text[], null, 'Format 1 gives tangible assets two items only, so fixtures and fittings, office equipment, computer equipment and motor vehicles all report here.', null),
579
+ ('GB-CA-SMALL-BS', 'B.III', 'B', 'Investments', '{}'::jsonb, 90, 1, true, array['B.III.1', 'B.III.2', 'B.III.3', 'B.III.4']::text[], '{}'::text[], null, null, null),
580
+ ('GB-CA-SMALL-BS', 'B.III.1', 'B.III', 'Shares in group undertakings and participating interests', '{}'::jsonb, 100, 1, false, '{}'::text[], '{}'::text[], null, null, null),
581
+ ('GB-CA-SMALL-BS', 'B.III.2', 'B.III', 'Loans to group undertakings and undertakings in which the company has a participating interest', '{}'::jsonb, 110, 1, false, '{}'::text[], '{}'::text[], null, null, null),
582
+ ('GB-CA-SMALL-BS', 'B.III.3', 'B.III', 'Other investments other than loans', '{}'::jsonb, 120, 1, false, '{}'::text[], '{}'::text[], null, null, null),
583
+ ('GB-CA-SMALL-BS', 'B.III.4', 'B.III', 'Other investments', '{}'::jsonb, 130, 1, false, '{}'::text[], '{}'::text[], null, null, null),
584
+ ('GB-CA-SMALL-BS', 'C', null, 'Current assets', '{}'::jsonb, 140, 1, true, array['C.I', 'C.II', 'C.III', 'C.IV']::text[], '{}'::text[], null, null, null),
585
+ ('GB-CA-SMALL-BS', 'C.I', 'C', 'Stocks', '{}'::jsonb, 150, 1, true, array['C.I.1', 'C.I.2']::text[], '{}'::text[], null, null, null),
586
+ ('GB-CA-SMALL-BS', 'C.I.1', 'C.I', 'Stocks', '{}'::jsonb, 160, 1, false, '{}'::text[], '{}'::text[], null, null, null),
587
+ ('GB-CA-SMALL-BS', 'C.I.2', 'C.I', 'Payments on account', '{}'::jsonb, 170, 1, false, '{}'::text[], '{}'::text[], null, null, null),
588
+ ('GB-CA-SMALL-BS', 'C.II', 'C', 'Debtors', '{}'::jsonb, 180, 1, true, array['C.II.1', 'C.II.2', 'C.II.3']::text[], '{}'::text[], null, null, null),
589
+ ('GB-CA-SMALL-BS', 'C.II.1', 'C.II', 'Trade debtors', '{}'::jsonb, 190, 1, false, '{}'::text[], '{}'::text[], null, null, null),
590
+ ('GB-CA-SMALL-BS', 'C.II.2', 'C.II', 'Amounts owed by group undertakings and undertakings in which the company has a participating interest', '{}'::jsonb, 200, 1, false, '{}'::text[], '{}'::text[], null, null, null),
591
+ ('GB-CA-SMALL-BS', 'C.II.3', 'C.II', 'Other debtors', '{}'::jsonb, 210, 1, false, '{}'::text[], '{}'::text[], null, 'The suspense account reaches this line while it is in debit and item E.4 while it is in credit, which is the one way the format lets two lines share an account.', null),
592
+ ('GB-CA-SMALL-BS', 'C.III', 'C', 'Investments', '{}'::jsonb, 220, 1, true, array['C.III.1', 'C.III.2']::text[], '{}'::text[], null, null, null),
593
+ ('GB-CA-SMALL-BS', 'C.III.1', 'C.III', 'Shares in group undertakings', '{}'::jsonb, 230, 1, false, '{}'::text[], '{}'::text[], null, null, null),
594
+ ('GB-CA-SMALL-BS', 'C.III.2', 'C.III', 'Other investments', '{}'::jsonb, 240, 1, false, '{}'::text[], '{}'::text[], null, null, null),
595
+ ('GB-CA-SMALL-BS', 'C.IV', 'C', 'Cash at bank and in hand', '{}'::jsonb, 250, 1, false, '{}'::text[], '{}'::text[], null, null, null),
596
+ ('GB-CA-SMALL-BS', 'D', null, 'Prepayments and accrued income', '{}'::jsonb, 260, 1, false, '{}'::text[], '{}'::text[], null, null, null),
597
+ ('GB-CA-SMALL-BS', 'E', null, 'Creditors: amounts falling due within one year', '{}'::jsonb, 270, 1, true, array['E.1', 'E.2', 'E.3', 'E.4']::text[], '{}'::text[], null, null, null),
598
+ ('GB-CA-SMALL-BS', 'E.1', 'E', 'Bank loans and overdrafts', '{}'::jsonb, 280, -1, false, '{}'::text[], '{}'::text[], null, null, null),
599
+ ('GB-CA-SMALL-BS', 'E.2', 'E', 'Trade creditors', '{}'::jsonb, 290, -1, false, '{}'::text[], '{}'::text[], null, null, null),
600
+ ('GB-CA-SMALL-BS', 'E.3', 'E', 'Amounts owed to group undertakings and undertakings in which the company has a participating interest', '{}'::jsonb, 300, -1, false, '{}'::text[], '{}'::text[], null, null, null),
601
+ ('GB-CA-SMALL-BS', 'E.4', 'E', 'Other creditors', '{}'::jsonb, 310, -1, false, '{}'::text[], '{}'::text[], null, 'Format 1 gives creditors within one year four items, so the taxes, the payroll liabilities and the finance lease obligations of this chart all report here.', null),
602
+ ('GB-CA-SMALL-BS', 'F', null, 'Net current assets (liabilities)', '{}'::jsonb, 320, 1, true, array['C', 'D']::text[], array['E', 'J']::text[], null, 'Note 5 to Section B of Schedule 1 puts the amount of accruals and deferred income falling due within one year into the computation of this item. This pack has no column that splits item J by maturity, so the whole of it is taken as current, which is how a small company''s accruals almost always are, and item J is therefore deducted here and not again below.', null),
603
+ ('GB-CA-SMALL-BS', 'G', null, 'Total assets less current liabilities', '{}'::jsonb, 330, 1, true, array['A', 'B', 'F']::text[], '{}'::text[], null, null, null),
604
+ ('GB-CA-SMALL-BS', 'H', null, 'Creditors: amounts falling due after more than one year', '{}'::jsonb, 340, 1, true, array['H.1', 'H.2', 'H.3', 'H.4']::text[], '{}'::text[], null, null, null),
605
+ ('GB-CA-SMALL-BS', 'H.1', 'H', 'Bank loans and overdrafts', '{}'::jsonb, 350, -1, false, '{}'::text[], '{}'::text[], null, null, null),
606
+ ('GB-CA-SMALL-BS', 'H.2', 'H', 'Trade creditors', '{}'::jsonb, 360, -1, false, '{}'::text[], '{}'::text[], null, null, null),
607
+ ('GB-CA-SMALL-BS', 'H.3', 'H', 'Amounts owed to group undertakings and undertakings in which the company has a participating interest', '{}'::jsonb, 370, -1, false, '{}'::text[], '{}'::text[], null, null, null),
608
+ ('GB-CA-SMALL-BS', 'H.4', 'H', 'Other creditors', '{}'::jsonb, 380, -1, false, '{}'::text[], '{}'::text[], null, null, null),
609
+ ('GB-CA-SMALL-BS', 'I', null, 'Provisions for liabilities', '{}'::jsonb, 390, -1, false, '{}'::text[], '{}'::text[], null, null, null),
610
+ ('GB-CA-SMALL-BS', 'J', null, 'Accruals and deferred income', '{}'::jsonb, 400, -1, false, '{}'::text[], '{}'::text[], null, null, null),
611
+ ('GB-CA-SMALL-BS', 'NET', null, 'Net assets (liabilities)', '{}'::jsonb, 410, 1, true, array['G']::text[], array['H', 'I']::text[], null, 'Not an item of Format 1, which ends on item K. It is the figure the items of the format produce and the one a British balance sheet prints above the capital and reserves, so that a reader can see the two agree. They agree only once the year is closed: until close_fiscal_year() carries the result into reserves, net assets exceed capital and reserves by exactly the profit of the income statement.', null),
612
+ ('GB-CA-SMALL-BS', 'K', null, 'Capital and reserves', '{}'::jsonb, 420, 1, true, array['K.I', 'K.II', 'K.III', 'K.IV', 'K.V']::text[], '{}'::text[], null, null, null),
613
+ ('GB-CA-SMALL-BS', 'K.I', 'K', 'Called up share capital', '{}'::jsonb, 430, -1, false, '{}'::text[], '{}'::text[], null, null, null),
614
+ ('GB-CA-SMALL-BS', 'K.II', 'K', 'Share premium account', '{}'::jsonb, 440, -1, false, '{}'::text[], '{}'::text[], null, null, null),
615
+ ('GB-CA-SMALL-BS', 'K.III', 'K', 'Revaluation reserve', '{}'::jsonb, 450, -1, false, '{}'::text[], '{}'::text[], null, null, null),
616
+ ('GB-CA-SMALL-BS', 'K.IV', 'K', 'Other reserves', '{}'::jsonb, 460, -1, false, '{}'::text[], '{}'::text[], null, null, null),
617
+ ('GB-CA-SMALL-BS', 'K.V', 'K', 'Profit and loss account', '{}'::jsonb, 470, -1, false, '{}'::text[], '{}'::text[], null, 'The United Kingdom closes the year into reserves: there is no current-year result account on this balance sheet, which is why the manifest declares the retained_earnings closing style. A dividend is not part of a close and is booked here by hand.', null),
618
+ ('GB-CA-SMALL-IS', '1', null, 'Turnover', '{}'::jsonb, 10, -1, false, '{}'::text[], '{}'::text[], null, 'Sales returns and discounts allowed are inside turnover and reduce it, which is why they are codes of this range rather than a line of their own: Format 1 has one turnover item.', null),
619
+ ('GB-CA-SMALL-IS', '2', null, 'Cost of sales', '{}'::jsonb, 20, 1, false, '{}'::text[], '{}'::text[], null, null, null),
620
+ ('GB-CA-SMALL-IS', '3', null, 'Gross profit or loss', '{}'::jsonb, 30, 1, true, array['1']::text[], array['2']::text[], null, null, null),
621
+ ('GB-CA-SMALL-IS', '4', null, 'Distribution costs', '{}'::jsonb, 40, 1, false, '{}'::text[], '{}'::text[], null, null, null),
622
+ ('GB-CA-SMALL-IS', '5', null, 'Administrative expenses', '{}'::jsonb, 50, 1, false, '{}'::text[], '{}'::text[], null, 'Format 1 classifies expenses by function, so the depreciation and amortisation of this chart, the exchange losses and the rounding differences all report here. A company that wants them on a line of their own reports on Format 2, which this pack does not carry.', null),
623
+ ('GB-CA-SMALL-IS', '6', null, 'Other operating income', '{}'::jsonb, 60, -1, false, '{}'::text[], '{}'::text[], null, null, null),
624
+ ('GB-CA-SMALL-IS', '7', null, 'Income from shares in group undertakings', '{}'::jsonb, 70, -1, false, '{}'::text[], '{}'::text[], null, null, null),
625
+ ('GB-CA-SMALL-IS', '8', null, 'Income from participating interests', '{}'::jsonb, 80, -1, false, '{}'::text[], '{}'::text[], null, null, null),
626
+ ('GB-CA-SMALL-IS', '9', null, 'Income from other fixed asset investments', '{}'::jsonb, 90, -1, false, '{}'::text[], '{}'::text[], null, null, null),
627
+ ('GB-CA-SMALL-IS', '10', null, 'Other interest receivable and similar income', '{}'::jsonb, 100, -1, false, '{}'::text[], '{}'::text[], null, null, null),
628
+ ('GB-CA-SMALL-IS', '11', null, 'Amounts written off investments', '{}'::jsonb, 110, 1, false, '{}'::text[], '{}'::text[], null, null, null),
629
+ ('GB-CA-SMALL-IS', '12', null, 'Interest payable and similar expenses', '{}'::jsonb, 120, 1, false, '{}'::text[], '{}'::text[], null, null, null),
630
+ ('GB-CA-SMALL-IS', '13', null, 'Tax on profit or loss', '{}'::jsonb, 130, 1, false, '{}'::text[], '{}'::text[], null, null, null),
631
+ ('GB-CA-SMALL-IS', '14', null, 'Profit or loss after taxation', '{}'::jsonb, 140, 1, true, array['3', '6', '7', '8', '9', '10']::text[], array['4', '5', '11', '12', '13']::text[], null, null, null),
632
+ ('GB-CA-SMALL-IS', '19', null, 'Other taxes not shown under the above items', '{}'::jsonb, 150, 1, false, '{}'::text[], '{}'::text[], null, null, null),
633
+ ('GB-CA-SMALL-IS', '20', null, 'Profit or loss for the financial year', '{}'::jsonb, 160, 1, true, array['14']::text[], array['19']::text[], null, null, null)
634
+ on conflict (statement_code, code) do update set
635
+ parent_code = excluded.parent_code,
636
+ name = excluded.name,
637
+ name_i18n = excluded.name_i18n,
638
+ sequence = excluded.sequence,
639
+ sign = excluded.sign,
640
+ is_total = excluded.is_total,
641
+ plus_lines = excluded.plus_lines,
642
+ minus_lines = excluded.minus_lines,
643
+ xbrl_element = excluded.xbrl_element,
644
+ legal_reference = excluded.legal_reference,
645
+ source_key = excluded.source_key;
646
+
647
+ insert into statement_line_rules
648
+ (statement_code, line_code, sequence, rule_kind, code_from, code_to,
649
+ account_type, balance_side)
650
+ select v.statement_code, v.line_code, v.sequence, v.rule_kind, v.code_from,
651
+ v.code_to, v.account_type::account_type, v.balance_side
652
+ from (values
653
+ ('GB-CA-SMALL-BS', 'A', 10, 'account_code', '0000', null, null, 'any'),
654
+ ('GB-CA-SMALL-BS', 'B.I.1', 10, 'code_range', '0010', '0011', null, 'any'),
655
+ ('GB-CA-SMALL-BS', 'B.I.2', 10, 'code_range', '0020', '0041', null, 'any'),
656
+ ('GB-CA-SMALL-BS', 'B.II.1', 10, 'code_range', '0100', '0111', null, 'any'),
657
+ ('GB-CA-SMALL-BS', 'B.II.2', 10, 'code_range', '0120', '0161', null, 'any'),
658
+ ('GB-CA-SMALL-BS', 'B.III.1', 10, 'account_code', '0200', null, null, 'any'),
659
+ ('GB-CA-SMALL-BS', 'B.III.2', 10, 'account_code', '0210', null, null, 'any'),
660
+ ('GB-CA-SMALL-BS', 'B.III.3', 10, 'account_code', '0220', null, null, 'any'),
661
+ ('GB-CA-SMALL-BS', 'B.III.4', 10, 'account_code', '0230', null, null, 'any'),
662
+ ('GB-CA-SMALL-BS', 'C.I.1', 10, 'code_range', '1000', '1020', null, 'any'),
663
+ ('GB-CA-SMALL-BS', 'C.I.2', 10, 'account_code', '1030', null, null, 'any'),
664
+ ('GB-CA-SMALL-BS', 'C.II.1', 10, 'code_range', '1100', '1105', null, 'any'),
665
+ ('GB-CA-SMALL-BS', 'C.II.2', 10, 'account_code', '1110', null, null, 'any'),
666
+ ('GB-CA-SMALL-BS', 'C.II.3', 10, 'code_range', '1120', '1160', null, 'any'),
667
+ ('GB-CA-SMALL-BS', 'C.II.3', 20, 'account_code', '2400', null, null, 'debit'),
668
+ ('GB-CA-SMALL-BS', 'C.III.1', 10, 'account_code', '1200', null, null, 'any'),
669
+ ('GB-CA-SMALL-BS', 'C.III.2', 10, 'account_code', '1210', null, null, 'any'),
670
+ ('GB-CA-SMALL-BS', 'C.IV', 10, 'code_range', '1300', '1350', null, 'any'),
671
+ ('GB-CA-SMALL-BS', 'D', 10, 'code_range', '1400', '1420', null, 'any'),
672
+ ('GB-CA-SMALL-BS', 'E.1', 10, 'code_range', '2000', '2020', null, 'any'),
673
+ ('GB-CA-SMALL-BS', 'E.2', 10, 'account_code', '2100', null, null, 'any'),
674
+ ('GB-CA-SMALL-BS', 'E.3', 10, 'account_code', '2110', null, null, 'any'),
675
+ ('GB-CA-SMALL-BS', 'E.4', 10, 'code_range', '2200', '2300', null, 'any'),
676
+ ('GB-CA-SMALL-BS', 'E.4', 20, 'account_code', '2400', null, null, 'credit'),
677
+ ('GB-CA-SMALL-BS', 'H.1', 10, 'code_range', '3000', '3010', null, 'any'),
678
+ ('GB-CA-SMALL-BS', 'H.2', 10, 'account_code', '3020', null, null, 'any'),
679
+ ('GB-CA-SMALL-BS', 'H.3', 10, 'account_code', '3030', null, null, 'any'),
680
+ ('GB-CA-SMALL-BS', 'H.4', 10, 'code_range', '3040', '3050', null, 'any'),
681
+ ('GB-CA-SMALL-BS', 'I', 10, 'code_range', '3100', '3110', null, 'any'),
682
+ ('GB-CA-SMALL-BS', 'J', 10, 'code_range', '3200', '3210', null, 'any'),
683
+ ('GB-CA-SMALL-BS', 'K.I', 10, 'account_code', '3300', null, null, 'any'),
684
+ ('GB-CA-SMALL-BS', 'K.II', 10, 'account_code', '3310', null, null, 'any'),
685
+ ('GB-CA-SMALL-BS', 'K.III', 10, 'account_code', '3320', null, null, 'any'),
686
+ ('GB-CA-SMALL-BS', 'K.IV', 10, 'code_range', '3330', '3340', null, 'any'),
687
+ ('GB-CA-SMALL-BS', 'K.V', 10, 'code_range', '3400', '3410', null, 'any'),
688
+ ('GB-CA-SMALL-IS', '1', 10, 'code_range', '4000', '4110', null, 'any'),
689
+ ('GB-CA-SMALL-IS', '2', 10, 'code_range', '5000', '5240', null, 'any'),
690
+ ('GB-CA-SMALL-IS', '4', 10, 'code_range', '6000', '6500', null, 'any'),
691
+ ('GB-CA-SMALL-IS', '5', 10, 'code_range', '7000', '7710', null, 'any'),
692
+ ('GB-CA-SMALL-IS', '6', 10, 'code_range', '4200', '4240', null, 'any'),
693
+ ('GB-CA-SMALL-IS', '7', 10, 'account_code', '4300', null, null, 'any'),
694
+ ('GB-CA-SMALL-IS', '8', 10, 'account_code', '4310', null, null, 'any'),
695
+ ('GB-CA-SMALL-IS', '9', 10, 'account_code', '4320', null, null, 'any'),
696
+ ('GB-CA-SMALL-IS', '10', 10, 'account_code', '4330', null, null, 'any'),
697
+ ('GB-CA-SMALL-IS', '11', 10, 'account_code', '8100', null, null, 'any'),
698
+ ('GB-CA-SMALL-IS', '12', 10, 'code_range', '8000', '8040', null, 'any'),
699
+ ('GB-CA-SMALL-IS', '13', 10, 'code_range', '8200', '8220', null, 'any'),
700
+ ('GB-CA-SMALL-IS', '19', 10, 'account_code', '8300', null, null, 'any')
701
+ ) as v (statement_code, line_code, sequence, rule_kind, code_from, code_to,
702
+ account_type, balance_side)
703
+ on conflict (statement_code, line_code, sequence) do update set
704
+ rule_kind = excluded.rule_kind,
705
+ code_from = excluded.code_from,
706
+ code_to = excluded.code_to,
707
+ account_type = excluded.account_type,
708
+ balance_side = excluded.balance_side;
709
+
710
+ insert into country_defaults
711
+ (country, name, name_i18n, languages, currency_code, receivable_code, payable_code, suspense_code,
712
+ rounding_code, retained_earnings_code, sales_account_code, purchase_account_code,
713
+ bank_account_code, cash_account_code, sales_journal_code, purchase_journal_code,
714
+ misc_journal_code, language_default, closing_style, current_year_result_profit_code,
715
+ current_year_result_loss_code, retained_earnings_loss_code, opening_journal_code,
716
+ rounding_method, cash_rounding_unit, fx_gain_code, fx_loss_code,
717
+ asset_disposal_gain_code, asset_disposal_loss_code,
718
+ asset_disposal_proceeds_code, asset_disposal_value_code,
719
+ tax_payable_code, tax_receivable_code, opening_entry_label,
720
+ vat_period_default)
721
+ values
722
+ ('GB', 'United Kingdom', '{}'::jsonb, array['en']::text[], 'GBP', '1100', '2100', '2400', '7710', '3400', '4000', '5000', '1300', '1330', 'SAL', 'PUR', 'GEN', 'en', 'retained_earnings', null, null, null, 'OPN', 'half_up', default, '4240', '7700', '4230', '7690', null, null, '2210', null, null, 'quarter'::declaration_period)
723
+ on conflict (country) do update set
724
+ name = excluded.name,
725
+ name_i18n = excluded.name_i18n,
726
+ languages = excluded.languages,
727
+ currency_code = excluded.currency_code,
728
+ receivable_code = excluded.receivable_code,
729
+ payable_code = excluded.payable_code,
730
+ suspense_code = excluded.suspense_code,
731
+ rounding_code = excluded.rounding_code,
732
+ retained_earnings_code = excluded.retained_earnings_code,
733
+ sales_account_code = excluded.sales_account_code,
734
+ purchase_account_code = excluded.purchase_account_code,
735
+ bank_account_code = excluded.bank_account_code,
736
+ cash_account_code = excluded.cash_account_code,
737
+ sales_journal_code = excluded.sales_journal_code,
738
+ purchase_journal_code = excluded.purchase_journal_code,
739
+ misc_journal_code = excluded.misc_journal_code,
740
+ language_default = excluded.language_default,
741
+ closing_style = excluded.closing_style,
742
+ current_year_result_profit_code = excluded.current_year_result_profit_code,
743
+ current_year_result_loss_code = excluded.current_year_result_loss_code,
744
+ retained_earnings_loss_code = excluded.retained_earnings_loss_code,
745
+ opening_journal_code = excluded.opening_journal_code,
746
+ rounding_method = excluded.rounding_method,
747
+ cash_rounding_unit = excluded.cash_rounding_unit,
748
+ fx_gain_code = excluded.fx_gain_code,
749
+ fx_loss_code = excluded.fx_loss_code,
750
+ asset_disposal_gain_code = excluded.asset_disposal_gain_code,
751
+ asset_disposal_loss_code = excluded.asset_disposal_loss_code,
752
+ asset_disposal_proceeds_code = excluded.asset_disposal_proceeds_code,
753
+ asset_disposal_value_code = excluded.asset_disposal_value_code,
754
+ tax_payable_code = excluded.tax_payable_code,
755
+ tax_receivable_code = excluded.tax_receivable_code,
756
+ opening_entry_label = excluded.opening_entry_label,
757
+ vat_period_default = excluded.vat_period_default;
758
+
759
+ update country_defaults set
760
+ numbering_gapless = false,
761
+ number_format = '{CODE}-{YYYY}-{NNNN}',
762
+ legal_payment_days = 30,
763
+ late_payment_reference = 'Late Payment of Commercial Debts (Interest) Act 1998, s. 4(2H) — where the parties agreed no payment day, the relevant day is the last day of the relevant 30-day period; s. 4(2E) — where the purchaser is not a public authority, an agreed payment day later than the relevant 60-day period does not stand; s. 6 — the rate of statutory interest is set by order of the Secretary of State with the consent of the Treasury; s. 5A — a fixed sum for the cost of recovering the debt, £40 below £1,000, £70 from £1,000 to £9,999.99 and £100 from £10,000, with the reasonable additional costs of recovery on top of it',
764
+ numbering_legal_reference = 'Value Added Tax Regulations 1995, reg. 14(1)(a) — a VAT invoice states “a sequential number based on one or more series which uniquely identifies the document”. The text imposes the sequence, the series and uniqueness, and never a shape: it does not forbid a hole, which is why `numbering` is `sequential` and not gapless, and the pattern declared in number_format is one of the series it allows rather than a form it prescribes. Regulation 16 lets a retailer issue a less detailed invoice where the consideration does not exceed £250.',
765
+ numbering_source_key = 'vat-regs-1995',
766
+ payment_terms_legal_reference = 'Late Payment of Commercial Debts (Interest) Act 1998, s. 4(2H) — where the parties agreed no payment day, the relevant day is the last day of the relevant 30-day period, which begins with the later of the performance of the supplier''s obligation and the day the purchaser has notice of the amount of the debt; s. 4(2E) — where the purchaser is not a public authority, an agreed payment day falling later than the relevant 60-day period does not stand. Thirty days is therefore the term the law sets in the absence of an agreement and sixty the ceiling on what two businesses may agree.',
767
+ payment_terms_source_key = 'lpcd-1998',
768
+ tax_point_rule = 'invoice_if_issued',
769
+ tax_point_legal_reference = 'Value Added Tax Act 1994, s. 6 — the basic tax point is the removal or making available of the goods (s. 6(2)) and the performance of the services (s. 6(3)); s. 6(4) and (5) displace it, so that a VAT invoice issued within fourteen days after the basic tax point, or an invoice issued or a payment received before it, makes the supply take place at that date instead, to that extent. `invoice_if_issued` says the principle and the derogation together, which is what the Act does; `invoice_date`, declared until now, said only the derogation, and this pack''s own citation said so. The payment branch of s. 6(4) is a prepayment rule and the word does not carry it.',
770
+ tax_point_source_key = 'vata-1994',
771
+ einvoice_profile = 'peppol-bis-3',
772
+ einvoice_mandatory_from = null,
773
+ einvoice_legal_reference = 'No United Kingdom statute obliges anybody to issue or receive an electronic invoice, and no date has been set in law. The consultation response of 26 November 2025 records the decision announced at Budget 2025 to make e-invoicing mandatory for all VAT invoices from 2029, on a decentralised four-corner model aligned with Peppol and with EN 16931 as the standard, and says an implementation roadmap will be published at Budget 2026; nothing has been legislated, so mandatory_from is empty rather than a date this pack invented. The profile declared here is what United Kingdom Peppol participants actually exchange and is not a legal requirement. The two identifiers are ISO 6523 codes of the Peppol electronic address scheme list: 0088 is the Global Location Number, under which British parties are commonly addressed, because that list carries no code for a Companies House registration number; 9932 is the United Kingdom VAT number.',
774
+ einvoice_source_key = 'einvoicing-response',
775
+ party_scheme = '0088',
776
+ vat_scheme = '9932',
777
+ bank_statement_formats = array['camt.053', 'ofx', 'mt940', 'csv']::text[],
778
+ payment_formats = array['bacs', 'pain.001', 'csv']::text[],
779
+ fiscal_year_default = null
780
+ where country = 'GB';
781
+
782
+ insert into legal_mention_templates
783
+ (country, code, applies_when, text, text_i18n, sequence, valid_from, valid_to, legal_reference)
784
+ values
785
+ ('GB', 'reverse_charge', 'reverse_charge', 'Reverse charge: the customer is to account for the VAT to HMRC.', '{}'::jsonb, 10, date '1970-01-01', null, 'Value Added Tax Regulations 1995, reg. 14(1) — a VAT invoice states, where the supply is one on which the customer is liable to pay the tax, a reference to the reverse charge. Two United Kingdom rules put a customer in that position and this pack prints one sentence for both, because the format offers one condition: VATA 1994, s. 55A and the Value Added Tax (Section 55A) (Specified Services and Excepted Supplies) Order 2019 for construction services supplied between taxable persons here, and VATA 1994, s. 8 for a service received from a supplier who is not established here.'),
786
+ ('GB', 'export', 'export', 'Zero-rated export of goods from the United Kingdom.', '{}'::jsonb, 20, date '1970-01-01', null, 'Value Added Tax Act 1994, s. 30(6) — a supply of goods is zero-rated where the Commissioners are satisfied that the goods have been or are to be exported; Value Added Tax Regulations 1995, reg. 14(1) requires the rate and the amount payable excluding VAT for each description of goods, which on a zero-rated line is nil.'),
787
+ ('GB', 'exempt', 'exempt', 'Exempt supply — no VAT is chargeable.', '{}'::jsonb, 30, date '1970-01-01', null, 'Value Added Tax Act 1994, s. 31 and Schedule 9 — a supply of a description specified in Schedule 9 is an exempt supply. Regulation 13 of the Value Added Tax Regulations 1995 obliges a VAT invoice only on a taxable supply, so a wholly exempt supply carries this sentence on a commercial document rather than on a VAT invoice.'),
788
+ ('GB', 'late_payment', 'late_payment', 'If this invoice is not paid by its due date the supplier is entitled to statutory interest and to a fixed sum for the cost of recovering the debt, under the Late Payment of Commercial Debts (Interest) Act 1998.', '{}'::jsonb, 40, date '1970-01-01', null, 'Late Payment of Commercial Debts (Interest) Act 1998, s. 1(1), s. 4 and s. 5A — an implied term of a contract for the supply of goods or services between businesses')
789
+ on conflict (country, code) do update set
790
+ applies_when = excluded.applies_when,
791
+ text = excluded.text,
792
+ text_i18n = excluded.text_i18n,
793
+ sequence = excluded.sequence,
794
+ valid_from = excluded.valid_from,
795
+ valid_to = excluded.valid_to,
796
+ legal_reference = excluded.legal_reference;