billing 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d99b85d2a8cba740b11827271a6a364f345b930
4
- data.tar.gz: 42468d50b105eea40ef7add0e1d894e75e9b757c
3
+ metadata.gz: 94919d017a270101a2efc99c13b37fc417d2ae75
4
+ data.tar.gz: 0210520fe469c56b06287cdc0b2694681ae25aa4
5
5
  SHA512:
6
- metadata.gz: e6e7d5ff518d835a26c6df10676b37141570c4b7921ec75a6b9c80a1c62a8a34bca398a2da0b3d6410f25f1d228d40283280b84ac8ce3fd576a0f49b8f522730
7
- data.tar.gz: 38466e3f9c9fdc8536e470084f85c26350600c59398da3676281df47eb700de2ef0097055277ece26f73d131e26f4d411962b7ca99fde55da7b7f5203414f5d2
6
+ metadata.gz: 627bc666c769bd49213e93d9b2e59dd1bc340374060f9218479fdd59bcee7d503c816a4e2d62cf391c15b1de5e57e561f5bc05a64e8805728cdb9609ef179f97
7
+ data.tar.gz: df019fb7b726d39cba6ce4610a8448d5d7d450cba658b09e1cdc42f6d2076a9344468bddd889ea3e3a3690ee864617c9e035d6f863f684443474d03ae305f2d9
@@ -41,7 +41,7 @@ module Billing
41
41
  text1: charge.name,
42
42
  text2: charge.description,
43
43
  tax_group: charge.find_tax_group_mapping_for(s), #find tax group mapping by ratio , not nice
44
- qty: charge.qty,
44
+ qty: charge.qty.try(:to_f),
45
45
  neto: neto,
46
46
  percent_ratio: percent_ratio #TODO check format
47
47
  )
@@ -1,3 +1,3 @@
1
1
  module Billing
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
Binary file
@@ -11249,3 +11249,301 @@ Billing::ModifierTest: test_allow_only_one_modifier_per_charge
11249
11249
  Billing::Modifier Exists (0.1ms) SELECT 1 AS one FROM "billing_modifiers" WHERE ("billing_modifiers"."bill_id" = 980190962 AND "billing_modifiers"."charge_id" = 980190962) LIMIT 1
