<?php
/**
 * Created by PhpStorm.
 * User: tandunzhao
 * Date: 2017/12/8
 * Time: 下午3:27
 */

namespace App\Http\Controllers\Manage\Finance\Transformers;


class PaymentStatisticTransformer
{
    public function transform($payment){
        return [
            'amount' => (float)($payment->amount),
            'amount_num' => (float)($payment->amount_num),
            'amount_person' => (float)($payment->amount_person),
            'amount_person_num' => (float)($payment->amount_person_num),
            'amount_company' => (float)($payment->amount_company),
            'amount_company_num' => (float)($payment->amount_company_num),
            'amount_audit_fail' => (float)($payment->amount_audit_fail),
            'amount_audit_fail_num' => (float)($payment->amount_audit_fail_num),
            'amount_fail' => (float)($payment->amount_fail),
            'amount_fail_num' => (float)($payment->amount_fail_num),
            'tallage' => (float)($payment->tallage),
            'created_time'   =>  date('Y-m-d',strtotime($payment->date)),
        ];
    }
}