|
|
@@ -208,7 +208,7 @@ class AuxiliaryAccountService extends Service
|
|
|
'type' => ExpenseClaims::Order_type,
|
|
|
'period' => date("Ym", strtotime($data['month']))
|
|
|
]);
|
|
|
- $model->month = $data['order_time'] ?? 0;
|
|
|
+ $model->month = strtotime($data['month']);
|
|
|
$model->crt_id = $user['id'];
|
|
|
$model->top_depart_id = $user['top_depart_id'];
|
|
|
$model->save();
|
|
|
@@ -344,7 +344,7 @@ class AuxiliaryAccountService extends Service
|
|
|
if(empty($customer)) return [false,'单据不存在或已被删除'];
|
|
|
$customer = $customer->toArray();
|
|
|
$customer['crt_name'] = Employee::where('id',$customer['crt_id'])->value('title');
|
|
|
- $customer['crt_time'] = $customer['crt_time'] ? date("Y-m-d H:i:s",$customer['crt_time']): '';
|
|
|
+ $customer['crt_time'] =$this->utcTime($customer['crt_time']);
|
|
|
|
|
|
$details = $this->getDetail($data['id']);
|
|
|
$customer["details"] = $details;
|
|
|
@@ -355,12 +355,15 @@ class AuxiliaryAccountService extends Service
|
|
|
private function getDetail($id){
|
|
|
$data = AuxiliaryAccountDetails::where('del_time',0)
|
|
|
->where('auxiliary_account_id', $id)
|
|
|
- ->select('*',DB::raw("FROM_UNIXTIME(voucher_date, '%Y-%m-%d') as voucher_date"))
|
|
|
+ ->select('*')
|
|
|
->get()->toArray();
|
|
|
+ foreach ($data as &$v){
|
|
|
+ $v['voucher_date'] = $this->utcTime($v['voucher_date']);
|
|
|
+ }
|
|
|
return $data;
|
|
|
}
|
|
|
|
|
|
- private function UtcTime($time){
|
|
|
+ private function utcTime($time){
|
|
|
return Carbon::createFromTimestamp($time, 'UTC')
|
|
|
->toIso8601ZuluString();
|
|
|
}
|