PaymentReceipt
extends Model
in package
uses
HasFactory
Class PaymentReceipt
Represents a payment receipt for a Pelanggan bill.
Table of Contents
Properties
- $amount : float
- $amount_formatted : string
- $appends : mixed
- $bill_id : int
- $invoice_number : string
- $payment_date : string
- $payment_date_formatted : string|null
- $payment_method : string
- $pelanggan_id : int
- $casts : mixed
- $fillable : mixed
- The attributes that are mass assignable.
Methods
- bill() : BelongsTo
- Get the bill associated with the payment receipt.
- customer() : BelongsTo
- Get the customer (Pelanggan) associated with the payment receipt.
- getAmountFormattedAttribute() : string
- Get the formatted amount paid.
- getPaymentDateFormattedAttribute() : string|null
- Get the formatted payment date.
Properties
$amount
public
float
$amount
The amount paid.
$amount_formatted
public
string
$amount_formatted
The formatted amount paid.
$appends
public
mixed
$appends
= ['amount_formatted', 'payment_date_formatted']
$bill_id
public
int
$bill_id
The ID of the associated bill.
$invoice_number
public
string
$invoice_number
The invoice number of the receipt.
$payment_date
public
string
$payment_date
The date of payment.
$payment_date_formatted
public
string|null
$payment_date_formatted
The formatted payment date.
$payment_method
public
string
$payment_method
The payment method used.
$pelanggan_id
public
int
$pelanggan_id
The ID of the associated Pelanggan.
$casts
protected
mixed
$casts
= ['payment_date' => 'datetime']
$fillable
The attributes that are mass assignable.
protected
mixed
$fillable
= ['invoice_number', 'pelanggan_id', 'amount', 'payment_date', 'payment_method', 'bill_id']
Methods
bill()
Get the bill associated with the payment receipt.
public
bill() : BelongsTo
Return values
BelongsTocustomer()
Get the customer (Pelanggan) associated with the payment receipt.
public
customer() : BelongsTo
Return values
BelongsTogetAmountFormattedAttribute()
Get the formatted amount paid.
public
getAmountFormattedAttribute() : string
Return values
stringgetPaymentDateFormattedAttribute()
Get the formatted payment date.
public
getPaymentDateFormattedAttribute() : string|null