zoghal/holoo-client

PHP Client Webservice for Holoo(Torfenagar) accounting and financial software(holoo.co.ir)

v0.0.3 2021-12-16 20:04 UTC

This package is auto-updated.

Last update: 2024-05-05 09:15:39 UTC


README

PHP Webservice Client for Holoo accounting(Torfenagar) and financial software(holoo.co.ir)

وب‌سرویس هلو

کلاینت PHP وب‌سرویس نرم‌افزار حسابداری و مالی هلو(طرفه‌نگار) (holoo.co.ir)

توضیحات

این پکیج بر اساس توضیحات راهنمای اتصال به وب‌سرویس هلو در حال تکمیل شدن می‌باشد.

687474703a2f2f7777772e636f6666656574652e69722f696d616765732f627574746f6e732f6c656d6f6e63686966666f6e2e706e67

نصب و راه اندازی

composer require zoghal/holoo-client

نحوه استفاده

<?php
require 'vendor/autoload.php';

use HolooClient\Holoo;
use HolooClient\Customer;
use HolooClient\Invoice;
use HolooClient\Product;

Holoo::config('http://server-ip:8080/TncHoloo/api/','DB Name','UserName','PassWord');
Holoo::login();


$user = Customer::GetCustomer();
$user = Customer::GetCustomer(["Code" => 2756]);
$user = Customer::GetCustomerCount();
$user = Customer::NewCustomer([
    'custifno' => [
        'name' => 'صالح سوزنچی',
        'ispurchaser' => true,
        'isseller' => true,
        'custtype' => true,
    ]
]);

$user = Customer::EditCustomer([
    'custifno' => [
        'erpcode=' => 'bBAPNA12dg0=',   
        'isblacklist' => true,
        'nationalid' => '38700011122',
    ]
]);

print_r($user);
$invioces= Invoice::GetInvoiceList();
$invioces= Invoice::GetInvoiceList(['Code'=>123]);
$invioces= Invoice::GetInvoiceList(['type'=>4]);
print_r($invioces);

$invioces = Invoice::NewInvoice([
    'invoiceinfo' => [
        'id' => '978',
        'type' => '1',
        'customererpcode' => 'bBAPcw12cg0=',
        'date' => date('Y-m-d'),
        'time' => date("H:i:s") ,
        'Nesiyeh' => '21000',
        'comment' => 'یک فاکتور جدید',
        'detailinfo' => [
            [
                'id' => '1',
                'ProductErpCode' => 'bBALNA1mckd7QB4O',
                'few' => '1',
                'price' => '1000',
                'Comment' => 'توضیحاتی مرتبط با یک محصول خریداری شده'
            ],
            [
                'id' => '2',
                'ProductErpCode' => 'bBALNA1mckd5dh4O',
                'few' => '2',
                'price' => '10000',
                'Comment' => 'ثبت دامنه | gogoliMagooli.miomio'
            ]
        ]
    ]
]);
print_r($invioces);
$preInvioces = Invoice::GetPreInvoiceList();

$preInvioces = Invoice::NewPreInvoice([
    'invoiceinfo' => [
        'id' => '978',
        'customererpcode' => 'bBAPcw12cg0=',
        'date' => date('Y-m-d'),
        'time' => date("H:i:s") ,
        'comment' => 'یک پیش فاکتور جدید',
        'detailinfo' => [
            [
                'id' => '001',
                'ProductErpCode' => 'bBALNA1mckd7QB4O',
                'few' => '1',
                'price' => '1000',
                'Comment' => 'توضیحاتی مرتبط با یک محصول خریداری شده'
            ],
            [
                'id' => '002',
                'ProductErpCode' => 'bBALNA1mckd5dh4O',
                'few' => '21',
                'price' => '10000',
                'Comment' => 'ثبت دامنه | gogoliMagooli.miomio'
            ]
        ]
    ]
]);
print_r($preInvioces);
$product = Product::GetMainGroup();
$product = Product::GetSideGroup();
$product = Product::GetUnit();
print_r($product);

$product= Product::GetProduct();
$product= Product::GetProduct(['Code'=>64]);
$product = Product::GetProduct(['MainGroupErpCode' => 'bBALfg==']); // bug
$product= Product::GetProductCount();
print_r($product);


$product = Product::NewProduct([
    'productinfo' => [
        'sidegroupErpcode' => 'bBALNA1jDg0=',
        'name' => 'saleh402'
    ]
]);

$product = Product::EditProduct([
    'productinfo' => [
        'erpcode' => 'bBALNA1mcgF7UB4O',
        'name' => 'محصول ادیت شده'
    ]
]);
print_r($product);