Skip to content

Commit ecbc91c

Browse files
authored
Merge pull request #1 from scaabel/fix-typo
chore: fix typo
2 parents d86f428 + 32e9561 commit ecbc91c

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

Classes/Invoice.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,19 +213,19 @@ public function template($template = 'default')
213213
*
214214
* @param string $name
215215
* @param int $price
216-
* @param int $ammount
216+
* @param int $amount
217217
* @param string $id
218218
* @param string $imageUrl
219219
*
220220
* @return self
221221
*/
222-
public function addItem($name, $price, $ammount = 1, $id = '-', $imageUrl = null)
222+
public function addItem($name, $price, $amount = 1, $id = '-', $imageUrl = null)
223223
{
224224
$this->items->push(Collection::make([
225225
'name' => $name,
226226
'price' => $price,
227-
'ammount' => $ammount,
228-
'totalPrice' => number_format(bcmul($price, $ammount, $this->decimals), $this->decimals),
227+
'amount' => $amount,
228+
'totalPrice' => number_format(bcmul($price, $amount, $this->decimals), $this->decimals),
229229
'id' => $id,
230230
'imageUrl' => $imageUrl,
231231
]));
@@ -272,7 +272,7 @@ public function formatCurrency()
272272
private function subTotalPrice()
273273
{
274274
return $this->items->sum(function ($item) {
275-
return bcmul($item['price'], $item['ammount'], $this->decimals);
275+
return bcmul($item['price'], $item['amount'], $this->decimals);
276276
});
277277
}
278278

Config/invoices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
|
8787
| The tax type accepted values are: 'percentage' and 'fixed'.
8888
| The percentage type calculates the tax depending on the invoice price, and
89-
| the fixed type simply adds a fixed ammount to the total price.
89+
| the fixed type simply adds a fixed amount to the total price.
9090
| You can't mix percentage and fixed tax rates.
9191
*/
9292
'tax_rates' => [

Templates/default.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
<td>{{ $item->get('id') }}</td>
155155
<td>{{ $item->get('name') }}</td>
156156
<td>{{ $item->get('price') }} {{ $invoice->formatCurrency()->symbol }}</td>
157-
<td>{{ $item->get('ammount') }}</td>
157+
<td>{{ $item->get('amount') }}</td>
158158
<td>{{ $item->get('totalPrice') }} {{ $invoice->formatCurrency()->symbol }}</td>
159159
</tr>
160160
@endforeach

docs/1/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ Select template for invoice.
438438

439439
### addItem
440440

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

443443
Adds an item to the invoice.
444444

@@ -450,7 +450,7 @@ Adds an item to the invoice.
450450
#### Arguments
451451
* $name **string**
452452
* $price **integer**
453-
* $ammount **integer**
453+
* $amount **integer**
454454
* $id **string**
455455

456456

0 commit comments

Comments
 (0)