Skip to content

Commit

Permalink
Merge pull request #1 from scaabel/fix-typo
Browse files Browse the repository at this point in the history
chore: fix typo
  • Loading branch information
Faks authored Feb 12, 2023
2 parents d86f428 + 32e9561 commit ecbc91c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
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

0 comments on commit ecbc91c

Please sign in to comment.