commit
4c55c7c498
|
|
@ -40,7 +40,7 @@ class Order extends Model implements OrderContract
|
|||
*/
|
||||
public function getBaseTotalDueAttribute()
|
||||
{
|
||||
return $this->base_grand_total - $this->base_grand_total_invoiced - $this->base_discount_amount;
|
||||
return $this->base_grand_total - $this->base_grand_total_invoiced;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,7 +48,7 @@ class Order extends Model implements OrderContract
|
|||
*/
|
||||
public function getTotalDueAttribute()
|
||||
{
|
||||
return $this->grand_total - $this->grand_total_invoiced - $this->discount_amount;
|
||||
return $this->grand_total - $this->grand_total_invoiced;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -265,9 +265,11 @@ class OrderRepository extends Repository
|
|||
*/
|
||||
public function collectTotals($order)
|
||||
{
|
||||
//Order invoice total
|
||||
$order->sub_total_invoiced = $order->base_sub_total_invoiced = 0;
|
||||
$order->shipping_invoiced = $order->base_shipping_invoiced = 0;
|
||||
$order->tax_amount_invoiced = $order->base_tax_amount_invoiced = 0;
|
||||
$order->discount_invoiced = $order->base_discount_invoiced = 0;
|
||||
|
||||
foreach ($order->invoices as $invoice) {
|
||||
$order->sub_total_invoiced += $invoice->sub_total;
|
||||
|
|
@ -286,7 +288,7 @@ class OrderRepository extends Repository
|
|||
$order->grand_total_invoiced = $order->sub_total_invoiced + $order->shipping_invoiced + $order->tax_amount_invoiced - $order->discount_invoiced;
|
||||
$order->base_grand_total_invoiced = $order->base_sub_total_invoiced + $order->base_shipping_invoiced + $order->base_tax_amount_invoiced - $order->base_discount_invoiced;
|
||||
|
||||
|
||||
//Order refund total
|
||||
$order->sub_total_refunded = $order->base_sub_total_refunded = 0;
|
||||
$order->shipping_refunded = $order->base_shipping_refunded = 0;
|
||||
$order->tax_amount_refunded = $order->base_tax_amount_refunded = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue