mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 13:33:57 +00:00
58 lines
1.7 KiB
PHP
58 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Bookings\Standards\Validators;
|
|
|
|
use App\Classes\General\Abstracts\AbstractValidation;
|
|
use App\Classes\Modules\Bookings\DataTransferObjects\UpdateBookingSalesInvoiceDTO;
|
|
|
|
class BookingSalesInvoiceValidation extends AbstractValidation
|
|
{
|
|
/**
|
|
* @param UpdateBookingSalesInvoiceDTO $object
|
|
* @return array
|
|
*/
|
|
protected function data($object): array
|
|
{
|
|
return [
|
|
'docno' => $object->getDocNo(),
|
|
'docdate' => $object->getDocDate(),
|
|
'debtorcode' => $object->getDebtorCode(),
|
|
'ref' => $object->getRef(),
|
|
'shipinfo' => $object->getShipInfo(),
|
|
'accno' => $object->getAccNo(),
|
|
'detaildescription' => $object->getDetailDescription(),
|
|
'furtherdescription' => $object->getFurtherDescription(),
|
|
'classification' => $object->getClassification(),
|
|
'deptno' => $object->getDeptNo(),
|
|
'qty' => $object->getQty(),
|
|
'unitprice' => $object->getUnitPrice(),
|
|
'submiteinvoice' => $object->getSubmitEinvoice(),
|
|
'consolidatedeinvoice' => $object->getConsolidatedEinvoice(),
|
|
'einvoicevalidationlink' => $object->getEinvoiceValidationLink(),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function rules(): array
|
|
{
|
|
return [
|
|
'docno' => 'required|string',
|
|
'docdate' => 'required|date',
|
|
'debtorcode' => 'required|string',
|
|
'ref' => 'required|string',
|
|
'shipinfo' => 'required|string',
|
|
'einvoicevalidationlink' => 'required|string',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function messages(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|