mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 22:13:59 +00:00
update accounting mapping
This commit is contained in:
@@ -93,9 +93,9 @@ class UpdateBankStatementDetailLogic extends AbstractControllerLogic
|
||||
if (in_array($systemReference, ['exchange', 'izyim'])) {
|
||||
$transaction = $this->checksBillNumber->execute($transactionReference, $systemReference);
|
||||
|
||||
if (!count($transaction)) {
|
||||
if (is_array($transaction) && empty($transaction)) {
|
||||
throw new MalformedRequestException('Transaction Not Found.');
|
||||
}
|
||||
}
|
||||
|
||||
if($systemReference === 'exchange') {
|
||||
$owner_type = Transaction::class;
|
||||
@@ -116,7 +116,7 @@ class UpdateBankStatementDetailLogic extends AbstractControllerLogic
|
||||
$transactionType = $transaction['type'];
|
||||
|
||||
if (($payFor === 'sales' && !in_array($transactionType, [ShippingTransactionType::PAYMENT, ShippingTransactionType::GROUP_PAYMENT]))
|
||||
|| ($payFor === 'top_up' && !in_array($transactionType, [ShippingTransactionType::TOP_UP]))) {
|
||||
|| ($payFor === 'top_up' && !in_array($transactionType, [ShippingTransactionType::TOP_UP, ShippingTransactionType::GROUP_PAYMENT]))) {
|
||||
throw new MalformedRequestException('Transaction Type does not match.');
|
||||
}
|
||||
|
||||
|
||||
@@ -20,11 +20,7 @@ class ChecksBillNumber
|
||||
$payload = $data['payload'];
|
||||
return $payload['data'];
|
||||
} catch (\Exception $exception) {
|
||||
dd($exception->getMessage());
|
||||
// preg_match('/\{.*\}/s', $exception->getMessage(), $matches);
|
||||
// $jsonError = json_decode($matches[0]);
|
||||
// Retrieved Transactions failed
|
||||
// throw new MalformedRequestException($jsonError->title);
|
||||
throw new MalformedRequestException($exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ class ExportsInvoiceTransactions implements FromQuery, WithHeadings, WithHeading
|
||||
|
||||
return [
|
||||
'<<New>>',
|
||||
$row['updated_at'],
|
||||
Carbon::parse($row['updated_at'])->format('m/d/Y H:m'),
|
||||
$row['debtor_code'],
|
||||
$row['type'] === ShippingTransactionType::PAYMENT ? $row['order_reference'] : $row['marking'],
|
||||
'',
|
||||
|
||||
Reference in New Issue
Block a user