Files
exchange-2.0/app/Http/Resources/TransactionDetailResource.php
T
weiken.intex 9ed67e74e2 create Transaction & Transaction Detail
- Supplier (AP)
	- PO
	- DO
	- INV

- Customer (AR)
	- PO
	- DO
	- INV
2020-12-07 14:00:24 +08:00

32 lines
808 B
PHP

<?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class TransactionDetailResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'trans_type1' => $this->trans_type1,
'trans_type2' => $this->trans_type2,
'transaction_id' => (int) $this->transaction_id,
'product_code' => $this->product_code,
'product_name' => $this->product_name,
'qty' => (int) $this->qty,
'price' => (double) $this->price,
'amount' => (double) $this->amount
];
}
}