feat/invoice-exportReady to merge
› Reading task BRA-214
› 6 files read
export async function exportInvoices(range) {
- const rows = await db.invoices.findAll();
+ const rows = await db.invoices.inRange(range);
+ if (!rows.length) return emptyReport(range);
› Tests: 48 passed
› Opened pull request #412
fix/discount-codeIn review
› Reading bug BRA-231
› Issue reproduced in tests
function applyDiscount(cart, code) {
- cart.total -= code.amount;
+ cart.total = Math.max(0, cart.total - code.amount);
+ cart.payable = cart.total > 0;
› Tests: 112 passed
› Code Reviewer: approved with 1 comment
feat/payment-alertsTests running
› Reading task BRA-240
› 4 files read
export function onPaymentFailed(event) {
+ metrics.increment('payments.failed');
+ if (event.retries > 2) alerts.notify(event);
› Tests: 37 passed
› Running integration tests