-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These changes utilize the Money library to format money values from the invoice and invoice line objects. It makes use of the invoice's currency to make sure there's no currency conflict when trying to display the values. New Composer requirements: - moneyphp/money: used for formatting money values - ext-intl: used for the above library to properly format currencies This brings along quite some changes as well: - Removal of the $currencySymbol setting on the Cashier object along with the useCurrencySymbol and usesCurrencySymbol methods - Removal of the $symbol parameter from the useCurrency method on the Cashier object and its guessCurrencySymbol method - Refactored the formatAmount method to a formatMoney method which takes a Money object - The starting balance is now no longer subtracted from the total and subtotal of an invoice - The rawTotal method now returns an integer instead of a float - A new amountDue() method is added to the Invoice object to display the amount left to pay - A new rawDiscount() method is added to the Invoice object which return the discount but as a raw integer value - A new tax() method is added to the Invoice object which returns the invoice tax formatted with its currency And finally the invoice pdf got a make over: - Subtotal is now displayed below the amount of each row and a total of all rows combined - Discount and Tax are displayed below subtotal - Total is now the summary of Subtotal - Discount - Tax - Starting balance is shown below the total as an extra subtracting from the total - Which results in the amount due which is displayed as the final value for the invoice which should be paid
- Loading branch information
1 parent
a844ad4
commit 34f606a
Showing
5 changed files
with
121 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.