-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Intacct: Handle Split Expense (#522)
* Intacct: Handle Split Expense * Split expense with tests * bump version
- Loading branch information
Showing
12 changed files
with
558 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 3.2.14 on 2024-07-03 18:18 | ||
|
||
import apps.fyle.models | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('fyle', '0031_expense_paid_on_fyle'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='expense', | ||
name='bank_transaction_id', | ||
field=models.CharField(blank=True, help_text='Bank Transaction ID', max_length=255, null=True), | ||
), | ||
migrations.AddField( | ||
model_name='expensegroupsettings', | ||
name='split_expense_grouping', | ||
field=models.CharField(choices=[('SINGLE_LINE_ITEM', 'SINGLE_LINE_ITEM'), ('MULTIPLE_LINE_ITEM', 'MULTIPLE_LINE_ITEM')], default=apps.fyle.models.get_default_split_expense_grouping, help_text='specify line items for split expenses grouping', max_length=100), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rollback; | ||
begin; | ||
|
||
UPDATE expense_group_settings | ||
SET split_expense_grouping = 'SINGLE_LINE_ITEM'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -990,7 +990,8 @@ CREATE TABLE public.expense_group_settings ( | |
updated_at timestamp with time zone NOT NULL, | ||
workspace_id integer NOT NULL, | ||
ccc_export_date_type character varying(100) NOT NULL, | ||
ccc_expense_state character varying(100) | ||
ccc_expense_state character varying(100), | ||
split_expense_grouping character varying(100) NOT NULL | ||
); | ||
|
||
|
||
|
@@ -1154,7 +1155,8 @@ CREATE TABLE public.expenses ( | |
accounting_export_summary jsonb NOT NULL, | ||
previous_export_state character varying(255), | ||
workspace_id integer, | ||
paid_on_fyle boolean NOT NULL | ||
paid_on_fyle boolean NOT NULL, | ||
bank_transaction_id character varying(255) | ||
); | ||
|
||
|
||
|
@@ -4108,6 +4110,7 @@ COPY public.django_migrations (id, app, name, applied) FROM stdin; | |
182 tasks 0009_tasklog_supdoc_id 2024-05-20 09:36:04.874867+00 | ||
183 fyle 0031_expense_paid_on_fyle 2024-06-05 16:26:11.775475+00 | ||
184 workspaces 0034_configuration_is_journal_credit_billable 2024-06-19 07:16:22.418147+00 | ||
185 fyle 0032_auto_20240703_1818 2024-07-03 18:29:14.061756+00 | ||
\. | ||
|
||
|
||
|
@@ -7497,8 +7500,8 @@ COPY public.expense_filters (id, condition, operator, "values", rank, join_by, i | |
-- Data for Name: expense_group_settings; Type: TABLE DATA; Schema: public; Owner: postgres | ||
-- | ||
|
||
COPY public.expense_group_settings (id, reimbursable_expense_group_fields, corporate_credit_card_expense_group_fields, expense_state, reimbursable_export_date_type, created_at, updated_at, workspace_id, ccc_export_date_type, ccc_expense_state) FROM stdin; | ||
1 {employee_email,report_id,claim_number,fund_source} {employee_email,report_id,expense_id,claim_number,fund_source} PAYMENT_PROCESSING current_date 2022-09-20 08:38:03.358472+00 2022-09-20 08:39:32.022875+00 1 spent_at PAID | ||
COPY public.expense_group_settings (id, reimbursable_expense_group_fields, corporate_credit_card_expense_group_fields, expense_state, reimbursable_export_date_type, created_at, updated_at, workspace_id, ccc_export_date_type, ccc_expense_state, split_expense_grouping) FROM stdin; | ||
1 {employee_email,report_id,claim_number,fund_source} {employee_email,report_id,expense_id,claim_number,fund_source} PAYMENT_PROCESSING current_date 2022-09-20 08:38:03.358472+00 2022-09-20 08:39:32.022875+00 1 spent_at PAID MULTIPLE_LINE_ITEM | ||
\. | ||
|
||
|
||
|
@@ -7544,10 +7547,10 @@ COPY public.expense_reports (id, employee_id, description, supdoc_id, created_at | |
-- Data for Name: expenses; Type: TABLE DATA; Schema: public; Owner: postgres | ||
-- | ||
|
||
COPY public.expenses (id, employee_email, category, sub_category, project, expense_id, expense_number, claim_number, amount, currency, foreign_amount, foreign_currency, settlement_id, reimbursable, state, vendor, cost_center, purpose, report_id, spent_at, approved_at, expense_created_at, expense_updated_at, created_at, updated_at, fund_source, custom_properties, verified_at, billable, paid_on_sage_intacct, org_id, tax_amount, tax_group_id, file_ids, payment_number, corporate_card_id, is_skipped, report_title, posted_at, employee_name, accounting_export_summary, previous_export_state, workspace_id, paid_on_fyle) FROM stdin; | ||
1 [email protected] Food \N Aaron Abbott txR9dyrqr1Jn E/2022/09/T/21 C/2022/09/R/21 21 USD \N \N setqwcKcC9q1k t PAYMENT_PROCESSING Ashwin Marketing \N rpEZGqVCyWxQ 2022-09-20 17:00:00+00 2022-09-19 19:54:36.96+00 2022-09-19 19:54:15.870239+00 2022-09-19 19:55:58.641995+00 2022-09-20 08:48:21.737374+00 2022-09-20 08:48:21.737392+00 PERSONAL {"Team": "", "Class": "", "Klass": "", "Location": "", "Team Copy": "", "Tax Groups": "", "Departments": "", "Team 2 Postman": "", "User Dimension": "", "Location Entity": "", "Operating System": "", "System Operating": "", "User Dimension Copy": "", "Custom Expense Field": null} \N \N f or79Cob97KSh \N \N {} P/2022/09/R/18 \N f \N \N \N {} \N \N f | ||
2 [email protected] Food \N Aaron Abbott txCqLqsEnAjf E/2022/09/T/22 C/2022/09/R/22 11 USD \N \N setzhjuqQ6Pl5 f PAYMENT_PROCESSING Ashwin Marketing \N rpSTYO8AfUVA 2022-09-20 17:00:00+00 2022-09-20 08:50:48.428+00 2022-09-20 08:50:27.570399+00 2022-09-20 08:51:13.891379+00 2022-09-20 08:51:27.566571+00 2022-09-20 08:51:27.566598+00 CCC {"Team": "", "Class": "", "Klass": "", "Location": "", "Team Copy": "", "Tax Groups": "", "Departments": "", "Team 2 Postman": "", "User Dimension": "", "Location Entity": "", "Operating System": "", "System Operating": "", "User Dimension Copy": "", "Custom Expense Field": null} \N t f or79Cob97KSh 2.41 tggu76WXIdjY {} P/2022/09/R/19 \N f \N \N \N {} \N \N f | ||
3 [email protected] Taxi \N Aaron Abbott txTHfEPWOEOp E/2022/09/T/23 C/2022/09/R/23 22 USD \N \N set0SnAq66Zbq f PAYMENT_PROCESSING Ashwin Marketing \N rpBf5ibqUT6B 2022-09-20 17:00:00+00 2022-09-20 08:56:09.337+00 2022-09-20 08:55:53.246893+00 2022-09-20 08:56:40.795304+00 2022-09-20 08:56:50.117313+00 2022-09-20 08:56:50.117349+00 CCC {"Team": "", "Class": "", "Klass": "", "Location": "", "Team Copy": "", "Tax Groups": "", "Departments": "", "Team 2 Postman": "", "User Dimension": "", "Location Entity": "", "Operating System": "", "System Operating": "", "User Dimension Copy": "", "Custom Expense Field": null} \N \N f or79Cob97KSh 4.81 tggu76WXIdjY {} P/2022/09/R/20 \N f \N \N \N {} \N \N f | ||
COPY public.expenses (id, employee_email, category, sub_category, project, expense_id, expense_number, claim_number, amount, currency, foreign_amount, foreign_currency, settlement_id, reimbursable, state, vendor, cost_center, purpose, report_id, spent_at, approved_at, expense_created_at, expense_updated_at, created_at, updated_at, fund_source, custom_properties, verified_at, billable, paid_on_sage_intacct, org_id, tax_amount, tax_group_id, file_ids, payment_number, corporate_card_id, is_skipped, report_title, posted_at, employee_name, accounting_export_summary, previous_export_state, workspace_id, paid_on_fyle, bank_transaction_id) FROM stdin; | ||
1 [email protected] Food \N Aaron Abbott txR9dyrqr1Jn E/2022/09/T/21 C/2022/09/R/21 21 USD \N \N setqwcKcC9q1k t PAYMENT_PROCESSING Ashwin Marketing \N rpEZGqVCyWxQ 2022-09-20 17:00:00+00 2022-09-19 19:54:36.96+00 2022-09-19 19:54:15.870239+00 2022-09-19 19:55:58.641995+00 2022-09-20 08:48:21.737374+00 2022-09-20 08:48:21.737392+00 PERSONAL {"Team": "", "Class": "", "Klass": "", "Location": "", "Team Copy": "", "Tax Groups": "", "Departments": "", "Team 2 Postman": "", "User Dimension": "", "Location Entity": "", "Operating System": "", "System Operating": "", "User Dimension Copy": "", "Custom Expense Field": null} \N \N f or79Cob97KSh \N \N {} P/2022/09/R/18 \N f \N \N \N {} \N \N f \N | ||
2 [email protected] Food \N Aaron Abbott txCqLqsEnAjf E/2022/09/T/22 C/2022/09/R/22 11 USD \N \N setzhjuqQ6Pl5 f PAYMENT_PROCESSING Ashwin Marketing \N rpSTYO8AfUVA 2022-09-20 17:00:00+00 2022-09-20 08:50:48.428+00 2022-09-20 08:50:27.570399+00 2022-09-20 08:51:13.891379+00 2022-09-20 08:51:27.566571+00 2022-09-20 08:51:27.566598+00 CCC {"Team": "", "Class": "", "Klass": "", "Location": "", "Team Copy": "", "Tax Groups": "", "Departments": "", "Team 2 Postman": "", "User Dimension": "", "Location Entity": "", "Operating System": "", "System Operating": "", "User Dimension Copy": "", "Custom Expense Field": null} \N t f or79Cob97KSh 2.41 tggu76WXIdjY {} P/2022/09/R/19 \N f \N \N \N {} \N \N f \N | ||
3 [email protected] Taxi \N Aaron Abbott txTHfEPWOEOp E/2022/09/T/23 C/2022/09/R/23 22 USD \N \N set0SnAq66Zbq f PAYMENT_PROCESSING Ashwin Marketing \N rpBf5ibqUT6B 2022-09-20 17:00:00+00 2022-09-20 08:56:09.337+00 2022-09-20 08:55:53.246893+00 2022-09-20 08:56:40.795304+00 2022-09-20 08:56:50.117313+00 2022-09-20 08:56:50.117349+00 CCC {"Team": "", "Class": "", "Klass": "", "Location": "", "Team Copy": "", "Tax Groups": "", "Departments": "", "Team 2 Postman": "", "User Dimension": "", "Location Entity": "", "Operating System": "", "System Operating": "", "User Dimension Copy": "", "Custom Expense Field": null} \N \N f or79Cob97KSh 4.81 tggu76WXIdjY {} P/2022/09/R/20 \N f \N \N \N {} \N \N f \N | ||
\. | ||
|
||
|
||
|
@@ -8115,7 +8118,7 @@ SELECT pg_catalog.setval('public.django_content_type_id_seq', 50, true); | |
-- Name: django_migrations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres | ||
-- | ||
|
||
SELECT pg_catalog.setval('public.django_migrations_id_seq', 184, true); | ||
SELECT pg_catalog.setval('public.django_migrations_id_seq', 185, true); | ||
|
||
|
||
-- | ||
|
Oops, something went wrong.