Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typo #83

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Classes/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,19 @@ public function template($template = 'default')
*
* @param string $name
* @param int $price
* @param int $ammount
* @param int $amount
* @param string $id
* @param string $imageUrl
*
* @return self
*/
public function addItem($name, $price, $ammount = 1, $id = '-', $imageUrl = null)
public function addItem($name, $price, $amount = 1, $id = '-', $imageUrl = null)
{
$this->items->push(Collection::make([
'name' => $name,
'price' => $price,
'ammount' => $ammount,
'totalPrice' => number_format(bcmul($price, $ammount, $this->decimals), $this->decimals),
'amount' => $amount,
'totalPrice' => number_format(bcmul($price, $amount, $this->decimals), $this->decimals),
'id' => $id,
'imageUrl' => $imageUrl,
]));
Expand Down Expand Up @@ -272,7 +272,7 @@ public function formatCurrency()
private function subTotalPrice()
{
return $this->items->sum(function ($item) {
return bcmul($item['price'], $item['ammount'], $this->decimals);
return bcmul($item['price'], $item['amount'], $this->decimals);
});
}

Expand Down
2 changes: 1 addition & 1 deletion Config/invoices.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
|
| The tax type accepted values are: 'percentage' and 'fixed'.
| The percentage type calculates the tax depending on the invoice price, and
| the fixed type simply adds a fixed ammount to the total price.
| the fixed type simply adds a fixed amount to the total price.
| You can't mix percentage and fixed tax rates.
*/
'tax_rates' => [
Expand Down
2 changes: 1 addition & 1 deletion Templates/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<td>{{ $item->get('id') }}</td>
<td>{{ $item->get('name') }}</td>
<td>{{ $item->get('price') }} {{ $invoice->formatCurrency()->symbol }}</td>
<td>{{ $item->get('ammount') }}</td>
<td>{{ $item->get('amount') }}</td>
<td>{{ $item->get('totalPrice') }} {{ $invoice->formatCurrency()->symbol }}</td>
</tr>
@endforeach
Expand Down
4 changes: 2 additions & 2 deletions docs/1/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ Select template for invoice.

### addItem

\ConsoleTVs\Invoices\Classes\Invoice ConsoleTVs\Invoices\Classes\Invoice::addItem(string $name, integer $price, integer $ammount, string $id)
\ConsoleTVs\Invoices\Classes\Invoice ConsoleTVs\Invoices\Classes\Invoice::addItem(string $name, integer $price, integer $amount, string $id)

Adds an item to the invoice.

Expand All @@ -450,7 +450,7 @@ Adds an item to the invoice.
#### Arguments
* $name **string**
* $price **integer**
* $ammount **integer**
* $amount **integer**
* $id **string**


Expand Down