Fix invoice creation with charges. Fix including discounts in invoices

This commit is contained in:
Deon George
2021-12-16 11:55:59 +11:00
parent 8a8e299c7b
commit 48a76bacb6
2 changed files with 3 additions and 3 deletions

View File

@@ -160,7 +160,7 @@ class InvoiceItem extends Model
*/
public function getSubTotalAttribute(): float
{
return sprintf('%3.2f',$this->quantity * $this->price_base);
return sprintf('%3.2f',$this->quantity * $this->price_base - $this->discount_amt);
}
/**