diff --git a/data/etc/nginx/conf.d/default.conf b/data/etc/nginx/conf.d/default.conf index 11119d0b..aed99293 100644 --- a/data/etc/nginx/conf.d/default.conf +++ b/data/etc/nginx/conf.d/default.conf @@ -33,7 +33,7 @@ access_log off; resolver 127.0.0.11; # HTTP 1.1 support proxy_http_version 1.1; -proxy_buffering off; +# proxy_buffering off; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $proxy_connection; @@ -44,6 +44,9 @@ proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl; proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port; # Mitigate httpoxy attack (see README for details) proxy_set_header Proxy ""; +proxy_buffer_size 128k; +proxy_buffers 4 256k; +proxy_busy_buffers_size 256k; server { server_name _; # This is just an invalid value which will never trigger on a real hostname. listen 80; diff --git a/resources/account customizations/BRYCE-TEST.csv b/resources/account customizations/BRYCE-TEST.csv new file mode 100644 index 00000000..393ca13a --- /dev/null +++ b/resources/account customizations/BRYCE-TEST.csv @@ -0,0 +1,186 @@ +Sushi Confidential Account,IOL Account,IOL Account Name,This Client's Account Name,"Action needed (Use existing, customize existing, Add shared account, Add custom account, Make Visible)","Account Type (Dividend, Expense, Asset, Liability, Equity, Revenue)","Location (e.g., A or HQ)","Default Setting +(Per-Customer +Visible by default +Hidden by default)", +15125 Leasehold Improvements P1:Building Improvements P1,15309,Leashold Improvements 9,15125 Leasehold Improvements P1:Building Improvements P1,Add Custom Account,Asset,A,Per Customer, +15210 Leasehold Improvement P2,15310,Leashold Improvements 10,Leasehold Improvement P2,Add Custom Account,Asset,A,Visible by default, +15211 Leasehold Improvement P2:Plan Check P2,15311,Leashold Improvements 11,Leasehold Improvement P2:Plan Check P2,Add Custom Account,Asset,A,Visible by default, +"15213 Leasehold Improvement P2:City Permits, Inspections, P2",15312,Leashold Improvements 12,"Leasehold Improvement P2:City Permits, Inspections",Add Custom Account,Asset,A,Visible by default, +"15215 Leasehold Improvement P2:Plans, Drawings, Architect, P2",15313,Leashold Improvements 13,"Leasehold Improvement P2:Plans, Drawings, Architec",Add Custom Account,Asset,A,Visible by default, +15221 Leasehold Improvement P2:Construction P2 -Demo,15314,Leashold Improvements 14,Leasehold Improvement P2:Construction P2 -Demo,Add Custom Account,Asset,A,Visible by default, +15224 Leasehold Improvement P2:Construction P2,15315,Leashold Improvements 15,Leasehold Improvement P2:Construction P2,Add Custom Account,Asset,A,Visible by default, +15225 Leasehold Improvement P2:Building Improvements P2,15316,Leashold Improvements 16,Leasehold Improvement P2:Building Improvements P2,Add Custom Account,Asset,A,Visible by default, +15245 Leasehold Improvement P2:Accum Depreciation-P2 Leasehold,15317,Leashold Improvements 17,Leasehold Improvement P2:Accum Depreciation-P2 Lea,Add Custom Account,Asset,A,Visible by default, +15310 Leasehold Improvement P2b,15318,Leashold Improvements 18,Leasehold Improvement P2b,Add Custom Account,Asset,A,Visible by default, +15311 Leasehold Improvement P2b:Plan Check P2b,15319,Leashold Improvements 19,Leasehold Improvement P2b:Plan Check P2b,Add Custom Account,Asset,A,Visible by default, +"15313 Leasehold Improvement P2b:City Permits, Inspections, P2b",15320,Leashold Improvements 20,"Leasehold Improvement P2b:City Permits, Inspection",Add Custom Account,Asset,A,Visible by default, +"15315 Leasehold Improvement P2b:Plans, Drawings, Architect, P2b",15321,Leashold Improvements 21,"Leasehold Improvement P2b:Plans, Drawings, Archite",Add Custom Account,Asset,A,Visible by default, +15324 Leasehold Improvement P2b:Construction P2b,15322,Leashold Improvements 22,Leasehold Improvement P2b:Construction P2b,Add Custom Account,Asset,A,Visible by default, +15325 Leasehold Improvement P2b:Building Improvements P2b,15323,Leashold Improvements 23,Leasehold Improvement P2b:Building Improvements P2,Add Custom Account,Asset,A,Visible by default, +15330 Leasehold Improvement P2b:Equipment Purchase P2b,15324,Leashold Improvements 24,Leasehold Improvement P2b:Equipment Purchase P2b,Add Custom Account,Asset,A,Visible by default, +30120 Equity:Partner 1 Investment-PWL Phase2,33011,Contributions/ Capital Account - 2.1,Partner 1 - PWL - Investment Phase 2,Add Custom Account,Equity,A,Per Customer, +30130 Equity:Partner 1 Invest-DirectPurchase,33012,Contributions/ Capital Account - 2.2,Partner 1 - PWL - Invest-Direct Purchase,Add Custom Account,Equity,A,Per Customer, +21510 Accrued Liabilities:Accrued Payables,21001,Accounts Payable 1,Other Accrued Payables,Add Custom Account,Liability,A,Per-Customer, +21520 Accrued Liabilities:Payable to CLS,21002,Accounts Payable 2,Payable to CLS,Add Custom Account,Liability,A,Per-Customer, +21530 Accrued Liabilities:Payable to Sushi Randy LLC,21003,Accounts Payable 3,Payable to Sushi Randy LLC,Add Custom Account,Liability,A,Per-Customer, +21540 Loan from PWL:Payable to PWL,21004,Accounts Payable 4,Payable to PWL,Add Custom Account,Liability,A,Per-Customer, +21541 Accrued Liabilities:Accrued Management Fees,21005,Accounts Payable 5,Management Fees Payable,Add Custom Account,Liability,A,Per-Customer, +21542 Accrued Liabilities:Accrued DOPS Fee,21006,Accounts Payable 6,DOPS Fee Payable,Add Custom Account,Liability,A,Per-Customer, +21542-1 Accrued Liabilities:Accrued DOCE Fees,21007,Accounts Payable 7,DOCE Fees Payable,Add Custom Account,Liability,A,Per-Customer, +21543 Accrued Liabilities:Van Use (catering),21008,Accounts Payable 8,Van Use (catering) Payable,Add Custom Account,Liability,A,Per-Customer, +21550 Payable to NSG,21009,Accounts Payable 9,Payable to NSG,Add Custom Account,Liability,A,Per-Customer, +"23000 Loan from PWL:Loans, Phase 1 Startup",28100,Notes Payable 10,Bryce Loan from PWL - P1 - USB 2448 75K,Add Custom Account,Liability,A,Per Customer, +"23100 Loan from PWL:Loans, Phase 1 Startup:P1 Loan USB 7793 Equipment 300k",28110,Notes Payable 11,Loan from PWL - P1 - USB 7793 Equipment 300k,Add Custom Account,Liability,A,Per-Customer, +"23200 Loan from PWL:Loans, Phase 1 Startup:P1 Loan UBOC 7183 CLSEquity 28k",28120,Notes Payable 12,Loan from PWL - P1 - UBOC 7183 CLSEquity 28k,Add Custom Account,Liability,A,Per-Customer, +"23300 Loan from PWL:Loans, Phase 1 Startup:P1 Loan FRB Constr 100k",28130,Notes Payable 13,Loan from PWL - P1 - Loan FRB Constr 100k,Add Custom Account,Liability,A,Per-Customer, +"23350 Loan from PWL:Loans, Phase 1 Startup:P1 Loan USB 1838 Const 100kReFi",28140,Notes Payable 14,Loan from PWL - P1 - USB 1838 Const 100kReFi,Add Custom Account,Liability,A,Per-Customer, +"23400 Loan from PWL:Loans, Phase 1 Startup:P2 Loan USB 6712 Constr 72k",28150,Notes Payable 15,Loan from PWL - P2 - USB 6712 Constr 72k,Add Custom Account,Liability,A,Per-Customer, +"23500 Loan from PWL:Loans, Phase 1 Startup:P2 Cash Loan from PWL",28160,Notes Payable 16,Loan from PWL - P2 - Cash Loan from PWL,Add Custom Account,Liability,A,Per-Customer, +"23050 Loan from PWL:Loans, Phase 1 Startup:P1 Loan Principle USB 2448 75k",28100,Notes Payable 10,Bryce Loan from PWL - P1 - USB 2448 75K,Add Custom Account,Liability,A,Per Customer, +"23055 Loan from PWL:Loans, Phase 1 Startup:P1 Loan Interest USB 2448 75K",28100,Notes Payable 10,Bryce Loan from PWL - P1 - USB 2448 75K,Add Custom Account,Liability,A,Per Customer, +10021 Bank Accounts:US Bank x2974,11100,Bank 1,Bryce US Bank x2974,Customize Existing,Asset,A,Per Customer, +10022 Bank Accounts:US Bank x1455 P2 Construction,11110,Bank 2,US Bank x1455 P2 Construction,Customize Existing,Asset,A,Per Customer, +Receivable from NSG,12001,Accounts Receivable 1,Receivable from NSG,Customize Existing,Asset,,Per Customer, +Receivable from PWL,12002,Accounts Receivable 2,Receivable from PWL,Customize Existing,Asset,,Per Customer, +11020 Advance Wages,14401,Other - Prepaid 1,Advance Wages,Customize Existing,Asset,,Per Customer, +11025 House Account,12200,Invoice Receivable,House Account,Customize Existing,Asset,A,Visible by default, +12410 All Inventory Items:Produce,13001,Food Inventory 1,All Inventory Items:Produce,Customize Existing,Asset,,Per Customer, +12415 All Inventory Items:Dairy,13002,Food Inventory 2,All Inventory Items:Dairy,Customize Existing,Asset,,Per Customer, +12420 All Inventory Items:Proteins - All,13003,Food Inventory 3,All Inventory Items:Proteins - All,Customize Existing,Asset,,Per Customer, +12421 All Inventory Items:Proteins - All:Beef/Pork,13004,Food Inventory 4,All Inventory Items:Proteins - All:Beef/Pork,Customize Existing,Asset,,Per Customer, +12422 All Inventory Items:Proteins - All:Seafood,13005,Food Inventory 5,All Inventory Items:Proteins - All:Seafood,Customize Existing,Asset,,Per Customer, +12423 All Inventory Items:Proteins - All:Poultry/Chicken,13006,Food Inventory 6,All Inventory Items:Proteins - All:Poultry/Chicken,Customize Existing,Asset,,Per Customer, +12430 All Inventory Items:Sakes - All,13301,Beer Inventory 1,All Inventory Items:Sakes - All,Customize Existing,Asset,,Per Customer, +12431 All Inventory Items:Sakes - All:Draft Sake,13302,Beer Inventory 2,All Inventory Items:Sakes - All:Draft Sake,Customize Existing,Asset,,Per Customer, +12432 All Inventory Items:Sakes - All:Bottled Sake,13303,Beer Inventory 3,All Inventory Items:Sakes - All:Bottled Sake,Customize Existing,Asset,,Per Customer, +12436 All Inventory Items:Beers - All:Draft Beer,13304,Beer Inventory 4,All Inventory Items:Beers - All:Draft Beer,Customize Existing,Asset,,Per Customer, +12437 All Inventory Items:Beers - All:Bottled Beer,13305,Beer Inventory 5,All Inventory Items:Beers - All:Bottled Beer,Customize Existing,Asset,,Per Customer, +12450 All Inventory Items:Bar Mixes,13201,Liquor Inventory 1,All Inventory Items:Bar Mixes,Customize Existing,Asset,,Per Customer, +12500 Keg Deposits,13306,Beer Inventory 6,Keg Deposits,Customize Existing,Asset,,Per Customer, +15010 Fixed Assets:FFE-Furniture and Equipment P1,15401,Equipment 1,Fixed Assets:FFE-Furniture and Equipment P1,Customize Existing,Asset,A,Per Customer, +15020 Fixed Assets:FFE-Furniture/Equipment P2,15402,Equipment 2,Fixed Assets:FFE-Furniture/Equipment P2,Customize Existing,Asset,A,Per Customer, +15110 Leasehold Improvements P1,15301,Leashold Improve. 1,Leasehold Improvements P1,Customize Existing,Asset,A,Per Customer, +15111 Leasehold Improvements P1:Plan Check P1,15302,Leashold Improve. 2,Leasehold Improvements P1:Plan Check P1,Customize Existing,Asset,A,Per Customer, +"15113 Leasehold Improvements P1:City Permits, Inspections, P1",15303,Leashold Improve. 3,"Leasehold Improvements P1:City Permits, Inspection",Customize Existing,Asset,A,Per Customer, +"15115 Leasehold Improvements P1:Plans, Drawings, Architect, P1",15304,Leashold Improve. 4,"15115 Leasehold Improvements P1:Plans, Drawings, Architect, P1",Customize Existing,Asset,A,Per Customer, +15121 Leasehold Improvements P1:Construction P1 - Demo,15305,Leashold Improve. 5,15121 Leasehold Improvements P1:Construction P1 - Demo,Customize Existing,Asset,A,Per Customer, +15122 Leasehold Improvements P1:Construction P1 - Sewer,15306,Leashold Improve. 6,15122 Leasehold Improvements P1:Construction P1 - Sewer,Customize Existing,Asset,A,Per Customer, +15123 Leasehold Improvements P1:Construction P1-Roof Replace,15307,Leashold Improve. 7,15123 Leasehold Improvements P1:Construction P1-Roof Replace,Customize Existing,Asset,A,Per Customer, +15124 Leasehold Improvements P1:Construction(Contractor) P1,15308,Leashold Improve. 8,15124 Leasehold Improvements P1:Construction(Contractor) P1,Customize Existing,Asset,A,Per Customer, +20220 SJ CreditCard USB x7446 Central,11120,Bank 3,SJ CreditCard USB x7446 Central,Customize Existing,Asset,A,Per Customer, +20230 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9340 - RSM,11130,Bank 4,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer, +20240 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9357 -CM,11140,Bank 5,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer, +20250 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9365 -MS,11150,Bank 6,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer, +20260 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9373 -LF,11160,Bank 7,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer, +20261 SJ CreditCard USB x7446 Central:CC-4126 AP,11170,Bank 8,SJ CreditCard USB x7446 Central:CC-4126 AP,Customize Existing,Asset,A,Per Customer, +20270 SJ CreditCard USB x7446 Central:SJ Credit Card USB x7335 -AG,11180,Bank 9,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer, +20280 SJ CreditCard USB x7446 Central:9340 Credit Card-RSM - 5512,11190,Bank 10,SJ CreditCard USB x7446 Central:9340 Credit Card-R,Customize Existing,Asset,A,Per Customer, +30100 Equity:Partner 1 Investment-PWL,33010,Contributions/ Capital Account - 2,Partner 1 - PWL - Investment,Customize Existing,Equity,A,Per Customer, +30150 Equity:Partner 1 Withdraws - PWL,34010,Distributions / Capital Withdrawal - 2,Partner 1 - PWL - Withdraws,Customize Existing,Equity,A,Per Customer, +30200 Equity:Partner 2 Investment - DM,33020,Contributions/ Capital Account - 3,Partner 2 - DM - Investment,Customize Existing,Equity,A,Per Customer, +30250 Equity:Partner 2 Withdraws - DM,34020,Distributions / Capital Withdrawal - 3,Partner 2 - DM - Withdraws,Customize Existing,Equity,A,Per Customer, +30300 Equity:Partner 3 Investment - MP,33030,Contributions/ Capital Account - 4,Partner 3 - MP - Investment,Customize Existing,Equity,A,Per Customer, +30350 Equity:Partner 3 Withdraws - MP,34030,Distributions / Capital Withdrawal - 4,Partner 3 - MP - Withdraws,Customize Existing,Equity,A,Per Customer, +30360 Equity:Partners 4 Investment - LD,33040,Contributions/ Capital Account - 5,Partner 3 - LD - Investment,Customize Existing,Equity,A,Per Customer, +30370 Equity:Partner 4 Withdrawals - LD,34040,Distributions / Capital Withdrawal - 5,Partner 3 - LD - Withdraws,Customize Existing,Equity,A,Per Customer, +51021 Draft Sake,54611,Sake Cost 1,Draft Sake,Customize Existing,Expense,,Per Customer, +51022 Bottled Sake,54612,Sake Cost 2,Bottled Sake,Customize Existing,Expense,,Per Customer, +51570 Fuel Surcharge Costs,57001,Delivery Cost 1,Fuel Surcharge Costs,Customize Existing,Expense,,Per Customer, +51580 Taxes - sales tax paid,57002,Delivery Cost 2,Taxes - sales tax paid,Customize Existing,Expense,,Per Customer, +57010 Uniforms/StaffShirts/ChefCoats,73301,Uniforms 1,Uniforms/StaffShirts/ChefCoats,Customize Existing,Expense,,Per Customer, +57020 Employee Shirts/Hoodies,73302,Uniforms 2,Employee Shirts/Hoodies,Customize Existing,Expense,,Per Customer, +60110 Employee Meal Discount,72701,Meal Comps 1,Employee Meal Discount,Customize Existing,Expense,,Per Customer, +"60130 Comps - Service, etc",72702,Meal Comps 2,"Comps - Service, etc",Customize Existing,Expense,,Per Customer, +60240 Charitable Contributions,72711,Promotional or Donation Meal Comps 1,Charitable Contributions,Customize Existing,Expense,,Per Customer, +60345 Advertising / Signage/Bus.Cards,72181,Advertising 1,Advertising / Signage/Bus.Cards,Customize Existing,Expense,,Per Customer, +60360 Advertising Print/Coupons/Flyers,72182,Advertising 2,Advertising Print/Coupons/Flyers,Customize Existing,Expense,,Per Customer, +60380 Photography/Video/Pictures,72183,Advertising 3,Photography/Video/Pictures,Customize Existing,Expense,,Per Customer, +"60390 Memberships (Chambers, Etc)",72184,Advertising 4,"Memberships (Chambers, Etc)",Customize Existing,Expense,,Per Customer, +60420 InHouse Event/Holiday Decor,73701,Company Picnics 1,InHouse Event/Holiday Decor,Customize Existing,Expense,,Per Customer, +60430 Florals/Balloons,73702,Company Picnics 2,Florals/Balloons,Customize Existing,Expense,,Per Customer, +60460 Team Building for our staff,73703,Company Picnics 3,Team Building for our staff,Customize Existing,Expense,,Per Customer, +60470 DJ/Live Entertainment,73704,Company Picnics 4,DJ/Live Entertainment,Customize Existing,Expense,,Per Customer, +60480 Benefits to Employees,73705,Company Picnics 5,Benefits to Employees,Customize Existing,Expense,,Per Customer, +61250 Chopsticks,71101,FOH Supplies - Consumable 1,Chopsticks,Customize Existing,Expense,,Per Customer, +61270 POS Receipt Paper,71181,Staff Supplies - Consumable 1,POS Receipt Paper,Customize Existing,Expense,,Per Customer, +61300 To Go consumables,71182,Staff Supplies - Consumable 2,To Go consumables,Customize Existing,Expense,,Per Customer, +61470 Medical Supplies-FirstAid,71183,Staff Supplies - Consumable 3,Medical Supplies-FirstAid,Customize Existing,Expense,,Per Customer, +61520 Dishwasher Rental & Consumables,74101,Cleaning Supplies 1,Dishwasher Rental & Consumables,Customize Existing,Expense,,Per Customer, +61530 Janitorial/Bathroom Consumables,74102,Cleaning Supplies 2,Janitorial/Bathroom Consumables,Customize Existing,Expense,,Per Customer, +61920 Catering 1-time use items,71801,Caterinig Expenses 1,Catering 1-time use items,Customize Existing,Expense,,Per Customer, +61940 Van & Driving Expenses,71802,Caterinig Expenses 2,Van & Driving Expenses,Customize Existing,Expense,,Per Customer, +61970 Catering Equipment Rental,71803,Caterinig Expenses 3,Catering Equipment Rental,Customize Existing,Expense,,Per Customer, +62410 Linen Laundry,74401,Laundry and Drycleaning 1,Linen Laundry,Customize Existing,Expense,,Per Customer, +62860 HotSchedules,75101,Office Supplies 1,HotSchedules,Customize Existing,Expense,,Per Customer, +62870 Printing & copys for office,75102,Office Supplies 2,Printing & copys for office,Customize Existing,Expense,,Per Customer, +62880 Postage,75103,Office Supplies 3,Postage,Customize Existing,Expense,,Per Customer, +64150 Office Electric,83101,Electric 1,Office Electric,Customize Existing,Expense,,Per Customer, +65105 Craig - Handyman,74501,Repairs to Building 1,Craig - Handyman,Customize Existing,Expense,,Per Customer, +65110 Building Repairs & Improvement,74502,Repairs to Building 2,Building Repairs & Improvement,Customize Existing,Expense,,Per Customer, +65205 Equipment Purchase/Repair,74701,Repairs to Equipment 1,Equipment Purchase/Repair,Customize Existing,Expense,,Per Customer, +66710 Inventory - Software,75301,Restaurant Software Fees 1,Inventory - Software,Customize Existing,Expense,,Per Customer, +66720 POS Annual Fees,75302,Restaurant Software Fees 2,POS Annual Fees,Customize Existing,Expense,,Per Customer, +66750 Reservation Software,75303,Restaurant Software Fees 3,Reservation Software,Customize Existing,Expense,,Per Customer, +66770 Computer Software/Hardware,75304,Restaurant Software Fees 4,Computer Software/Hardware,Customize Existing,Expense,,Per Customer, +66780 Caterease Software,75305,Restaurant Software Fees 5,Caterease Software,Customize Existing,Expense,,Per Customer, +67410 Transportation,91301,Travel 1,Transportation,Customize Existing,Expense,,Per Customer, +67430 Meals / Entertainment,91302,Travel 2,Travel Meals,Customize Existing,Expense,,Per Customer, +67440 Parking,91303,Travel 3,Parking,Customize Existing,Expense,,Per Customer, +69200 NSG Contracted Staff,62001,BOH Payroll 1,NSG Contracted Staff,Customize Existing,Expense,,Per Customer, +69400 Reimbursements for Managers,73181,Employee Mileage Reimbursements 1,Reimbursements for Managers,Customize Existing,Expense,,Per Customer, +69850 Training / Continued Education,73501,Employee Training 1,Training / Continued Education,Customize Existing,Expense,,Per Customer, +69720 State Payroll Taxes,69802,Other Payroll Taxes 2,State Payroll Taxes,Customize Existing,Expense,,Per Customer, +68050 Interest on 2448 P1cashflow75K,93401,Interest Expense 1,Interest on 2448 P1cashflow75K,Customize Existing,Expense,,Per Customer, +68100 Interest on 7793 300K P1 Loan,93402,Interest Expense 2,Interest on 7793 300K P1 Loan,Customize Existing,Expense,,Per Customer, +68150 Interest on 7183UBOC P1Loan 28K,93403,Interest Expense 3,Interest on 7183UBOC P1Loan 28K,Customize Existing,Expense,,Per Customer, +68300 Interest on 1838 P2 100k refi,93404,Interest Expense 4,Interest on 1838 P2 100k refi,Customize Existing,Expense,,Per Customer, +68400 Interest on 6712 Const P2 72k,93405,Interest Expense 5,Interest on 6712 Const P2 72k,Customize Existing,Expense,,Per Customer, +71400 Interest Expense on TH Loan,93406,Interest Expense on TH Loan,erest Expense on TH Loan,Customize Existing,Expense,,Per Customer, +71500 Interest PWL Loan,93407,Interest Expense 7,erest PWL Loan,Customize Existing,Expense,,Per Customer, +71600 Interest Expense PWL Loan (SCC),93408,Interest Expense 8,erest Expense PWL Loan (SCC),Customize Existing,Expense,,Per Customer, +71650 Interest on 500K Loan(SCC),93409,Interest Expense 9,erest on 500K Loan(SCC),Customize Existing,Expense,,Per Customer, +71700 Interest Expense on NDR Loan,93411,Interest Expense 11,erest Expense on NDR Loan,Customize Existing,Expense,,Per Customer, +77420 Interest on 300K,93412,Interest Expense 12,Interest on 300K,Customize Existing,Expense,,Per Customer, +77440 Interest Expense 850K Loan,93413,Interest Expense 13,Interest Expense 850K Loan,Customize Existing,Expense,,Per Customer, +40600 Doordash Comps - NEW,48201,Food App Sales 1,Doordash Comps - NEW,Customize Existing,Revenue,,Per Customer, +41021 Sake Sales Draft,45301,Sake Sales 1,Sake Sales Draft,Customize Existing,Revenue,,Per Customer, +41022 Sake Sales Bottle,45302,Sake Sales 2,Sake Sales Bottle,Customize Existing,Revenue,,Per Customer, +41055 SakeBombs & Specials,44201,Beer Sales 1,SakeBombs & Specials,Customize Existing,Revenue,,Per Customer, +44600 Cash Reward Income,49701,Non-Business Income 1,Cash Reward Income,Customize Existing,Revenue,,Per Customer, +21120 Loan from Nance Danner Rocha,28050,Notes Payable 5,Loan from Nance Danner Rocha,Customize Existing,Liability,,, +21130 Loan from Trivium Holdings LLC,28060,Notes Payable 6,Loan from Trivium Holdings LLC,Customize Existing,Liability,,, +21140 Payable to SCC:Construction Loan From SCC 500K,28070,Notes Payable 7,Loan from SCCB - Construction (500K),Customize Existing,Liability,,, +62300 China/Flatware/Utensils <$500,71221,Dining Room Supplies - Reuseable 1,China/Flatware/Utensils <$500,Customize Existing,Liability,,Per Customer, +69710 Federal Payroll Taxes,69801,Other Payroll Taxes 1,Federal Payroll Taxes,Customize Existing,Liability,,, +15710 Loan Temporary,16501,Other intangible 1,Loan Temporary,Customize Existing,Asset,,, +16000 CUP Amendment,16502,Other intangible 2,CUP Amendment,Customize Existing,Asset,,, +21000 Loan from PWL,28010,Notes Payable 1,Loan from PWL - Bills,Customize Existing,Liability,,, +21010 Loan from PWL:Short term Loan-Construction,28020,Notes Payable 2,Loan from PWL - Construction,Customize Existing,Liability,,, +21100 Payable to SCC,28030,Notes Payable 3,Loan from SCCB (500K),Customize Existing,Liability,,, +21110 Payable to SCC:Loan From SCC 600K,28040,Notes Payable 4,Loan from SCCB (600K),Customize Existing,Liability,,, +21150 Payable to SCC:Construction Loan SCC 300K,28080,Notes Payable 8,Loan from SCCB - Construction (300K),Customize Existing,Liability,,, +21250 Deferred Revenue-Habitec Credit,12201,AR 1,Deferred Revenue-Habitec Credit,Customize Existing,Asset,,, +21544 Loan from PWL:28K Loan,28090,Notes Payable 9,PWL 28 K Loan,Customize Existing,Liability,,, +21005 Loan from PWL:Short term Loan-Bills,28010,Notes Payable 1,Loan from PWL - Bills,Customize Existing,Liability,,, +21020 Loan from PWL:Principal amount PWL Loan,28010,Notes Payable 1,Loan from PWL - Bills,Customize Existing,Liability,,, +21025 Loan from PWL:Interest amount PWL Loan,28010,Notes Payable 1,Loan from PWL - Bills,Customize Existing,Liability,,, +21105 Payable to SCC:Accrued Interest- 500K Loan,28030,Notes Payable 3,Loan from SCCB (500K),Customize Existing,Liability,,, +21111 Payable to SCC:Loan From SCC 600K:Principal amount 600K,28040,Notes Payable 4,Loan from SCCB (600K),Customize Existing,Liability,,, +21112 Payable to SCC:Loan From SCC 600K:Interest amount 600K,28040,Notes Payable 4,Loan from SCCB (600K),Customize Existing,Liability,,, +21113 Payable to SCC:Loan From SCC 600K:Accrued Interest on 850K Loan,28040,Notes Payable 4,Loan from SCCB (600K),Customize Existing,Liability,,, +21122 Loan from Nance Danner Rocha:Principal amount NDR Loan,28050,Notes Payable 5,Loan from Nance Danner Rocha,Customize Existing,Liability,,, +21125 Loan from Nance Danner Rocha:Accrued Interest NDR loan,28050,Notes Payable 5,Loan from Nance Danner Rocha,Customize Existing,Liability,,, +21132 Loan from Trivium Holdings LLC:Principal amount THL Loan,28060,Notes Payable 6,Loan from Trivium Holdings LLC,Customize Existing,Liability,,, +21135 Loan from Trivium Holdings LLC:Accrued Interest THL loan,28060,Notes Payable 6,Loan from Trivium Holdings LLC,Customize Existing,Liability,,, +21142 Payable to SCC:Construction Loan From SCC 500K:Principal amount 500K,28070,Notes Payable 7,Loan from SCCB - Construction (500K),Customize Existing,Liability,,, +21145 Payable to SCC:Construction Loan From SCC 500K:Accrued Interest 500K,28070,Notes Payable 7,Loan from SCCB - Construction (500K),Customize Existing,Liability,,, +21152 Payable to SCC:Construction Loan SCC 300K:Principal amount 300K,28080,Notes Payable 8,Loan from SCCB - Construction (300K),Customize Existing,Liability,,, +21155 Payable to SCC:Construction Loan SCC 300K:Accrued Interest on 300K,28080,Notes Payable 8,Loan from SCCB - Construction (300K),Customize Existing,Liability,,, +21545 Loan from PWL:28K Loan:Interest on 28K loan,28090,Notes Payable 9,PWL 28 K Loan,Customize Existing,Liability,,, +67700 Management Cost,81350,% of Sales Management Fee,Management Fee,Add Custom Account,Expense,,Hidden By Default, +67710 Management - DOPS,81351,% of Sales Management Fee 1,Management - DOPS,Add Custom Account,Expense,,Per Customer, +67720 Management - DOPS Bonus,81352,% of Sales Management Fee 2,Management - DOPS Bonus,Add Custom Account,Expense,,Per Customer, +67730 Management - DOCE,81353,% of Sales Management Fee 3,Management - DOCE,Add Custom Account,Expense,,Per Customer, +67740 Management - DOCE Bonus,81354,% of Sales Management Fee 4,Management - DOCE Bonus,Add Custom Account,Expense,,Per Customer, +67800 Management Fees,81355,% of Sales Management Fee 5,Management Fees,Add Custom Account,Expense,,Per Customer, +40600 Doordash Comps - NEW,40200,Kitchen Sales,,Customize Existing,Revenue,,, \ No newline at end of file diff --git a/resources/account customizations/SCSJ.csv b/resources/account customizations/SCSJ.csv index b3ea2fb2..904fbafe 100644 --- a/resources/account customizations/SCSJ.csv +++ b/resources/account customizations/SCSJ.csv @@ -1,185 +1,385 @@ Sushi Confidential Account,IOL Account,IOL Account Name,This Client's Account Name,"Action needed (Use existing, customize existing, Add shared account, Add custom account, Make Visible)","Account Type (Dividend, Expense, Asset, Liability, Equity, Revenue)","Location (e.g., A or HQ)","Default Setting (Per-Customer Visible by default -Hidden by default)", -15125 Leasehold Improvements P1:Building Improvements P1,15309,Leashold Improvements 9,15125 Leasehold Improvements P1:Building Improvements P1,Add Custom Account,Asset,A,Per Customer, -15210 Leasehold Improvement P2,15310,Leashold Improvements 10,Leasehold Improvement P2,Add Custom Account,Asset,A,Visible by default, -15211 Leasehold Improvement P2:Plan Check P2,15311,Leashold Improvements 11,Leasehold Improvement P2:Plan Check P2,Add Custom Account,Asset,A,Visible by default, -"15213 Leasehold Improvement P2:City Permits, Inspections, P2",15312,Leashold Improvements 12,"Leasehold Improvement P2:City Permits, Inspections",Add Custom Account,Asset,A,Visible by default, -"15215 Leasehold Improvement P2:Plans, Drawings, Architect, P2",15313,Leashold Improvements 13,"Leasehold Improvement P2:Plans, Drawings, Architec",Add Custom Account,Asset,A,Visible by default, -15221 Leasehold Improvement P2:Construction P2 -Demo,15314,Leashold Improvements 14,Leasehold Improvement P2:Construction P2 -Demo,Add Custom Account,Asset,A,Visible by default, -15224 Leasehold Improvement P2:Construction P2,15315,Leashold Improvements 15,Leasehold Improvement P2:Construction P2,Add Custom Account,Asset,A,Visible by default, -15225 Leasehold Improvement P2:Building Improvements P2,15316,Leashold Improvements 16,Leasehold Improvement P2:Building Improvements P2,Add Custom Account,Asset,A,Visible by default, -15245 Leasehold Improvement P2:Accum Depreciation-P2 Leasehold,15317,Leashold Improvements 17,Leasehold Improvement P2:Accum Depreciation-P2 Lea,Add Custom Account,Asset,A,Visible by default, -15310 Leasehold Improvement P2b,15318,Leashold Improvements 18,Leasehold Improvement P2b,Add Custom Account,Asset,A,Visible by default, -15311 Leasehold Improvement P2b:Plan Check P2b,15319,Leashold Improvements 19,Leasehold Improvement P2b:Plan Check P2b,Add Custom Account,Asset,A,Visible by default, -"15313 Leasehold Improvement P2b:City Permits, Inspections, P2b",15320,Leashold Improvements 20,"Leasehold Improvement P2b:City Permits, Inspection",Add Custom Account,Asset,A,Visible by default, -"15315 Leasehold Improvement P2b:Plans, Drawings, Architect, P2b",15321,Leashold Improvements 21,"Leasehold Improvement P2b:Plans, Drawings, Archite",Add Custom Account,Asset,A,Visible by default, -15324 Leasehold Improvement P2b:Construction P2b,15322,Leashold Improvements 22,Leasehold Improvement P2b:Construction P2b,Add Custom Account,Asset,A,Visible by default, -15325 Leasehold Improvement P2b:Building Improvements P2b,15323,Leashold Improvements 23,Leasehold Improvement P2b:Building Improvements P2,Add Custom Account,Asset,A,Visible by default, -15330 Leasehold Improvement P2b:Equipment Purchase P2b,15324,Leashold Improvements 24,Leasehold Improvement P2b:Equipment Purchase P2b,Add Custom Account,Asset,A,Visible by default, -30120 Equity:Partner 1 Investment-PWL Phase2,33011,Contributions/ Capital Account - 2.1,Partner 1 - PWL - Investment Phase 2,Add Custom Account,Equity,A,Per Customer, -30130 Equity:Partner 1 Invest-DirectPurchase,33012,Contributions/ Capital Account - 2.2,Partner 1 - PWL - Invest-Direct Purchase,Add Custom Account,Equity,A,Per Customer, -21510 Accrued Liabilities:Accrued Payables,21001,Accounts Payable 1,Other Accrued Payables,Add Custom Account,Liability,A,Per-Customer, -21520 Accrued Liabilities:Payable to CLS,21002,Accounts Payable 2,Payable to CLS,Add Custom Account,Liability,A,Per-Customer, -21530 Accrued Liabilities:Payable to Sushi Randy LLC,21003,Accounts Payable 3,Payable to Sushi Randy LLC,Add Custom Account,Liability,A,Per-Customer, -21540 Loan from PWL:Payable to PWL,21004,Accounts Payable 4,Payable to PWL,Add Custom Account,Liability,A,Per-Customer, -21541 Accrued Liabilities:Accrued Management Fees,21005,Accounts Payable 5,Management Fees Payable,Add Custom Account,Liability,A,Per-Customer, -21542 Accrued Liabilities:Accrued DOPS Fee,21006,Accounts Payable 6,DOPS Fee Payable,Add Custom Account,Liability,A,Per-Customer, -21542-1 Accrued Liabilities:Accrued DOCE Fees,21007,Accounts Payable 7,DOCE Fees Payable,Add Custom Account,Liability,A,Per-Customer, -21543 Accrued Liabilities:Van Use (catering),21008,Accounts Payable 8,Van Use (catering) Payable,Add Custom Account,Liability,A,Per-Customer, -21550 Payable to NSG,21009,Accounts Payable 9,Payable to NSG,Add Custom Account,Liability,A,Per-Customer, -"23000 Loan from PWL:Loans, Phase 1 Startup",28100,Notes Payable 10,Loan from PWL - P1 - USB 2448 75K,Add Custom Account,Liability,A,Per Customer, -"23100 Loan from PWL:Loans, Phase 1 Startup:P1 Loan USB 7793 Equipment 300k",28110,Notes Payable 11,Loan from PWL - P1 - USB 7793 Equipment 300k,Add Custom Account,Liability,A,Per-Customer, -"23200 Loan from PWL:Loans, Phase 1 Startup:P1 Loan UBOC 7183 CLSEquity 28k",28120,Notes Payable 12,Loan from PWL - P1 - UBOC 7183 CLSEquity 28k,Add Custom Account,Liability,A,Per-Customer, -"23300 Loan from PWL:Loans, Phase 1 Startup:P1 Loan FRB Constr 100k",28130,Notes Payable 13,Loan from PWL - P1 - Loan FRB Constr 100k,Add Custom Account,Liability,A,Per-Customer, -"23350 Loan from PWL:Loans, Phase 1 Startup:P1 Loan USB 1838 Const 100kReFi",28140,Notes Payable 14,Loan from PWL - P1 - USB 1838 Const 100kReFi,Add Custom Account,Liability,A,Per-Customer, -"23400 Loan from PWL:Loans, Phase 1 Startup:P2 Loan USB 6712 Constr 72k",28150,Notes Payable 15,Loan from PWL - P2 - USB 6712 Constr 72k,Add Custom Account,Liability,A,Per-Customer, -"23500 Loan from PWL:Loans, Phase 1 Startup:P2 Cash Loan from PWL",28160,Notes Payable 16,Loan from PWL - P2 - Cash Loan from PWL,Add Custom Account,Liability,A,Per-Customer, -"23050 Loan from PWL:Loans, Phase 1 Startup:P1 Loan Principle USB 2448 75k",28100,Notes Payable 10,Loan from PWL - P1 - USB 2448 75K,Add Custom Account,Liability,A,Per Customer, -"23055 Loan from PWL:Loans, Phase 1 Startup:P1 Loan Interest USB 2448 75K",28100,Notes Payable 10,Loan from PWL - P1 - USB 2448 75K,Add Custom Account,Liability,A,Per Customer, -10021 Bank Accounts:US Bank x2974,11100,Bank 1,US Bank x2974,Customize Existing,Asset,A,Per Customer, -10022 Bank Accounts:US Bank x1455 P2 Construction,11110,Bank 2,US Bank x1455 P2 Construction,Customize Existing,Asset,A,Per Customer, -Receivable from NSG,12001,Accounts Receivable 1,Receivable from NSG,Customize Existing,Asset,,Per Customer, -Receivable from PWL,12002,Accounts Receivable 2,Receivable from PWL,Customize Existing,Asset,,Per Customer, -11020 Advance Wages,14401,Other - Prepaid 1,Advance Wages,Customize Existing,Asset,,Per Customer, -11025 House Account,12200,Invoice Receivable,House Account,Customize Existing,Asset,A,Visible by default, -12410 All Inventory Items:Produce,13001,Food Inventory 1,All Inventory Items:Produce,Customize Existing,Asset,,Per Customer, -12415 All Inventory Items:Dairy,13002,Food Inventory 2,All Inventory Items:Dairy,Customize Existing,Asset,,Per Customer, -12420 All Inventory Items:Proteins - All,13003,Food Inventory 3,All Inventory Items:Proteins - All,Customize Existing,Asset,,Per Customer, -12421 All Inventory Items:Proteins - All:Beef/Pork,13004,Food Inventory 4,All Inventory Items:Proteins - All:Beef/Pork,Customize Existing,Asset,,Per Customer, -12422 All Inventory Items:Proteins - All:Seafood,13005,Food Inventory 5,All Inventory Items:Proteins - All:Seafood,Customize Existing,Asset,,Per Customer, -12423 All Inventory Items:Proteins - All:Poultry/Chicken,13006,Food Inventory 6,All Inventory Items:Proteins - All:Poultry/Chicken,Customize Existing,Asset,,Per Customer, -12430 All Inventory Items:Sakes - All,13301,Beer Inventory 1,All Inventory Items:Sakes - All,Customize Existing,Asset,,Per Customer, -12431 All Inventory Items:Sakes - All:Draft Sake,13302,Beer Inventory 2,All Inventory Items:Sakes - All:Draft Sake,Customize Existing,Asset,,Per Customer, -12432 All Inventory Items:Sakes - All:Bottled Sake,13303,Beer Inventory 3,All Inventory Items:Sakes - All:Bottled Sake,Customize Existing,Asset,,Per Customer, -12436 All Inventory Items:Beers - All:Draft Beer,13304,Beer Inventory 4,All Inventory Items:Beers - All:Draft Beer,Customize Existing,Asset,,Per Customer, -12437 All Inventory Items:Beers - All:Bottled Beer,13305,Beer Inventory 5,All Inventory Items:Beers - All:Bottled Beer,Customize Existing,Asset,,Per Customer, -12450 All Inventory Items:Bar Mixes,13201,Liquor Inventory 1,All Inventory Items:Bar Mixes,Customize Existing,Asset,,Per Customer, -12500 Keg Deposits,13306,Beer Inventory 6,Keg Deposits,Customize Existing,Asset,,Per Customer, -15010 Fixed Assets:FFE-Furniture and Equipment P1,15401,Equipment 1,Fixed Assets:FFE-Furniture and Equipment P1,Customize Existing,Asset,A,Per Customer, -15020 Fixed Assets:FFE-Furniture/Equipment P2,15402,Equipment 2,Fixed Assets:FFE-Furniture/Equipment P2,Customize Existing,Asset,A,Per Customer, -15110 Leasehold Improvements P1,15301,Leashold Improve. 1,Leasehold Improvements P1,Customize Existing,Asset,A,Per Customer, -15111 Leasehold Improvements P1:Plan Check P1,15302,Leashold Improve. 2,Leasehold Improvements P1:Plan Check P1,Customize Existing,Asset,A,Per Customer, -"15113 Leasehold Improvements P1:City Permits, Inspections, P1",15303,Leashold Improve. 3,"Leasehold Improvements P1:City Permits, Inspection",Customize Existing,Asset,A,Per Customer, -"15115 Leasehold Improvements P1:Plans, Drawings, Architect, P1",15304,Leashold Improve. 4,"15115 Leasehold Improvements P1:Plans, Drawings, Architect, P1",Customize Existing,Asset,A,Per Customer, -15121 Leasehold Improvements P1:Construction P1 - Demo,15305,Leashold Improve. 5,15121 Leasehold Improvements P1:Construction P1 - Demo,Customize Existing,Asset,A,Per Customer, -15122 Leasehold Improvements P1:Construction P1 - Sewer,15306,Leashold Improve. 6,15122 Leasehold Improvements P1:Construction P1 - Sewer,Customize Existing,Asset,A,Per Customer, -15123 Leasehold Improvements P1:Construction P1-Roof Replace,15307,Leashold Improve. 7,15123 Leasehold Improvements P1:Construction P1-Roof Replace,Customize Existing,Asset,A,Per Customer, -15124 Leasehold Improvements P1:Construction(Contractor) P1,15308,Leashold Improve. 8,15124 Leasehold Improvements P1:Construction(Contractor) P1,Customize Existing,Asset,A,Per Customer, -20220 SJ CreditCard USB x7446 Central,11120,Bank 3,SJ CreditCard USB x7446 Central,Customize Existing,Asset,A,Per Customer, -20230 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9340 - RSM,11130,Bank 4,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer, -20240 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9357 -CM,11140,Bank 5,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer, -20250 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9365 -MS,11150,Bank 6,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer, -20260 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9373 -LF,11160,Bank 7,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer, -20261 SJ CreditCard USB x7446 Central:CC-4126 AP,11170,Bank 8,SJ CreditCard USB x7446 Central:CC-4126 AP,Customize Existing,Asset,A,Per Customer, -20270 SJ CreditCard USB x7446 Central:SJ Credit Card USB x7335 -AG,11180,Bank 9,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer, -20280 SJ CreditCard USB x7446 Central:9340 Credit Card-RSM - 5512,11190,Bank 10,SJ CreditCard USB x7446 Central:9340 Credit Card-R,Customize Existing,Asset,A,Per Customer, -30100 Equity:Partner 1 Investment-PWL,33010,Contributions/ Capital Account - 2,Partner 1 - PWL - Investment,Customize Existing,Equity,A,Per Customer, -30150 Equity:Partner 1 Withdraws - PWL,34010,Distributions / Capital Withdrawal - 2,Partner 1 - PWL - Withdraws,Customize Existing,Equity,A,Per Customer, -30200 Equity:Partner 2 Investment - DM,33020,Contributions/ Capital Account - 3,Partner 2 - DM - Investment,Customize Existing,Equity,A,Per Customer, -30250 Equity:Partner 2 Withdraws - DM,34020,Distributions / Capital Withdrawal - 3,Partner 2 - DM - Withdraws,Customize Existing,Equity,A,Per Customer, -30300 Equity:Partner 3 Investment - MP,33030,Contributions/ Capital Account - 4,Partner 3 - MP - Investment,Customize Existing,Equity,A,Per Customer, -30350 Equity:Partner 3 Withdraws - MP,34030,Distributions / Capital Withdrawal - 4,Partner 3 - MP - Withdraws,Customize Existing,Equity,A,Per Customer, -30360 Equity:Partners 4 Investment - LD,33040,Contributions/ Capital Account - 5,Partner 3 - LD - Investment,Customize Existing,Equity,A,Per Customer, -30370 Equity:Partner 4 Withdrawals - LD,34040,Distributions / Capital Withdrawal - 5,Partner 3 - LD - Withdraws,Customize Existing,Equity,A,Per Customer, -51021 Draft Sake,54611,Sake Cost 1,Draft Sake,Customize Existing,Expense,,Per Customer, -51022 Bottled Sake,54612,Sake Cost 2,Bottled Sake,Customize Existing,Expense,,Per Customer, -51570 Fuel Surcharge Costs,57001,Delivery Cost 1,Fuel Surcharge Costs,Customize Existing,Expense,,Per Customer, -51580 Taxes - sales tax paid,57002,Delivery Cost 2,Taxes - sales tax paid,Customize Existing,Expense,,Per Customer, -57010 Uniforms/StaffShirts/ChefCoats,73301,Uniforms 1,Uniforms/StaffShirts/ChefCoats,Customize Existing,Expense,,Per Customer, -57020 Employee Shirts/Hoodies,73302,Uniforms 2,Employee Shirts/Hoodies,Customize Existing,Expense,,Per Customer, -60110 Employee Meal Discount,72701,Meal Comps 1,Employee Meal Discount,Customize Existing,Expense,,Per Customer, -"60130 Comps - Service, etc",72702,Meal Comps 2,"Comps - Service, etc",Customize Existing,Expense,,Per Customer, -60240 Charitable Contributions,72711,Promotional or Donation Meal Comps 1,Charitable Contributions,Customize Existing,Expense,,Per Customer, -60345 Advertising / Signage/Bus.Cards,72181,Advertising 1,Advertising / Signage/Bus.Cards,Customize Existing,Expense,,Per Customer, -60360 Advertising Print/Coupons/Flyers,72182,Advertising 2,Advertising Print/Coupons/Flyers,Customize Existing,Expense,,Per Customer, -60380 Photography/Video/Pictures,72183,Advertising 3,Photography/Video/Pictures,Customize Existing,Expense,,Per Customer, -"60390 Memberships (Chambers, Etc)",72184,Advertising 4,"Memberships (Chambers, Etc)",Customize Existing,Expense,,Per Customer, -60420 InHouse Event/Holiday Decor,73701,Company Picnics 1,InHouse Event/Holiday Decor,Customize Existing,Expense,,Per Customer, -60430 Florals/Balloons,73702,Company Picnics 2,Florals/Balloons,Customize Existing,Expense,,Per Customer, -60460 Team Building for our staff,73703,Company Picnics 3,Team Building for our staff,Customize Existing,Expense,,Per Customer, -60470 DJ/Live Entertainment,73704,Company Picnics 4,DJ/Live Entertainment,Customize Existing,Expense,,Per Customer, -60480 Benefits to Employees,73705,Company Picnics 5,Benefits to Employees,Customize Existing,Expense,,Per Customer, -61250 Chopsticks,71101,FOH Supplies - Consumable 1,Chopsticks,Customize Existing,Expense,,Per Customer, -61270 POS Receipt Paper,71181,Staff Supplies - Consumable 1,POS Receipt Paper,Customize Existing,Expense,,Per Customer, -61300 To Go consumables,71182,Staff Supplies - Consumable 2,To Go consumables,Customize Existing,Expense,,Per Customer, -61470 Medical Supplies-FirstAid,71183,Staff Supplies - Consumable 3,Medical Supplies-FirstAid,Customize Existing,Expense,,Per Customer, -61520 Dishwasher Rental & Consumables,74101,Cleaning Supplies 1,Dishwasher Rental & Consumables,Customize Existing,Expense,,Per Customer, -61530 Janitorial/Bathroom Consumables,74102,Cleaning Supplies 2,Janitorial/Bathroom Consumables,Customize Existing,Expense,,Per Customer, -61920 Catering 1-time use items,71801,Caterinig Expenses 1,Catering 1-time use items,Customize Existing,Expense,,Per Customer, -61940 Van & Driving Expenses,71802,Caterinig Expenses 2,Van & Driving Expenses,Customize Existing,Expense,,Per Customer, -61970 Catering Equipment Rental,71803,Caterinig Expenses 3,Catering Equipment Rental,Customize Existing,Expense,,Per Customer, -62410 Linen Laundry,74401,Laundry and Drycleaning 1,Linen Laundry,Customize Existing,Expense,,Per Customer, -62860 HotSchedules,75101,Office Supplies 1,HotSchedules,Customize Existing,Expense,,Per Customer, -62870 Printing & copys for office,75102,Office Supplies 2,Printing & copys for office,Customize Existing,Expense,,Per Customer, -62880 Postage,75103,Office Supplies 3,Postage,Customize Existing,Expense,,Per Customer, -64150 Office Electric,83101,Electric 1,Office Electric,Customize Existing,Expense,,Per Customer, -65105 Craig - Handyman,74501,Repairs to Building 1,Craig - Handyman,Customize Existing,Expense,,Per Customer, -65110 Building Repairs & Improvement,74502,Repairs to Building 2,Building Repairs & Improvement,Customize Existing,Expense,,Per Customer, -65205 Equipment Purchase/Repair,74701,Repairs to Equipment 1,Equipment Purchase/Repair,Customize Existing,Expense,,Per Customer, -66710 Inventory - Software,75301,Restaurant Software Fees 1,Inventory - Software,Customize Existing,Expense,,Per Customer, -66720 POS Annual Fees,75302,Restaurant Software Fees 2,POS Annual Fees,Customize Existing,Expense,,Per Customer, -66750 Reservation Software,75303,Restaurant Software Fees 3,Reservation Software,Customize Existing,Expense,,Per Customer, -66770 Computer Software/Hardware,75304,Restaurant Software Fees 4,Computer Software/Hardware,Customize Existing,Expense,,Per Customer, -66780 Caterease Software,75305,Restaurant Software Fees 5,Caterease Software,Customize Existing,Expense,,Per Customer, -67410 Transportation,91301,Travel 1,Transportation,Customize Existing,Expense,,Per Customer, -67430 Meals / Entertainment,91302,Travel 2,Travel Meals,Customize Existing,Expense,,Per Customer, -67440 Parking,91303,Travel 3,Parking,Customize Existing,Expense,,Per Customer, -69200 NSG Contracted Staff,62001,BOH Payroll 1,NSG Contracted Staff,Customize Existing,Expense,,Per Customer, -69400 Reimbursements for Managers,73181,Employee Mileage Reimbursements 1,Reimbursements for Managers,Customize Existing,Expense,,Per Customer, -69850 Training / Continued Education,73501,Employee Training 1,Training / Continued Education,Customize Existing,Expense,,Per Customer, -69720 State Payroll Taxes,69802,Other Payroll Taxes 2,State Payroll Taxes,Customize Existing,Expense,,Per Customer, -68050 Interest on 2448 P1cashflow75K,93401,Interest Expense 1,Interest on 2448 P1cashflow75K,Customize Existing,Expense,,Per Customer, -68100 Interest on 7793 300K P1 Loan,93402,Interest Expense 2,Interest on 7793 300K P1 Loan,Customize Existing,Expense,,Per Customer, -68150 Interest on 7183UBOC P1Loan 28K,93403,Interest Expense 3,Interest on 7183UBOC P1Loan 28K,Customize Existing,Expense,,Per Customer, -68300 Interest on 1838 P2 100k refi,93404,Interest Expense 4,Interest on 1838 P2 100k refi,Customize Existing,Expense,,Per Customer, -68400 Interest on 6712 Const P2 72k,93405,Interest Expense 5,Interest on 6712 Const P2 72k,Customize Existing,Expense,,Per Customer, -71400 Interest Expense on TH Loan,93406,Interest Expense on TH Loan,erest Expense on TH Loan,Customize Existing,Expense,,Per Customer, -71500 Interest PWL Loan,93407,Interest Expense 7,erest PWL Loan,Customize Existing,Expense,,Per Customer, -71600 Interest Expense PWL Loan (SCC),93408,Interest Expense 8,erest Expense PWL Loan (SCC),Customize Existing,Expense,,Per Customer, -71650 Interest on 500K Loan(SCC),93409,Interest Expense 9,erest on 500K Loan(SCC),Customize Existing,Expense,,Per Customer, -71700 Interest Expense on NDR Loan,93411,Interest Expense 11,erest Expense on NDR Loan,Customize Existing,Expense,,Per Customer, -77420 Interest on 300K,93412,Interest Expense 12,Interest on 300K,Customize Existing,Expense,,Per Customer, -77440 Interest Expense 850K Loan,93413,Interest Expense 13,Interest Expense 850K Loan,Customize Existing,Expense,,Per Customer, -40600 Doordash Comps - NEW,48201,Food App Sales 1,Doordash Comps - NEW,Customize Existing,Revenue,,Per Customer, -41021 Sake Sales Draft,45301,Sake Sales 1,Sake Sales Draft,Customize Existing,Revenue,,Per Customer, -41022 Sake Sales Bottle,45302,Sake Sales 2,Sake Sales Bottle,Customize Existing,Revenue,,Per Customer, -41055 SakeBombs & Specials,44201,Beer Sales 1,SakeBombs & Specials,Customize Existing,Revenue,,Per Customer, -44600 Cash Reward Income,49701,Non-Business Income 1,Cash Reward Income,Customize Existing,Revenue,,Per Customer, -21120 Loan from Nance Danner Rocha,28050,Notes Payable 5,Loan from Nance Danner Rocha,Customize Existing,Liability,,, -21130 Loan from Trivium Holdings LLC,28060,Notes Payable 6,Loan from Trivium Holdings LLC,Customize Existing,Liability,,, -21140 Payable to SCC:Construction Loan From SCC 500K,28070,Notes Payable 7,Loan from SCCB - Construction (500K),Customize Existing,Liability,,, -62300 China/Flatware/Utensils <$500,71221,Dining Room Supplies - Reuseable 1,China/Flatware/Utensils <$500,Customize Existing,Liability,,Per Customer, -69710 Federal Payroll Taxes,69801,Other Payroll Taxes 1,Federal Payroll Taxes,Customize Existing,Liability,,, -15710 Loan Temporary,16501,Other intangible 1,Loan Temporary,Customize Existing,Asset,,, -16000 CUP Amendment,16502,Other intangible 2,CUP Amendment,Customize Existing,Asset,,, -21000 Loan from PWL,28010,Notes Payable 1,Loan from PWL - Bills,Customize Existing,Liability,,, -21010 Loan from PWL:Short term Loan-Construction,28020,Notes Payable 2,Loan from PWL - Construction,Customize Existing,Liability,,, -21100 Payable to SCC,28030,Notes Payable 3,Loan from SCCB (500K),Customize Existing,Liability,,, -21110 Payable to SCC:Loan From SCC 600K,28040,Notes Payable 4,Loan from SCCB (600K),Customize Existing,Liability,,, -21150 Payable to SCC:Construction Loan SCC 300K,28080,Notes Payable 8,Loan from SCCB - Construction (300K),Customize Existing,Liability,,, -21250 Deferred Revenue-Habitec Credit,12201,AR 1,Deferred Revenue-Habitec Credit,Customize Existing,Asset,,, -21544 Loan from PWL:28K Loan,28090,Notes Payable 9,PWL 28 K Loan,Customize Existing,Liability,,, -21005 Loan from PWL:Short term Loan-Bills,28010,Notes Payable 1,Loan from PWL - Bills,Customize Existing,Liability,,, -21020 Loan from PWL:Principal amount PWL Loan,28010,Notes Payable 1,Loan from PWL - Bills,Customize Existing,Liability,,, -21025 Loan from PWL:Interest amount PWL Loan,28010,Notes Payable 1,Loan from PWL - Bills,Customize Existing,Liability,,, -21105 Payable to SCC:Accrued Interest- 500K Loan,28030,Notes Payable 3,Loan from SCCB (500K),Customize Existing,Liability,,, -21111 Payable to SCC:Loan From SCC 600K:Principal amount 600K,28040,Notes Payable 4,Loan from SCCB (600K),Customize Existing,Liability,,, -21112 Payable to SCC:Loan From SCC 600K:Interest amount 600K,28040,Notes Payable 4,Loan from SCCB (600K),Customize Existing,Liability,,, -21113 Payable to SCC:Loan From SCC 600K:Accrued Interest on 850K Loan,28040,Notes Payable 4,Loan from SCCB (600K),Customize Existing,Liability,,, -21122 Loan from Nance Danner Rocha:Principal amount NDR Loan,28050,Notes Payable 5,Loan from Nance Danner Rocha,Customize Existing,Liability,,, -21125 Loan from Nance Danner Rocha:Accrued Interest NDR loan,28050,Notes Payable 5,Loan from Nance Danner Rocha,Customize Existing,Liability,,, -21132 Loan from Trivium Holdings LLC:Principal amount THL Loan,28060,Notes Payable 6,Loan from Trivium Holdings LLC,Customize Existing,Liability,,, -21135 Loan from Trivium Holdings LLC:Accrued Interest THL loan,28060,Notes Payable 6,Loan from Trivium Holdings LLC,Customize Existing,Liability,,, -21142 Payable to SCC:Construction Loan From SCC 500K:Principal amount 500K,28070,Notes Payable 7,Loan from SCCB - Construction (500K),Customize Existing,Liability,,, -21145 Payable to SCC:Construction Loan From SCC 500K:Accrued Interest 500K,28070,Notes Payable 7,Loan from SCCB - Construction (500K),Customize Existing,Liability,,, -21152 Payable to SCC:Construction Loan SCC 300K:Principal amount 300K,28080,Notes Payable 8,Loan from SCCB - Construction (300K),Customize Existing,Liability,,, -21155 Payable to SCC:Construction Loan SCC 300K:Accrued Interest on 300K,28080,Notes Payable 8,Loan from SCCB - Construction (300K),Customize Existing,Liability,,, -21545 Loan from PWL:28K Loan:Interest on 28K loan,28090,Notes Payable 9,PWL 28 K Loan,Customize Existing,Liability,,, -67700 Management Cost,81350,% of Sales Management Fee,Management Fee,Add Custom Account,Expense,,Hidden By Default, -67710 Management - DOPS,81351,% of Sales Management Fee 1,Management - DOPS,Add Custom Account,Expense,,Per Customer, -67720 Management - DOPS Bonus,81352,% of Sales Management Fee 2,Management - DOPS Bonus,Add Custom Account,Expense,,Per Customer, -67730 Management - DOCE,81353,% of Sales Management Fee 3,Management - DOCE,Add Custom Account,Expense,,Per Customer, -67740 Management - DOCE Bonus,81354,% of Sales Management Fee 4,Management - DOCE Bonus,Add Custom Account,Expense,,Per Customer, -67800 Management Fees,81355,% of Sales Management Fee 5,Management Fees,Add Custom Account,Expense,,Per Customer, \ No newline at end of file +Hidden by default)" + 40000 Food Sales,40000,Food Sales,,,Revenue,,Per-Customer + 40200 Kitchen Sales,40200,Kitchen Sales,,,Revenue,, + 40500 Sushi Sales,40500,Sushi Sales,,,Revenue,, + 40600 Doordash Comps - NEW,48201,Food App Sales 1,Doordash Comps - NEW,Customize Existing,Revenue,,Per Customer + Total 40000 Food Sales,,,,,,, + 41000 Beverage Sales,42000,Soft Beverage Sales,,,Revenue,,Visible by default + 41010 Wine Sales,45000,Wine Sales,,,Revenue,,Visible by default + 41020 Sake Sales,45300,Sake Sales,,,Revenue,, + 41021 Sake Sales Draft,45301,Sake Sales 1,Sake Sales Draft,Customize Existing,Revenue,,Per Customer + 41022 Sake Sales Bottle,45302,Sake Sales 2,Sake Sales Bottle,Customize Existing,Revenue,,Per Customer + Total 41020 Sake Sales,,,,,,, + 41050 Beer Sales,44000,Beer Sales,,,Revenue,,Visible by default + 41051 Beer Draft,44100,Draft Beer Sales,,,Revenue,,Visible by default + 41052 Beer Bottled,44200,Bottled Beer Sales,,,Revenue,,Visible by default + 41055 SakeBombs & Specials,44201,Beer Sales 1,SakeBombs & Specials,Customize Existing,Revenue,,Per Customer + Total 41050 Beer Sales,,,,,,, + 41100 Liquor Sales,46000,Liquor Sales,,,Revenue,,Visible by default + 41400 N/A Beverages Sales,42000,Soft Beverage Sales,,,Revenue,,Visible by default + Total 41000 Beverage Sales,,,,,,, + 42000 Catering Sales,43000,Catering Sales,,,Revenue,,Visible by default + 42500 Corporate Catering,43100,Corporate Catering,,,Revenue,, + Total 42000 Catering Sales,,,,,,, + 44000 Other Income,48000,Other Sales,,,Revenue,,Visible by default + 44600 Cash Reward Income,49701,Non-Business Income 1,Cash Reward Income,Customize Existing,Revenue,,Per Customer + Total 44000 Other Income,,,,,,, + 45000 Other Sales,,,,,,, + 45010 Clothing & Accessories,47000,Merchandise Sales,,,Revenue,,Visible by default + 45500 Events / Ticket Sales,48300,Events / Ticket Sales,,,Revenue,, + Total 45000 Other Sales,,,,,,, + Uncategorized Income-1,49700,Non-Business Income,,,Revenue,,Visible by default +Total Income,,,,,,, +Cost of Goods Sold,,,,,,, + 50000 Food Purchases - All,50000,Food Cost,,,Expense,,Visible by default + 50010 Proteins,51100,Proteins Cost,,,Expense,,Visible by default + 50011 Beef/Pork,51110,Beef/ Pork Costs,,,Expense,,Visible by default + 50012 Chicken/Poultry,51120,Chicken/ Poultry Costs,,,Expense,,Visible by default + 50013 Fish,51130,Seafood Costs,,,Expense,,Visible by default + Total 50010 Proteins,,,,,,, + 50020 Dairy,51300,Dairy Costs,,,Expense,,Visible by default + 50030 Produce,51200,Produce Costs,,,Expense,,Visible by default + 50040 Dry Goods,51500,Dry Goods,,,Expense,, + Total 50000 Food Purchases - All,,,,,,, + 51000 Bar Purchases,54000,Alcohol Cost,,,Expense,,Visible by default + 51010 Wines,45000,Wine Sales,,,Revenue,,Visible by default + 51020 Sake,54610,Sake,,,Expense,, + 51021 Draft Sake,54611,Sake Cost 1,Draft Sake,Customize Existing,Expense,,Per Customer + 51022 Bottled Sake,54612,Sake Cost 2,Bottled Sake,Customize Existing,Expense,,Per Customer + Total 51020 Sake,,,,,,, + 51050 Beers - All,54100,Beer Cost,,,Expense,,Visible by default + 51051 Draft Beer,54200,Draft Beer Cost,,,Expense,,Visible by default + 51052 Bottled Beer,54150,Bottled Beer Cost,,,Expense,,Visible by default + Total 51050 Beers - All,,,,,,, + 51100 Liquor,54700,Liquor Cost,,,Expense,,Visible by default + 51300 Bar Mixes,54790,Bar Mixes,,,Expense,, + 51400 N/A Beverages,52000,Soft Beverage Cost,,,Expense,,Visible by default + 51570 Fuel Surcharge Costs,57001,Delivery Cost 1,Fuel Surcharge Costs,Customize Existing,Expense,,Per Customer + 51580 Taxes - sales tax paid,57002,Delivery Cost 2,Taxes - sales tax paid,Customize Existing,Expense,,Per Customer + Total 51000 Bar Purchases,,,,,,, + 56999 Merchant Account Fees,75400,Credit Card Processing,,,Expense,,Visible by default + 57000 Clothing & Merchandise,56000,Merchandise Cost,,,Expense,,Visible by default + 57010 Uniforms/StaffShirts/ChefCoats,73301,Uniforms 1,Uniforms/StaffShirts/ChefCoats,Customize Existing,Expense,,Per Customer + 57020 Employee Shirts/Hoodies,73302,Uniforms 2,Employee Shirts/Hoodies,Customize Existing,Expense,,Per Customer + Total 57010 Uniforms/StaffShirts/ChefCoats,,,,,,, + Total 57000 Clothing & Merchandise,,,,,,, +Total Cost of Goods Sold,,,,,,, +Gross Profit,,,,,,, +Expenses,,,,,,, + 60000 Marketing/Promotion Expenses,72100,Marketing,,,Expense,,Visible by default + 60100 Discounts for Service/Employees,72700,Meal Comps,,,Expense,,Visible by default + 60110 Employee Meal Discount,72701,Meal Comps 1,Employee Meal Discount,Customize Existing,Expense,,Per Customer +" 60130 Comps - Service, etc",72702,Meal Comps 2,"Comps - Service, etc",Customize Existing,Expense,,Per Customer + Total 60100 Discounts for Service/Employees,,,,,,, + 60200 Promotional Discounts/Donations,72710,Promotional Discounts/Donations,,,Expense,,Hidden by default + 60240 Charitable Contributions,72711,Promotional or Donation Meal Comps 1,Charitable Contributions,Customize Existing,Expense,,Per Customer + Total 60200 Promotional Discounts/Donations,,,,,,, + 60300 Marketing,72100,Marketing,,,Expense,,Visible by default + 60330 Website / Social Media,72110,Website / Social Media,,,Expense,, +" 60340 Menus (Books, Pages, Design)",72200,Menus,,,Expense,,Visible by default + 60345 Advertising / Signage/Bus.Cards,72181,Advertising 1,Advertising / Signage/Bus.Cards,Customize Existing,Expense,,Per Customer + 60360 Advertising Print/Coupons/Flyers,72182,Advertising 2,Advertising Print/Coupons/Flyers,Customize Existing,Expense,,Per Customer + 60380 Photography/Video/Pictures,72183,Advertising 3,Photography/Video/Pictures,Customize Existing,Expense,,Per Customer +" 60390 Memberships (Chambers, Etc)",72184,Advertising 4,"Memberships (Chambers, Etc)",Customize Existing,Expense,,Per Customer + Total 60300 Marketing,,,,,,, + 60400 Event & Holiday Expenses,73700,Company Picnics,,,Expense,,Visible by default + 60420 InHouse Event/Holiday Decor,73701,Company Picnics 1,InHouse Event/Holiday Decor,Customize Existing,Expense,,Per Customer + 60430 Florals/Balloons,73702,Company Picnics 2,Florals/Balloons,Customize Existing,Expense,,Per Customer + 60460 Team Building for our staff,73703,Company Picnics 3,Team Building for our staff,Customize Existing,Expense,,Per Customer + 60470 DJ/Live Entertainment,73704,Company Picnics 4,DJ/Live Entertainment,Customize Existing,Expense,,Per Customer + 60480 Benefits to Employees,73705,Company Picnics 5,Benefits to Employees,Customize Existing,Expense,,Per Customer + Total 60400 Event & Holiday Expenses,,,,,,, + 60500 Events w Tickets Sold,,,,,,, + 60530 Fish & Sticks - Giants,,,,,,, + Total 60500 Events w Tickets Sold,,,,,,, + 60700 3rd Party Sales/Commissions,,,,,,, + Total 60000 Marketing/Promotion Expenses,,,,,,, + 61000 Supplies - Consumable,71100,Dining Room and Bar Supplies,,,Expense,,Visible by default + 61100 Bar/Dining Room Consu-Non Foods,71100,Dining Room and Bar Supplies,,,Expense,,Visible by default + 61250 Chopsticks,71101,FOH Supplies - Consumable 1,Chopsticks,Customize Existing,Expense,,Per Customer + 61270 POS Receipt Paper,71181,Staff Supplies - Consumable 1,POS Receipt Paper,Customize Existing,Expense,,Per Customer + 61300 To Go consumables,71182,Staff Supplies - Consumable 2,To Go consumables,Customize Existing,Expense,,Per Customer + 61400 Kitchen Consumables,74200,Kitchen Supplies,,,Expense,,Visible by default + 61470 Medical Supplies-FirstAid,71183,Staff Supplies - Consumable 3,Medical Supplies-FirstAid,Customize Existing,Expense,,Per Customer + 61500 Cleaning Consumables,74100,Cleaning Supplies,,,Expense,,Visible by default + 61520 Dishwasher Rental & Consumables,74101,Cleaning Supplies 1,Dishwasher Rental & Consumables,Customize Existing,Expense,,Per Customer + 61530 Janitorial/Bathroom Consumables,74102,Cleaning Supplies 2,Janitorial/Bathroom Consumables,Customize Existing,Expense,,Per Customer + Total 61500 Cleaning Consumables,,,,,,, + 61900 Catering Related Expenses,71800,Catering Expenses,,,Expense,,Visible by default + 61920 Catering 1-time use items,71801,Caterinig Expenses 1,Catering 1-time use items,Customize Existing,Expense,,Per Customer + 61940 Van & Driving Expenses,71802,Caterinig Expenses 2,Catering Van & Driving Expenses,Customize Existing,Expense,,Per Customer + 61970 Catering Equipment Rental,71803,Caterinig Expenses 3,Catering Equipment Rental,Customize Existing,Expense,,Per Customer + Total 61900 Catering Related Expenses,,,,,,, + Total 61000 Supplies - Consumable,,,,,,, + 62000 Supplies - Reusable,71200,Supplies - Reuseable,,,Expense,,Hidden by default + 62100 Bar Supplies / equip < $500,71260,Bar Supplies - Reuseable,,,Expense,,Hidden by default + 62200 Dining Room Supplies <$500,71220,Dining Roomo Supplies - Reuseable,,,Expense,,Visible by default + 62300 China/Flatware/Utensils <$500,71221,Dining Room Supplies - Reuseable 1,China/Flatware/Utensils <$500,Customize Existing,,,Per Customer + 62400 Laundry,74400,Laundry and Drycleaning,,,Expense,,Visible by default + 62410 Linen Laundry,74401,Laundry and Drycleaning 1,Linen Laundry,Customize Existing,Expense,,Per Customer + Total 62400 Laundry,,,,,,, + 62500 Kitchen Supplies <$500,74200,Kitchen Supplies,,,Expense,,Visible by default + 62800 Office Expenses,75050,Office Expenses,,,Expense,,Visible by default + 62810 Office Supplies-Reusables,75100,Office Supplies,,,Expense,,Visible by default + 62860 HotSchedules,75101,Office Supplies 1,HotSchedules,Customize Existing,Expense,,Per Customer + 62870 Printing & copys for office,75102,Office Supplies 2,Printing & copys for office,Customize Existing,Expense,,Per Customer + 62880 Postage,75103,Office Supplies 3,Postage,Customize Existing,Expense,,Per Customer + 62890 Dues and Subscriptions,81200,Membership Dues and Associations,,,Expense,,Visible by default + Total 62800 Office Expenses,,,,,,, + 62900 Catering Reusable Supplies,71240,Banquet and Catering Supplies - Reuseable,,,Expense,,Hidden by default + Total 62000 Supplies - Reusable,,,,,,, + 64000 Utilities,83000,Utilities,,,Expense,,Visible by default + 64100 Gas & Electric - Main Bldg,83100,Electric,,,Expense,,Visible by default + 64150 Office Electric,83101,Electric 1,Office Electric,Customize Existing,Expense,,Per Customer + 64200 Water,83400,Water and Sewage,,,Expense,,Visible by default + 64300 Trash/Waste Removal,83300,Trash Removal,,,Expense,,Visible by default + 64400 Telephone,83600,Telephone,,,Expense,,Visible by default + 64500 Internet & Fax,83500,Internet,,,Expense,,Visible by default + 64600 TV and Audio Expenses,72500,Cable Television,,,Expense,,Visible by default + Total 64000 Utilities,,,,,,, + 65000 Repairs / Maintenance,74500,Repairs to Building,,,Expense,,Visible by default + 65100 Building Repair/Maint,74500,Repairs to Building,,,Expense,,Visible by default + 65105 Craig - Handyman,74501,Repairs to Building 1,Craig - Handyman,Customize Existing,Expense,,Per Customer + 65110 Building Repairs & Improvement,74502,Repairs to Building 2,Building Repairs & Improvement,Customize Existing,Expense,,Per Customer + Total 65100 Building Repair/Maint,,,,,,, + 65200 Equipment Repair/Maint,74700,Repairs to Equipment,,,Expense,,Visible by default + 65205 Equipment Purchase/Repair,74701,Repairs to Equipment 1,Equipment Purchase/Repair,Customize Existing,Expense,,Per Customer + Total 65200 Equipment Repair/Maint,,,,,,, + 65500 Equipment Rental-Kitchen,84100,Kitchen Equipment Rental,,,Expense,,Visible by default + 65600 IT & Computer Repair/Maint,74710,IT / Computer Repair,,,Expense,,Visible by default + 65700 Pest Control,74610,Pest Control,,,Expense,,Visible by default + Total 65000 Repairs / Maintenance,,,,,,, + 66000 Business Expenses,,,,,,, + 66100 Rent Expense,82100,Rent,,,Expense,,Visible by default + 66150 Storage Rental,83700,Storage,,,Expense,,Visible by default + 66200 Taxes - Property,86300,Personal Property Taxes,,,Expense,,Visible by default + 66250 State Taxes,97200,State Taxes - HQ,,,Expense,,Visible by default +" 66300 Biz & ABC Licenses, Use Permits",86500,Liquor License Fee,,,Expense,,Visible by default + 66400 Security / Alarm,83800,Security System/ Alarms,,,Expense,,Visible by default + 66450 Fees,93300,Late Payment Fees,,,Expense,,Visible by default + 66500 Banks,93100,Bank Fees,,,Expense,,Visible by default + 66510 Service Charges,93100,Bank Fees,,,Expense,,Visible by default + 66520 Finance & Interest Charges,93400,Interest Expense,,,Expense,,Visible by default + Total 66500 Banks,,,,,,, + 66600 Insurance Expense,85100,Liability Insurance,,,Expense,,Visible by default + 66610 General Liability Insurance,85100,Liability Insurance,,,Expense,,Visible by default + Total 66600 Insurance Expense,,,,,,, + 66700 Operational Software,75300,Restaurant Software Fees,,,Expense,,Visible by default + 66710 Inventory - Software,75301,Restaurant Software Fees 1,Inventory - Software,Customize Existing,Expense,,Per Customer + 66720 POS Annual Fees,75302,Restaurant Software Fees 2,POS Annual Fees,Customize Existing,Expense,,Per Customer + 66750 Reservation Software,75303,Restaurant Software Fees 3,Reservation Software,Customize Existing,Expense,,Per Customer + 66770 Computer Software/Hardware,75304,Restaurant Software Fees 4,Computer Software/Hardware,Customize Existing,Expense,,Per Customer + 66780 Caterease Software,75305,Restaurant Software Fees 5,Caterease Software,Customize Existing,Expense,,Per Customer + Total 66700 Operational Software,,,,,,, + 66800 Meeting Meals - Deductible,91200,Meals and Entertainment,,,Expense,,Visible by default + Total 66000 Business Expenses,,,,,,, + 67000 Other Business Expenses,81110,Professional Fees,,,Expense,,Hidden by default + 67100 Professional Fees,81110,Professional Fees,,,Expense,, + 67110 Bookkeeping/Accounting,81140,Accounting,,,Expense,,Visible by default + 67115 CPA & Tax Returns,81140,Accounting,,,Expense,,Visible by default + 67130 Outside Services,81150,Consultants,,,Expense,,Visible by default + Total 67100 Professional Fees,,,,,,, + 67400 Travel Expense,91300,Travel,,,Expense,,Visible by default + 67410 Transportation,91301,Travel 1,Transportation,Customize Existing,Expense,,Per Customer + 67430 Meals / Entertainment,91302,Travel 2,Travel Meals,Customize Existing,Expense,,Per Customer + 67440 Parking,91303,Travel 3,Parking,Customize Existing,Expense,,Per Customer + Total 67400 Travel Expense,,,,,,, + 67700 Management Cost,81350,% of Sales Management Fee,Management Fee,Add Custom Account,Expense,,Hidden By Default + 67710 Management - DOPS,81351,% of Sales Management Fee 1,Management - DOPS,Add Custom Account,Expense,,Per Customer + 67720 Management - DOPS Bonus,81352,% of Sales Management Fee 2,Management - DOPS Bonus,Add Custom Account,Expense,,Per Customer + 67730 Management - DOCE,81353,% of Sales Management Fee 3,Management - DOCE,Add Custom Account,Expense,,Per Customer + 67740 Management - DOCE Bonus,81354,% of Sales Management Fee 4,Management - DOCE Bonus,Add Custom Account,Expense,,Per Customer + Total 67700 Management Cost,,% of Sales Management Fee 5,,,,, + 67800 Management Fees,81355,% of Sales Management Fee 5,Management Fees,Add Custom Account,Expense,,Per Customer + 67900 Miscellaneous Expense,98800,Misc Payments,,,Expense,,Visible by default + Total 67000 Other Business Expenses,,,,,,, + 69000 Labor Costs,60000,Payroll,,,Expense,,Visible by default + 69110 BOH Wages,62000,BOH Payroll,,,Expense,,Visible by default + 69120 FOH Wages,63000,FOH Payroll,,,Expense,,Visible by default + 69140 Security Wages,66000,Security Payroll,Security Payroll,,,, + 69175 Overtime Wages,63800,FOH Payroll - OT,,,Expense,,Hidden by default + 69200 NSG Contracted Staff,62001,BOH Payroll 1,NSG Contracted Staff,Customize Existing,Expense,,Per Customer + 69300 Management,61000,Manager Payroll,,,Expense,,Visible by default + 69336 Management - FOH - TB,61100,Manager Payroll - FOH,,,Expense,,Visible by default + Total 69300 Management,,,,,,, + 69400 Reimbursements for Managers,73181,Employee Mileage Reimbursements 1,Reimbursements for Managers,Customize Existing,Expense,,Per Customer + 69600 Staffing/Recruiting/Hiring,73500,Employee Training,,,Expense,,Visible by default + 69850 Training / Continued Education,73501,Employee Training 1,Training / Continued Education,Customize Existing,Expense,,Per Customer + 69860 Craig's List / Ads,73400,Recruiting,,,Expense,,Visible by default + Total 69600 Staffing/Recruiting/Hiring,,,,,,, + 69710 Federal Payroll Taxes,69801,Other Payroll Taxes 1,Federal Payroll Taxes,Customize Existing,,, + 69720 State Payroll Taxes,69802,Other Payroll Taxes 2,State Payroll Taxes,Customize Existing,Expense,,Per Customer + 69740 Payroll Expenses,,,,,,, + 69900 Worker's Compensation,73600,Workers Compensation Insurance - Fixed,,,Expense,,Visible by default + Total 69000 Labor Costs,,,,,,, + Uncategorized Expense,75990,Unassigned Expenses,,,Expense,,Visible by default +Total Expenses,,,,,,, +Net Operating Income,,,,,,, +Other Expenses,,,,,,, + 67600 Interest on Loan,93400,Interest Expense,,,Expense,,Visible by default + 68050 Interest on 2448 P1cashflow75K,93401,Interest Expense 1,Interest on 2448 P1cashflow75K,Customize Existing,Expense,,Per Customer + 68100 Interest on 7793 300K P1 Loan,93402,Interest Expense 2,Interest on 7793 300K P1 Loan,Customize Existing,Expense,,Per Customer + 68150 Interest on 7183UBOC P1Loan 28K,93403,Interest Expense 3,Interest on 7183UBOC P1Loan 28K,Customize Existing,Expense,,Per Customer + 68300 Interest on 1838 P2 100k refi,93404,Interest Expense 4,Interest on 1838 P2 100k refi,Customize Existing,Expense,,Per Customer + 68400 Interest on 6712 Const P2 72k,93405,Interest Expense 5,Interest on 6712 Const P2 72k,Customize Existing,Expense,,Per Customer + 71400 Interest Expense on TH Loan,93406,Interest Expense on TH Loan,erest Expense on TH Loan,Customize Existing,Expense,,Per Customer + 71500 Interest PWL Loan,93407,Interest Expense 7,erest PWL Loan,Customize Existing,Expense,,Per Customer + 71600 Interest Expense PWL Loan (SCC),93408,Interest Expense 8,erest Expense PWL Loan (SCC),Customize Existing,Expense,,Per Customer + 71650 Interest on 500K Loan(SCC),93409,Interest Expense 9,erest on 500K Loan(SCC),Customize Existing,Expense,,Per Customer + 71700 Interest Expense on NDR Loan,93411,Interest Expense 11,erest Expense on NDR Loan,Customize Existing,Expense,,Per Customer + 77420 Interest on 300K,93412,Interest Expense 12,Interest on 300K,Customize Existing,Expense,,Per Customer + 77440 Interest Expense 850K Loan,93413,Interest Expense 13,Interest Expense 850K Loan,Customize Existing,Expense,,Per Customer +,,,,,,, +,,,,,,, +,,,,,,, + Total 67600 Interest on Loan,,,,,,, + 67910 Depreciation Expense,96600,Depreciation on Furniture and Fixtures,,,Expense,,Visible by default +Total Other Expenses,,,,,,, +Net Other Income,,,,,,, +Net Income,,,,,,, +10000 Bank Accounts,11000,Bank Accounts,,,Asset,A,Per Customer +10005 Bank Accounts:Cash Drawer,11000,Cash on Hand,,,Asset,A,Per Customer +10021 Bank Accounts:US Bank x2974,11100,Bank 1,US Bank x2974,Customize Existing,Asset,A,Per Customer +10022 Bank Accounts:US Bank x1455 P2 Construction,11110,Bank 2,US Bank x1455 P2 Construction,Customize Existing,Asset,A,Per Customer +11000 Accounts Receivable,12000,Accounts Receivable,,,Asset,, +Receivable from NSG,12001,Accounts Receivable,Receivable from NSG,Customize Existing,Asset,,Per Customer +Receivable from PWL,12002,Accounts Receivable,Receivable from PWL,Customize Existing,Asset,,Per Customer +11020 Advance Wages,14401,Other - Prepaid 1,Advance Wages,Customize Existing,Asset,,Per Customer +11025 House Account,12200,Invoice Receivable,House Account,Customize Existing,Asset,A,Visible by default +11030 Prepaid Others,14400,Other - Prepaid,,,Asset,A,Visible by default +12400 All Inventory Items,13000,Food Inventory,,,Asset,A,Visible by default +12410 All Inventory Items:Produce,13001,Food Inventory 1,All Inventory Items:Produce,Customize Existing,Asset,,Per Customer +12415 All Inventory Items:Dairy,13002,Food Inventory 2,All Inventory Items:Dairy,Customize Existing,Asset,,Per Customer +12420 All Inventory Items:Proteins - All,13003,Food Inventory 3,All Inventory Items:Proteins - All,Customize Existing,Asset,,Per Customer +12421 All Inventory Items:Proteins - All:Beef/Pork,13004,Food Inventory 4,All Inventory Items:Proteins - All:Beef/Pork,Customize Existing,Asset,,Per Customer +12422 All Inventory Items:Proteins - All:Seafood,13005,Food Inventory 5,All Inventory Items:Proteins - All:Seafood,Customize Existing,Asset,,Per Customer +12423 All Inventory Items:Proteins - All:Poultry/Chicken,13006,Food Inventory 6,All Inventory Items:Proteins - All:Poultry/Chicken,Customize Existing,Asset,,Per Customer +12425 All Inventory Items:NA Beverages,13100,Soft Beverage Inventory,,,Asset,A,Visible by default +12430 All Inventory Items:Sakes - All,13301,Beer Inventory 1,All Inventory Items:Sakes - All,Customize Existing,Asset,,Per Customer +12431 All Inventory Items:Sakes - All:Draft Sake,13302,Beer Inventory 2,All Inventory Items:Sakes - All:Draft Sake,Customize Existing,Asset,,Per Customer +12432 All Inventory Items:Sakes - All:Bottled Sake,13303,Beer Inventory 3,All Inventory Items:Sakes - All:Bottled Sake,Customize Existing,Asset,,Per Customer +12435 All Inventory Items:Beers - All,13300,Beer Inventory,,,Asset,A,Visible by default +12436 All Inventory Items:Beers - All:Draft Beer,13304,Beer Inventory 4,All Inventory Items:Beers - All:Draft Beer,Customize Existing,Asset,,Per Customer +12437 All Inventory Items:Beers - All:Bottled Beer,13305,Beer Inventory 5,All Inventory Items:Beers - All:Bottled Beer,Customize Existing,Asset,,Per Customer +12440 All Inventory Items:Wines,13400,Wine Inventory,,,Asset,A,Visible by default +12445 All Inventory Items:Liquors,13200,Liquor Inventory,,,Asset,A,Visible by default +12450 All Inventory Items:Bar Mixes,13201,Liquor Inventory 1,All Inventory Items:Bar Mixes,Customize Existing,Asset,,Per Customer +12455 All Inventory Items:Dry Goods,13050,All Inventory Items:Dry Goods,,,Asset,, +12500 Keg Deposits,13306,Beer Inventory 6,Keg Deposits,Customize Existing,Asset,,Per Customer +12550 Other-Apparel for sale,13600,Merchandise Inventory,,,Asset,A,Visible by default +13000 Amex Clearing Account,12100,CCP,,,Asset,A,Visible by default +13100 Catering Clearing Account,12100,CCP,,,Asset,A,Visible by default +13200 Doordash Clearing Account,12100,CCP,,,Asset,A,Visible by default +13300 Go Fund Me Clearing Account,12100,CCP,,,Asset,A,Visible by default +15010 Fixed Assets:FFE-Furniture and Equipment P1,15401,Equipment 1,Fixed Assets:FFE-Furniture and Equipment P1,Customize Existing,Asset,A,Per Customer +15015 Fixed Assets:FFE P1-Accumulated Depreciation,15940,Accum Depr - Furniture and Equipment,,,Asset,A,Visible by default +15020 Fixed Assets:FFE-Furniture/Equipment P2,15402,Equipment 2,Fixed Assets:FFE-Furniture/Equipment P2,Customize Existing,Asset,A,Per Customer +15025 Fixed Assets:FFE P2-Accumulated Depreciation,15940,Accum Depr - Furniture and Equipment,,,Asset,A,Visible by default +15090 Fixed Assets:Liquor License,16400,Liquor License,,,Asset,A,Visible by default +15095 Fixed Assets:Accumulated Dep - License,16600,Accum Amortization,,,Asset,A,Visible by default +15110 Leasehold Improvements P1,15301,Leashold Improve. 1,Leasehold Improvements P1,Customize Existing,Asset,A,Per Customer +15111 Leasehold Improvements P1:Plan Check P1,15302,Leashold Improve. 2,Leasehold Improvements P1:Plan Check P1,Customize Existing,Asset,A,Per Customer +"15113 Leasehold Improvements P1:City Permits, Inspections, P1",15303,Leashold Improve. 3,"Leasehold Improvements P1:City Permits, Inspection",Customize Existing,Asset,A,Per Customer +"15115 Leasehold Improvements P1:Plans, Drawings, Architect, P1",15304,Leashold Improve. 4,"15115 Leasehold Improvements P1:Plans, Drawings, Architect, P1",Customize Existing,Asset,A,Per Customer +15121 Leasehold Improvements P1:Construction P1 - Demo,15305,Leashold Improve. 5,15121 Leasehold Improvements P1:Construction P1 - Demo,Customize Existing,Asset,A,Per Customer +15122 Leasehold Improvements P1:Construction P1 - Sewer,15306,Leashold Improve. 6,15122 Leasehold Improvements P1:Construction P1 - Sewer,Customize Existing,Asset,A,Per Customer +15123 Leasehold Improvements P1:Construction P1-Roof Replace,15307,Leashold Improve. 7,15123 Leasehold Improvements P1:Construction P1-Roof Replace,Customize Existing,Asset,A,Per Customer +15124 Leasehold Improvements P1:Construction(Contractor) P1,15308,Leashold Improve. 8,15124 Leasehold Improvements P1:Construction(Contractor) P1,Customize Existing,Asset,A,Per Customer +15125 Leasehold Improvements P1:Building Improvements P1,15309,Leashold Improvements 9,15125 Leasehold Improvements P1:Building Improvements P1,Add Custom Account,Asset,A,Per Customer +15145 Accum Depreciation-P1 Leasehold,15920,Accum Depr - Leasehold Improvements,,,Asset,A,Visible by default +15150 Leasehold Improvements P1:Amortization P1 LeaseImprovmnts,15920,Accum Depr - Leasehold Improvements,,,Asset,A,Visible by default +15210 Leasehold Improvement P2,15310,Leashold Improvements 10,Leasehold Improvement P2,Add Custom Account,Asset,A,Visible by default +15211 Leasehold Improvement P2:Plan Check P2,15311,Leashold Improvements 11,Leasehold Improvement P2:Plan Check P2,Add Custom Account,Asset,A,Visible by default +"15213 Leasehold Improvement P2:City Permits, Inspections, P2",15312,Leashold Improvements 12,"Leasehold Improvement P2:City Permits, Inspections",Add Custom Account,Asset,A,Visible by default +"15215 Leasehold Improvement P2:Plans, Drawings, Architect, P2",15313,Leashold Improvements 13,"Leasehold Improvement P2:Plans, Drawings, Architec",Add Custom Account,Asset,A,Visible by default +15221 Leasehold Improvement P2:Construction P2 -Demo,15314,Leashold Improvements 14,Leasehold Improvement P2:Construction P2 -Demo,Add Custom Account,Asset,A,Visible by default +15224 Leasehold Improvement P2:Construction P2,15315,Leashold Improvements 15,Leasehold Improvement P2:Construction P2,Add Custom Account,Asset,A,Visible by default +15225 Leasehold Improvement P2:Building Improvements P2,15316,Leashold Improvements 16,Leasehold Improvement P2:Building Improvements P2,Add Custom Account,Asset,A,Visible by default +15245 Leasehold Improvement P2:Accum Depreciation-P2 Leasehold,15317,Leashold Improvements 17,Leasehold Improvement P2:Accum Depreciation-P2 Lea,Add Custom Account,Asset,A,Visible by default +15310 Leasehold Improvement P2b,15318,Leashold Improvements 18,Leasehold Improvement P2b,Add Custom Account,Asset,A,Visible by default +15311 Leasehold Improvement P2b:Plan Check P2b,15319,Leashold Improvements 19,Leasehold Improvement P2b:Plan Check P2b,Add Custom Account,Asset,A,Visible by default +"15313 Leasehold Improvement P2b:City Permits, Inspections, P2b",15320,Leashold Improvements 20,"Leasehold Improvement P2b:City Permits, Inspection",Add Custom Account,Asset,A,Visible by default +"15315 Leasehold Improvement P2b:Plans, Drawings, Architect, P2b",15321,Leashold Improvements 21,"Leasehold Improvement P2b:Plans, Drawings, Archite",Add Custom Account,Asset,A,Visible by default +15324 Leasehold Improvement P2b:Construction P2b,15322,Leashold Improvements 22,Leasehold Improvement P2b:Construction P2b,Add Custom Account,Asset,A,Visible by default +15325 Leasehold Improvement P2b:Building Improvements P2b,15323,Leashold Improvements 23,Leasehold Improvement P2b:Building Improvements P2,Add Custom Account,Asset,A,Visible by default +15330 Leasehold Improvement P2b:Equipment Purchase P2b,15324,Leashold Improvements 24,Leasehold Improvement P2b:Equipment Purchase P2b,Add Custom Account,Asset,A,Visible by default +15350 Leasehold Improvement P2b:Amortization P2B Leaseimp,15920,Accum Depr - Leasehold Improvements,,,Asset,A,Visible by default +15710 Loan Temporary,16501,Other intangible 1,Loan Temporary,Customize Existing,,, +16000 CUP Amendment,16502,Other intangible 2,CUP Amendment,Customize Existing,,, +20001 Accounts Payable,21000,Accounts Payable,,,Liability,A,Visible by default +20220 SJ CreditCard USB x7446 Central,11120,Bank 3,SJ CreditCard USB x7446 Central,Customize Existing,Asset,A,Per Customer +20230 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9340 - RSM,11130,Bank 4,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer +20240 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9357 -CM,11140,Bank 5,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer +20250 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9365 -MS,11150,Bank 6,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer +20260 SJ CreditCard USB x7446 Central:SJ Credit Card USB x9373 -LF,11160,Bank 7,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer +20261 SJ CreditCard USB x7446 Central:CC-4126 AP,11170,Bank 8,SJ CreditCard USB x7446 Central:CC-4126 AP,Customize Existing,Asset,A,Per Customer +20270 SJ CreditCard USB x7446 Central:SJ Credit Card USB x7335 -AG,11180,Bank 9,SJ CreditCard USB x7446 Central:SJ Credit Card USB,Customize Existing,Asset,A,Per Customer +20280 SJ CreditCard USB x7446 Central:9340 Credit Card-RSM - 5512,11190,Bank 10,SJ CreditCard USB x7446 Central:9340 Credit Card-R,Customize Existing,Asset,A,Per Customer +21000 Loan from PWL,28010,Notes Payable 1,Loan from PWL - Bills,Customize Existing,,, +21005 Loan from PWL:Short term Loan-Bills,28010,Notes Payable 1,Loan from PWL - Bills,,,, +21010 Loan from PWL:Short term Loan-Construction,28020,Notes Payable 2,Loan from PWL - Construction,Customize Existing,,, +21020 Loan from PWL:Principal amount PWL Loan,28010,Loan from PWL,Loan from PWL - Bills,,,, +21025 Loan from PWL:Interest amount PWL Loan,28010,Loan from PWL,Loan from PWL - Bills,,,, +21100 Payable to SCC,28030,Notes Payable 3,Loan from SCCB (500K),Customize Existing,,, +21105 Payable to SCC:Accrued Interest- 500K Loan,28030,Notes Payable 3,Loan from SCCB (500K),,,, +21110 Payable to SCC:Loan From SCC 600K,28040,Notes Payable 4,Loan from SCCB (600K),Customize Existing,,, +21111 Payable to SCC:Loan From SCC 600K:Principal amount 600K,28040,Notes Payable 4,Loan from SCCB (600K),,,, +21112 Payable to SCC:Loan From SCC 600K:Interest amount 600K,28040,Notes Payable 4,Loan from SCCB (600K),,,, +21113 Payable to SCC:Loan From SCC 600K:Accrued Interest on 850K Loan,28040,Notes Payable 4,Loan from SCCB (600K),,,, +21120 Loan from Nance Danner Rocha,28050,Notes Payable 5,Loan from Nance Danner Rocha,Customize Existing,Type,, +21122 Loan from Nance Danner Rocha:Principal amount NDR Loan,28050,Notes Payable 5,Loan from Nance Danner Rocha,,,, +21125 Loan from Nance Danner Rocha:Accrued Interest NDR loan,28050,Notes Payable 5,Loan from Nance Danner Rocha,,,, +21130 Loan from Trivium Holdings LLC,28060,Notes Payable 6,Loan from Trivium Holdings LLC,Customize Existing,Type,, +21132 Loan from Trivium Holdings LLC:Principal amount THL Loan,28060,Notes Payable 6,Loan from Trivium Holdings LLC,,,, +21135 Loan from Trivium Holdings LLC:Accrued Interest THL loan,28060,Notes Payable 6,Loan from Trivium Holdings LLC,,,, +21140 Payable to SCC:Construction Loan From SCC 500K,28070,Notes Payable 7,Loan from SCCB - Construction (500K),Customize Existing,Type,Location,Hidden by default +21142 Payable to SCC:Construction Loan From SCC 500K:Principal amount 500K,28070,Notes Payable 7,Loan from SCCB - Construction (500K),,,, +21145 Payable to SCC:Construction Loan From SCC 500K:Accrued Interest 500K,28070,Notes Payable 7,Loan from SCCB - Construction (500K),,,, +21150 Payable to SCC:Construction Loan SCC 300K,28080,Notes Payable 8,Loan from SCCB - Construction (300K),Customize Existing,,, +21152 Payable to SCC:Construction Loan SCC 300K:Principal amount 300K,28080,Notes Payable 8,Loan from SCCB - Construction (300K),,,, +21155 Payable to SCC:Construction Loan SCC 300K:Accrued Interest on 300K,28080,Notes Payable 8,Loan from SCCB - Construction (300K),,,, +21250 Deferred Revenue-Habitec Credit,12201,AR 1,Deferred Revenue-Habitec Credit,Customize Existing,,, +21500 Accrued Liabilities,21000,Accounts Payable,,,,, +21510 Accrued Liabilities:Accrued Payables,21001,Accounts Payable 1,Other Accrued Payables,Add Custom Account,Liability,A,Per-Customer +21520 Accrued Liabilities:Payable to CLS,21002,Accounts Payable 2,Payable to CLS,Add Custom Account,Liability,A,Per-Customer +21530 Accrued Liabilities:Payable to Sushi Randy LLC,21003,Accounts Payable 3,Payable to Sushi Randy LLC,Add Custom Account,Liability,A,Per-Customer +21540 Loan from PWL:Payable to PWL,21004,Accounts Payable 4,Payable to PWL,Add Custom Account,Liability,A,Per-Customer +21541 Accrued Liabilities:Accrued Management Fees,21005,Accounts Payable 5,Management Fees Payable,Add Custom Account,Liability,A,Per-Customer +21542 Accrued Liabilities:Accrued DOPS Fee,21006,Accounts Payable 6,DOPS Fee Payable,Add Custom Account,Liability,A,Per-Customer +21542-1 Accrued Liabilities:Accrued DOCE Fees,21007,Accounts Payable 7,DOCE Fees Payable,Add Custom Account,Liability,A,Per-Customer +21543 Accrued Liabilities:Van Use (catering),21008,Accounts Payable 8,Van Use (catering) Payable,Add Custom Account,Liability,A,Per-Customer +21544 Loan from PWL:28K Loan,28090,Notes Payable 9,PWL 28 K Loan,Customize Existing,,, +21545 Loan from PWL:28K Loan:Interest on 28K loan,28090,Notes Payable 9,PWL 28 K Loan,,,, +21550 Payable to NSG,21009,Accounts Payable 9,Payable to NSG,Add Custom Account,Liability,A,Per-Customer +"23000 Loan from PWL:Loans, Phase 1 Startup",28100,Notes Payable 10,Loan from PWL - P1 - USB 2448 75K,Add Custom Account,Liability,A,Per-Customer +"23050 Loan from PWL:Loans, Phase 1 Startup:P1 Loan Principle USB 2448 75k",28100,Notes Payable 10,Loan from PWL - P1 - USB 2448 75K,,,, +"23055 Loan from PWL:Loans, Phase 1 Startup:P1 Loan Interest USB 2448 75K",28100,Notes Payable 10,Loan from PWL - P1 - USB 2448 75K,,,, +"23100 Loan from PWL:Loans, Phase 1 Startup:P1 Loan USB 7793 Equipment 300k",28110,Notes Payable 11,Loan from PWL - P1 - USB 7793 Equipment 300k,Add Custom Account,Liability,A,Per-Customer +"23200 Loan from PWL:Loans, Phase 1 Startup:P1 Loan UBOC 7183 CLSEquity 28k",28120,Notes Payable 12,Loan from PWL - P1 - UBOC 7183 CLSEquity 28k,Add Custom Account,Liability,A,Per-Customer +"23300 Loan from PWL:Loans, Phase 1 Startup:P1 Loan FRB Constr 100k",28130,Notes Payable 13,Loan from PWL - P1 - Loan FRB Constr 100k,Add Custom Account,Liability,A,Per-Customer +"23350 Loan from PWL:Loans, Phase 1 Startup:P1 Loan USB 1838 Const 100kReFi",28140,Notes Payable 14,Loan from PWL - P1 - USB 1838 Const 100kReFi,Add Custom Account,Liability,A,Per-Customer +"23400 Loan from PWL:Loans, Phase 1 Startup:P2 Loan USB 6712 Constr 72k",28150,Notes Payable 15,Loan from PWL - P2 - USB 6712 Constr 72k,Add Custom Account,Liability,A,Per-Customer +"23500 Loan from PWL:Loans, Phase 1 Startup:P2 Cash Loan from PWL",28160,Notes Payable 16,Loan from PWL - P2 - Cash Loan from PWL,Add Custom Account,Liability,A,Per-Customer +24000 Payroll Liabilities/Payee Accts,25200,Payroll Outstanding,,,Liability,A,Visible by default +24010 Payroll Liabilities/Payee Accts:Federal (941),22300,Federal Payroll Taxes Payable,,,Liability,A,Visible by default +24020 Payroll Liabilities/Payee Accts:FUTA,22300,Federal Payroll Taxes Payable,,,Liability,A,Visible by default +24030 Payroll Liabilities/Payee Accts:State (CA),22400,CA Payroll Taxes Payable,,,Liability,A,Visible by default +24040 Payroll Liabilities/Payee Accts:SUI,22400,CA Payroll Taxes Payable,,,Liability,A,Visible by default +24050 Payroll Liabilities/Payee Accts:Accrued Payroll Liabilities,25200,Payroll Outstanding,,,Liability,A,Visible by default +24100 Employee Child Support,22100,Payroll Payable,,,Liability,A,Visible by default +25100 Employee Tips Payable,25500,Tips Payable,,,Liability,A,Visible by default +25500 Sales Tax Payable,23000,Sales Taxes Payable,,,Liability,A,Visible by default +26000 Gift Cards,25100,Gift Card Outstanding,,,Liability,A,Visible by default +30100 Equity:Partner 1 Investment-PWL,33010,Contributions/ Capital Account - 2,Partner 1 - PWL - Investment,Customize Existing,Equity,A,Per Customer +30120 Equity:Partner 1 Investment-PWL Phase2,33011,Contributions/ Capital Account - 2.1,Partner 1 - PWL - Investment Phase 2,Add Custom Account,Equity,A,Per Customer +30130 Equity:Partner 1 Invest-DirectPurchase,33012,Contributions/ Capital Account - 2.2,Partner 1 - PWL - Invest-Direct Purchase,Add Custom Account,Equity,A,Per Customer +30150 Equity:Partner 1 Withdraws - PWL,34010,Distributions / Capital Withdrawal - 2,Partner 1 - PWL - Withdraws,Customize Existing,Equity,A,Per Customer +30200 Equity:Partner 2 Investment - DM,33020,Contributions/ Capital Account - 3,Partner 2 - DM - Investment,Customize Existing,Equity,A,Per Customer +30250 Equity:Partner 2 Withdraws - DM,34020,Distributions / Capital Withdrawal - 3,Partner 2 - DM - Withdraws,Customize Existing,Equity,A,Per Customer +30300 Equity:Partner 3 Investment - MP,33030,Contributions/ Capital Account - 4,Partner 3 - MP - Investment,Customize Existing,Equity,A,Per Customer +30350 Equity:Partner 3 Withdraws - MP,34030,Distributions / Capital Withdrawal - 4,Partner 3 - MP - Withdraws,Customize Existing,Equity,A,Per Customer +30360 Equity:Partners 4 Investment - LD,33040,Contributions/ Capital Account - 5,Partner 3 - LD - Investment,Customize Existing,Equity,A,Per Customer +30370 Equity:Partner 4 Withdrawals - LD,34040,Distributions / Capital Withdrawal - 5,Partner 3 - LD - Withdraws,Customize Existing,Equity,A,Per Customer \ No newline at end of file diff --git a/scratch-sessions/fix_pending_transactions.clj b/scratch-sessions/fix_pending_transactions.clj new file mode 100644 index 00000000..8fd648ca --- /dev/null +++ b/scratch-sessions/fix_pending_transactions.clj @@ -0,0 +1,88 @@ +(ns fix-pending-transactions) + + +(def potential-matches + (d/query {:query {:find ['(pull ?e1 [:db/id :transaction/date]) + '(pull ?e2 [:db/id :transaction/date])] + :in ['$] + :where ['[?e1 :transaction/status "PENDING"] + '[?e1 :transaction/description-original ?e1-d] + '[?e1 :transaction/amount ?e1-a] + #_'[?e1 :transaction/date ?e1-dt] + + '[?e2 :transaction/description-original ?e1-d] + '[?e2 :transaction/amount ?e1-a] + #_'[?e2 :transaction/date e1-dt] + '[?e2 :transaction/status "POSTED"]]} + :args [(d/db (d/connect uri))]}) + ) + +(def all-pending + (d/query {:query {:find ['?e1] + :in ['$] + :where ['[?e1 :transaction/status "PENDING"]]} + :args [(d/db (d/connect uri))]})) + +(def checkless + (d/query {:query {:find ['?e1] + :in ['$] + :where ['[?e1 :transaction/status "PENDING"] + '(not [?e1 :transaction/payment]) + ]} + :args [(d/db (d/connect uri))]})) + +(def checked + (d/query {:query {:find ['?e1 '(pull ?z [:payment/amount :payment/type :payment/status {:payment/client [:client/code]}])] + :in ['$] + :where ['[?e1 :transaction/status "PENDING"] + '[?e1 :transaction/payment ?z] + ]} + :args [(d/db (d/connect uri))]})) + +(count checkless) +(count all-pending) +(count checked) +(take 4 checked) + +(def match-lookup (->> potential-matches + (reduce + (fn [acc x] + (into acc (map + #(vector (:db/id %) x) + x))) + {}))) + +(take 2 potential-matches) + +(take 3 match-lookup) + +(->> checked + (map first) + (map #(if (get match-lookup %) + (d/pull (d/db (d/connect uri)) '[*] (:db/id (second (get match-lookup %)))) + ))) + +(defn revert-transactions [ids] + (->> + (d/query {:query {:find ['(pull ?id [:db/id {:journal-entry/_original-entity [:db/id] + :transaction/payment [:db/id]} ])] + :in ['$ '[?id ...]] + :where ['[?id :transaction/status]]} + :args [(d/db (d/connect uri)) ids]}) + (mapcat (fn [[transaction]] + (let [ledger-id (:db/id (first (:journal-entry/_original-entity transaction))) + payment-id (:db/id (:transaction/payment transaction))] + (cond-> [[:db/retractEntity (:db/id transaction)]] + ledger-id (conj [:db/retractEntity ledger-id]) + payment-id (conj {:db/id payment-id + :payment/status :payment-status/pending}))))) + (into []))) + +#_(doseq [result (partition-all 200 (revert-transactions (map first checked)))] + (println "proccesed 1") + @(d/transact (d/connect uri) result )) + +(map second checked) + + +(re-find #"(?i)check(card|[^0-9]+([0-9]*))" "Check-1205") diff --git a/scratch-sessions/fixing_transactions_manually_imported_incorrectl.clj b/scratch-sessions/fixing_transactions_manually_imported_incorrectl.clj new file mode 100644 index 00000000..48625efb --- /dev/null +++ b/scratch-sessions/fixing_transactions_manually_imported_incorrectl.clj @@ -0,0 +1,51 @@ +(ns fixing-transactions-manually-imported-incorrectl) + + +;; This buffer is for Clojure experiments and evaluation. + +;; Press C-j to evaluate the last expression. + +;; You can also press C-u C-j to evaluate the expression and pretty-print its result. + +(def t (auto-ap.yodlee.core/get-specific-transactions 24249175)) +(def all-ts (auto-ap.yodlee.core/get-transactions)) + +(filter all-ts) + +(first all-ts) + +(def g (auto-ap.yodlee.import/get-existing)) +(map + :transaction/yodlee-merchant + (let [all-bank-accounts (get-all-bank-accounts) + transaction->bank-account (comp (by :bank-account/yodlee-account-id all-bank-accounts) :accountId) + all-rules (tr/get-all)] + (transactions->txs all-ts transaction->bank-account (rm/rule-applying-fn all-rules) (get-existing)))) + +(count g) + +(g (digest/sha-256 (str 2553824503))) + +(require '[clojure.java.io :as io]) + + +(with-open [writer (java.io.StringWriter.)] + (clojure.data.csv/write-csv writer + (->> + (d/query {:query {:find ['?e] + :in ['$] + :where ['[?e :transaction/id ?tid] + '[?e :transaction/date ?d] + '(not [?e :transaction/type])]} + :args [(d/since (d/db (d/connect uri)) #inst "2020-06-01")]}) + (map first) + vec + (d/pull-many (d/db (d/connect uri)) + [:db/id + :transaction/date :transaction/id :transaction/amount + :transaction/description-original + {:transaction/client [:client/code]} + {:transaction/bank-account [:bank-account/code]}]) + (map (fn [r] + [(:transaction/id r) (:db/id r) (:transaction/amount r) (coerce/to-date-time (:transaction/date r)) (:transaction/description-original r) (:bank-account/code (:transaction/bank-account r)) (:client/code (:transaction/client r))])))) + (println (.toString writer))) diff --git a/src/clj/auto_ap/datomic/ledger.clj b/src/clj/auto_ap/datomic/ledger.clj index 98efb69a..43c9c68d 100644 --- a/src/clj/auto_ap/datomic/ledger.clj +++ b/src/clj/auto_ap/datomic/ledger.clj @@ -1,6 +1,7 @@ (ns auto-ap.datomic.ledger (:require [datomic.api :as d] [auto-ap.graphql.utils :refer [->graphql limited-clients]] + [auto-ap.utils :refer [dollars-0?]] [auto-ap.datomic :refer [merge-query apply-sort-3 apply-pagination add-sorter-fields]] [auto-ap.datomic :refer [uri]] [clj-time.coerce :as c] @@ -88,7 +89,9 @@ :args [(:location args)]}) true - (merge-query {:query {:find ['?base-date '?e] :where ['[?e :journal-entry/date ?base-date]]}}))] + (merge-query {:query {:find ['?base-date '?e] :where ['[?e :journal-entry/date ?base-date] + '[?e :journal-entry/amount ?ja2] + '[(not= 0.0 ?ja2)]]}}))] (->> query (d/query) (apply-sort-3 args) diff --git a/src/clj/auto_ap/graphql.clj b/src/clj/auto_ap/graphql.clj index 45360955..44498abf 100644 --- a/src/clj/auto_ap/graphql.clj +++ b/src/clj/auto_ap/graphql.clj @@ -1,37 +1,37 @@ (ns auto-ap.graphql (:require - [com.walmartlabs.lacinia.util :refer [attach-resolvers]] - [com.walmartlabs.lacinia.schema :as schema] - [com.walmartlabs.lacinia :refer [execute]] - [com.walmartlabs.lacinia.executor :as executor] - [com.walmartlabs.lacinia.resolve :as resolve] - [buddy.auth :refer [throw-unauthorized]] - [auto-ap.utils :refer [by]] - [auto-ap.graphql.utils :refer [assert-admin can-see-client? assert-can-see-client]] - [auto-ap.datomic :refer [uri merge-query]] - [datomic.api :as d] - [clj-time.coerce :as coerce] - [clj-time.core :as t] - [auto-ap.datomic.clients :as d-clients] - [auto-ap.datomic.checks :as d-checks] - [auto-ap.datomic.users :as d-users] - [auto-ap.datomic.invoices :as d-invoices] - [auto-ap.datomic.vendors :as d-vendors] - [auto-ap.graphql.users :as gq-users] - [auto-ap.graphql.yodlee-merchants :as ym] - [auto-ap.graphql.ledger :as gq-ledger] - [auto-ap.graphql.accounts :as gq-accounts] - [auto-ap.graphql.clients :as gq-clients] - [auto-ap.graphql.vendors :as gq-vendors] - [auto-ap.graphql.checks :as gq-checks] - [auto-ap.graphql.invoices :as gq-invoices] - [auto-ap.graphql.transactions :as gq-transactions] - [auto-ap.graphql.transaction-rules :as gq-transaction-rules] - [auto-ap.time :as time] - [clojure.walk :as walk] - [clojure.string :as str]) + [com.walmartlabs.lacinia.util :refer [attach-resolvers]] + [com.walmartlabs.lacinia.schema :as schema] + [com.walmartlabs.lacinia :refer [execute]] + [com.walmartlabs.lacinia.executor :as executor] + [com.walmartlabs.lacinia.resolve :as resolve] + [buddy.auth :refer [throw-unauthorized]] + [auto-ap.utils :refer [by]] + [auto-ap.graphql.utils :refer [assert-admin can-see-client? assert-can-see-client]] + [auto-ap.datomic :refer [uri merge-query]] + [datomic.api :as d] + [clj-time.coerce :as coerce] + [clj-time.core :as t] + [auto-ap.datomic.clients :as d-clients] + [auto-ap.datomic.checks :as d-checks] + [auto-ap.datomic.users :as d-users] + [auto-ap.datomic.invoices :as d-invoices] + [auto-ap.datomic.vendors :as d-vendors] + [auto-ap.graphql.users :as gq-users] + [auto-ap.graphql.yodlee-merchants :as ym] + [auto-ap.graphql.ledger :as gq-ledger] + [auto-ap.graphql.accounts :as gq-accounts] + [auto-ap.graphql.clients :as gq-clients] + [auto-ap.graphql.vendors :as gq-vendors] + [auto-ap.graphql.checks :as gq-checks] + [auto-ap.graphql.invoices :as gq-invoices] + [auto-ap.graphql.transactions :as gq-transactions] + [auto-ap.graphql.transaction-rules :as gq-transaction-rules] + [auto-ap.time :as time] + [clojure.walk :as walk] + [clojure.string :as str]) (:import - (clojure.lang IPersistentMap))) + (clojure.lang IPersistentMap))) (def integreat-schema @@ -922,6 +922,20 @@ 0 (- total outstanding-balance))}))) +(defn has-fulfilled? [id date recent-fulfillments] + + (seq (transduce + (filter (fn [[potential-id potential-date]] + (let [date (coerce/to-date-time date) + potential-date (coerce/to-date-time potential-date)] + #_(println "HERE" id potential-id potential-date date) + (and (= id potential-id) + (<= (t/in-days (apply t/interval (sort [date potential-date]))) 10))))) + conj + [] + recent-fulfillments)) + ) + (defn get-cash-flow [context {:keys [client_id]} value] (when client_id (let [{:client/keys [weekly-credits weekly-debits forecasted-transactions ]} (d/pull (d/db (d/connect uri)) '[*] client_id ) @@ -959,14 +973,25 @@ [?p :payment/type :payment-type/debit] [?p :payment/type :payment-type/check])]} :args [(d/db (d/connect uri)) client_id (coerce/to-date (t/plus (time/local-now) (t/days 31)))]}))) - forecasted-transactions (->> forecasted-transactions - (filter (fn [{:forecasted-transaction/keys [day-of-month]}] - (>= day-of-month (t/day (time/local-now))))) - (mapv (fn [{:forecasted-transaction/keys [amount identifier day-of-month]}] - {:identifier identifier - :amount amount - :date (coerce/to-date-time (t/local-date (t/year (time/local-now)) (t/month (time/local-now)) day-of-month ))} - )))] + recent-fulfillments (d/query {:query {:find '[?f ?d] + :in '[$ ?client ?min-date] + :where ['[?t :transaction/forecast-match ?f] + '[?t :transaction/date ?d] + '[?t :transaction/client ?client] + '[(>= ?d ?min-date)]]} + :args [(d/db (d/connect uri)) client_id (coerce/to-date (t/plus (time/local-now) (t/months -2)))]}) + forecasted-transactions (for [{:forecasted-transaction/keys [amount identifier day-of-month] + :db/keys [id]} forecasted-transactions + month (range -1 2) + :let [next (t/plus (t/local-date (t/year (time/local-now)) + (t/month (time/local-now)) + day-of-month ) + (t/months month))] + :when (not (has-fulfilled? id next recent-fulfillments))] + {:identifier identifier + :amount amount + :date (coerce/to-date-time next)})] + (println "RECENT" forecasted-transactions) {:beginning_balance total-cash :outstanding_payments outstanding-checks :invoices_due_soon (mapv (fn [[due outstanding]] @@ -979,13 +1004,12 @@ :date (coerce/to-date-time date)}) (take 5 (time/day-of-week-seq 1))) (filter #(>= (:amount %) 0) forecasted-transactions)) - :upcoming_debits (doto (into (mapv - (fn [date] - {:amount (- (or weekly-debits 0)) - :date (coerce/to-date-time date)}) - (take 5 (time/day-of-week-seq 1))) - (filter #(< (:amount %) 0) forecasted-transactions)) - println) + :upcoming_debits (into (mapv + (fn [date] + {:amount (- (or weekly-debits 0)) + :date (coerce/to-date-time date)}) + (take 5 (time/day-of-week-seq 1))) + (filter #(< (:amount %) 0) forecasted-transactions)) }))) (def schema diff --git a/src/clj/auto_ap/graphql/ledger.clj b/src/clj/auto_ap/graphql/ledger.clj index 5a9717ff..68edc65d 100644 --- a/src/clj/auto_ap/graphql/ledger.clj +++ b/src/clj/auto_ap/graphql/ledger.clj @@ -184,7 +184,6 @@ (:entries args)) all-vendors (into all-vendors new-hidden-vendors) all-accounts (transduce (map (comp str :account/numeric-code)) conj #{} (a/get-accounts)) - _ (println all-accounts) transaction (doall (map (assoc-error (fn [entry] (let [entry (-> entry @@ -202,6 +201,8 @@ (throw (Exception. (str "Client '" (:client_code entry )"' not found.")) )) (when-not vendor (throw (Exception. (str "Vendor '" (:vendor_name entry) "' not found.")))) + (when-not (re-find #"\d{1,2}/\d{1,2}/\d{4}" (:date entry)) + (throw (Exception. (str "Date must be MM/dd/yyyy")))) (when-not (dollars= (doto (reduce + 0.0 (map :debit (:line_items entry)))) (reduce + 0.0 (map :credit (:line_items entry)))) (throw (Exception. (str "Debits '" @@ -249,6 +250,7 @@ success (filter (comp not :error) transaction) retraction (mapv (fn [x] [:db/retractEntity [:journal-entry/external-id (:journal-entry/external-id x)]]) success)] + (println (take 4 success)) (run! (fn [batch] (println "transacting retraction batch") @(d/transact (d/connect uri) batch)) (partition-all 100 retraction)) (run! (fn [batch] (println "transacting success batch") @(d/transact (d/connect uri) batch)) (partition-all 100 success)) {:successful (map (fn [x] {:external_id (:journal-entry/external-id x)}) success) diff --git a/src/clj/auto_ap/parse.clj b/src/clj/auto_ap/parse.clj index c09fb54e..83e67cd6 100644 --- a/src/clj/auto_ap/parse.clj +++ b/src/clj/auto_ap/parse.clj @@ -81,33 +81,36 @@ [file filename] (excel/parse-file file filename)) -(defn best-match [clients invoice-client-name] - (let [fuzzy-match (->> clients - (mapcat (fn [{:keys [:db/id :client/matches :client/name] :as client :or {matches []}}] - (map (fn [m] - [client (m/jaccard (.toLowerCase invoice-client-name) (.toLowerCase m))]) - (conj matches name)))) - (filter #(< (second %) 0.25)) - (sort-by second) - ffirst) +(defn best-match + ([clients invoice-client-name] + (best-match clients invoice-client-name 0.25)) + ([clients invoice-client-name threshold] + (let [fuzzy-match (->> clients + (mapcat (fn [{:keys [:db/id :client/matches :client/name] :as client :or {matches []}}] + (map (fn [m] + [client (m/jaccard (.toLowerCase invoice-client-name) (.toLowerCase m))]) + (conj matches name)))) + (filter #(<= (second %) threshold)) + (sort-by second) + ffirst) - word-set (set (filter (complement str/blank?) (str/split (.toLowerCase invoice-client-name) #"[\s:\-]" ))) - client-word-match (->> clients - (map - (fn [{:keys [:db/id :client/matches :client/name] :as client :or {matches []}}] - (let [client-words (-> #{} - (into - (mapcat - (fn [match] (str/split (.toLowerCase match) #"\s" )) - matches)) - (into - (str/split (.toLowerCase name) #"\s" )))] - [client (count (set/intersection client-words word-set))]))) - (filter (fn [[_ c]] (> c 0))) - (sort-by (fn [[_ c]] c)) - reverse - ffirst)] - (or fuzzy-match client-word-match))) + word-set (set (filter (complement str/blank?) (str/split (.toLowerCase invoice-client-name) #"[\s:\-]" ))) + client-word-match (->> clients + (map + (fn [{:keys [:db/id :client/matches :client/name] :as client :or {matches []}}] + (let [client-words (-> #{} + (into + (mapcat + (fn [match] (str/split (.toLowerCase match) #"\s" )) + matches)) + (into + (str/split (.toLowerCase name) #"\s" )))] + [client (count (set/intersection client-words word-set))]))) + (filter (fn [[_ c]] (> c 0))) + (sort-by (fn [[_ c]] c)) + reverse + ffirst)] + (or fuzzy-match client-word-match)))) (defn best-location-match [client text full-text] (or (->> client diff --git a/src/clj/auto_ap/parse/templates.clj b/src/clj/auto_ap/parse/templates.clj index eb0d378c..bc07a443 100644 --- a/src/clj/auto_ap/parse/templates.clj +++ b/src/clj/auto_ap/parse/templates.clj @@ -42,7 +42,8 @@ :extract {:invoice-number #"Invoice #\s*\n\s*[\w\.]+\s+[\w\./]+(.*)\s*\n" :customer-identifier #"Bill To[^\n]+\n[^\n]*\n([\w ]+)\s{2,}" :date #"Invoice #\s*\n\s*[\w\.]+\s+([\w\./]+)" - :total #"Total\s+\$([0-9.,]+)"} + :total #"Total\s+\$([0-9.,]+)" + :account-number #"Account #\s+(\d+)"} :parser {:date [:clj-time "MM/dd/yy"] :total [:trim-commas nil]}} @@ -211,7 +212,8 @@ :extract {:date #"INVOICE DATE\s+([0-9]+/[0-9]+/[0-9]+)" :customer-identifier #"SHIP-TO-PARTY.*\n(.*?)(?=\s{2,})" :invoice-number #"INV #\s+(\d+)" - :total #"PLEASE PAY THIS AMOUNT\s+([0-9]+\.[0-9]{2})"} + :total #"PLEASE PAY THIS AMOUNT\s+([0-9]+\.[0-9]{2})" + :account-number #"CUSTOMER NUMBER\s+(\d+)"} :parser {:date [:clj-time "MM/dd/yyyy"] :total [:trim-commas nil]}} diff --git a/src/clj/auto_ap/routes/auth.clj b/src/clj/auto_ap/routes/auth.clj index 627cc7d6..a893c967 100644 --- a/src/clj/auto_ap/routes/auth.clj +++ b/src/clj/auto_ap/routes/auth.clj @@ -48,7 +48,7 @@ (let [jwt (jwt/sign (doto {:user (:name profile) :exp (time/plus (time/now) (time/days 30)) :user/clients (map (fn [c] - (dissoc c :client/bank-accounts :client/location-matches)) + (dissoc c :client/bank-accounts :client/location-matches :client/forecasted-transactions :client/matches :client/weekly-debits :client/weekly-credits :client/signature-file :client/address)) (:user/clients user)) :user/role (name (:user/role user)) :user/name (:name profile)} diff --git a/src/clj/auto_ap/routes/invoices.clj b/src/clj/auto_ap/routes/invoices.clj index 129081ec..2ba45682 100644 --- a/src/clj/auto_ap/routes/invoices.clj +++ b/src/clj/auto_ap/routes/invoices.clj @@ -93,7 +93,11 @@ (defn parse-date [{:keys [raw-date]}] + (when-not + (re-find #"\d{1,2}/\d{1,2}/\d{4}" raw-date) + (throw (Exception. (str "Date " raw-date " must match MM/dd/yyyy")))) (try + (parse-u/parse-value :clj-time "MM/dd/yyyy" raw-date) (catch Exception e (throw (Exception. (str "Could not parse date from '" raw-date "'") e))))) @@ -197,10 +201,12 @@ (defn import-uploaded-invoice [client forced-location forced-vendor imports] (let [clients (d-clients/get-all) - transactions (reduce (fn [result {:keys [invoice-number customer-identifier total date vendor-code text full-text] :as info}] + transactions (reduce (fn [result {:keys [invoice-number customer-identifier account-number total date vendor-code text full-text] :as info}] (println "searching for" vendor-code) (let [ _ (println "matching" customer-identifier) - matching-client (or (and customer-identifier + matching-client (or (and account-number + (parse/best-match clients account-number 0.0)) + (and customer-identifier (parse/best-match clients customer-identifier)) (if client (first (filter (fn [c] @@ -274,8 +280,113 @@ (throw (ex-info "No invoices found." {:imports (str imports)}))) @(d/transact (d/connect uri) (vec (set transactions))))) + + +(defn validate-account-rows [rows code->existing-account] + (when-let [bad-types (seq (->> rows + (filter (fn [[account _ _ type :as row]] + (and (not (code->existing-account (Integer/parseInt account))) + (not (#{"Asset" "Liability" "Revenue" "Expense" "Equity" "Dividend"} type))) + ))))] + (throw (ex-info (str "You are adding accounts without a valid type" ) + {:rows bad-types}))) + + (when-let [duplicate-rows (seq (->> rows + (filter (fn [[account]] + (not-empty account))) + (group-by (fn [[account]] + account)) + vals + (filter #(> (count %) 1)) + (filter (fn [duplicates] + (apply not= duplicates))) + #_(map (fn [[[_ account]]] + account)) + ))] + (throw (ex-info (str "You have duplicated rows with different values." ) + {:rows duplicate-rows})))) + +(defn import-account-overrides [customer filename] + (let [conn (d/connect uri) + [header & rows] (-> filename (io/reader) csv/read-csv) + [client-id] (first (d/query (-> {:query {:find ['?e] + :in ['$ '?z] + :where [['?e :client/code '?z]]} + :args [(d/db (d/connect uri)) customer]}))) + _ (println client-id) + headers (map read-string header) + code->existing-account (by :account/numeric-code (map first (d/query {:query {:find ['(pull ?e [:account/numeric-code + {:account/applicability [:db/ident]} + :db/id])] + :in ['$] + :where ['[?e :account/name]]} + :args [(d/db conn)]}))) + + existing-account-overrides (d/query (-> {:query {:find ['?e] + :in ['$ '?client-id] + :where [['?e :account-client-override/client '?client-id]]} + :args [(d/db (d/connect uri)) client-id]})) + + + rows (transduce (comp + (map (fn [[_ account account-name override-name _ type]] + [account account-name override-name type])) + (filter (fn [[account]] + (not-empty account)))) + conj + [] + rows) + + _ (validate-account-rows rows code->existing-account) + rows (vec (set rows)) + + txes (transduce + (comp + (mapcat (fn parse-map [[account account-name override-name type]] + (let [code (some-> account + not-empty + Integer/parseInt) + existing (code->existing-account code)] + (cond (not code) + [] + + (and existing (or (#{:account-applicability/optional :account-applicability/customized} + (:db/ident (:account/applicability existing))) + (and (not-empty override-name) + (not-empty account-name) + (not= override-name account-name) + ))) + [{:db/id (:db/id existing) + :account/client-overrides [{:account-client-override/client client-id + :account-client-override/name (or (not-empty override-name) + (not-empty account-name))}]}] + + (not existing) + [{:account/applicability :account-applicability/customized + :account/name account-name + :account/account-set "default" + :account/numeric-code code + :account/code (str code) + :account/type (if (str/blank? type) + :account-type/expense + (keyword "account-type" (str/lower-case type))) + :account/client-overrides [{:account-client-override/client client-id + :account-client-override/name (or (not-empty override-name) + (not-empty account-name))}]}] + :else + []))))) + + conj + (mapv + (fn [[x]] + [:db/retractEntity x]) + existing-account-overrides) + rows)] + + @(d/transact conn txes) + txes)) - + (defn import-transactions-cleared-against [file] (let [[header & rows] (-> file (io/reader) csv/read-csv) @@ -418,5 +529,25 @@ :body (pr-str {:message (.getMessage e) :error (.toString e) :data (ex-data e)}) - :headers {"Content-Type" "application/edn"}}))))) + :headers {"Content-Type" "application/edn"}})))) + (wrap-json-response (POST "/account-overrides" + {{files :file + files-2 "file" + client :client + client-2 "client"} :params :as params + user :identity} + (let [files (or files files-2) + client (or client client-2) + {:keys [filename tempfile]} files] + (assert-admin user) + (try + {:status 200 + :body (import-account-overrides client (.getPath tempfile)) + :headers {"Content-Type" "application/json"}} + (catch Exception e + (println e) + {:status 500 + :body {:message (.getMessage e) + :data (ex-data e)} + :headers {"Content-Type" "application/json"}})))))) wrap-secure)) diff --git a/src/clj/auto_ap/routes/yodlee.clj b/src/clj/auto_ap/routes/yodlee.clj index 72a4b80c..3eda02ad 100644 --- a/src/clj/auto_ap/routes/yodlee.clj +++ b/src/clj/auto_ap/routes/yodlee.clj @@ -36,10 +36,36 @@ {:status 200 :headers {"Content-Type" "application/edn"} :body (pr-str (yodlee/get-accounts)) })) - (POST "/accounts/:id" {:keys [query-params identity] {:keys [id]} :route-params :as request} + + (GET "/provider-accounts" {:keys [query-params identity] :as request} (assert-admin identity) (let [[session token] (yodlee/get-access-token)] {:status 200 :headers {"Content-Type" "application/edn"} - :body (pr-str (yodlee/update-yodlee (Long/parseLong id))) }))) + :body (pr-str (yodlee/get-provider-accounts-with-accounts)) })) + (POST "/reauthenticate/:id" {:keys [query-params identity] {:keys [id]} :route-params + data :edn-params + :as request} + (assert-admin identity) + (try + (let [[session token] (yodlee/get-access-token)] + {:status 200 + :headers {"Content-Type" "application/edn"} + :body (pr-str (yodlee/reauthenticate (Long/parseLong id) data)) }) + (catch Exception e + {:status 500 + :headers {"Content-Type" "application/edn"} + :body (pr-str {:message (.getMessage e) + :error (.toString e)})}))) + (POST "/provider-accounts/:id" {:keys [query-params identity] {:keys [id]} :route-params :as request} + (assert-admin identity) + (try + (let [[session token] (yodlee/get-access-token)] + {:status 200 + :headers {"Content-Type" "application/edn"} + :body (pr-str (yodlee/update-yodlee (Long/parseLong id))) }) + (catch Exception e + {:status 400 + :headers {"Content-Type" "application/edn"} + :body (pr-str e)})))) wrap-secure)) diff --git a/src/clj/auto_ap/yodlee/core.clj b/src/clj/auto_ap/yodlee/core.clj index af7daa53..bf8b26c5 100644 --- a/src/clj/auto_ap/yodlee/core.clj +++ b/src/clj/auto_ap/yodlee/core.clj @@ -1,5 +1,6 @@ (ns auto-ap.yodlee.core (:require [clj-http.client :as client] + [auto-ap.utils :refer [by]] [cemerick.url :as u] [clojure.data.json :as json] [config.core :refer [env]])) @@ -65,10 +66,12 @@ user-session (login-user cob-session)] (-> (str (:yodlee-base-url env) "/providerAccounts") (-> (client/get {:headers (merge base-headers {"Authorization" (auth-header cob-session user-session)}) + :query-params {"include" "credentials,questions,preferences"} :as :json}) :body - :providerAccount) - ))) + :providerAccount)))) + + (defn get-transactions [] (let [cob-session (login-cobrand) @@ -124,6 +127,22 @@ :body :providerAccount))) +(defn get-provider-account-detail [id] + (let [cob-session (login-cobrand) + user-session (login-user cob-session) + batch-size 100] + + (-> (str (:yodlee-base-url env) "/providerAccounts/" id ) + + (client/get {:headers (doto + (merge base-headers {"Authorization" (auth-header cob-session user-session)}) + println) + :query-params {"include" "credentials,questions,preferences"} + :as :json}) + :body + :providerAccount + first))) + (defn update-provider-account [pa] (let [cob-session (login-cobrand) user-session (login-user cob-session) @@ -137,9 +156,21 @@ :body "{\"dataSetName\": [\"BASIC_AGG_DATA\"]}" :as :json})))) + +(defn reauthenticate [pa data] + (let [cob-session (login-cobrand) + user-session (login-user cob-session) + batch-size 100] + + (-> (str (:yodlee-base-url env) "/providerAccounts?providerAccountIds=" pa) + + (client/put {:headers (merge base-headers {"Authorization" (auth-header cob-session user-session)}) + :body (json/write-str data) + :as :json})))) + (defn update-yodlee [id] - (update-provider-account (:providerAccountId (first (filter #(= (:id %) id) (get-accounts))))) - (get-provider-account (:providerAccountId (first (filter #(= (:id %) id) (get-accounts)))))) + (update-provider-account id) + (get-provider-account id)) (defn get-specific-transactions [account] (let [cob-session (login-cobrand) @@ -205,6 +236,24 @@ :as :json}) :body))) +(defn get-provider-accounts-with-details [] + (let [provider-accounts (get-provider-accounts)] + (reduce + (fn [pas pa] + (conj pas (try (get-provider-account-detail (:id pa)) + (catch Exception e + pa)))) + [] + provider-accounts))) + +(defn get-provider-accounts-with-accounts [] + (let [provider-accounts (by :id (get-provider-accounts-with-details)) + accounts (get-accounts)] + (->> accounts + (reduce + (fn [provider-accounts a] + (update-in provider-accounts [(:providerAccountId a) :accounts] conj a)) provider-accounts) + vals))) #_(defn get-users [] (let [cob-session (login-cobrand)] diff --git a/src/clj/auto_ap/yodlee/import.clj b/src/clj/auto_ap/yodlee/import.clj index 6f6ffd6f..d37f4759 100644 --- a/src/clj/auto_ap/yodlee/import.clj +++ b/src/clj/auto_ap/yodlee/import.clj @@ -90,12 +90,9 @@ :id (sha-256 (str id)) :account-id account-id :date (coerce/to-date (time/parse date "YYYY-MM-dd")) - :yodlee-merchant (when (and merchant-id merchant-name (not (str/blank? merchant-id))) - {:yodlee-merchant/yodlee-id merchant-id - :yodlee-merchant/name merchant-name}) :amount (double amount) - :description-original description-original - :description-simple description-simple + :description-original (some-> description-original (str/replace #"\s+" " ")) + :description-simple (some-> description-simple (str/replace #"\s+" " ")) :approval-status (if check :transaction-approval-status/approved :transaction-approval-status/unapproved) diff --git a/src/clj/user.clj b/src/clj/user.clj index b38f50ce..d417a206 100644 --- a/src/clj/user.clj +++ b/src/clj/user.clj @@ -196,11 +196,17 @@ _ (println client-id) headers (map read-string header) code->existing-account (by :account/numeric-code (map first (d/query {:query {:find ['(pull ?e [:account/numeric-code + {:account/applicability [:db/ident]} :db/id])] :in ['$] :where ['[?e :account/name]]} :args [(d/db conn)]}))) + existing-account-overrides (d/query (-> {:query {:find ['?e] + :in ['$ '?client-id] + :where [['?e :account-client-override/client '?client-id]]} + :args [(d/db (d/connect uri)) client-id]})) + _ (if-let [bad-rows (seq (->> rows @@ -219,27 +225,46 @@ txes (transduce (comp - (filter (fn [[account _ override-name]] - (and - (not (str/blank? override-name)) - (not (str/blank? account))))) - (map (fn parse-map [[account account-name override-name _ type]] - (let [code (Integer/parseInt account) - existing-id (:db/id (code->existing-account code))] - (cond-> {:account/client-overrides [{:account-client-override/client client-id - :account-client-override/name override-name}]} - existing-id (assoc :db/id existing-id) - (not existing-id) (assoc :account/applicability :account-applicability/customized - :account/name account-name - :account/account-set "default" - :account/numeric-code code - :account/code (str code) - :account/type (if (str/blank? type) - :account-type/expense - (keyword "account-type" (str/lower-case type))))))))) + + (mapcat (fn parse-map [[account account-name override-name _ type]] + (let [code (some-> account + not-empty + Integer/parseInt) + existing (code->existing-account code)] + (cond (not code) + [] + + (and existing (or (#{:account-applicability/optional :account-applicability/customized} + (:db/ident (:account/applicability existing))) + (and (not-empty override-name) + (not-empty account-name) + (not= override-name account-name) + ))) + [{:db/id (:db/id existing) + :account/client-overrides [{:account-client-override/client client-id + :account-client-override/name (or (not-empty override-name) + (not-empty account-name))}]}] + + (not existing) + [{:account/applicability :account-applicability/customized + :account/name account-name + :account/account-set "default" + :account/numeric-code code + :account/code (str code) + :account/type (if (str/blank? type) + :account-type/expense + (keyword "account-type" (str/lower-case type))) + :account/client-overrides [{:account-client-override/client client-id + :account-client-override/name (or (not-empty override-name) + (not-empty account-name))}]}] + :else + []))))) conj - [] + (mapv + (fn [[x]] + [:db/retractEntity x]) + existing-account-overrides) rows)] txes diff --git a/src/cljs/auto_ap/forms.cljs b/src/cljs/auto_ap/forms.cljs index f41a2e2a..facbb0f5 100644 --- a/src/cljs/auto_ap/forms.cljs +++ b/src/cljs/auto_ap/forms.cljs @@ -7,7 +7,7 @@ (re-frame/reg-sub ::form (fn [db [_ x]] - (-> db ::forms x))) + (get (-> db ::forms) x))) (re-frame/reg-sub @@ -47,7 +47,7 @@ :after (fn [context] (let [db (i/get-coeffect context :db) result (get-in (i/get-coeffect context :event) [1 data-key])] - (println (get-in db [::forms form :complete-listener])) + (cond-> context true (i/assoc-effect :db (update-in db @@ -95,7 +95,8 @@ (re-frame/reg-event-db ::save-error (fn [db [_ form result]] - (println form result) + (println result) + (-> db (assoc-in [::forms form :status] :error) (assoc-in [::forms form :error] (or (:message (first result)) @@ -114,7 +115,6 @@ (i/->interceptor :id :settles :befor (fn [context] - (println "here2") context) :after (fn [context] (i/assoc-effect context :dispatch-debounce {:event event @@ -143,18 +143,20 @@ (defn vertical-form [{:keys [can-submit id change-event submit-event ]}] - {:form (fn [{:keys [title] :as params} & children] - (let [{:keys [data active? error]} @(re-frame/subscribe [::form id]) - can-submit @(re-frame/subscribe can-submit)] - - (into ^{:key id} [:form { :on-submit (fn [e] - (when (.-stopPropagation e) - (.stopPropagation e) - (.preventDefault e)) - (when can-submit - (re-frame/dispatch-sync (vec (conj submit-event params)))))} - [:h1.title.is-2 title]] - children))) + {:form ^{:key "form"} + (fn [{:keys [title] :as params} & children] + (let [{:keys [data active? error]} @(re-frame/subscribe [::form id]) + can-submit @(re-frame/subscribe can-submit)] + + [:form { :on-submit (fn [e] + (when (.-stopPropagation e) + (.stopPropagation e) + (.preventDefault e)) + (when can-submit + (re-frame/dispatch-sync (vec (conj submit-event params)))))} + [:h1.title.is-2 title] + [:<> + children]])) :raw-field (fn [control] (let [{:keys [data]} @(re-frame/subscribe [::form id])] [bind-field (-> control @@ -164,18 +166,20 @@ [:div.field (when label [:p.help label]) [:div.control control]]) - :field (fn [label control] - (let [{:keys [data]} @(re-frame/subscribe [::form id])] - [:div.field - (when label [:p.help label]) - [:div.control [bind-field (-> control - (assoc-in [1 :subscription] data) - (assoc-in [1 :event] change-event))]]])) + :field ^{:key "field"} + (fn [label control] + (let [{:keys [data]} @(re-frame/subscribe [::form id])] + [:div.field + (when label [:p.help label]) + [:div.control [bind-field (-> control + (assoc-in [1 :subscription] data) + (assoc-in [1 :event] change-event))]]])) - :error-notification (fn [] - (when-let [error (:error @(re-frame/subscribe [::form id]))] - ^{:key error} - [:div.notification.is-warning.animated.fadeInUp error])) + :error-notification + (fn [] + (when-let [error (:error @(re-frame/subscribe [::form id]))] + ^{:key error} + [:div.notification.is-warning.animated.fadeInUp {} error])) :submit-button (fn [child] (let [error (:error @(re-frame/subscribe [::form id]))] [:button.button.is-medium.is-primary.is-fullwidth {:disabled (if @(re-frame/subscribe can-submit) diff --git a/src/cljs/auto_ap/views/components/number_filter.cljs b/src/cljs/auto_ap/views/components/number_filter.cljs index ca3786c7..4b199b9a 100644 --- a/src/cljs/auto_ap/views/components/number_filter.cljs +++ b/src/cljs/auto_ap/views/components/number_filter.cljs @@ -32,31 +32,4 @@ :event on-change-event :step "0.01" :subscription value}]]]]]] - #_[:div - [:div.field.has-addons - [:div.control - [bind-field - [date-picker {:class-name "input is-fullwidth" - :class "input" - :format-week-number (fn [] "") - :previous-month-button-label "" - :placeholder-text "Start" - :next-month-button-label "" - :next-month-label "" - :event on-change-event - :type "date" - :field [:start] - :subscription value}]]] - [:div.control - [bind-field - [date-picker {:class-name "input is-fullwidth" - :class "input" - :format-week-number (fn [] "") - :previous-month-button-label "" - :placeholder-text "End" - :next-month-button-label "" - :event on-change-event - :next-month-label "" - :type "date" - :field [:end] - :subscription value}]]]]]) + ) diff --git a/src/cljs/auto_ap/views/components/vendor_dialog.cljs b/src/cljs/auto_ap/views/components/vendor_dialog.cljs index 710d6528..d340dd82 100644 --- a/src/cljs/auto_ap/views/components/vendor_dialog.cljs +++ b/src/cljs/auto_ap/views/components/vendor_dialog.cljs @@ -147,28 +147,33 @@ [horizontal-field [:label.label "Default"] [bind-field - (assoc-in template [1 :field ] default-key)]] + (template default-key nil) + #_(assoc-in template [1 :field ] default-key)]] (when is-admin? [horizontal-field [:label.label "Overrides"] - (for [[i override] (map vector (range) (conj (override-key data) {:key (random-uuid)}))] - ^{:key (or - (:id override) - (:key override))} - [:div.columns - [:div.column - [bind-field - [typeahead-entity {:matches clients - :match->text :name - :type "typeahead-entity" - :field [override-key i :client] - :event change-event - :subscription data}]]] - [:div.column - [bind-field - (assoc-in template [1 :field ] [override-key i :override])]] - [:div.column.is-1 - [:a.button {:on-click (dispatch-event [::removed-override override-key i])} [:span.icon [:span.icon-remove]]]]])])])) + (doall + (for [[i override] (map vector (range) (conj (override-key data) {:key (random-uuid)}))] + ^{:key (or + (:id override) + (:key override))} + [:div.columns + [:div.column + [bind-field + [typeahead-entity {:matches clients + :match->text :name + :type "typeahead-entity" + :field [override-key i :client] + :event change-event + :subscription data}]]] + [:div.column + [bind-field + (template + [override-key i :override] + (get-in data [override-key i :client]) + )]] + [:div.column.is-1 + [:a.button {:on-click (dispatch-event [::removed-override override-key i])} [:span.icon [:span.icon-remove]]]]]))])])) (defn form-content [{:keys [data change-event]}] (let [accounts @(re-frame/subscribe [::subs/accounts]) @@ -210,23 +215,28 @@ [default-with-overrides {:data data :change-event change-event :default-key :terms :override-key :terms-overrides} - [:input.input {:type "number" - :step "1" - :style {:width "4em"} - :size 3 - :spec ::entity/terms - :event change-event - :subscription data}]] + (fn [field client] + [:input.input {:type "number" + :step "1" + :style {:width "4em"} + :field field + :size 3 + :spec ::entity/terms + :event change-event + :subscription data}])] [:h2.subtitle "Expense Accounts"] [default-with-overrides {:data data :change-event change-event :default-key :default-account :override-key :account-overrides} - [typeahead-entity {:matches accounts - :match->text (fn [x ] (str (:numeric-code x) " - " (:name x))) - :type "typeahead-entity" - :event change-event - :subscription data}]] + (fn [field client] + + [typeahead-entity {:matches @(re-frame/subscribe [::subs/accounts client]) + :match->text (fn [x ] (str (:numeric-code x) " - " (:name x))) + :field field + :type "typeahead-entity" + :event change-event + :subscription data}])] [:h2.subtitle "Address"] [address-field {:field [:address] diff --git a/src/cljs/auto_ap/views/pages/admin/yodlee.cljs b/src/cljs/auto_ap/views/pages/admin/yodlee.cljs index 0408b6b4..62df17cf 100644 --- a/src/cljs/auto_ap/views/pages/admin/yodlee.cljs +++ b/src/cljs/auto_ap/views/pages/admin/yodlee.cljs @@ -1,15 +1,17 @@ (ns auto-ap.views.pages.admin.yodlee (:require-macros [cljs.core.async.macros :refer [go]]) (:require [re-frame.core :as re-frame] + [auto-ap.forms :as forms] [reagent.core :as reagent] [clojure.string :as str] + [cljs-time.format :as f] [auto-ap.subs :as subs] [auto-ap.events.admin.clients :as events] [auto-ap.entities.clients :as entity] [auto-ap.views.components.layouts :refer [side-bar-layout]] [auto-ap.views.components.admin.side-bar :refer [admin-side-bar]] [auto-ap.views.components.address :refer [address-field]] - [auto-ap.views.utils :refer [login-url dispatch-event dispatch-value-change bind-field horizontal-field]] + [auto-ap.views.utils :refer [login-url dispatch-event dispatch-value-change bind-field horizontal-field str->date date->str with-user]] [auto-ap.views.components.modal :refer [action-modal]] [cljs.reader :as edn] [auto-ap.routes :as routes] @@ -22,6 +24,11 @@ (fn [db] (-> db ::yodlee :authentication))) +(re-frame/reg-sub + ::can-submit + (fn [db] + true)) + (re-frame/reg-sub ::loading? (fn [db] @@ -37,6 +44,16 @@ (fn [db] (-> db ::yodlee :accounts-loading?))) +(re-frame/reg-sub + ::provider-accounts-loading? + (fn [db] + (-> db ::provider-accounts-loading?))) + +(re-frame/reg-sub + ::provider-accounts + (fn [db] + (-> db ::provider-accounts))) + (re-frame/reg-event-fx ::authenticate-with-yodlee (fn [{:keys [db]} _] @@ -51,40 +68,34 @@ (re-frame/reg-event-fx ::mounted (fn [{:keys [db]} _] - {:db (assoc-in db [::yodlee] {:accounts-loading? true}) + {:db (-> db + (assoc ::yodlee {:provider-accounts-loading? true}) + #_(assoc ::provider-accounts []) + #_(assoc ::provider-accounts-loading? true)) :http {:token (:user db) :method :get :headers {"Content-Type" "application/edn"} - :uri (str "/api/yodlee/accounts") - :on-success [::got-accounts] + :uri (str "/api/yodlee/provider-accounts") + :on-success [::got-provider-accounts] :on-error [::save-error]}})) (re-frame/reg-event-fx ::kicked (fn [{:keys [db]} [_ id state]] - {:db (update-in db [::yodlee :accounts] - (fn [as] - (map (fn [a] - (if (= (:id a) id) - (assoc a :status state) - a)) - as)))})) + {:dispatch [::mounted]})) +(re-frame/reg-event-fx + ::kicked + (fn [{:keys [db]} [_ id state]] + {:dispatch [::mounted]})) (re-frame/reg-event-fx ::kick (fn [{:keys [db]} [_ id]] - {:db (update-in db [::yodlee :accounts] - (fn [as] - (map (fn [a] - (if (= (:id a) id) - (assoc a :status :kicking) - a)) - as))) - :http {:token (:user db) + {:http {:token (:user db) :method :post :headers {"Content-Type" "application/edn"} - :uri (str "/api/yodlee/accounts/" id) + :uri (str "/api/yodlee/provider-accounts/" id) :on-success [::kicked id :kicked] :on-error [::kicked id :errored]}})) @@ -95,14 +106,22 @@ (assoc-in [::yodlee :accounts] accounts) (assoc-in [::yodlee :accounts-loading?] false))})) +(re-frame/reg-event-fx + ::got-provider-accounts + (fn [{:keys [db]} [_ accounts]] + {:db (-> db + (assoc-in [::provider-accounts] accounts) + (assoc-in [::provider-accounts-loading?] false))})) + (re-frame/reg-event-fx ::authenticated (fn [{:keys [db]} [_ authentication]] - {:db (-> db - (assoc-in [::yodlee :authentication] authentication) - (assoc-in [::yodlee :loading?] false))})) - + {:dispatch [::mounted]})) +(re-frame/reg-event-fx + ::save-error + (fn [{:keys [db]} [_ authentication]] + {:dispatch [::mounted]})) (defn yodlee-link-button [] [:div @@ -130,7 +149,16 @@ [:button.button.is-primary {:class (if loading? "is-loading" "") :on-click (dispatch-event [::authenticate-with-yodlee])} "Authenticate with Yodlee"]))]) -(defn yodlee-accounts-table [] +(defn yodlee-date->str [d] + (try + (or (some-> d + (str->date (:date-time-no-ms f/formatters)) + date->str) + "N/A") + (catch js/Error e + "N/A"))) + +(defn yodlee-accounts-table [accounts] [:div [:table.table @@ -139,41 +167,132 @@ [:th "Account Name"] [:th "Account Number"] [:th "Yodlee Account Number"] - [:th "Yodlee Last updated"] - [:th "Yodlee Status"] - [:th]]] + [:th "Balance"] + [:th "Yodlee Status"]]] + [:tbody - (if @(re-frame/subscribe [::accounts-loading?]) - [:tr [:td {:col-span "6"} "Loading..."] - ] - (for [account @(re-frame/subscribe [::accounts])] - ^{:key (:id account)} [:tr - [:td (:accountName account)] - [:td (:accountNumber account)] - [:td (:id account)] - [:td (str/join ", " (map :lastUpdated (:dataset account)))] - [:td (str/join ", " (map :additionalStatus (:dataset account)))] - [:td - (cond (= (:status account) :kicking) - [:button.button.is-success.is-loading {:disabled "disabled"} "Kick."] + (for [account accounts] + ^{:key (:id account)} [:tr + [:td (:accountName account)] + [:td (:accountNumber account)] + [:td (:id account)] + [:td.has-text-right (:amount (:balance account))] + [:td (str/join ", " (map :additionalStatus (:dataset account)))] + ])]]]) - (= (:status account) :kicked) - [:button.button {:disabled "disabled"} "In progress..."] +(re-frame/reg-event-fx + ::reauthenticate-mfa + [with-user ] + (fn [{:keys [user db]} [_ provider-account-id ]] + {:db (forms/loading db [::mfa-form provider-account-id]) + :http {:token user + :method :post + :headers {"Content-Type" "application/edn"} + :uri (str "/api/yodlee/reauthenticate/" provider-account-id ) + :body {"field" + (mapv (fn [[k v]] + {"id" k + "value" v}) + (:data (get-in db [::forms/forms [::mfa-form provider-account-id]])))} + + :on-success [::authenticated] + :on-error [::forms/save-error [::mfa-form provider-account-id] ]}})) - (= (:status account) :errored) - [:button.button.is-danger {:disabled "disabled"} "Error."] +(re-frame/reg-event-fx + ::reauthenticate + [with-user ] + (fn [{:keys [user db]} [_ provider-account-id ]] + {:db (forms/loading db [::login-form provider-account-id]) + :http {:token user + :method :post + :headers {"Content-Type" "application/edn"} + :uri (str "/api/yodlee/reauthenticate/" provider-account-id ) + :body {"loginForm" + {"row" + [{"field" + (mapv (fn [[k v]] + {"id" k + "value" v}) + (:data (get-in db [::forms/forms [::login-form provider-account-id]])))}]}} + + :on-success [::authenticated] + :on-error [::forms/save-error [::login-form provider-account-id]]}})) - :else - [:button.button.is-success {:on-click (dispatch-event [::kick (:id account)] )} "Kick." ])]]))]]) +(defn yodlee-provider-accounts-table [] + + (if @(re-frame/subscribe [::provider-accounts-loading?]) + [:div "Loading..."] + [:div.columns + [:div.column.is-three-quarters + (doall + (for [account @(re-frame/subscribe [::provider-accounts])] + + ^{:key (:id account)} + [:div.card {:style {:margin-bottom "1em"}} + [:div.card-header + [:div.card-header-title "Provider account " (:id account) + ]] + [:div.card-content + [:div.notification.is-info.is-light + [:div.level + [:div.level-left + [:div.level-item + [:p + "This account was last updated on " + (yodlee-date->str (-> account :dataset first :lastUpdated)) + ", and last attempted " + (yodlee-date->str (-> account :dataset first :lastUpdateAttempt)) + "."]]] + [:div.level-right [:button.button.is-success {:on-click (dispatch-event [::kick (:id account)] )} "Force refresh" ]]] + + ] + [:div.notification.is-info.is-warning + [:div.level + [:div.level-left + [:div.level-item + "This provider account's status is '" + (-> account :dataset first :additionalStatus) + "'. If this is in error, it might help to try reauthenticating by filling out the form below."]]]] + + [yodlee-accounts-table (:accounts account)] + [:div + (if (:field account) + (for [f (:field account)] + (let [{error :error account-data :data } @(re-frame/subscribe [::forms/form [::mfa-form (:id account)]]) + change-event [::forms/change [::mfa-form (:id account)]] + {:keys [form field field-holder raw-field error-notification submit-button]} (forms/vertical-form {:can-submit [::can-submit] + :change-event change-event + :submit-event [::reauthenticate-mfa (:id account)] + :id [::mfa-form (:id account)]} )] + (form {:title "Reauthenticate (login)"} + (error-notification) + (for [f (-> account :field)] + ^{:key (:id f)} + (field (:label f) + [:input.input {:type "text" :field [(:id f)] :value (-> f :field first :value)}])) + (submit-button "Reauthenticate")))) + (let [{error :error account-data :data } @(re-frame/subscribe [::forms/form [::login-form (:id account)]]) + change-event [::forms/change [::login-form (:id account)]] + {:keys [form field field-holder raw-field error-notification submit-button]} (forms/vertical-form {:can-submit [::can-submit] + :change-event change-event + :submit-event [::reauthenticate (:id account)] + :id [::login-form (:id account)]} )] + (form {:title "Reauthenticate (MFA)"} + (error-notification) + (for [f (-> account :loginForm first :row)] + ^{:key (:id f)} + (field (:label f) + [:input.input {:type "text" :field [(:id f)] :value (-> f :field first :value)}])) + (submit-button "Reauthenticate"))))]]]))]])) (defn admin-yodlee-content [] [(with-meta (fn [] [:div - [:h1.title "Yodlee"] + [:h1.title "Yodlee provider accounts"] - [yodlee-accounts-table] + [yodlee-provider-accounts-table] [yodlee-link-button]]) {:component-did-mount (fn [] (re-frame/dispatch [::mounted]))})]) diff --git a/src/cljs/auto_ap/views/pages/ledger/profit_and_loss.cljs b/src/cljs/auto_ap/views/pages/ledger/profit_and_loss.cljs index 04f286be..9d03e2ad 100644 --- a/src/cljs/auto_ap/views/pages/ledger/profit_and_loss.cljs +++ b/src/cljs/auto_ap/views/pages/ledger/profit_and_loss.cljs @@ -11,7 +11,7 @@ (def ranges {:sales [40000 48999] :cogs [50000 59999] - :payroll [60000 62999] + :payroll [60000 69999] :controllable [70000 79999] :fixed-overhead [80000 89999] :ownership-controllable [90000 99999]}) @@ -98,6 +98,16 @@ (fn [[accounts] _] (reduce + 0 (map :amount (vals accounts))))) +(re-frame/reg-sub + ::percent-of-sales + (fn [[_ type only-location]] + [(re-frame/subscribe [::amount :sales only-location]) + (re-frame/subscribe [::amount type only-location])]) + (fn [[sales accounts] _] + (if (> (or sales 0) 0 ) + (/ accounts sales) + 0.0))) + (re-frame/reg-sub ::comparable-percent-of-sales (fn [[_ type only-location]] @@ -293,78 +303,76 @@ (defn grouping [{:keys [header accounts comparable-accounts groupings location sales comparable-sales]}] - (for [[grouping-name from to] groupings - :let [matching-accounts (filter - #(<= from (:numeric-code %) to) - accounts) - total (reduce + 0 (map :amount matching-accounts)) - comparable-total (reduce + 0 (map #(:amount (get comparable-accounts (:id %)) 0) matching-accounts))] - :when (seq matching-accounts) - ] - (list - ^{:key "title"} - [:tr [:th "---" grouping-name "---"] - [:td] - [:td] - [:td] - [:td] - [:td] - ] - ^{:key "detail"} - (for [account matching-accounts] - ^{:key (:name account)} - [:tr [:td (:name account)] - [:td.has-text-right [:a {:on-click (dispatch-event [::investigate-clicked location (:numeric-code account) (:numeric-code account) :current])} - (->$ (:amount account))]] - [:td.has-text-right (->% (if (> sales 0) - (/ (:amount account) sales) - 0.0))] - [:td.has-text-right [:a {:on-click (dispatch-event [::investigate-clicked location (:numeric-code account) (:numeric-code account) :comparable])} - (->$ (:amount (get comparable-accounts (:id account)) 0))]] - [:td.has-text-right (->% (if (> comparable-sales 0) - (/ (:amount (get comparable-accounts (:id account)) 0) sales) - 0.0))] - [:td.has-text-right (->$ (- (:amount account ) (:amount (get comparable-accounts (:id account)) 0)))]]) + [:<> + (for [[grouping-name from to] groupings + :let [matching-accounts (filter + #(<= from (:numeric-code %) to) + accounts) + total (reduce + 0 (map :amount matching-accounts)) + comparable-total (reduce + 0 (map #(:amount (get comparable-accounts (:id %)) 0) matching-accounts))] + :when (seq matching-accounts) + ] + ^{:key grouping-name} + [:<> + [:tr [:td "---" grouping-name "---"] + [:td] + [:td] + [:td] + [:td] + [:td] + ] + [:<> + (for [account matching-accounts] + ^{:key (:name account)} + [:tr [:td (:name account)] + [:td.has-text-right [:a {:on-click (dispatch-event [::investigate-clicked location (:numeric-code account) (:numeric-code account) :current])} + (->$ (:amount account))]] + [:td.has-text-right (->% (if (> sales 0) + (/ (:amount account) sales) + 0.0))] + [:td.has-text-right [:a {:on-click (dispatch-event [::investigate-clicked location (:numeric-code account) (:numeric-code account) :comparable])} + (->$ (:amount (get comparable-accounts (:id account)) 0))]] + [:td.has-text-right (->% (if (> comparable-sales 0) + (/ (:amount (get comparable-accounts (:id account)) 0) sales) + 0.0))] + [:td.has-text-right (->$ (- (:amount account ) (:amount (get comparable-accounts (:id account)) 0)))]])] - ^{:key "total"} - [:tr [:th "---" grouping-name "---"] - [:th.has-text-right.total [:a - {:on-click (dispatch-event [::investigate-clicked location from to :current])} - (->$ total)] ] - [:th.has-text-right.total (->% (if (> sales 0) - (/ total sales) - 0.0))] - [:th.has-text-right.total [:a - {:on-click (dispatch-event [::investigate-clicked location from to :comparable])} - (->$ comparable-total)]] - [:th.has-text-right.total (->% (if (> comparable-sales 0) - (/ comparable-total sales) - 0.0))] - [:th.has-text-right.total (->$ (- total comparable-total))] - [:td] - ]))) + [:tr [:th ] + [:th.has-text-right.total [:a + {:on-click (dispatch-event [::investigate-clicked location from to :current])} + (->$ total)] ] + [:th.has-text-right.total (->% (if (> sales 0) + (/ total sales) + 0.0))] + [:th.has-text-right.total [:a + {:on-click (dispatch-event [::investigate-clicked location from to :comparable])} + (->$ comparable-total)]] + [:th.has-text-right.total (->% (if (> comparable-sales 0) + (/ comparable-total sales) + 0.0))] + [:th.has-text-right.total (->$ (- total comparable-total))] + [:td] + ] + [:tr [:td]]])]) (defn overall-grouping [type title location] (let [accounts @(re-frame/subscribe [::accounts type location]) min-numeric-code (or (first (map :numeric-code accounts)) 0) max-numeric-code (or (last (map :numeric-code accounts)) 0)] - (list - ^{:key "title"} - [:tr [:th.has-text-centered title] + [:<> + [:tr [:th.is-size-5 title] [:td] [:td] [:td]] - ^{:key "grouping"} - (grouping {:accounts accounts + [grouping {:accounts accounts :location location :groupings (type groupings) :comparable-accounts @(re-frame/subscribe [::comparable-accounts-by-id type location]) :sales @(re-frame/subscribe [::amount :sales location]) - :comparable-sales @(re-frame/subscribe [::comparable-amount :sales location])}) + :comparable-sales @(re-frame/subscribe [::comparable-amount :sales location])}] - ^{:key "total"} - [:tr [:th.has-text-centered title] + [:tr [:th.is-size-5 title] [:th.has-text-right [:a {:on-click (dispatch-event [::investigate-clicked location min-numeric-code max-numeric-code :current])} (->$ @(re-frame/subscribe [::amount type location]))]] @@ -374,7 +382,7 @@ (->$ @(re-frame/subscribe [::comparable-amount type location]))]] [:th.has-text-right (->% @(re-frame/subscribe [::comparable-percent-of-sales type location]))] [:th.has-text-right (->$ (- @(re-frame/subscribe [::amount type location]) - @(re-frame/subscribe [::comparable-amount type location])))]]))) + @(re-frame/subscribe [::comparable-amount type location])))]]])) (defn subtotal [types negs title location] (let [accounts (transduce (comp @@ -400,7 +408,7 @@ max-numeric-code (or (last (map :numeric-code accounts)) 0) sales @(re-frame/subscribe [::amount :sales location]) comparable-sales @(re-frame/subscribe [::comparable-amount :sales location])] - [:tr [:th.has-text-centered title] + [:tr [:th.is-size-5 title] [:td.has-text-right [:a {:on-click (dispatch-event [::investigate-clicked location min-numeric-code max-numeric-code :current])} (->$ (reduce + 0 (map :amount accounts)))]] @@ -418,6 +426,42 @@ [:td.has-text-right (->$ (- (reduce + 0 (map :amount accounts)) (reduce + 0 (map :amount comparable))))]])) +(defn location-rows [location] + [:<> + [overall-grouping :sales (str location " Sales") location] + [overall-grouping :cogs (str location " COGS") location] + [overall-grouping :payroll (str location " Payroll") location] + [subtotal [:payroll :cogs] #{} (str location " Prime Costs") location] + [subtotal [:sales :payroll :cogs] #{:payroll :cogs} (str location " Gross Profits") location] + [overall-grouping :controllable (str location " Controllable Expenses") location] + [overall-grouping :fixed-overhead (str location " Fixed Overhead") location] + [overall-grouping :ownership-controllable (str location " Ownership Controllable") location] + [subtotal [:controllable :fixed-overhead :ownership-controllable] #{} (str location " Overhead") location] + [subtotal [:sales :cogs :payroll :controllable :fixed-overhead :ownership-controllable] #{:cogs :payroll :controllable :fixed-overhead :ownership-controllable} (str location " Net Income") location] + [subtotal [:sales :cogs :payroll :controllable :fixed-overhead :ownership-controllable] #{:cogs :payroll :controllable :fixed-overhead :ownership-controllable} "Net Income" nil]]) + +(defn location-summary [location params] + [:div + [:h2.title.is-4 {:style {:margin-bottom "1rem"}} location " Summary"] + [:table.table.compact.balance-sheet {:style {:margin-bottom "2.5rem"}} + [:tbody + [:tr + [:td.has-text-right "Period ending"] + [:td.has-text-right (date->str (str->date (:to-date params) standard))] + [:td] + [:td.has-text-right (when (:to-date params) + (date->str (t/minus (str->date (:to-date params) standard) (t/years 1))))] + [:td] + [:td]] + [subtotal [:sales ] #{} "Sales" location] + [subtotal [:cogs ] #{} "Cogs" location] + [subtotal [:payroll ]#{} "Payroll" location] + [subtotal [:sales :payroll :cogs] #{:payroll :cogs} "Gross Profits" location] + [subtotal [:controllable :fixed-overhead :ownership-controllable] #{} "Overhead" location] + [subtotal [:sales :cogs :payroll :controllable :fixed-overhead :ownership-controllable] #{:cogs :payroll :controllable :fixed-overhead :ownership-controllable} "Net Income" location]]] + + ]) + (def profit-and-loss-content (with-meta (fn [] @@ -550,41 +594,27 @@ :else [:div + [:<> + (for [location @(re-frame/subscribe [::locations])] + ^{:key (str location "-summary")} + [location-summary location params] + )] + [:h2.title.is-4 {:style {:margin-bottom "1rem"}} "Detail"] [:table.table.compact.balance-sheet - (list - ^{:key "title"} + [:tbody [:tr - [:td.has-text-right "Period ending"] + [:td.has-text-right "Period Ending"] [:td.has-text-right (date->str (str->date (:to-date params) standard))] + [:td] [:td.has-text-right (when (:to-date params) (date->str (t/minus (str->date (:to-date params) standard) (t/years 1))))] - [:td]] - ^{:key "report"} - (for [location @(re-frame/subscribe [::locations])] - ^{:key location} - (list - ^{:key "sales"} - (overall-grouping :sales (str location " Sales") location) - ^{:key "cogs"} - (overall-grouping :cogs (str location " COGS") location) - ^{:key "payroll"} - (overall-grouping :payroll (str location " Payroll") location) - ^{:key "prime"} - (subtotal [:payroll :cogs] #{} (str location " Prime Costs") location) - ^{:key "gross profit"} - (subtotal [:sales :payroll :cogs] #{:payroll :cogs} (str location " Gross Profits") location) - ^{:key "controllable"} - (overall-grouping :controllable (str location " Controllable Expenses") location) - ^{:key "fixed overhead"} - (overall-grouping :fixed-overhead (str location " Fixed Overhead") location) - ^{:key "ownership"} - (overall-grouping :ownership-controllable (str location " Ownership Controllable") location) - ^{:key "sub-overhead"} - (subtotal [:controllable :fixed-overhead :ownership-controllable] #{} (str location " Overhead") location) - ^{:key "sub-loc-income"} - (subtotal [:sales :cogs :payroll :controllable :fixed-overhead :ownership-controllable] #{:cogs :payroll :controllable :fixed-overhead :ownership-controllable} (str location " Net Income") location) - ^{:key "sub-net-income"} - (subtotal [:sales :cogs :payroll :controllable :fixed-overhead :ownership-controllable] #{:cogs :payroll :controllable :fixed-overhead :ownership-controllable} "Net Income" nil))))]])]))) + [:td] + [:td.has-text-right "𝝙"]] + [:<> + (for [location @(re-frame/subscribe [::locations])] + ^{:key location} + [location-rows location] + )]]]])]))) {:component-will-mount #(re-frame/dispatch-sync [::params-change {:from-date (date->str (t/minus (local-now) (t/period :years 1)) standard) :to-date (date->str (local-now) standard)}]) })) diff --git a/src/cljs/auto_ap/views/utils.cljs b/src/cljs/auto_ap/views/utils.cljs index 881a144c..353e1906 100644 --- a/src/cljs/auto_ap/views/utils.cljs +++ b/src/cljs/auto_ap/views/utils.cljs @@ -226,8 +226,8 @@ (re-frame/dispatch (-> event (conj field) (conj (let [val (.. e -target -value)] - (cond (and val (not (str/blank? val)) - (not (str/ends-with? val "."))) + (cond (and val + (re-matches #"[\-]?(\d+)(\.\d{2})?" val)) (js/parseFloat val) (str/blank? val )