Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM: Fix email invoices not sending #41172

Merged
merged 4 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Invoices: Fix bug introduced in 6.5.0 that prevented email invoices from being sent.
5 changes: 3 additions & 2 deletions projects/plugins/crm/js/ZeroBSCRM.admin.invoicebuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ window.zbs_invoice = false; // stores data of this inv (post init)
window.zbs_tax = false; // ?
window.zbs_tax_table = false; // stores tax table
window.zbsInvBlocker = false; // this is a blocker... ctrl F it
window.invoice_id = 0;

// ========================================================================
// ======= /Globals
Expand All @@ -41,10 +42,10 @@ jQuery( function () {
// but DAL3.0 should return the next available ID and reserve it?
// WH - how do we handle the case where YOU and I make a new invoice (same time)
// we fill it in, and the ID is the same - won't we have a race condition here?
const invoice_id = jQuery( '.zbs_invoice_html_canvas' ).data( 'invid' );
window.invoice_id = jQuery( '.zbs_invoice_html_canvas' ).data( 'invid' );

//draw the invoice HTML UI (v2.98) start by drawing the data from the DB (drawing / getting)
zbscrm_JS_retrieve_invoice_data( invoice_id );
zbscrm_JS_retrieve_invoice_data( window.invoice_id );

// hack for weird tax bug
if ( jQuery( '#invoice_tax_total' ).val() > 0 ) {
Expand Down
Loading