Hook for Accounting and Bookkeeping module

  • Last Created On Dec 13, 2023
  • 496
0 0

1. The hook "after_expense_deleted"

Path: application/models/Expenses_model.php

Function: delete

Line: 469

Code: hooks()->do_action('after_expense_deleted', $id);

To remove non-existent expenses that still show up in reports, paste  "admin/accounting/remove_wrong_mapping?type=expense"  into your URL -> then press Enter.

2. The hook "delete_applied_credit"

Path: application/models/Credit_notes_model.php

Function: delete_applied_credit

Line: 553

Code: hooks()->do_action('after_applied_credit_deleted', ['id' => $id, 'credit_note_id' => $credit_id, 'invoice_id' => $invoice_id]);


To remove non-existent applied credits that still show up in reports, paste "/admin/accounting/remove_wrong_mapping?type=credit_note" into your URL -> then press Enter.

3. The hook "apply_credits"

Path: application/models/Credit_notes_model.php

Function: apply_credits

Line: 801

Code: hooks()->do_action('credits_applied', ['data' => $data, 'credit_note_id' => $id, 'credit_id' => $insert_id]);


4. The hook "credit_note_refund_created"

Path: application/models/Credit_notes_model.php

Function: create_refund

Line: 666

Code: hooks()->do_action('credit_note_refund_created', ['data' => $data, 'credit_note_id' => $id, 'refund_id' => $insert_id]);

5. The hook "credit_note_refund_updated "

Path: application/models/Credit_notes_model.php

Function: edit_refund

Line: 695

Code: hooks()->do_action('credit_note_refund_updated', ['data' => $data, 'credit_note_id' => $refund->credit_note_id, 'refund_id' => $id]);



6. The hook "after_expense_imported"

Path: application/libraries/import/Import_expenses.php

Function: perform

Line: 98

Code: hooks()->do_action('after_expense_imported', $id);


Views: 496

Recent Articles

  • Updated Feature in Version 1.1.4 of the...
    9
  • How to Create Custom Fields for the Logi...
    23
  • Temp Staffing Module - Clients Portal
    27
  • Temp Staffing Module - Dashboard Screen
    23
  • Temp Staffing Module - Reports Screen
    24

Popular Articles

  • Warehouse
    2015
  • Item Settings
    1682
  • General Accounting Settings
    1412
  • Plaid environment & Setup Your Bank Acco...
    1286
  • Mapping Setup
    1258