mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-28 08:53:59 +00:00
9ed67e74e2
- Supplier (AP) - PO - DO - INV - Customer (AR) - PO - DO - INV
31 lines
1.0 KiB
PHP
31 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Transactions\Services;
|
|
|
|
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
|
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionDetailObject;
|
|
use App\Models\TransactionDetail;
|
|
|
|
class CreatesTransactionDetail extends AbstractUpdateRecord
|
|
{
|
|
/**
|
|
* @param WalletObject $object
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @throws \App\Classes\Exceptions\MalformedRequestException
|
|
*/
|
|
public function execute(TransactionDetailObject $object) {
|
|
$model = new TransactionDetail();
|
|
$model->trans_type1 = $object->getTransType1();
|
|
$model->trans_type2 = $object->getTransType2();
|
|
$model->transaction_id = $object->getTransactionId();
|
|
$model->product_code = $object->getProductCode();
|
|
$model->product_name = $object->getProductName();
|
|
$model->qty = $object->getQty();
|
|
$model->price = $object->getPrice();
|
|
$model->amount = $object->getAmount();
|
|
|
|
|
|
return $this->handler($model);
|
|
|
|
}
|
|
} |