11250
11250
   (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
11251
11251
   (0.1ms) rollback transaction
11252
+  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
11253
+  (117.7ms) DROP TABLE IF EXISTS "billing_bills"
11254
+  (0.1ms) SELECT sqlite_version(*)
11255
+  (81.0ms) CREATE TABLE "billing_bills" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar, "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime, "name" varchar, "number" varchar, "deleted_at" datetime, "print_job_id" integer)
11256
+  (81.9ms) CREATE INDEX "index_billing_bills_on_billable_type_and_billable_id" ON "billing_bills" ("billable_type", "billable_id")
11257
+  (81.6ms) CREATE INDEX "index_billing_bills_on_extface_job_id" ON "billing_bills" ("extface_job_id")
11258
+  (81.2ms) CREATE INDEX "index_billing_bills_on_origin_id" ON "billing_bills" ("origin_id")
11259
+  (90.8ms) CREATE INDEX "index_billing_bills_on_report_id" ON "billing_bills" ("report_id")
11260
+  (98.6ms) DROP TABLE IF EXISTS "billing_charges"
11261
+  (79.9ms) CREATE TABLE "billing_charges" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "chargable_id" integer, "chargable_type" varchar, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar, "description" varchar, "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime, "qty" decimal(6,3), "tax_ratio" decimal(6,3))
11262
+  (88.1ms) CREATE INDEX "index_billing_charges_on_bill_id" ON "billing_charges" ("bill_id")
11263
+  (91.3ms) CREATE INDEX "index_billing_charges_on_chargable_type_and_chargable_id" ON "billing_charges" ("chargable_type", "chargable_id")
11264
+  (89.3ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")
11265
+  (107.6ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")
11266
+  (101.8ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")
11267
+  (102.1ms) DROP TABLE IF EXISTS "billing_departments"
11268
+  (94.8ms) CREATE TABLE "billing_departments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "tax_group_id" integer, "type" varchar, "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)
11269
+  (91.6ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")
11270
+  (97.9ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")
11271
+  (98.1ms) DROP TABLE IF EXISTS "billing_modifiers"
11272
+  (88.8ms) CREATE TABLE "billing_modifiers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime)
11273
+  (91.2ms) CREATE INDEX "index_billing_modifiers_on_bill_id" ON "billing_modifiers" ("bill_id")
11274
+  (90.2ms) DROP TABLE IF EXISTS "billing_op_fp_mappings"
11275
+  (90.6ms) CREATE TABLE "billing_op_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "operator_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime, "pwd" varchar)
11276
+  (98.2ms) CREATE INDEX "index_billing_op_fp_mappings_on_extface_driver_id" ON "billing_op_fp_mappings" ("extface_driver_id")
11277
+  (97.9ms) CREATE INDEX "index_billing_op_fp_mappings_on_operator_id" ON "billing_op_fp_mappings" ("operator_id")
11278
+  (89.9ms) DROP TABLE IF EXISTS "billing_operators"
11279
+  (90.1ms) CREATE TABLE "billing_operators" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "type" varchar, "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)
11280
+  (90.2ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")
11281
+  (90.0ms) DROP TABLE IF EXISTS "billing_origins"
11282
+  (90.4ms) CREATE TABLE "billing_origins" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar, "payment_model" varchar DEFAULT 'Billing::PaymentWithType', "transfer_device_id" integer, "print_device_id" integer, "print_header" varchar, "print_footer" varchar, "receipt_config_id" integer)
11283
+  (89.8ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")
11284
+  (89.7ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")
11285
+  (89.0ms) CREATE INDEX "index_billing_origins_on_receipt_config_id" ON "billing_origins" ("receipt_config_id")
11286
+  (81.6ms) CREATE INDEX "index_billing_origins_on_transfer_device_id" ON "billing_origins" ("transfer_device_id")
11287
+  (123.4ms) DROP TABLE IF EXISTS "billing_payment_types"
11288
+  (81.6ms) CREATE TABLE "billing_payment_types" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar, "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)
11289
+  (81.7ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")
11290
+  (81.5ms) DROP TABLE IF EXISTS "billing_payments"
11291
+  (81.7ms) CREATE TABLE "billing_payments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar, "payment_type_id" integer, "status" varchar, "name" varchar, "description" varchar, "external_token" varchar, "note" varchar, "deleted_at" datetime)
11292
+  (82.2ms) CREATE INDEX "index_billing_payments_on_bill_id" ON "billing_payments" ("bill_id")
11293
+  (80.7ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")
11294
+  (82.5ms) DROP TABLE IF EXISTS "billing_plus"
11295
+  (81.8ms) CREATE TABLE "billing_plus" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar DEFAULT 'USD' NOT NULL, "code" varchar, "type" varchar, "banned" boolean, "deleted_at" datetime)
11296
+  (81.4ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")
11297
+  (89.7ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")
11298
+  (89.1ms) DROP TABLE IF EXISTS "billing_profiles"
11299
+  (90.7ms) CREATE TABLE "billing_profiles" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)
11300
+  (90.0ms) DROP TABLE IF EXISTS "billing_pt_fp_mappings"
11301
+  (98.9ms) CREATE TABLE "billing_pt_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)
11302
+  (98.1ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")
11303
+  (114.3ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")
11304
+  (89.9ms) DROP TABLE IF EXISTS "billing_receipt_configs"
11305
+  (90.4ms) CREATE TABLE "billing_receipt_configs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "type" varchar, "name" varchar, "discount_text" varchar, "surcharge_text" varchar, "sound_signal" boolean, "open_cash_drawer" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "paper_cut" boolean, "custom_commands" boolean, "custom_commands_text" varchar)
11306
+  (89.7ms) DROP TABLE IF EXISTS "billing_reports"
11307
+  (98.2ms) CREATE TABLE "billing_reports" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar DEFAULT 'USD' NOT NULL, "note" text, "type" varchar, "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar, "f_amount_cents" integer DEFAULT 0 NOT NULL, "f_amount_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime)
11308
+  (73.9ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")
11309
+  (97.4ms) DROP TABLE IF EXISTS "billing_resources"
11310
+  (65.8ms) CREATE TABLE "billing_resources" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "properties" text, "banned" boolean, "type" varchar, "created_at" datetime, "updated_at" datetime, "deleted_at" datetime)
11311
+  (65.5ms) DROP TABLE IF EXISTS "billing_tax_groups"
11312
+  (65.4ms) CREATE TABLE "billing_tax_groups" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar, "deleted_at" datetime)
11313
+  (73.3ms) DROP TABLE IF EXISTS "billing_tg_fp_mappings"
11314
+  (66.0ms) CREATE TABLE "billing_tg_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "tax_group_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)
11315
+  (65.2ms) CREATE INDEX "index_billing_tg_fp_mappings_on_extface_driver_id" ON "billing_tg_fp_mappings" ("extface_driver_id")
11316
+  (64.9ms) CREATE INDEX "index_billing_tg_fp_mappings_on_tax_group_id" ON "billing_tg_fp_mappings" ("tax_group_id")
11317
+  (65.0ms) DROP TABLE IF EXISTS "billing_versions"
11318
+  (65.6ms) CREATE TABLE "billing_versions" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "event" varchar NOT NULL, "whodunnit" varchar, "object" text, "created_at" datetime, "ip" varchar, "user_agent" varchar, "object_changes" text, "master_id" integer, "master_type" varchar)
11319
+  (65.5ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")
11320
+  (73.5ms) DROP TABLE IF EXISTS "profiles"
11321
+  (74.1ms) CREATE TABLE "profiles" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
11322
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
11323
+  (97.1ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
11324
+ ActiveRecord::InternalMetadata Load (0.5ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
11325
+  (0.1ms) begin transaction
11326
+ ActiveRecord::InternalMetadata Create (0.2ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "test"], ["created_at", "2018-11-15 00:46:01.289678"], ["updated_at", "2018-11-15 00:46:01.289678"]]
11327
+  (105.1ms) commit transaction
11328
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
11329
+  (111.7ms) DROP TABLE IF EXISTS "billing_bills"
11330
+  (0.1ms) SELECT sqlite_version(*)
11331
+  (82.8ms) CREATE TABLE "billing_bills" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar, "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime, "name" varchar, "number" varchar, "deleted_at" datetime, "print_job_id" integer)
11332
+  (73.5ms) CREATE INDEX "index_billing_bills_on_billable_type_and_billable_id" ON "billing_bills" ("billable_type", "billable_id")
11333
+  (79.6ms) CREATE INDEX "index_billing_bills_on_extface_job_id" ON "billing_bills" ("extface_job_id")
11334
+  (74.8ms) CREATE INDEX "index_billing_bills_on_origin_id" ON "billing_bills" ("origin_id")
11335
+  (72.7ms) CREATE INDEX "index_billing_bills_on_report_id" ON "billing_bills" ("report_id")
11336
+  (73.8ms) DROP TABLE IF EXISTS "billing_charges"
11337
+  (67.5ms) CREATE TABLE "billing_charges" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "chargable_id" integer, "chargable_type" varchar, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar, "description" varchar, "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime, "qty" decimal(6,3), "tax_ratio" decimal(6,3))
11338
+  (60.9ms) CREATE INDEX "index_billing_charges_on_bill_id" ON "billing_charges" ("bill_id")
11339
+  (73.5ms) CREATE INDEX "index_billing_charges_on_chargable_type_and_chargable_id" ON "billing_charges" ("chargable_type", "chargable_id")
11340
+  (64.8ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")
11341
+  (74.5ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")
11342
+  (99.6ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")
11343
+  (91.6ms) DROP TABLE IF EXISTS "billing_departments"
11344
+  (62.0ms) CREATE TABLE "billing_departments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "tax_group_id" integer, "type" varchar, "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)
11345
+  (62.2ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")
11346
+  (56.2ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")
11347
+  (57.2ms) DROP TABLE IF EXISTS "billing_modifiers"
11348
+  (65.5ms) CREATE TABLE "billing_modifiers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime)
11349
+  (81.7ms) CREATE INDEX "index_billing_modifiers_on_bill_id" ON "billing_modifiers" ("bill_id")
11350
+  (57.2ms) DROP TABLE IF EXISTS "billing_op_fp_mappings"
11351
+  (57.6ms) CREATE TABLE "billing_op_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "operator_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime, "pwd" varchar)
11352
+  (56.8ms) CREATE INDEX "index_billing_op_fp_mappings_on_extface_driver_id" ON "billing_op_fp_mappings" ("extface_driver_id")
11353
+  (65.0ms) CREATE INDEX "index_billing_op_fp_mappings_on_operator_id" ON "billing_op_fp_mappings" ("operator_id")
11354
+  (65.6ms) DROP TABLE IF EXISTS "billing_operators"
11355
+  (73.5ms) CREATE TABLE "billing_operators" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "type" varchar, "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)
11356
+  (73.4ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")
11357
+  (65.8ms) DROP TABLE IF EXISTS "billing_origins"
11358
+  (78.9ms) CREATE TABLE "billing_origins" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar, "payment_model" varchar DEFAULT 'Billing::PaymentWithType', "transfer_device_id" integer, "print_device_id" integer, "print_header" varchar, "print_footer" varchar, "receipt_config_id" integer)
11359
+  (73.5ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")
11360
+  (73.1ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")
11361
+  (104.5ms) CREATE INDEX "index_billing_origins_on_receipt_config_id" ON "billing_origins" ("receipt_config_id")
11362
+  (81.3ms) CREATE INDEX "index_billing_origins_on_transfer_device_id" ON "billing_origins" ("transfer_device_id")
11363
+  (65.3ms) DROP TABLE IF EXISTS "billing_payment_types"
11364
+  (81.4ms) CREATE TABLE "billing_payment_types" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar, "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)
11365
+  (89.9ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")
11366
+  (81.9ms) DROP TABLE IF EXISTS "billing_payments"
11367
+  (73.7ms) CREATE TABLE "billing_payments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar, "payment_type_id" integer, "status" varchar, "name" varchar, "description" varchar, "external_token" varchar, "note" varchar, "deleted_at" datetime)
11368
+  (65.2ms) CREATE INDEX "index_billing_payments_on_bill_id" ON "billing_payments" ("bill_id")
11369
+  (73.3ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")
11370
+  (89.3ms) DROP TABLE IF EXISTS "billing_plus"
11371
+  (65.5ms) CREATE TABLE "billing_plus" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar DEFAULT 'USD' NOT NULL, "code" varchar, "type" varchar, "banned" boolean, "deleted_at" datetime)
11372
+  (65.2ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")
11373
+  (64.8ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")
11374
+  (65.5ms) DROP TABLE IF EXISTS "billing_profiles"
11375
+  (65.7ms) CREATE TABLE "billing_profiles" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)
11376
+  (65.4ms) DROP TABLE IF EXISTS "billing_pt_fp_mappings"
11377
+  (65.5ms) CREATE TABLE "billing_pt_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)
11378
+  (65.3ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")
11379
+  (65.0ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")
11380
+  (65.4ms) DROP TABLE IF EXISTS "billing_receipt_configs"
11381
+  (65.5ms) CREATE TABLE "billing_receipt_configs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "type" varchar, "name" varchar, "discount_text" varchar, "surcharge_text" varchar, "sound_signal" boolean, "open_cash_drawer" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "paper_cut" boolean, "custom_commands" boolean, "custom_commands_text" varchar)
11382
+  (65.3ms) DROP TABLE IF EXISTS "billing_reports"
11383
+  (65.2ms) CREATE TABLE "billing_reports" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar DEFAULT 'USD' NOT NULL, "note" text, "type" varchar, "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar, "f_amount_cents" integer DEFAULT 0 NOT NULL, "f_amount_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime)
11384
+  (65.3ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")
11385
+  (65.4ms) DROP TABLE IF EXISTS "billing_resources"
11386
+  (65.6ms) CREATE TABLE "billing_resources" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "properties" text, "banned" boolean, "type" varchar, "created_at" datetime, "updated_at" datetime, "deleted_at" datetime)
11387
+  (65.4ms) DROP TABLE IF EXISTS "billing_tax_groups"
11388
+  (57.4ms) CREATE TABLE "billing_tax_groups" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar, "deleted_at" datetime)
11389
+  (97.7ms) DROP TABLE IF EXISTS "billing_tg_fp_mappings"
11390
+  (81.9ms) CREATE TABLE "billing_tg_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "tax_group_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)
11391
+  (65.3ms) CREATE INDEX "index_billing_tg_fp_mappings_on_extface_driver_id" ON "billing_tg_fp_mappings" ("extface_driver_id")
11392
+  (73.3ms) CREATE INDEX "index_billing_tg_fp_mappings_on_tax_group_id" ON "billing_tg_fp_mappings" ("tax_group_id")
11393
+  (73.5ms) DROP TABLE IF EXISTS "billing_versions"
11394
+  (73.8ms) CREATE TABLE "billing_versions" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "event" varchar NOT NULL, "whodunnit" varchar, "object" text, "created_at" datetime, "ip" varchar, "user_agent" varchar, "object_changes" text, "master_id" integer, "master_type" varchar)
11395
+  (81.7ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")
11396
+  (72.4ms) DROP TABLE IF EXISTS "profiles"
11397
+  (66.9ms) CREATE TABLE "profiles" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
11398
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
11399
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
11400
+  (0.1ms) begin transaction
11401
+  (0.0ms) commit transaction
11402
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
11403
+  (120.6ms) DROP TABLE IF EXISTS "billing_bills"
11404
+  (0.3ms) SELECT sqlite_version(*)
11405
+  (95.4ms) CREATE TABLE "billing_bills" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar, "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime, "name" varchar, "number" varchar, "deleted_at" datetime, "print_job_id" integer)
11406
+  (88.3ms) CREATE INDEX "index_billing_bills_on_billable_type_and_billable_id" ON "billing_bills" ("billable_type", "billable_id")
11407
+  (64.9ms) CREATE INDEX "index_billing_bills_on_extface_job_id" ON "billing_bills" ("extface_job_id")
11408
+  (64.7ms) CREATE INDEX "index_billing_bills_on_origin_id" ON "billing_bills" ("origin_id")
11409
+  (72.7ms) CREATE INDEX "index_billing_bills_on_report_id" ON "billing_bills" ("report_id")
11410
+  (80.3ms) DROP TABLE IF EXISTS "billing_charges"
11411
+  (83.3ms) CREATE TABLE "billing_charges" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "chargable_id" integer, "chargable_type" varchar, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar, "description" varchar, "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime, "qty" decimal(6,3), "tax_ratio" decimal(6,3))
11412
+  (73.3ms) CREATE INDEX "index_billing_charges_on_bill_id" ON "billing_charges" ("bill_id")
11413
+  (73.1ms) CREATE INDEX "index_billing_charges_on_chargable_type_and_chargable_id" ON "billing_charges" ("chargable_type", "chargable_id")
11414
+  (73.1ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")
11415
+  (73.0ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")
11416
+  (101.6ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")
11417
+  (98.0ms) DROP TABLE IF EXISTS "billing_departments"
11418
+  (97.0ms) CREATE TABLE "billing_departments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "tax_group_id" integer, "type" varchar, "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)
11419
+  (81.7ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")
11420
+  (89.5ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")
11421
+  (81.9ms) DROP TABLE IF EXISTS "billing_modifiers"
11422
+  (82.0ms) CREATE TABLE "billing_modifiers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime)
11423
+  (81.6ms) CREATE INDEX "index_billing_modifiers_on_bill_id" ON "billing_modifiers" ("bill_id")
11424
+  (73.7ms) DROP TABLE IF EXISTS "billing_op_fp_mappings"
11425
+  (82.1ms) CREATE TABLE "billing_op_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "operator_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime, "pwd" varchar)
11426
+  (81.8ms) CREATE INDEX "index_billing_op_fp_mappings_on_extface_driver_id" ON "billing_op_fp_mappings" ("extface_driver_id")
11427
+  (81.4ms) CREATE INDEX "index_billing_op_fp_mappings_on_operator_id" ON "billing_op_fp_mappings" ("operator_id")
11428
+  (89.9ms) DROP TABLE IF EXISTS "billing_operators"
11429
+  (106.0ms) CREATE TABLE "billing_operators" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "type" varchar, "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)
11430
+  (98.7ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")
11431
+  (65.1ms) DROP TABLE IF EXISTS "billing_origins"
11432
+  (73.6ms) CREATE TABLE "billing_origins" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar, "payment_model" varchar DEFAULT 'Billing::PaymentWithType', "transfer_device_id" integer, "print_device_id" integer, "print_header" varchar, "print_footer" varchar, "receipt_config_id" integer)
11433
+  (73.9ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")
11434
+  (73.2ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")
11435
+  (73.1ms) CREATE INDEX "index_billing_origins_on_receipt_config_id" ON "billing_origins" ("receipt_config_id")
11436
+  (80.3ms) CREATE INDEX "index_billing_origins_on_transfer_device_id" ON "billing_origins" ("transfer_device_id")
11437
+  (65.5ms) DROP TABLE IF EXISTS "billing_payment_types"
11438
+  (74.4ms) CREATE TABLE "billing_payment_types" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar, "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)
11439
+  (73.5ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")
11440
+  (73.2ms) DROP TABLE IF EXISTS "billing_payments"
11441
+  (105.7ms) CREATE TABLE "billing_payments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar, "payment_type_id" integer, "status" varchar, "name" varchar, "description" varchar, "external_token" varchar, "note" varchar, "deleted_at" datetime)
11442
+  (97.1ms) CREATE INDEX "index_billing_payments_on_bill_id" ON "billing_payments" ("bill_id")
11443
+  (95.7ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")
11444
+  (98.3ms) DROP TABLE IF EXISTS "billing_plus"
11445
+  (73.8ms) CREATE TABLE "billing_plus" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar DEFAULT 'USD' NOT NULL, "code" varchar, "type" varchar, "banned" boolean, "deleted_at" datetime)
11446
+  (73.4ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")
11447
+  (73.1ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")
11448
+  (73.7ms) DROP TABLE IF EXISTS "billing_profiles"
11449
+  (73.9ms) CREATE TABLE "billing_profiles" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)
11450
+  (73.6ms) DROP TABLE IF EXISTS "billing_pt_fp_mappings"
11451
+  (82.1ms) CREATE TABLE "billing_pt_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)
11452
+  (73.7ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")
11453
+  (87.8ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")
11454
+  (81.1ms) DROP TABLE IF EXISTS "billing_receipt_configs"
11455
+  (105.7ms) CREATE TABLE "billing_receipt_configs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "type" varchar, "name" varchar, "discount_text" varchar, "surcharge_text" varchar, "sound_signal" boolean, "open_cash_drawer" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "paper_cut" boolean, "custom_commands" boolean, "custom_commands_text" varchar)
11456
+  (65.3ms) DROP TABLE IF EXISTS "billing_reports"
11457
+  (65.4ms) CREATE TABLE "billing_reports" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar DEFAULT 'USD' NOT NULL, "note" text, "type" varchar, "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar, "f_amount_cents" integer DEFAULT 0 NOT NULL, "f_amount_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime)
11458
+  (64.9ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")
11459
+  (65.4ms) DROP TABLE IF EXISTS "billing_resources"
11460
+  (57.5ms) CREATE TABLE "billing_resources" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "properties" text, "banned" boolean, "type" varchar, "created_at" datetime, "updated_at" datetime, "deleted_at" datetime)
11461
+  (73.6ms) DROP TABLE IF EXISTS "billing_tax_groups"
11462
+  (65.6ms) CREATE TABLE "billing_tax_groups" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar, "deleted_at" datetime)
11463
+  (73.6ms) DROP TABLE IF EXISTS "billing_tg_fp_mappings"
11464
+  (73.8ms) CREATE TABLE "billing_tg_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "tax_group_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)
11465
+  (73.4ms) CREATE INDEX "index_billing_tg_fp_mappings_on_extface_driver_id" ON "billing_tg_fp_mappings" ("extface_driver_id")
11466
+  (73.5ms) CREATE INDEX "index_billing_tg_fp_mappings_on_tax_group_id" ON "billing_tg_fp_mappings" ("tax_group_id")
11467
+  (112.0ms) DROP TABLE IF EXISTS "billing_versions"
11468
+  (91.5ms) CREATE TABLE "billing_versions" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "event" varchar NOT NULL, "whodunnit" varchar, "object" text, "created_at" datetime, "ip" varchar, "user_agent" varchar, "object_changes" text, "master_id" integer, "master_type" varchar)
11469
+  (96.7ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")
11470
+  (73.7ms) DROP TABLE IF EXISTS "profiles"
11471
+  (73.8ms) CREATE TABLE "profiles" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
11472
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
11473
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
11474
+  (0.1ms) begin transaction
11475
+  (0.1ms) commit transaction
11476
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
11477
+  (97.3ms) DROP TABLE IF EXISTS "billing_bills"
11478
+  (0.2ms) SELECT sqlite_version(*)
11479
+  (78.5ms) CREATE TABLE "billing_bills" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "billable_id" integer, "billable_type" varchar, "created_at" datetime, "updated_at" datetime, "charges_sum_cents" integer DEFAULT 0 NOT NULL, "charges_sum_currency" varchar DEFAULT 'USD' NOT NULL, "discounts_sum_cents" integer DEFAULT 0 NOT NULL, "discounts_sum_currency" varchar DEFAULT 'USD' NOT NULL, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar DEFAULT 'USD' NOT NULL, "total_cents" integer DEFAULT 0 NOT NULL, "total_currency" varchar DEFAULT 'USD' NOT NULL, "balance_cents" integer DEFAULT 0 NOT NULL, "balance_currency" varchar DEFAULT 'USD' NOT NULL, "surcharges_sum_cents" integer DEFAULT 0 NOT NULL, "surcharges_sum_currency" varchar DEFAULT 'USD' NOT NULL, "origin_id" integer, "extface_job_id" integer, "report_id" integer, "autofin" boolean DEFAULT 't', "finalized_at" datetime, "name" varchar, "number" varchar, "deleted_at" datetime, "print_job_id" integer)
11480
+  (73.4ms) CREATE INDEX "index_billing_bills_on_billable_type_and_billable_id" ON "billing_bills" ("billable_type", "billable_id")
11481
+  (65.0ms) CREATE INDEX "index_billing_bills_on_extface_job_id" ON "billing_bills" ("extface_job_id")
11482
+  (56.5ms) CREATE INDEX "index_billing_bills_on_origin_id" ON "billing_bills" ("origin_id")
11483
+  (74.7ms) CREATE INDEX "index_billing_bills_on_report_id" ON "billing_bills" ("report_id")
11484
+  (63.7ms) DROP TABLE IF EXISTS "billing_charges"
11485
+  (81.6ms) CREATE TABLE "billing_charges" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "chargable_id" integer, "chargable_type" varchar, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "name" varchar, "description" varchar, "origin_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime, "revenue_at" datetime, "qty" decimal(6,3), "tax_ratio" decimal(6,3))
11486
+  (65.2ms) CREATE INDEX "index_billing_charges_on_bill_id" ON "billing_charges" ("bill_id")
11487
+  (56.8ms) CREATE INDEX "index_billing_charges_on_chargable_type_and_chargable_id" ON "billing_charges" ("chargable_type", "chargable_id")
11488
+  (64.7ms) CREATE INDEX "index_billing_charges_on_deleted_at" ON "billing_charges" ("deleted_at")
11489
+  (72.6ms) CREATE INDEX "index_billing_charges_on_origin_id" ON "billing_charges" ("origin_id")
11490
+  (72.6ms) CREATE INDEX "index_billing_charges_on_revenue_at" ON "billing_charges" ("revenue_at")
11491
+  (72.3ms) DROP TABLE IF EXISTS "billing_departments"
11492
+  (75.1ms) CREATE TABLE "billing_departments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "tax_group_id" integer, "type" varchar, "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)
11493
+  (73.6ms) CREATE INDEX "index_billing_departments_on_deleted_at" ON "billing_departments" ("deleted_at")
11494
+  (89.6ms) CREATE INDEX "index_billing_departments_on_tax_group_id" ON "billing_departments" ("tax_group_id")
11495
+  (81.8ms) DROP TABLE IF EXISTS "billing_modifiers"
11496
+  (73.9ms) CREATE TABLE "billing_modifiers" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "charge_id" integer, "percent_ratio" decimal(6,3), "created_at" datetime, "updated_at" datetime, "fixed_value_cents" integer DEFAULT 0 NOT NULL, "fixed_value_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime)
11497
+  (65.2ms) CREATE INDEX "index_billing_modifiers_on_bill_id" ON "billing_modifiers" ("bill_id")
11498
+  (73.7ms) DROP TABLE IF EXISTS "billing_op_fp_mappings"
11499
+  (82.2ms) CREATE TABLE "billing_op_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "operator_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime, "pwd" varchar)
11500
+  (81.7ms) CREATE INDEX "index_billing_op_fp_mappings_on_extface_driver_id" ON "billing_op_fp_mappings" ("extface_driver_id")
11501
+  (81.5ms) CREATE INDEX "index_billing_op_fp_mappings_on_operator_id" ON "billing_op_fp_mappings" ("operator_id")
11502
+  (312.2ms) DROP TABLE IF EXISTS "billing_operators"
11503
+  (117.0ms) CREATE TABLE "billing_operators" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "type" varchar, "created_at" datetime, "updated_at" datetime, "number" integer, "banned" boolean, "deleted_at" datetime)
11504
+  (156.4ms) CREATE INDEX "index_billing_operators_on_deleted_at" ON "billing_operators" ("deleted_at")
11505
+  (70.9ms) DROP TABLE IF EXISTS "billing_origins"
11506
+  (82.4ms) CREATE TABLE "billing_origins" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "fiscal_device_id" integer, "banned" boolean, "deleted_at" datetime, "type" varchar, "payment_model" varchar DEFAULT 'Billing::PaymentWithType', "transfer_device_id" integer, "print_device_id" integer, "print_header" varchar, "print_footer" varchar, "receipt_config_id" integer)
11507
+  (81.7ms) CREATE INDEX "index_billing_origins_on_deleted_at" ON "billing_origins" ("deleted_at")
11508
+  (81.4ms) CREATE INDEX "index_billing_origins_on_fiscal_device_id" ON "billing_origins" ("fiscal_device_id")
11509
+  (81.2ms) CREATE INDEX "index_billing_origins_on_receipt_config_id" ON "billing_origins" ("receipt_config_id")
11510
+  (80.4ms) CREATE INDEX "index_billing_origins_on_transfer_device_id" ON "billing_origins" ("transfer_device_id")
11511
+  (73.6ms) DROP TABLE IF EXISTS "billing_payment_types"
11512
+  (82.5ms) CREATE TABLE "billing_payment_types" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "cash" boolean, "fiscal" boolean, "created_at" datetime, "updated_at" datetime, "type" varchar, "master_id" integer, "number" integer, "banned" boolean, "deleted_at" datetime, "print_copy" boolean)
11513
+  (81.6ms) CREATE INDEX "index_billing_payment_types_on_deleted_at" ON "billing_payment_types" ("deleted_at")
11514
+  (73.1ms) DROP TABLE IF EXISTS "billing_payments"
11515
+  (90.2ms) CREATE TABLE "billing_payments" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "bill_id" integer, "value_cents" integer DEFAULT 0 NOT NULL, "value_currency" varchar DEFAULT 'USD' NOT NULL, "created_at" datetime, "updated_at" datetime, "type" varchar, "payment_type_id" integer, "status" varchar, "name" varchar, "description" varchar, "external_token" varchar, "note" varchar, "deleted_at" datetime)
11516
+  (65.2ms) CREATE INDEX "index_billing_payments_on_bill_id" ON "billing_payments" ("bill_id")
11517
+  (81.5ms) CREATE INDEX "index_billing_payments_on_deleted_at" ON "billing_payments" ("deleted_at")
11518
+  (73.6ms) DROP TABLE IF EXISTS "billing_plus"
11519
+  (73.6ms) CREATE TABLE "billing_plus" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "tax_group_id" integer, "department_id" integer, "number" integer, "price_cents" integer DEFAULT 0 NOT NULL, "price_currency" varchar DEFAULT 'USD' NOT NULL, "code" varchar, "type" varchar, "banned" boolean, "deleted_at" datetime)
11520
+  (73.5ms) CREATE INDEX "index_billing_plus_on_department_id" ON "billing_plus" ("department_id")
11521
+  (73.2ms) CREATE INDEX "index_billing_plus_on_tax_group_id" ON "billing_plus" ("tax_group_id")
11522
+  (73.7ms) DROP TABLE IF EXISTS "billing_profiles"
11523
+  (73.8ms) CREATE TABLE "billing_profiles" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)
11524
+  (114.8ms) DROP TABLE IF EXISTS "billing_pt_fp_mappings"
11525
+  (82.2ms) CREATE TABLE "billing_pt_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "payment_type_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)
11526
+  (65.2ms) CREATE INDEX "index_billing_pt_fp_mappings_on_extface_driver_id" ON "billing_pt_fp_mappings" ("extface_driver_id")
11527
+  (64.9ms) CREATE INDEX "index_billing_pt_fp_mappings_on_payment_type_id" ON "billing_pt_fp_mappings" ("payment_type_id")
11528
+  (65.3ms) DROP TABLE IF EXISTS "billing_receipt_configs"
11529
+  (73.7ms) CREATE TABLE "billing_receipt_configs" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "type" varchar, "name" varchar, "discount_text" varchar, "surcharge_text" varchar, "sound_signal" boolean, "open_cash_drawer" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "paper_cut" boolean, "custom_commands" boolean, "custom_commands_text" varchar)
11530
+  (65.3ms) DROP TABLE IF EXISTS "billing_reports"
11531
+  (65.2ms) CREATE TABLE "billing_reports" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "origin_id" integer, "payments_sum_cents" integer DEFAULT 0 NOT NULL, "payments_sum_currency" varchar DEFAULT 'USD' NOT NULL, "payments_cash_cents" integer DEFAULT 0 NOT NULL, "payments_cash_currency" varchar DEFAULT 'USD' NOT NULL, "payments_fiscal_cents" integer DEFAULT 0 NOT NULL, "payments_fiscal_currency" varchar DEFAULT 'USD' NOT NULL, "note" text, "type" varchar, "created_at" datetime, "updated_at" datetime, "extface_job_id" integer, "f_period_from" date, "f_period_to" date, "zeroing" boolean, "f_operation" varchar, "f_amount_cents" integer DEFAULT 0 NOT NULL, "f_amount_currency" varchar DEFAULT 'USD' NOT NULL, "deleted_at" datetime)
11532
+  (65.1ms) CREATE INDEX "index_billing_reports_on_origin_id" ON "billing_reports" ("origin_id")
11533
+  (139.5ms) DROP TABLE IF EXISTS "billing_resources"
11534
+  (65.6ms) CREATE TABLE "billing_resources" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "master_id" integer, "name" varchar, "properties" text, "banned" boolean, "type" varchar, "created_at" datetime, "updated_at" datetime, "deleted_at" datetime)
11535
+  (65.4ms) DROP TABLE IF EXISTS "billing_tax_groups"
11536
+  (65.4ms) CREATE TABLE "billing_tax_groups" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime, "master_id" integer, "number" integer, "percent_ratio" decimal(6,3), "banned" boolean, "type" varchar, "deleted_at" datetime)
11537
+  (65.4ms) DROP TABLE IF EXISTS "billing_tg_fp_mappings"
11538
+  (65.7ms) CREATE TABLE "billing_tg_fp_mappings" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "tax_group_id" integer, "extface_driver_id" integer, "mapping" integer, "created_at" datetime, "updated_at" datetime)
11539
+  (65.2ms) CREATE INDEX "index_billing_tg_fp_mappings_on_extface_driver_id" ON "billing_tg_fp_mappings" ("extface_driver_id")
11540
+  (65.0ms) CREATE INDEX "index_billing_tg_fp_mappings_on_tax_group_id" ON "billing_tg_fp_mappings" ("tax_group_id")
11541
+  (65.3ms) DROP TABLE IF EXISTS "billing_versions"
11542
+  (57.6ms) CREATE TABLE "billing_versions" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "item_type" varchar NOT NULL, "item_id" integer NOT NULL, "event" varchar NOT NULL, "whodunnit" varchar, "object" text, "created_at" datetime, "ip" varchar, "user_agent" varchar, "object_changes" text, "master_id" integer, "master_type" varchar)
11543
+  (104.7ms) CREATE INDEX "index_billing_versions_on_item_type_and_item_id" ON "billing_versions" ("item_type", "item_id")
11544
+  (65.6ms) DROP TABLE IF EXISTS "profiles"
11545
+  (81.5ms) CREATE TABLE "profiles" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
11546
+  (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
11547
+ ActiveRecord::InternalMetadata Load (0.3ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
11548
+  (0.1ms) begin transaction
11549
+  (0.0ms) commit transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Vangelov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-29 00:00:00.000000000 Z
11
+ date: 2018-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -282,7 +282,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
282
  version: '0'
283
283
  requirements: []
284
284
  rubyforge_project:
285
- rubygems_version: 2.5.0
285
+ rubygems_version: 2.6.14
286
286
  signing_key:
287
287
  specification_version: 4
288
288
  summary: Billing for Rails 4 app