INSERT INTO `0p4_import` (`import_id`, `name`, `start_row`, `limit`, `description`, `file`, `model`, `clear`, `filter_column`, `filter_value`, `after_init`, `before_save`, `after_save`, `created_by`, `created_at`, `updated_by`, `updated_at`, `find_column`, `find_attribute`, `skip_empty`) VALUES
(86, 'Aging DN', 1, 2000, '', 'uploads/import/debtors aging balance-206748123.csv', '\\app\\modules\\sale\\models\\DebitNote', NULL, '', '', '$model->scenario=\'import\';', 'if(!$data[4]){\r\n  $save=false;\r\n}\r\n$model->currency_id=$model->customer->currency_id?? 2;\r\n$model-> opening=1;\r\n$model->total_amount=$model->total_amount;\r\n$model->total_tax_amount=0;\r\n$model->exchange_rate=1;', '', 1, '2020-07-12 17:38:28', NULL, NULL, '', NULL, 0),
(85, 'Aging CN', 1, 2000, '', 'uploads/import/debtors aging balance-1204406846.csv', '\\app\\modules\\sale\\models\\CreditNote', NULL, '', '', '$model->scenario=\'import\';', 'if(!$data[3]){\r\n  $save=false;\r\n}\r\n$model->currency_id=$model->customer->currency_id?? 2;\r\n$model-> opening=1;\r\n$model->total_amount=abs($model->total_amount);\r\n$model->total_tax_amount=0;\r\n$model->exchange_rate=1;', '', 1, '2020-07-12 17:28:00', 1, '2020-07-12 17:28:36', '', '', 0),
(84, 'Aging Invoice', 1, 2000, '', 'uploads/import/debtors aging balance-360954084.csv', '\\app\\modules\\sale\\models\\Invoice', NULL, '', '', '$model->scenario=\'import\';', 'if(substr($data[2],0, 2) !== \"IN\"){\r\n  $save=false;\r\n}\r\n$model->currency_id=$model->customer->currency_id?? 2;\r\n$model-> opening=1;\r\n$model->total_amount=$model->sub_total;\r\n$model->total_tax_amount=0;\r\n$model->exchange_rate=1;\r\n$model->setRelationalData();', '', 1, '2020-07-12 16:34:00', 1, '2020-07-12 17:10:01', '', '', 0);

INSERT INTO `0p4_import_detail` (`import_detail_id`, `import_id`, `column`, `type`, `attribute`, `relation_model`, `relation_attribute`, `relation_value`, `relation_create_new`, `before_relation_create`, `after_relation_find`, `after_assign`, `skip_empty`) VALUES
(8913, 86, 'N', 'NORMAL', 'total_amount', '', '', '', 0, '', '', '', 0),
(8912, 86, 'G', 'NORMAL', 'date', '', '', '', 0, '', '', '', 0),
(8911, 86, 'E', 'NORMAL', 'debit_note_no', '', '', '', 0, '', '', '', 0),
(8910, 86, 'A', 'RELATION', 'customer_id', '\\app\\modules\\sale\\models\\Customer', 'customer_id', 'customer_code', 1, '$relation->customer_name=$data[1];\r\n$relation->currency_id=2;\r\n$relation-> credit_limit=0;\r\n$relation->chart_account_id=209;\r\n$relation->scenario=\'import\';\r\n$relation-> note=\"Aging Import\";', '', '', 0),
(8909, 85, 'N', 'NORMAL', 'total_amount', '', '', '', 0, '', '', '', 0),
(8908, 85, 'G', 'NORMAL', 'date', '', '', '', 0, '', '', '', 0),
(8907, 85, 'D', 'NORMAL', 'credit_note_no', '', '', '', 0, '', '', '', 0),
(8906, 85, 'A', 'RELATION', 'customer_id', '\\app\\modules\\sale\\models\\Customer', 'customer_id', 'customer_code', 1, '$relation->customer_name=$data[1];\r\n$relation->currency_id=2;\r\n$relation-> credit_limit=0;\r\n$relation->chart_account_id=209;\r\n$relation->scenario=\'import\';\r\n$relation-> note=\"Aging Import\";', '', '', 0),
(8901, 84, 'N', 'NORMAL', 'sub_total', '', '', '', 0, '', '', '', 0),
(8900, 84, 'G', 'NORMAL', 'date', '', '', '', 0, '', '', '', 0),
(8899, 84, 'C', 'NORMAL', 'invoice_no', '', '', '', 0, '', '', '', 0),
(8898, 84, 'A', 'RELATION', 'customer_id', '\\app\\modules\\sale\\models\\Customer', 'customer_id', 'customer_code', 1, '$relation->customer_name=$data[1];\r\n$relation->currency_id=2;\r\n$relation-> credit_limit=0;\r\n$relation->chart_account_id=209;\r\n$relation->scenario=\'import\';\r\n$relation-> note=\"Aging Import\";', '', '', 0);
