-
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 some changes as well: - Removed the $currencySymbol setting on the Cashier object along with the useCurrencySymbol and usesCurrencySymbol methods - Removed the $symbol parameter from the useCurrency method on the Cashier object and its guessCurrencySymbol method - Refactored the formatAmount method on the Cashier object to accept an optional $currency parameter. By default it'll use the current set Currency. Also refactored its internals to use the Money library to format the value. - The starting balance is now no longer subtracted from the subtotal of an invoice - The rawTotal method now returns an integer instead of a float - 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 right above the total
- Loading branch information
1 parent
a844ad4
commit c24139f
Showing
5 changed files
with
97 additions
and
108 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.