funkytime/

yuki

Yuki的销售和会计API(子集)的PHP连接器,旨在创建销售发票并获取付款状态。

维护者

详细信息

github.com/FunkyTime/Yuki

源代码

dev-master / 0.2.x-dev 2024-08-21 08:16 UTC

This package is auto-updated.

Last update: 2024-09-21 08:29:33 UTC


README

Yuki的销售和会计API(子集)的PHP连接器,旨在创建销售发票并获取付款状态。

$invoice = [
    'Reference' => '',
    // ...
    'Contact' => [
        'ContactCode' => '',
        // ...
    ]
    'ContactPerson' => ['FullName' => ''],
    'InvoiceLines' => [
        'InvoiceLine' => [
            'ProductQuantity' => '',
            'Product' => [
                'Description' => '',
                // ...
            ]
        ]
    ]
    ];
];
$YukiSales = new \FunkyTime\Yuki($api_key, 'sales');
$YukiSales->ProcessInvoice($invoice);
$YukiAccounting = new \FunkyTime\Yuki($api_key, 'accounting');
$status = $YukiAccounting->GetInvoiceBalance($inv_reference);
// Result: an array with keys 'openAmount' and 'originalAmount'