当前位置: 首页>>代码示例>>PHP>>正文


PHP Account::GetAccount方法代码示例

本文整理汇总了PHP中Account::GetAccount方法的典型用法代码示例。如果您正苦于以下问题:PHP Account::GetAccount方法的具体用法?PHP Account::GetAccount怎么用?PHP Account::GetAccount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Account的用法示例。


在下文中一共展示了Account::GetAccount方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: TransferArrears

 public static function TransferArrears($supplierid, $amount)
 {
     $supplier = Supplier::GetSupplier($supplierid);
     $descr = "Purchases Arrears B/F";
     $pid = 0;
     $discount = 0;
     $orders = null;
     $datetime = new DateTime();
     $ledger = Account::GetAccount('Purchases', 'ledgers');
     $invoice = PurchaseInvoice::CreateInvoice($supplier, $pid, $orders, 0, $descr, $datetime->format('d/m/Y'));
     $invoice->addToInvoice(PurchaseInvoiceLine::Create($invoice->id, 'Balances brought forward', 1, $amount->amount, 0, 0, $ledger->ledgerId));
     if ($invoice->generate()) {
         return new PurchaseTX($invoice, 'Purchases Arrears B/F Invoice');
     } else {
         Logger::Log('PurchaseTx', 'Failed', 'Purchases arrears B/F invoice transaction with id:' . $invoice->id . ' and tx id:' . $this->transactionId . ' could not be completed');
         return false;
     }
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:18,代码来源:DomainSCM.php

示例2: __construct

 function __construct()
 {
     parent::__construct();
     //provider
     //name - electronic payment - paypal
     $this->drAccounts[] = Account::GetAccount('PayPal', 'ledgers');
     $this->drRatios[] = 1;
     $this->crAccounts[] = Account::GetAccount('Sales Revenue', 'ledgers');
     $this->crRatios[] = 1;
     //this info should originate from the database, insert ignore protocol included
     //$this->code = self::GetCode('PayPal');
     //parent::__construct();
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:13,代码来源:ShopDomain.php

示例3: __construct

 function __construct($clientId, $invoiceType)
 {
     parent::__construct($invoiceType);
     if ($invoiceType == 'Credit Note') {
         $this->crAccounts[] = Account::GetAccountByNo($clientId, 'clients', 'Debtors');
         $this->crRatios[] = 1;
         $this->drAccounts[] = Account::GetAccount('Sales', 'ledgers');
         $this->drRatios[] = 1;
     } else {
         $this->drAccounts[] = Account::GetAccountByNo($clientId, 'clients', 'Debtors');
         $this->drRatios[] = 1;
         $this->crAccounts[] = Account::GetAccount('Sales', 'ledgers');
         $this->crRatios[] = 1;
     }
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:15,代码来源:DomainCRM.php

示例4: __construct

 function __construct($clientId, $name)
 {
     parent::__construct($name);
     $this->drAccounts[] = Account::GetAccountByNo($clientId, 'clients', 'Debtors');
     $this->drRatios[] = 1;
     $this->crAccounts[] = Account::GetAccount('Sales', 'ledgers');
     $this->crRatios[] = 1;
 }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:8,代码来源:DomainAccounting.php

示例5: RecoverAdvance

    public static function RecoverAdvance($empid, $month)
    {
        try {
            $employee = Employee::GetEmployee(intval($empid));
            $descr = "Advance recovered from " . $month . " salary.";
            //$d = explode('/', $date);
            //$month = $d[1].'/'.$d[2];
            $sql2 = 'SELECT * FROM advances_and_loans WHERE party_id = ' . $empid . ' and type = "Salary Advance" ORDER BY id DESC LIMIT 0,1';
            $entry = DatabaseHandler::GetRow($sql2);
            if (!empty($entry)) {
                $amount = $entry['balance'];
            } else {
                $amount = 0.0;
            }
            $amount = floatval($amount);
            if ($amount != 0.0) {
                $ledger = Account::GetAccount('PAYROLL');
                $sql = 'INSERT INTO advances_and_loans (party_id, month, type, effect, amount, ledger_id, balance, description) VALUES 
				(' . $employee->id . ', "' . $month . '", "Salary Advance", "cr", ' . $amount . ', ' . $ledger->ledgerId . ', 0.00, "Advance recovered from ' . $month . ' salary.")';
                DatabaseHandler::Execute($sql);
                $sqlb = 'SELECT * FROM payroll_entries WHERE party_id = ' . $empid . ' ORDER BY id DESC LIMIT 0,1';
                $latest = DatabaseHandler::GetRow($sqlb);
                $ladgerac = Account::GetAccount('LOANS AND ADVANCES');
                $sqla = 'INSERT INTO payroll_entries (party_id, month, type, effect, amount, ledger_id,description) VALUES 
				(' . $employee->id . ', "' . $month . '", "Salary Advance", "dr", ' . $amount . ', ' . $ladgerac->ledgerId . ', "Salary Advance for ' . $month . '.")';
                DatabaseHandler::Execute($sqla);
                $sql2 = 'SELECT * FROM payroll_entries WHERE party_id = ' . $empid . ' ORDER BY id DESC LIMIT 0,1';
                $entry = DatabaseHandler::GetRow($sql2);
                Logger::Log('Payroll', 'Passed', 'Salary advance for employee id: ' . $employee->id . ' for ' . $month . ' recovered');
                //return new PayrollTX($payment, 'Salary Payment');
                $txtype = AdvancesAndLoans::Recover($ledger->ledgerId, 'Advance Recovery');
                $tx = PayrollTX::Initialize($entry, $txtype, 'payroll_entries');
                $tx->post();
                $sql = 'UPDATE advances_and_loans SET tx_id = ' . $tx->transactionId . ', user = "' . SessionManager::GetUsername() . '", datetime = "' . $tx->date . '", stamp = ' . $tx->stamp . ' WHERE id = ' . $latest['id'];
                DatabaseHandler::Execute($sql);
            } else {
            }
        } catch (Exception $e) {
            Logger::Log('Payroll', 'Failed', 'Salary advance for employee id: ' . $employee->id . ' for ' . $month . ' could not be recovered');
        }
    }
开发者ID:xander-mbaka,项目名称:momentum,代码行数:41,代码来源:DomainHRM.php


注:本文中的Account::GetAccount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。