automate and view gl entries
This commit is contained in:
@@ -364,7 +364,14 @@
|
||||
invoice_id: invoice_id,
|
||||
due_date: is_dn ? '' : due_date.split('/').reverse().join('-')
|
||||
},
|
||||
onSuccess: function() { retrieve_invoice(); }
|
||||
onSuccess: function(res) {
|
||||
retrieve_invoice();
|
||||
if (res.gl_posted === true) {
|
||||
toastr.success('GL entry posted automatically.', 'GL Posted');
|
||||
} else if (res.gl_posted === false) {
|
||||
toastr.warning('Document issued, but GL posting failed: ' + (res.gl_message || 'Unknown error'), 'GL Skipped', { timeOut: 8000 });
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user