Andrew Wallo 4 months ago
parent
commit
6f0ee175a1

+ 4
- 4
app/Models/Accounting/Estimate.php View File

472
             'discount_method' => $this->discount_method,
472
             'discount_method' => $this->discount_method,
473
             'discount_computation' => $this->discount_computation,
473
             'discount_computation' => $this->discount_computation,
474
             'discount_rate' => $this->getRawOriginal('discount_rate'),
474
             'discount_rate' => $this->getRawOriginal('discount_rate'),
475
-            'subtotal' => $this->getRawOriginal('subtotal'),
476
-            'tax_total' => $this->getRawOriginal('tax_total'),
477
-            'discount_total' => $this->getRawOriginal('discount_total'),
478
-            'total' => $this->getRawOriginal('total'),
475
+            'subtotal' => $this->subtotal,
476
+            'tax_total' => $this->tax_total,
477
+            'discount_total' => $this->discount_total,
478
+            'total' => $this->total,
479
             'terms' => $this->terms,
479
             'terms' => $this->terms,
480
             'footer' => $this->footer,
480
             'footer' => $this->footer,
481
             'created_by' => auth()->id(),
481
             'created_by' => auth()->id(),

+ 4
- 4
app/Models/Accounting/RecurringInvoice.php View File

644
             'discount_method' => $this->discount_method,
644
             'discount_method' => $this->discount_method,
645
             'discount_computation' => $this->discount_computation,
645
             'discount_computation' => $this->discount_computation,
646
             'discount_rate' => $this->getRawOriginal('discount_rate'),
646
             'discount_rate' => $this->getRawOriginal('discount_rate'),
647
-            'subtotal' => $this->getRawOriginal('subtotal'),
648
-            'tax_total' => $this->getRawOriginal('tax_total'),
649
-            'discount_total' => $this->getRawOriginal('discount_total'),
650
-            'total' => $this->getRawOriginal('total'),
647
+            'subtotal' => $this->subtotal,
648
+            'tax_total' => $this->tax_total,
649
+            'discount_total' => $this->discount_total,
650
+            'total' => $this->total,
651
             'terms' => $this->terms,
651
             'terms' => $this->terms,
652
             'footer' => $this->footer,
652
             'footer' => $this->footer,
653
             'created_by' => auth()->id(),
653
             'created_by' => auth()->id(),

+ 0
- 1
database/factories/Accounting/BillFactory.php View File

254
         }
254
         }
255
 
255
 
256
         $grandTotalCents = $subtotalCents + $taxTotalCents - $discountTotalCents;
256
         $grandTotalCents = $subtotalCents + $taxTotalCents - $discountTotalCents;
257
-        $currencyCode = $bill->currency_code;
258
 
257
 
259
         $bill->update([
258
         $bill->update([
260
             'subtotal' => $subtotalCents,
259
             'subtotal' => $subtotalCents,

+ 0
- 1
database/factories/Accounting/EstimateFactory.php View File

235
         }
235
         }
236
 
236
 
237
         $grandTotalCents = $subtotalCents + $taxTotalCents - $discountTotalCents;
237
         $grandTotalCents = $subtotalCents + $taxTotalCents - $discountTotalCents;
238
-        $currencyCode = $estimate->currency_code;
239
 
238
 
240
         $estimate->update([
239
         $estimate->update([
241
             'subtotal' => $subtotalCents,
240
             'subtotal' => $subtotalCents,

+ 0
- 1
database/factories/Accounting/InvoiceFactory.php View File

279
         }
279
         }
280
 
280
 
281
         $grandTotalCents = $subtotalCents + $taxTotalCents - $discountTotalCents;
281
         $grandTotalCents = $subtotalCents + $taxTotalCents - $discountTotalCents;
282
-        $currencyCode = $invoice->currency_code;
283
 
282
 
284
         $invoice->update([
283
         $invoice->update([
285
             'subtotal' => $subtotalCents,
284
             'subtotal' => $subtotalCents,

+ 0
- 1
database/factories/Accounting/RecurringInvoiceFactory.php View File

329
         }
329
         }
330
 
330
 
331
         $grandTotalCents = $subtotalCents + $taxTotalCents - $discountTotalCents;
331
         $grandTotalCents = $subtotalCents + $taxTotalCents - $discountTotalCents;
332
-        $currencyCode = $recurringInvoice->currency_code;
333
 
332
 
334
         $recurringInvoice->update([
333
         $recurringInvoice->update([
335
             'subtotal' => $subtotalCents,
334
             'subtotal' => $subtotalCents,

Loading…
Cancel
Save