Merge branch 'develop' into feature/mzl_dev
This commit is contained in:
@@ -91,9 +91,9 @@ class FinPaymentApplyService
|
|||||||
$data['submit_files'] = json_encode($data['submit_files']);
|
$data['submit_files'] = json_encode($data['submit_files']);
|
||||||
redis::set('stock_' . $data['doc_user_id'], json_encode($request->post('stock')), 'EX', 30);
|
redis::set('stock_' . $data['doc_user_id'], json_encode($request->post('stock')), 'EX', 30);
|
||||||
unset($data['stock']);
|
unset($data['stock']);
|
||||||
if($data['voucher_file'] == '[]' || $data['voucher_file'] == '{}' )
|
if($data['voucher_file'] == '[]' || $data['voucher_file'] == '{}' || $data['voucher_file'] == '""')
|
||||||
$data['voucher_file'] = '';
|
$data['voucher_file'] = '';
|
||||||
if($data['submit_files'] == '[]' || $data['submit_files'] == '{}' )
|
if($data['submit_files'] == '[]' || $data['submit_files'] == '{}' || $data['submit_files'] == '""')
|
||||||
$data['submit_files'] = '';
|
$data['submit_files'] = '';
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
@@ -119,10 +119,10 @@ class FinPaymentApplyService
|
|||||||
{
|
{
|
||||||
unset($data['stock']);
|
unset($data['stock']);
|
||||||
$data['submit_files'] = json_encode($data['submit_files']);
|
$data['submit_files'] = json_encode($data['submit_files']);
|
||||||
if($data['submit_files'] == '[]' || $data['submit_files'] == '{}' )
|
if($data['submit_files'] == '[]' || $data['submit_files'] == '{}' || $data['submit_files'] == '""')
|
||||||
$data['submit_files'] = '';
|
$data['submit_files'] = '';
|
||||||
$data['voucher_file'] = json_encode($data['voucher_file']);
|
$data['voucher_file'] = json_encode($data['voucher_file']);
|
||||||
if($data['voucher_file'] == '[]' || $data['voucher_file'] == '{}' )
|
if($data['voucher_file'] == '[]' || $data['voucher_file'] == '{}' || $data['voucher_file'] == '""')
|
||||||
$data['voucher_file'] = '';
|
$data['voucher_file'] = '';
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
@@ -233,12 +233,12 @@ class FinPaymentApplyService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($remitter)) {
|
if (!empty($remitter)) {
|
||||||
$similarityOrder[] = "CASE WHEN remitter = {$remitter} THEN 0 ELSE 1 END";
|
$similarityOrder[] = "CASE WHEN remitter = '{$remitter}' THEN 0 ELSE 1 END";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($amount)) {
|
if (!empty($amount)) {
|
||||||
$amount = (float)$amount;
|
$amount = (float)$amount;
|
||||||
$similarityOrder[] = "ABS(amount - {$amount}) ASC";
|
$similarityOrder[] = "ABS(amount - {$amount})";
|
||||||
$similarityOrder[] = "CASE WHEN (ABS(amount - {$amount}) / {$amount} * 100) <= 5 THEN 0 ELSE 1 END";
|
$similarityOrder[] = "CASE WHEN (ABS(amount - {$amount}) / {$amount} * 100) <= 5 THEN 0 ELSE 1 END";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,9 +252,9 @@ class FinPaymentApplyService
|
|||||||
END ASC, ";
|
END ASC, ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$orderByClause .= "CASE
|
$orderByClause .= "CASE
|
||||||
WHEN created_at > {$sevenDaysAgo} THEN id
|
WHEN created_at > {$sevenDaysAgo} THEN id
|
||||||
ELSE 999999
|
ELSE 999999
|
||||||
END DESC, ";
|
END DESC, ";
|
||||||
|
|
||||||
$orderByClause .= "id DESC";
|
$orderByClause .= "id DESC";
|
||||||
|
|||||||
@@ -114,7 +114,8 @@ class FinReceiptService
|
|||||||
$data['arrived_at'] = strtotime( $data['arrived_at']);
|
$data['arrived_at'] = strtotime( $data['arrived_at']);
|
||||||
$data['created_by'] = $request->user->uid;
|
$data['created_by'] = $request->user->uid;
|
||||||
$data['updated_by'] = $request->user->uid;
|
$data['updated_by'] = $request->user->uid;
|
||||||
if($data['fx_receipt_file'] == '[]' || $data['fx_receipt_file'] == '{}' )
|
$data['fx_receipt_file'] = json_encode($data['fx_receipt_file']);
|
||||||
|
if($data['fx_receipt_file'] == '[]' || $data['fx_receipt_file'] == '{}' || $data['fx_receipt_file'] == '""')
|
||||||
$data['fx_receipt_file'] = '';
|
$data['fx_receipt_file'] = '';
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
@@ -135,7 +136,8 @@ class FinReceiptService
|
|||||||
if(isset($data['received_at']))
|
if(isset($data['received_at']))
|
||||||
$data['received_at'] = strtotime($data['received_at']);
|
$data['received_at'] = strtotime($data['received_at']);
|
||||||
|
|
||||||
if($data['fx_receipt_file'] == '[]' || $data['fx_receipt_file'] == '{}' )
|
$data['fx_receipt_file'] = json_encode($data['fx_receipt_file']);
|
||||||
|
if($data['fx_receipt_file'] == '[]' || $data['fx_receipt_file'] == '{}' || $data['fx_receipt_file'] == '""')
|
||||||
$data['fx_receipt_file'] = '';
|
$data['fx_receipt_file'] = '';
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user