示例#1
0
 private function getInvoiceResponseObject($invoiceMap)
 {
     switch ($invoiceMap->getInvoiceType()) {
         case PowerMedia_Ifirma_Model_Ifirma::TYPE_INVOICE:
             return ifirma\Invoice::get($invoiceMap->getInvoiceId());
             break;
         case PowerMedia_Ifirma_Model_Ifirma::TYPE_INVOICE_SEND:
             return ifirma\InvoiceSend::get($invoiceMap->getInvoiceId());
             break;
         case PowerMedia_Ifirma_Model_Ifirma::TYPE_INVOICE_PROFORMA:
             return ifirma\InvoiceProforma::get($invoiceMap->getInvoiceId());
             break;
         case PowerMedia_Ifirma_Model_Ifirma::TYPE_INVOICE_BILL:
             return ifirma\InvoiceBill::get($invoiceMap->getInvoiceId());
             break;
     }
 }