Credit Limit Tests
These tests verify how credit limits will be observed. The seed data contains an account with partyId accountlimit100 with a credit limit of $100:
Approve Invoice Below Credit Limit
Create a sales invoice in financials with a total of $50 and set the invoice to READY.
Invoice is successfully created and set to READY. In Financials > Receivables >> Balances by Customer, you can see this customer has a balance of $50.
Approve Invoice Above Credit Limit
Create a second sales invoice in financials with a total of $100 and set the invoice to READY.
Invoice cannot be set to ready because it would exceed credit limit.
Use Deposit to Prepay for Invoice
Receive a payment from this account of $100 of type "Customer Deposit". Set it to Received. Then go back to mark the invoice as READY again.
Invoice is successfully set to Ready. Customer balance is still $50.
Orders and Shipping
Shipping Order under Credit Limit
Receive a payment for $50 and make sure that the customer balance is now 0 again. Create a sales order for $50 or so for customer in CRMSFA using "offline payment" method. Pack and ship order in warehouse.
Order should ship successfully. Customer balance should be value of new invoice.
Shipping Order over Credit Limit
Try creating another order for "offline payment" and then shipping it so that the total customer balance would exceed $100.
Order should not be shippable from warehouse packing because customer credit limit is exceeded.
Credit Card Orders
Create an order with a credit card as payment method for the item GZ-1005. Go to warehouse > shipping and pack this order.
This order should ship successfully and be billed to the credit card.
Receive Payment and Shipping Order
Go to CRMSFA > Orders to find the unshipped order. Then use [Receive Payment] to receive a check for the order. Then go to warehouse and pack and ship the order.
Order should ship successfully and be paid with the check payment.