feat(billing): renewals, coupons, VAT numbering, billing cycles and invoice payment tracking
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
ea9a53f742
commit
25f23d541e
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Resources\Api\Admin;
|
||||
|
||||
use App\Support\Billing\BillingDuplicateDetector;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
@@ -12,6 +13,7 @@ class InvoiceResource extends JsonResource
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'invoice_number' => $this->invoice_number,
|
||||
'duplicate' => BillingDuplicateDetector::forInvoice($this->id),
|
||||
'order_num' => $this->whenLoaded('order', fn() => $this->order?->order_num),
|
||||
'order_items' => $this->when(
|
||||
$this->relationLoaded('order') && $this->order?->relationLoaded('orderItems'),
|
||||
@@ -25,6 +27,7 @@ class InvoiceResource extends JsonResource
|
||||
]),
|
||||
'sub_total' => $this->sub_total,
|
||||
'discount_amount' => $this->discount_amount,
|
||||
'coupon_code' => $this->coupon_code,
|
||||
'tax' => $this->tax,
|
||||
'total' => $this->total,
|
||||
// Công nợ: đã thu bao nhiêu / còn thiếu bao nhiêu. Kế toán cần thấy ngay trên
|
||||
|
||||
Reference in New Issue
Block a user