Skip to content

Commit

Permalink
Add loggers for exports payload (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruuushhh authored Dec 21, 2023
1 parent c1ecf90 commit adab628
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/sage_intacct/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ def __construct_expense_report(self, expense_report: ExpenseReport,
'taxsolutionid': self.get_tax_solution_id_or_none(expense_report_lineitems),
})

logger.info("WORKSPACE_ID = {}, EXPENSE_GROUP_ID = {}, EXPENSE_REPORT_PAYLOAD = {}, ".format(self.workspace_id, expense_report.expense_group.id, expense_report_payload))
return expense_report_payload

def __construct_bill(self, bill: Bill, bill_lineitems: List[BillLineitem]) -> Dict:
Expand Down Expand Up @@ -938,7 +939,7 @@ def __construct_bill(self, bill: Bill, bill_lineitems: List[BillLineitem]) -> Di
'INCLUSIVETAX': True,
'TAXSOLUTIONID': self.get_tax_solution_id_or_none(bill_lineitems)
})

logger.info("WORKSPACE_ID = {}, EXPENSE_GROUP_ID = {}, BILL_PAYLOAD = {}, ".format(self.workspace_id, bill.expense_group.id, bill_payload))
return bill_payload

def __construct_charge_card_transaction(self, charge_card_transaction: ChargeCardTransaction, \
Expand Down Expand Up @@ -1129,6 +1130,7 @@ def __construct_journal_entry(self, journal_entry: JournalEntry, journal_entry_l
'taxsolutionid': self.get_tax_solution_id_or_none(journal_entry_lineitems),
})

logger.info("WORKSPACE_ID = {}, EXPENSE_GROUP_ID = {}, JOURNAL_ENTRY_PAYLOAD = {}, ".format(self.workspace_id, journal_entry.expense_group.id, journal_entry_payload))
return journal_entry_payload

def post_expense_report(self, expense_report: ExpenseReport, expense_report_lineitems: List[ExpenseReportLineitem]):
Expand Down Expand Up @@ -1398,6 +1400,7 @@ def __construct_ap_payment(ap_payment: APPayment, ap_payment_lineitems: List[APP
}
}

logger.info("WORKSPACE_ID = {}, EXPENSE_GROUP_ID = {}, AP_PAYMENT_PAYLOAD = {}, ".format(ap_payment.expense_group.workspace.id, ap_payment.expense_group.id, ap_payment_payload))
return ap_payment_payload

def post_ap_payment(self, ap_payment: APPayment, ap_payment_lineitems: List[APPaymentLineitem]):
Expand Down Expand Up @@ -1444,6 +1447,7 @@ def __construct_sage_intacct_reimbursement(reimbursement: SageIntacctReimburseme
'paymentdescription': reimbursement.payment_description
}

logger.info("WORKSPACE_ID = {}, EXPENSE_GROUP_ID = {}, REIMBURSEMENT_PAYLOAD = {}, ".format(reimbursement.expense_group.workspace.id, reimbursement.expense_group.id, reimbursement_payload))
return reimbursement_payload

def post_sage_intacct_reimbursement(self, reimbursement: SageIntacctReimbursement,
Expand Down

0 comments on commit adab628

Please sign in to comment.