/**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'QuestionMatrixResponse')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_matrix_response']) && !empty($fields['id_matrix_response'])) {
         $criteria->add(QuestionMatrixResponse::ID_MATRIX_RESPONSE, $fields['id_matrix_response']);
     }
     if (isset($fields['id_question']) && !empty($fields['id_question'])) {
         $criteria->add(QuestionMatrixResponse::ID_QUESTION, $fields['id_question']);
     }
     if (isset($fields['header_type']) && !empty($fields['header_type'])) {
         $criteria->add(QuestionMatrixResponse::HEADER_TYPE, $fields['header_type']);
     }
     if (isset($fields['description']) && !empty($fields['description'])) {
         $criteria->add(QuestionMatrixResponse::DESCRIPTION, $fields['description']);
     }
     if (isset($fields['status']) && !empty($fields['status'])) {
         $criteria->add(QuestionMatrixResponse::STATUS, $fields['status']);
     }
     $criteria->endPrefix();
 }
예제 #2
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'PurchaseOrderLog')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_purchase_order_log']) && !empty($fields['id_purchase_order_log'])) {
         $criteria->add(PurchaseOrderLog::ID_PURCHASE_ORDER_LOG, $fields['id_purchase_order_log']);
     }
     if (isset($fields['id_purchase_order']) && !empty($fields['id_purchase_order'])) {
         $criteria->add(PurchaseOrderLog::ID_PURCHASE_ORDER, $fields['id_purchase_order']);
     }
     if (isset($fields['id_user']) && !empty($fields['id_user'])) {
         $criteria->add(PurchaseOrderLog::ID_USER, $fields['id_user']);
     }
     if (isset($fields['date']) && !empty($fields['date'])) {
         $criteria->add(PurchaseOrderLog::DATE, $fields['date']);
     }
     if (isset($fields['event_type']) && !empty($fields['event_type'])) {
         $criteria->add(PurchaseOrderLog::EVENT_TYPE, $fields['event_type']);
     }
     $criteria->endPrefix();
 }
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'AIT1')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['ItemCode']) && !empty($fields['ItemCode'])) {
         $criteria->add(ProductPriceListHistory::ITEMCODE, $fields['ItemCode']);
     }
     if (isset($fields['PriceList']) && !empty($fields['PriceList'])) {
         $criteria->add(ProductPriceListHistory::PRICELIST, $fields['PriceList']);
     }
     if (isset($fields['Price']) && !empty($fields['Price'])) {
         $criteria->add(ProductPriceListHistory::PRICE, $fields['Price']);
     }
     if (isset($fields['Currency']) && !empty($fields['Currency'])) {
         $criteria->add(ProductPriceListHistory::CURRENCY, $fields['Currency']);
     }
     if (isset($fields['LogInstance']) && !empty($fields['LogInstance'])) {
         $criteria->add(ProductPriceListHistory::LOGINSTANCE, $fields['LogInstance']);
     }
     $criteria->endPrefix();
 }
예제 #4
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'OCRY')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['Code']) && !empty($fields['Code'])) {
         $criteria->add(Country::CODE, $fields['Code']);
     }
     if (isset($fields['Name']) && !empty($fields['Name'])) {
         $criteria->add(Country::NAME, $fields['Name']);
     }
     $criteria->endPrefix();
 }
예제 #5
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'PriceList')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_price_list']) && !empty($fields['id_price_list'])) {
         $criteria->add(PriceList::ID_PRICE_LIST, $fields['id_price_list']);
     }
     if (isset($fields['id_product']) && !empty($fields['id_product'])) {
         $criteria->add(PriceList::ID_PRODUCT, $fields['id_product']);
     }
     if (isset($fields['quantity_min']) && !empty($fields['quantity_min'])) {
         $criteria->add(PriceList::QUANTITY_MIN, $fields['quantity_min']);
     }
     if (isset($fields['quantity_max']) && !empty($fields['quantity_max'])) {
         $criteria->add(PriceList::QUANTITY_MAX, $fields['quantity_max']);
     }
     if (isset($fields['price']) && !empty($fields['price'])) {
         $criteria->add(PriceList::PRICE, $fields['price']);
     }
     $criteria->endPrefix();
 }
예제 #6
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'PurchaseOrder')
 {
     $criteria = $query->where();
     // $criteria->prefix($prefix);
     if (isset($fields['id_purchase_order']) && !empty($fields['id_purchase_order'])) {
         $criteria->add(PurchaseOrder::ID_PURCHASE_ORDER, $fields['id_purchase_order']);
     }
     if (isset($fields['sap_document_number']) && !empty($fields['sap_document_number'])) {
         $criteria->add(PurchaseOrder::SAP_DOCUMENT_NUMBER, $fields['sap_document_number']);
     }
     if (isset($fields['id_supplier']) && !empty($fields['id_supplier'])) {
         $criteria->add(PurchaseOrder::ID_SUPPLIER, $fields['id_supplier']);
     }
     if (isset($fields['id_courtyard']) && !empty($fields['id_courtyard'])) {
         $criteria->add(PurchaseOrder::ID_COURTYARD, $fields['id_courtyard']);
     }
     if (isset($fields['id_destination_country']) && !empty($fields['id_destination_country'])) {
         $criteria->add(PurchaseOrder::ID_DESTINATION_COUNTRY, $fields['id_destination_country']);
     }
     if (isset($fields['num_purchase_order']) && !empty($fields['num_purchase_order'])) {
         $criteria->add(PurchaseOrder::NUM_PURCHASE_ORDER, $fields['num_purchase_order']);
     }
     if (isset($fields['purchase_order_date']) && !empty($fields['purchase_order_date'])) {
         $criteria->add(PurchaseOrder::PURCHASE_ORDER_DATE, $fields['purchase_order_date']);
     }
     if (isset($fields['delivery_estimate_date']) && !empty($fields['delivery_estimate_date'])) {
         $criteria->add(PurchaseOrder::DELIVERY_ESTIMATE_DATE, $fields['delivery_estimate_date']);
     }
     if (isset($fields['courtyard_arrival_date']) && !empty($fields['courtyard_arrival_date'])) {
         $criteria->add(PurchaseOrder::COURTYARD_ARRIVAL_DATE, $fields['courtyard_arrival_date']);
     }
     if (isset($fields['reference']) && !empty($fields['reference'])) {
         $criteria->add(PurchaseOrder::REFERENCE, $fields['reference']);
     }
     if (isset($fields['id_currency']) && !empty($fields['id_currency'])) {
         $criteria->add(PurchaseOrder::ID_CURRENCY, $fields['id_currency']);
     }
     if (isset($fields['groupnum']) && !empty($fields['groupnum'])) {
         $criteria->add(PurchaseOrder::GROUPNUM, $fields['groupnum']);
     }
     if (isset($fields['comments']) && !empty($fields['comments'])) {
         $criteria->add(PurchaseOrder::COMMENTS, $fields['comments']);
     }
     if (isset($fields['invoice_number']) && !empty($fields['invoice_number'])) {
         $criteria->add(PurchaseOrder::INVOICE_NUMBER, $fields['invoice_number']);
     }
     if (isset($fields['id_folio_import']) && $fields['id_folio_import'] != "") {
         $criteria->add(PurchaseOrder::ID_FOLIO_IMPORT, $fields['id_folio_import']);
     }
     if (isset($fields['status']) && $fields['status'] != "") {
         switch ($fields['status']) {
             case PurchaseOrder::$Status["Canceled"]:
                 $criteria->add(PurchaseOrder::CANCELLED, PurchaseOrder::$Cancelled["Yes"]);
                 break;
             case PurchaseOrder::$Status["Closed"]:
                 $criteria->add(PurchaseOrder::CANCELLED, PurchaseOrder::$Cancelled["No"]);
                 $criteria->add(PurchaseOrder::CLOSED, PurchaseOrder::$Closed["Yes"]);
                 break;
             default:
                 $criteria->add(PurchaseOrder::STATUS, $fields['status']);
                 $criteria->add(PurchaseOrder::CANCELLED, PurchaseOrder::$Cancelled["No"]);
                 $criteria->add(PurchaseOrder::CLOSED, PurchaseOrder::$Closed["No"]);
                 break;
         }
     }
     if (isset($fields['startDate']) && !empty($fields['startDate']) && isset($fields['endDate']) && !empty($fields['endDate'])) {
         $criteria->add(PurchaseOrder::PURCHASE_ORDER_DATE, array($fields['startDate'] . " 00:00:00", $fields['endDate'] . " 23:59:59"), BaseQuery::BETWEEN);
     } else {
         if (isset($fields['startDate']) && !empty($fields['startDate'])) {
             $criteria->add(PurchaseOrder::PURCHASE_ORDER_DATE, array($fields['startDate'] . " 00:00:00", $fields['startDate'] . " 23:59:59"), BaseQuery::BETWEEN);
         }
     }
     //$criteria->endPrefix();
 }
예제 #7
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'CustomsTariffCode')
 {
     $criteria = $query->where();
     //$criteria = $query->order(" TotalTax asc ");
     $criteria->prefix($prefix);
     if (isset($fields['CstGrpCode']) && !empty($fields['CstGrpCode'])) {
         $criteria->add(CustomsTariffCode::CODE, $fields['CstGrpCode']);
     }
     if (isset($fields['CstGrpName']) && !empty($fields['CstGrpName'])) {
         $criteria->add(CustomsTariffCode::NAME, $fields['CstGrpName']);
     }
     if (isset($fields['TotalTax']) && !empty($fields['TotalTax'])) {
         $criteria->add(CustomsTariffCode::PERCENT, $fields['TotalTax']);
     }
     if (isset($fields['Locked']) && !empty($fields['Locked'])) {
         $criteria->add(CustomsTariffCode::STATUS, $fields['Locked']);
     }
     if (isset($fields['DataSource']) && !empty($fields['DataSource'])) {
         $criteria->add(CustomsTariffCode::DATASOURCE, $fields['DataSource']);
     }
     if (isset($fields['UserSign']) && !empty($fields['UserSign'])) {
         $criteria->add(CustomsTariffCode::USERSIGN, $fields['UserSign']);
     }
     $criteria->endPrefix();
 }
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'WarehouseEntranceClaimReport')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_warehouse_entrance_quarantine_claim_report']) && !empty($fields['id_warehouse_entrance_quarantine_claim_report'])) {
         $criteria->add(WarehouseEntranceClaimReport::ID_WAREHOUSE_ENTRANCE_QUARANTINE_CLAIM_REPORT, $fields['id_warehouse_entrance_quarantine_claim_report']);
     }
     if (isset($fields['id_warehouse_entrance']) && !empty($fields['id_warehouse_entrance'])) {
         $criteria->add(WarehouseEntranceClaimReport::ID_WAREHOUSE_ENTRANCE, $fields['id_warehouse_entrance']);
     }
     if (isset($fields['id_warehouse_entrance_product']) && !empty($fields['id_warehouse_entrance_product'])) {
         $criteria->add(WarehouseEntranceClaimReport::ID_WAREHOUSE_ENTRANCE_PRODUCT, $fields['id_warehouse_entrance_product']);
     }
     if (isset($fields['reimbursement_doc_num']) && !empty($fields['reimbursement_doc_num'])) {
         $criteria->add(WarehouseEntranceClaimReport::REIMBURSEMENT_DOC_NUM, $fields['reimbursement_doc_num']);
     }
     if (isset($fields['invoice_number']) && !empty($fields['invoice_number'])) {
         $criteria->add(WarehouseEntranceClaimReport::INVOICE_NUMBER, $fields['invoice_number']);
     }
     if (isset($fields['claimed_amount']) && !empty($fields['claimed_amount'])) {
         $criteria->add(WarehouseEntranceClaimReport::CLAIMED_AMOUNT, $fields['claimed_amount']);
     }
     if (isset($fields['final_amount']) && !empty($fields['final_amount'])) {
         $criteria->add(WarehouseEntranceClaimReport::FINAL_AMOUNT, $fields['final_amount']);
     }
     if (isset($fields['debit_meno_amount']) && !empty($fields['debit_meno_amount'])) {
         $criteria->add(WarehouseEntranceClaimReport::DEBIT_MENO_AMOUNT, $fields['debit_meno_amount']);
     }
     if (isset($fields['video_link']) && !empty($fields['video_link'])) {
         $criteria->add(WarehouseEntranceClaimReport::VIDEO_LINK, $fields['video_link']);
     }
     if (isset($fields['description']) && !empty($fields['description'])) {
         $criteria->add(WarehouseEntranceClaimReport::DESCRIPTION, $fields['description']);
     }
     if (isset($fields['good']) && !empty($fields['good'])) {
         $criteria->add(WarehouseEntranceClaimReport::GOOD, $fields['good']);
     }
     if (isset($fields['missing']) && !empty($fields['missing'])) {
         $criteria->add(WarehouseEntranceClaimReport::MISSING, $fields['missing']);
     }
     if (isset($fields['rejected']) && !empty($fields['rejected'])) {
         $criteria->add(WarehouseEntranceClaimReport::REJECTED, $fields['rejected']);
     }
     if (isset($fields['price']) && !empty($fields['price'])) {
         $criteria->add(WarehouseEntranceClaimReport::PRICE, $fields['price']);
     }
     if (isset($fields['landed_cost']) && !empty($fields['landed_cost'])) {
         $criteria->add(WarehouseEntranceClaimReport::LANDED_COST, $fields['landed_cost']);
     }
     if (isset($fields['indirect_costs']) && !empty($fields['indirect_costs'])) {
         $criteria->add(WarehouseEntranceClaimReport::INDIRECT_COSTS, $fields['indirect_costs']);
     }
     if (isset($fields['report_status']) && !empty($fields['report_status'])) {
         $criteria->add(WarehouseEntranceClaimReport::REPORT_STATUS, $fields['report_status']);
     }
     if (isset($fields['id_supplier']) && !empty($fields['id_supplier'])) {
         $criteria->add(WarehouseEntranceClaimReport::ID_SUPPLIER, $fields['id_supplier']);
     }
     if (isset($fields['id_currency']) && !empty($fields['id_currency'])) {
         $criteria->add(WarehouseEntranceClaimReport::ID_CURRENCY, $fields['id_currency']);
     }
     if (isset($fields['status']) && !empty($fields['status'])) {
         $criteria->add(WarehouseEntranceClaimReport::STATUS, $fields['status']);
     }
     if (isset($fields['comments']) && !empty($fields['comments'])) {
         $criteria->add(WarehouseEntranceClaimReport::COMMENTS, $fields['comments']);
     }
     if (isset($fields['reception_date']) && !empty($fields['reception_date'])) {
         $criteria->add(WarehouseEntranceClaimReport::RECEPTION_DATE, $fields['reception_date']);
     }
     if (isset($fields['doc_entry']) && !empty($fields['doc_entry'])) {
         $criteria->add(WarehouseEntranceClaimReport::DOC_ENTRY, $fields['doc_entry']);
     }
     $criteria->endPrefix();
 }
예제 #9
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'TemporalSupplier')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_temporal_supplier']) && !empty($fields['id_temporal_supplier'])) {
         $criteria->add(TemporalSupplier::ID_TEMPORAL_SUPPLIER, $fields['id_temporal_supplier']);
     }
     if (isset($fields['id_temporal_sap']) && !empty($fields['id_temporal_sap'])) {
         $criteria->add(TemporalSupplier::ID_TEMPORAL_SAP, $fields['id_temporal_sap']);
     }
     if (isset($fields['name']) && !empty($fields['name'])) {
         $criteria->add(TemporalSupplier::NAME, $fields['name']);
     }
     if (isset($fields['id_currency']) && !empty($fields['id_currency'])) {
         $criteria->add(TemporalSupplier::ID_CURRENCY, $fields['id_currency']);
     }
     if (isset($fields['contact']) && !empty($fields['contact'])) {
         $criteria->add(TemporalSupplier::CONTACT, $fields['contact']);
     }
     if (isset($fields['telephone']) && !empty($fields['telephone'])) {
         $criteria->add(TemporalSupplier::TELEPHONE, $fields['telephone']);
     }
     if (isset($fields['status']) && !empty($fields['status'])) {
         $criteria->add(TemporalSupplier::STATUS, $fields['status']);
     }
     $criteria->endPrefix();
 }
예제 #10
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'File')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_file']) && !empty($fields['id_file'])) {
         $criteria->add(File::ID_FILE, $fields['id_file']);
     }
     if (isset($fields['type']) && !empty($fields['type'])) {
         $criteria->add(File::TYPE, $fields['type']);
     }
     if (isset($fields['content']) && !empty($fields['content'])) {
         $criteria->add(File::CONTENT, $fields['content']);
     }
     $criteria->endPrefix();
 }
예제 #11
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'ProformaInvoiceEntry')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_proforma_invoice_entry']) && !empty($fields['id_proforma_invoice_entry'])) {
         $criteria->add(ProformaInvoiceEntry::ID_PROFORMA_INVOICE_ENTRY, $fields['id_proforma_invoice_entry']);
     }
     if (isset($fields['id_proforma_invoice']) && !empty($fields['id_proforma_invoice'])) {
         $criteria->add(ProformaInvoiceEntry::ID_PROFORMA_INVOICE, $fields['id_proforma_invoice']);
     }
     if (isset($fields['line']) && !empty($fields['line'])) {
         $criteria->add(ProformaInvoiceEntry::LINE, $fields['line']);
     }
     if (isset($fields['vis_order']) && !empty($fields['vis_order'])) {
         $criteria->add(ProformaInvoiceEntry::VIS_ORDER, $fields['vis_order']);
     }
     if (isset($fields['tax_code']) && !empty($fields['tax_code'])) {
         $criteria->add(ProformaInvoiceEntry::TAX_CODE, $fields['tax_code']);
     }
     if (isset($fields['id_product']) && !empty($fields['id_product'])) {
         $criteria->add(ProformaInvoiceEntry::ID_PRODUCT, $fields['id_product']);
     }
     if (isset($fields['quantity']) && !empty($fields['quantity'])) {
         $criteria->add(ProformaInvoiceEntry::QUANTITY, $fields['quantity']);
     }
     if (isset($fields['open_quantity']) && !empty($fields['open_quantity'])) {
         $criteria->add(ProformaInvoiceEntry::OPEN_QUANTITY, $fields['open_quantity']);
     }
     if (isset($fields['price']) && !empty($fields['price'])) {
         $criteria->add(ProformaInvoiceEntry::PRICE, $fields['price']);
     }
     if (isset($fields['currency']) && !empty($fields['currency'])) {
         $criteria->add(ProformaInvoiceEntry::CURRENCY, $fields['currency']);
     }
     if (isset($fields['id_warehouse_store']) && !empty($fields['id_warehouse_store'])) {
         $criteria->add(ProformaInvoiceEntry::ID_WAREHOUSE_STORE, $fields['id_warehouse_store']);
     }
     if (isset($fields['lead_time']) && !empty($fields['lead_time'])) {
         $criteria->add(ProformaInvoiceEntry::LEAD_TIME, $fields['lead_time']);
     }
     if (isset($fields['status']) && !empty($fields['status'])) {
         $criteria->add(ProformaInvoiceEntry::STATUS, $fields['status']);
     }
     if (isset($fields['line_status']) && !empty($fields['line_status'])) {
         $criteria->add(ProformaInvoiceEntry::LINE_STATUS, $fields['line_status']);
     }
     if (isset($fields['requisition_ids']) && !empty($fields['requisition_ids'])) {
         $criteria->add(ProformaInvoiceEntry::REQUISITION_IDS, $fields['requisition_ids']);
     }
     $criteria->endPrefix();
 }
예제 #12
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'ProformaInvoiceFile')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_proforma_invoice_file']) && !empty($fields['id_proforma_invoice_file'])) {
         $criteria->add(ProformaInvoiceFile::ID_PROFORMA_INVOICE_FILE, $fields['id_proforma_invoice_file']);
     }
     if (isset($fields['id_file']) && !empty($fields['id_file'])) {
         $criteria->add(ProformaInvoiceFile::ID_FILE, $fields['id_file']);
     }
     if (isset($fields['id_proforma_invoice']) && !empty($fields['id_proforma_invoice'])) {
         $criteria->add(ProformaInvoiceFile::ID_PROFORMA_INVOICE, $fields['id_proforma_invoice']);
     }
     if (isset($fields['type']) && !empty($fields['type'])) {
         $criteria->add(ProformaInvoiceFile::TYPE, $fields['type']);
     }
     $criteria->endPrefix();
 }
예제 #13
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'OCRD')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['CardCode']) && !empty($fields['CardCode'])) {
         $criteria->add(SapSupplier::CARDCODE, $fields['CardCode']);
     }
     if (isset($fields['Cardname']) && !empty($fields['Cardname'])) {
         $criteria->add(SapSupplier::CARDNAME, $fields['Cardname']);
     }
     if (isset($fields['GroupCode']) && !empty($fields['GroupCode'])) {
         $criteria->add(SapSupplier::GROUPCODE, $fields['GroupCode']);
     }
     if (isset($fields['LicTradNum']) && !empty($fields['LicTradNum'])) {
         $criteria->add(SapSupplier::LICTRADNUM, $fields['LicTradNum']);
     }
     if (isset($fields['CmpPrivate']) && !empty($fields['CmpPrivate'])) {
         $criteria->add(SapSupplier::CMPPRIVATE, $fields['CmpPrivate']);
     }
     if (isset($fields['Groupnum']) && !empty($fields['Groupnum'])) {
         $criteria->add(SapSupplier::GROUPNUM, $fields['Groupnum']);
     }
     if (isset($fields['CardType']) && !empty($fields['CardType'])) {
         $criteria->add(SapSupplier::CARDTYPE, $fields['CardType']);
     }
     if (isset($fields['frozenFor']) && !empty($fields['frozenFor'])) {
         $criteria->add(SapSupplier::FROZEN_FOR, $fields['frozenFor']);
     }
     if (isset($fields['validFor']) && !empty($fields['validFor'])) {
         $criteria->add(SapSupplier::VALID_FOR, $fields['validFor']);
     }
     $criteria->endPrefix();
 }
예제 #14
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'PriceListLog')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_price_list_log']) && !empty($fields['id_price_list_log'])) {
         $criteria->add(PriceListLog::ID_PRICE_LIST_LOG, $fields['id_price_list_log']);
     }
     if (isset($fields['id_price_list']) && !empty($fields['id_price_list'])) {
         $criteria->add(PriceListLog::ID_PRICE_LIST, $fields['id_price_list']);
     }
     if (isset($fields['id_user']) && !empty($fields['id_user'])) {
         $criteria->add(PriceListLog::ID_USER, $fields['id_user']);
     }
     if (isset($fields['date']) && !empty($fields['date'])) {
         $criteria->add(PriceListLog::DATE, $fields['date']);
     }
     if (isset($fields['event_type']) && !empty($fields['event_type'])) {
         $criteria->add(PriceListLog::EVENT_TYPE, $fields['event_type']);
     }
     $criteria->endPrefix();
 }
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'WarehouseEntranceQuarantineRecoveryDeadline')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_warehouse_entrance_quarantine_recovery_deadline']) && !empty($fields['id_warehouse_entrance_quarantine_recovery_deadline'])) {
         $criteria->add(WarehouseEntranceQuarantineRecoveryDeadline::ID_WAREHOUSE_ENTRANCE_QUARANTINE_RECOVERY_DEADLINE, $fields['id_warehouse_entrance_quarantine_recovery_deadline']);
     }
     if (isset($fields['id_warehouse_entry']) && !empty($fields['id_warehouse_entry'])) {
         $criteria->add(WarehouseEntranceQuarantineRecoveryDeadline::ID_WAREHOUSE_ENTRANCE, $fields['id_warehouse_entry']);
     }
     if (isset($fields['id_warehouse_entry_line']) && !empty($fields['id_warehouse_entry_line'])) {
         $criteria->add(WarehouseEntranceQuarantineRecoveryDeadline::ID_WAREHOUSE_ENTRANCE_LINE, $fields['id_warehouse_entry_line']);
     }
     if (isset($fields['recovery_deadline']) && !empty($fields['recovery_deadline'])) {
         $criteria->add(WarehouseEntranceQuarantineRecoveryDeadline::RECOVERY_DEADLINE, $fields['recovery_deadline']);
     }
     $criteria->endPrefix();
 }
예제 #16
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'OLCT')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['Code']) && !empty($fields['Code'])) {
         $criteria->add(Warehouse::CODE, $fields['Code']);
     }
     if (isset($fields['Location']) && !empty($fields['Location'])) {
         $criteria->add(Warehouse::LOCATION, $fields['Location']);
     }
     $criteria->endPrefix();
 }
예제 #17
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'LandedCostItem')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['DocEntry']) && !empty($fields['DocEntry'])) {
         $criteria->add(LandedCostItem::DOCENTRY, $fields['DocEntry']);
     }
     if (isset($fields['LineNum']) && !empty($fields['LineNum'])) {
         $criteria->add(LandedCostItem::LINENUM, $fields['LineNum']);
     }
     if (isset($fields['BaseType']) && !empty($fields['BaseType'])) {
         $criteria->add(LandedCostItem::BASETYPE, $fields['BaseType']);
     }
     if (isset($fields['BaseEntry']) && !empty($fields['BaseEntry'])) {
         $criteria->add(LandedCostItem::BASEENTRY, $fields['BaseEntry']);
     }
     if (isset($fields['ItemCode']) && !empty($fields['ItemCode'])) {
         $criteria->add(LandedCostItem::ITEMCODE, $fields['ItemCode']);
     }
     if (isset($fields['Quantity']) && !empty($fields['Quantity'])) {
         $criteria->add(LandedCostItem::QUANTITY, $fields['Quantity']);
     }
     if (isset($fields['PriceFOB']) && !empty($fields['PriceFOB'])) {
         $criteria->add(LandedCostItem::PRICEFOB, $fields['PriceFOB']);
     }
     if (isset($fields['Currency']) && !empty($fields['Currency'])) {
         $criteria->add(LandedCostItem::CURRENCY, $fields['Currency']);
     }
     if (isset($fields['Rate']) && !empty($fields['Rate'])) {
         $criteria->add(LandedCostItem::RATE, $fields['Rate']);
     }
     if (isset($fields['Custom']) && !empty($fields['Custom'])) {
         $criteria->add(LandedCostItem::CUSTOM, $fields['Custom']);
     }
     if (isset($fields['PriceAtWH']) && !empty($fields['PriceAtWH'])) {
         $criteria->add(LandedCostItem::PRICEATWH, $fields['PriceAtWH']);
     }
     if (isset($fields['LineTotal']) && !empty($fields['LineTotal'])) {
         $criteria->add(LandedCostItem::LINETOTAL, $fields['LineTotal']);
     }
     if (isset($fields['CardCode']) && !empty($fields['CardCode'])) {
         $criteria->add(LandedCostItem::CARDCODE, $fields['CardCode']);
     }
     $criteria->endPrefix();
 }
예제 #18
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'OCRN')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['CurrCode']) && !empty($fields['CurrCode'])) {
         $criteria->add(Currency::CURRCODE, $fields['CurrCode']);
     }
     if (isset($fields['CurrName']) && !empty($fields['CurrName'])) {
         $criteria->add(Currency::CURRNAME, $fields['CurrName']);
     }
     if (isset($fields['DocCurrCod']) && !empty($fields['DocCurrCod'])) {
         $criteria->add(Currency::DOCCURRCOD, $fields['DocCurrCod']);
     }
     if (isset($fields['Locked']) && !empty($fields['Locked'])) {
         $criteria->add(Currency::LOCKED, $fields['Locked']);
     }
     if (isset($fields['ISOCurrCod']) && !empty($fields['ISOCurrCod'])) {
         $criteria->add(Currency::ISOCURRCOD, $fields['ISOCurrCod']);
     }
     $criteria->endPrefix();
 }
예제 #19
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'OITM')
 {
     $criteria = $query->where();
     //$criteria->prefix($prefix);
     if (isset($fields['CstGrpCode']) && !empty($fields['CstGrpCode'])) {
         $criteria->add(Product::ID_CUSTOMS_TARIFF_CODE, $fields['CstGrpCode']);
     }
     if (isset($fields['FirmCode']) && !empty($fields['FirmCode'])) {
         $criteria->add(Product::ID_BRAND, $fields['FirmCode']);
     }
     if (isset($fields['U_Color']) && !empty($fields['U_Color'])) {
         $criteria->add(Product::ID_COLOR, $fields['U_Color']);
     }
     if (isset($fields['U_Categoria']) && !empty($fields['U_Categoria'])) {
         $criteria->add(Product::FAMILY_NAME, $fields['U_Categoria']);
     }
     if (isset($fields['U_PCS_Impor_per_id']) && !empty($fields['U_PCS_Impor_per_id'])) {
         $criteria->add(Product::ID_FAMILY, $fields['U_PCS_Impor_per_id']);
     }
     if (isset($fields['U_PCS_Impor_per_id']) && !empty($fields['U_PCS_Impor_per_id'])) {
         $criteria->add(Product::IMPORT_PERMIT, $fields['U_PCS_Impor_per_id']);
     }
     if (isset($fields['ItmsGrpCod']) && !empty($fields['ItmsGrpCod'])) {
         $criteria->add(Product::ID_PRODUCT_GROUP, $fields['ItmsGrpCod']);
     }
     if (isset($fields['U_id_subcategoria']) && !empty($fields['U_id_subcategoria'])) {
         $criteria->add(Product::ID_SUBFAMILY, $fields['U_id_subcategoria']);
     }
     if (isset($fields['CardCode']) && !empty($fields['CardCode'])) {
         $criteria->add(Product::ID_SUPPLIER, $fields['CardCode']);
     }
     if (isset($fields['U_PCSid_npd_sheet']) && !empty($fields['U_PCSid_npd_sheet'])) {
         $criteria->add(Product::ID_NPD_SHEET, $fields['U_PCSid_npd_sheet']);
     }
     if (isset($fields['ItemCode']) && !empty($fields['ItemCode'])) {
         $criteria->add(Product::ITEM_CODE, $fields['ItemCode'], BaseQuery::LIKE);
     }
     if (isset($fields['ItemName']) && !empty($fields['ItemName'])) {
         $criteria->add(Product::ITEM_NAME, $fields['ItemName']);
     }
     if (isset($fields['SWW']) && !empty($fields['SWW'])) {
         $criteria->add(Product::STATUS, $fields['SWW']);
     }
     if (isset($fields['Invntitem']) && !empty($fields['Invntitem'])) {
         $criteria->add(Product::INVENTARY_ITEM, $fields['Invntitem']);
     }
     if (isset($fields['PrchseItem']) && !empty($fields['PrchseItem'])) {
         $criteria->add(Product::PURCHASE_ITEM, $fields['PrchseItem']);
     }
     if (isset($fields['SellItem']) && !empty($fields['SellItem'])) {
         $criteria->add(Product::SELL_ITEM, $fields['SellItem']);
     }
     if (isset($fields['U_Madre_09']) && !empty($fields['U_Madre_09'])) {
         $criteria->add(Product::KEY_MOTHER, $fields['key_mother']);
     }
     if (isset($fields['U_CODPRO']) && !empty($fields['U_CODPRO'])) {
         $criteria->add(Product::COD_PRO, $fields['U_CODPRO']);
     }
     if (isset($fields['BuyUnitMsr']) && !empty($fields['BuyUnitMsr'])) {
         $criteria->add(Product::BUY_UNIT, $fields['BuyUnitMsr']);
     }
     if (isset($fields['NumInBuy']) && !empty($fields['NumInBuy'])) {
         $criteria->add(Product::NUM_BUY, $fields['NumInBuy']);
     }
     if (isset($fields['SalUnitMsr']) && !empty($fields['SalUnitMsr'])) {
         $criteria->add(Product::SAI_UNIT, $fields['SalUnitMsr']);
     }
     if (isset($fields['NumInSale']) && !empty($fields['NumInSale'])) {
         $criteria->add(Product::NUM_SALES, $fields['NumInSale']);
     }
     if (isset($fields['InvntryUom']) && !empty($fields['InvntryUom'])) {
         $criteria->add(Product::INVENTORY_UNIT, $fields['InvntryUom']);
     }
     if (isset($fields['U_MCFrente']) && !empty($fields['U_MCFrente'])) {
         $criteria->add(Product::MC_FRONT, $fields['U_MCFrente']);
     }
     if (isset($fields['U_MCAltura']) && !empty($fields['U_MCAltura'])) {
         $criteria->add(Product::MC_HEIGHT, $fields['U_MCAltura']);
     }
     if (isset($fields['U_MCProfundida']) && !empty($fields['U_MCProfundida'])) {
         $criteria->add(Product::MC_DEPTH, $fields['U_MCProfundida']);
     }
     if (isset($fields['U_MCPeso']) && !empty($fields['U_MCPeso'])) {
         $criteria->add(Product::MC_WEIGHT, $fields['U_MCPeso']);
     }
     if (isset($fields['U_PzasXCaja']) && !empty($fields['U_PzasXCaja'])) {
         $criteria->add(Product::MC_PARTS, $fields['U_PzasXCaja']);
     }
     if (isset($fields['U_PCS_Pieces_per_inn']) && !empty($fields['U_PCS_Pieces_per_inn'])) {
         $criteria->add(Product::PIECES_PER_INNER, $fields['U_PCS_Pieces_per_inn']);
     }
     if (isset($fields['U_pzafrente']) && !empty($fields['U_pzafrente'])) {
         $criteria->add(Product::PZA_FRONT, $fields['U_pzafrente']);
     }
     if (isset($fields['U_pzaaltura']) && !empty($fields['U_pzaaltura'])) {
         $criteria->add(Product::PZA_HEIGHT, $fields['U_pzaaltura']);
     }
     if (isset($fields['U_pzaprofu']) && !empty($fields['U_pzaprofu'])) {
         $criteria->add(Product::PZA_DEPTH, $fields['U_pzaprofu']);
     }
     if (isset($fields['U_PesoxPza']) && !empty($fields['U_PesoxPza'])) {
         $criteria->add(Product::PZA_WEIGHT, $fields['pza_weight']);
     }
     if (isset($fields['U_pzadiametro']) && !empty($fields['U_pzadiametro'])) {
         $criteria->add(Product::PZA_DIAMETER, $fields['U_pzadiametro']);
     }
     if (isset($fields['U_PCS_Individual_Pac']) && !empty($fields['U_PCS_Individual_Pac'])) {
         $criteria->add(Product::INDIVIDUAL_PACKAGE, $fields['U_PCS_Individual_Pac']);
     }
     if (isset($fields['U_PCS_Packing_Front']) && !empty($fields['U_PCS_Packing_Front'])) {
         $criteria->add(Product::PACKING_FRONT, $fields['U_PCS_Packing_Front']);
     }
     if (isset($fields['U_PCS_Packing_Height']) && !empty($fields['U_PCS_Packing_Height'])) {
         $criteria->add(Product::PACKING_HEIGHT, $fields['U_PCS_Packing_Height']);
     }
     if (isset($fields['U_PCS_Packing_Depth']) && !empty($fields['U_PCS_Packing_Depth'])) {
         $criteria->add(Product::PACKING_DEPTH, $fields['U_PCS_Packing_Depth']);
     }
     if (isset($fields['U_PCS_Packing_Weight']) && !empty($fields['U_PCS_Packing_Weight'])) {
         $criteria->add(Product::PACKING_WEIGHT, $fields['U_PCS_Packing_Weight']);
     }
     if (isset($fields['U_PCS_Packing_Diamet']) && !empty($fields['U_PCS_Packing_Diamet'])) {
         $criteria->add(Product::PACKING_DIAMETER, $fields['U_PCS_Packing_Diamet']);
     }
     if (isset($fields['U_PCS_Def_Freight_Fa']) && !empty($fields['U_PCS_Def_Freight_Fa'])) {
         $criteria->add(Product::DEFAULT_FREIGHT_FARE, $fields['U_PCS_Def_Freight_Fa']);
     }
     if (isset($fields['U_PCS_Important']) && !empty($fields['U_PCS_Important'])) {
         $criteria->add(Product::IMPORTANT, $fields['U_PCS_Important']);
     }
     if (isset($fields['U_PCS_Rescue']) && !empty($fields['U_PCS_Rescue'])) {
         $criteria->add(Product::RESCUE, $fields['U_PCS_Rescue']);
     }
     if (isset($fields['U_PCS_VIM']) && !empty($fields['U_PCS_VIM'])) {
         $criteria->add(Product::VIM, $fields['U_PCS_VIM']);
     }
     if (isset($fields['U_PCS_Individual_VIM']) && !empty($fields['U_PCS_Individual_VIM'])) {
         $criteria->add(Product::INDIVIDUAL_VIM, $fields['U_PCS_Individual_VIM']);
     }
     if (isset($fields['U_PCS_import_permit']) && !empty($fields['U_PCS_import_permit'])) {
         $criteria->add(Product::IMPORT_PERMIT_REMARKS, $fields['U_PCS_import_permit']);
     }
     if (isset($fields['U_PCS_Put_trougth']) && !empty($fields['U_PCS_Put_trougth'])) {
         $criteria->add(Product::GOOD_TROUGH, $fields['U_PCS_Put_trougth']);
     }
     if (isset($fields['U_PCS_Catalog_Year']) && !empty($fields['U_PCS_Catalog_Year'])) {
         $criteria->add(Product::CATALOG_YEAR, $fields['U_PCS_Catalog_Year']);
     }
     if (isset($fields['LeadTime']) && !empty($fields['LeadTime'])) {
         $criteria->add(Product::LEAD_TIME, $fields['LeadTime']);
     }
     if (isset($fields['U_PCS_id_incoterm']) && !empty($fields['U_PCS_id_incoterm'])) {
         $criteria->add(Product::ID_INCOTERM, $fields['U_PCS_id_incoterm']);
     }
     if (isset($fields['U_PCS_manual_restock']) && !empty($fields['U_PCS_manual_restock'])) {
         $criteria->add(Product::MANUAL_RESTOCK, $fields['U_PCS_manual_restock']);
     }
     $criteria->endPrefix();
 }
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'ProductionTimePrintingTechnique')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_production_time_by_printing_technique']) && !empty($fields['id_production_time_by_printing_technique'])) {
         $criteria->add(ProductionTimePrintingTechnique::ID_PRODUCTION_TIME_BY_PRINTING_TECHNIQUE, $fields['id_production_time_by_printing_technique']);
     }
     if (isset($fields['id_product_printing_area']) && !empty($fields['id_product_printing_area'])) {
         $criteria->add(ProductionTimePrintingTechnique::ID_PRODUCT_PRINTING_AREA, $fields['id_product_printing_area']);
     }
     if (isset($fields['id_printing_technique']) && !empty($fields['id_printing_technique'])) {
         $criteria->add(ProductionTimePrintingTechnique::ID_PRINTING_TECHNIQUE, $fields['id_printing_technique']);
     }
     if (isset($fields['max_inks']) && !empty($fields['max_inks'])) {
         $criteria->add(ProductionTimePrintingTechnique::MAX_INKS, $fields['max_inks']);
     }
     if (isset($fields['favorite']) && !empty($fields['favorite'])) {
         $criteria->add(ProductionTimePrintingTechnique::FAVORITE, $fields['favorite']);
     }
     if (isset($fields['serve_three_days']) && !empty($fields['serve_three_days'])) {
         $criteria->add(ProductionTimePrintingTechnique::SERVE_THREE_DAYS, $fields['serve_three_days']);
     }
     if (isset($fields['additional_day']) && !empty($fields['additional_day'])) {
         $criteria->add(ProductionTimePrintingTechnique::ADDITIONAL_DAY, $fields['additional_day']);
     }
     if (isset($fields['emergency_collection_day']) && !empty($fields['emergency_collection_day'])) {
         $criteria->add(ProductionTimePrintingTechnique::EMERGENCY_COLLECTION_DAY, $fields['emergency_collection_day']);
     }
     if (isset($fields['emergency_collection_two_day']) && !empty($fields['emergency_collection_two_day'])) {
         $criteria->add(ProductionTimePrintingTechnique::EMERGENCY_COLLECTION_TWO_DAY, $fields['emergency_collection_two_day']);
     }
     $criteria->endPrefix();
     if (isset($fields['id_product']) && !empty($fields['id_product'])) {
         $criteria->add('ProductPrintingArea.id_product', $fields['id_product'] . '%');
     }
 }
예제 #21
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'Address')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_address']) && !empty($fields['id_address'])) {
         $criteria->add(Address::ID_ADDRESS, $fields['id_address']);
     }
     if (isset($fields['state']) && !empty($fields['state'])) {
         $criteria->add(Address::STATE, $fields['state']);
     }
     if (isset($fields['street']) && !empty($fields['street'])) {
         $criteria->add(Address::STREET, $fields['street']);
     }
     if (isset($fields['settlement']) && !empty($fields['settlement'])) {
         $criteria->add(Address::SETTLEMENT, $fields['settlement']);
     }
     if (isset($fields['district']) && !empty($fields['district'])) {
         $criteria->add(Address::DISTRICT, $fields['district']);
     }
     if (isset($fields['city']) && !empty($fields['city'])) {
         $criteria->add(Address::CITY, $fields['city']);
     }
     if (isset($fields['zip_code']) && !empty($fields['zip_code'])) {
         $criteria->add(Address::ZIP_CODE, $fields['zip_code']);
     }
     if (isset($fields['country']) && !empty($fields['country'])) {
         $criteria->add(Address::COUNTRY, $fields['country']);
     }
     $criteria->endPrefix();
 }
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'RestockPurchaseCriteria')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_restock_purchase_criteria']) && !empty($fields['id_restock_purchase_criteria'])) {
         $criteria->add(RestockPurchaseCriteria::ID_RESTOCK_PURCHASE_CRITERIA, $fields['id_restock_purchase_criteria']);
     }
     if (isset($fields['name']) && !empty($fields['name'])) {
         $criteria->add(RestockPurchaseCriteria::NAME, $fields['name']);
     }
     if (isset($fields['value']) && !empty($fields['value'])) {
         $criteria->add(RestockPurchaseCriteria::VALUE, $fields['value']);
     }
     if (isset($fields['type']) && !empty($fields['type'])) {
         $criteria->add(RestockPurchaseCriteria::TYPE, $fields['type']);
     }
     $criteria->endPrefix();
 }
예제 #23
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'FolioImport')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_folio_import']) && !empty($fields['id_folio_import'])) {
         $criteria->add(FolioImport::ID_FOLIO_IMPORT, $fields['id_folio_import']);
     }
     if (isset($fields['id_forwarder']) && !empty($fields['id_forwarder'])) {
         $criteria->add(FolioImport::ID_FORWARDER, $fields['id_forwarder']);
     }
     if (isset($fields['id_port_custom']) && !empty($fields['id_port_custom'])) {
         $criteria->add(FolioImport::ID_PORT_CUSTOM, $fields['id_port_custom']);
     }
     if (isset($fields['id_port_destination']) && !empty($fields['id_port_destination'])) {
         $criteria->add(FolioImport::ID_PORT_DESTINATION, $fields['id_port_destination']);
     }
     if (isset($fields['id_customs_broker']) && !empty($fields['id_customs_broker'])) {
         $criteria->add(FolioImport::ID_CUSTOMS_BROKER, $fields['id_customs_broker']);
     }
     if (isset($fields['id_warehouse']) && !empty($fields['id_warehouse'])) {
         $criteria->add(FolioImport::ID_WAREHOUSE, $fields['id_warehouse']);
     }
     if (isset($fields['folio']) && !empty($fields['folio'])) {
         $criteria->add(FolioImport::FOLIO, $fields['folio']);
     }
     if (isset($fields['date']) && !empty($fields['date'])) {
         $criteria->add(FolioImport::DATE, $fields['date']);
     }
     if (isset($fields['type_income']) && !empty($fields['type_income'])) {
         $criteria->add(FolioImport::TYPE_INCOME, $fields['type_income']);
     }
     if (isset($fields['pre_inspected']) && !empty($fields['pre_inspected'])) {
         $criteria->add(FolioImport::PRE_INSPECTED, $fields['pre_inspected']);
     }
     if (isset($fields['origen_sell']) && !empty($fields['origen_sell'])) {
         $criteria->add(FolioImport::ORIGEN_SELL, $fields['origen_sell']);
     }
     if (isset($fields['customs_sell']) && !empty($fields['customs_sell'])) {
         $criteria->add(FolioImport::CUSTOMS_SELL, $fields['customs_sell']);
     }
     if (isset($fields['import_licence']) && !empty($fields['import_licence'])) {
         $criteria->add(FolioImport::IMPORT_LICENCE, $fields['import_licence']);
     }
     if (isset($fields['customs']) && !empty($fields['customs'])) {
         $criteria->add(FolioImport::CUSTOMS, $fields['customs']);
     }
     if (isset($fields['in_date']) && !empty($fields['in_date'])) {
         $criteria->add(FolioImport::IN_DATE, $fields['in_date']);
     }
     if (isset($fields['exchange_euro_to_dollar']) && !empty($fields['exchange_euro_to_dollar'])) {
         $criteria->add(FolioImport::EXCHANGE_EURO_TO_DOLLAR, $fields['exchange_euro_to_dollar']);
     }
     if (isset($fields['exchange_dollar_to_peso']) && !empty($fields['exchange_dollar_to_peso'])) {
         $criteria->add(FolioImport::EXCHANGE_DOLLAR_TO_PESO, $fields['exchange_dollar_to_peso']);
     }
     if (isset($fields['prv']) && !empty($fields['prv'])) {
         $criteria->add(FolioImport::PRV, $fields['prv']);
     }
     if (isset($fields['rec']) && !empty($fields['rec'])) {
         $criteria->add(FolioImport::REC, $fields['rec']);
     }
     if (isset($fields['other_cost']) && !empty($fields['other_cost'])) {
         $criteria->add(FolioImport::OTHER_COST, $fields['other_cost']);
     }
     if (isset($fields['frontpage_status']) && !empty($fields['frontpage_status'])) {
         $criteria->add(FolioImport::FRONTPAGE_STATUS, $fields['frontpage_status']);
     }
     if (isset($fields['status']) && !empty($fields['status'])) {
         $criteria->add(FolioImport::STATUS, $fields['status']);
     }
     if (isset($fields['use_precaptured_values']) && !empty($fields['use_precaptured_values'])) {
         $criteria->add(FolioImport::USE_PRECAPTURED_VALUES, $fields['use_precaptured_values']);
     }
     if (isset($fields['dta']) && !empty($fields['dta'])) {
         $criteria->add(FolioImport::DTA, $fields['dta']);
     }
     if (isset($fields['payment_status']) && !empty($fields['payment_status'])) {
         $criteria->add(FolioImport::PAYMENT_STATUS, $fields['payment_status']);
     }
     $criteria->endPrefix();
 }
예제 #24
0
 /**
  *
  * @param Query $query
  * @param Storage $storage
  * @return \Application\Model\Bean\Bean
  */
 public function getOneByQuery(Query $query, Storage $storage = null)
 {
     $storage = StorageFactory::create($storage);
     $key = "getOneByQuery:" . $query->createSql();
     if ($storage->exists($key)) {
         $bean = $storage->load($key);
     } else {
         $bean = $this->getByQuery($query, $storage)->getOne();
         $storage->save($key, $bean);
     }
     return $bean;
 }
예제 #25
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'CreditNote')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['DocEntry']) && !empty($fields['DocEntry'])) {
         $criteria->add(CreditNote::DOCENTRY, $fields['DocEntry']);
     }
     if (isset($fields['DocNum']) && !empty($fields['DocNum'])) {
         $criteria->add(CreditNote::DOCNUM, $fields['DocNum']);
     }
     if (isset($fields['DocType']) && !empty($fields['DocType'])) {
         $criteria->add(CreditNote::DOCTYPE, $fields['DocType']);
     }
     if (isset($fields['Canceled']) && !empty($fields['Canceled'])) {
         $criteria->add(CreditNote::CANCELED, $fields['Canceled']);
     }
     if (isset($fields['DocStatus']) && !empty($fields['DocStatus'])) {
         $criteria->add(CreditNote::DOCSTATUS, $fields['DocStatus']);
     }
     if (isset($fields['DocDate']) && !empty($fields['DocDate'])) {
         $criteria->add(CreditNote::DOCDATE, $fields['DocDate']);
     }
     if (isset($fields['DocDueDate']) && !empty($fields['DocDueDate'])) {
         $criteria->add(CreditNote::DOCDUEDATE, $fields['DocDueDate']);
     }
     if (isset($fields['CardCode']) && !empty($fields['CardCode'])) {
         $criteria->add(CreditNote::CARDCODE, $fields['CardCode']);
     }
     if (isset($fields['CardName']) && !empty($fields['CardName'])) {
         $criteria->add(CreditNote::CARDNAME, $fields['CardName']);
     }
     if (isset($fields['NumAtCard']) && !empty($fields['NumAtCard'])) {
         $criteria->add(CreditNote::NUMATCARD, $fields['NumAtCard']);
     }
     if (isset($fields['VatPercent']) && !empty($fields['VatPercent'])) {
         $criteria->add(CreditNote::VATPERCENT, $fields['VatPercent']);
     }
     if (isset($fields['VatSum']) && !empty($fields['VatSum'])) {
         $criteria->add(CreditNote::VATSUM, $fields['VatSum']);
     }
     if (isset($fields['VarSumFC']) && !empty($fields['VarSumFC'])) {
         $criteria->add(CreditNote::VARSUMFC, $fields['VarSumFC']);
     }
     if (isset($fields['DiscPrcnt']) && !empty($fields['DiscPrcnt'])) {
         $criteria->add(CreditNote::DISCPRCNT, $fields['DiscPrcnt']);
     }
     if (isset($fields['DiscSum']) && !empty($fields['DiscSum'])) {
         $criteria->add(CreditNote::DISCSUM, $fields['DiscSum']);
     }
     if (isset($fields['DiscSumFC']) && !empty($fields['DiscSumFC'])) {
         $criteria->add(CreditNote::DISCSUMFC, $fields['DiscSumFC']);
     }
     if (isset($fields['DocCur']) && !empty($fields['DocCur'])) {
         $criteria->add(CreditNote::DOCCUR, $fields['DocCur']);
     }
     if (isset($fields['DocRate']) && !empty($fields['DocRate'])) {
         $criteria->add(CreditNote::DOCRATE, $fields['DocRate']);
     }
     if (isset($fields['DocTotal']) && !empty($fields['DocTotal'])) {
         $criteria->add(CreditNote::DOCTOTAL, $fields['DocTotal']);
     }
     if (isset($fields['DocTotalFC']) && !empty($fields['DocTotalFC'])) {
         $criteria->add(CreditNote::DOCTOTALFC, $fields['DocTotalFC']);
     }
     if (isset($fields['PaidToDate']) && !empty($fields['PaidToDate'])) {
         $criteria->add(CreditNote::PAIDTODATE, $fields['PaidToDate']);
     }
     if (isset($fields['PaidFC']) && !empty($fields['PaidFC'])) {
         $criteria->add(CreditNote::PAIDFC, $fields['PaidFC']);
     }
     if (isset($fields['Ref1']) && !empty($fields['Ref1'])) {
         $criteria->add(CreditNote::REF1, $fields['Ref1']);
     }
     if (isset($fields['Ref2']) && !empty($fields['Ref2'])) {
         $criteria->add(CreditNote::REF2, $fields['Ref2']);
     }
     if (isset($fields['JrnlMemo']) && !empty($fields['JrnlMemo'])) {
         $criteria->add(CreditNote::JRNLMEMO, $fields['JrnlMemo']);
     }
     if (isset($fields['TransId']) && !empty($fields['TransId'])) {
         $criteria->add(CreditNote::TRANSID, $fields['TransId']);
     }
     if (isset($fields['GroupNum']) && !empty($fields['GroupNum'])) {
         $criteria->add(CreditNote::GROUPNUM, $fields['GroupNum']);
     }
     $criteria->endPrefix();
 }
예제 #26
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'LandedCost')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['DocEntry']) && !empty($fields['DocEntry'])) {
         $criteria->add(LandedCost::DOCENTRY, $fields['DocEntry']);
     }
     if (isset($fields['CardCode']) && !empty($fields['CardCode'])) {
         $criteria->add(LandedCost::CARDCODE, $fields['CardCode']);
     }
     if (isset($fields['SuppName']) && !empty($fields['SuppName'])) {
         $criteria->add(LandedCost::SUPPNAME, $fields['SuppName']);
     }
     if (isset($fields['DocStatus']) && !empty($fields['DocStatus'])) {
         $criteria->add(LandedCost::DOCSTATUS, $fields['DocStatus']);
     }
     if (isset($fields['Descr']) && !empty($fields['Descr'])) {
         $criteria->add(LandedCost::DESCR, $fields['Descr']);
     }
     if (isset($fields['BeforeVat']) && !empty($fields['BeforeVat'])) {
         $criteria->add(LandedCost::BEFOREVAT, $fields['BeforeVat']);
     }
     if (isset($fields['DocTotal']) && !empty($fields['DocTotal'])) {
         $criteria->add(LandedCost::DOCTOTAL, $fields['DocTotal']);
     }
     if (isset($fields['CreateDate']) && !empty($fields['CreateDate'])) {
         $criteria->add(LandedCost::CREATEDATE, $fields['CreateDate']);
     }
     $criteria->endPrefix();
 }
예제 #27
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'SapAddress')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['Cardcode']) && !empty($fields['Cardcode'])) {
         $criteria->add(SapAddress::CARDCODE, $fields['Cardcode']);
     }
     if (isset($fields['Address']) && !empty($fields['Address'])) {
         $criteria->add(SapAddress::ADDRESS, $fields['Address']);
     }
     if (isset($fields['Street']) && !empty($fields['Street'])) {
         $criteria->add(SapAddress::STREET, $fields['Street']);
     }
     if (isset($fields['StreetNo']) && !empty($fields['StreetNo'])) {
         $criteria->add(SapAddress::STREETNO, $fields['StreetNo']);
     }
     if (isset($fields['Building']) && !empty($fields['Building'])) {
         $criteria->add(SapAddress::BUILDING, $fields['Building']);
     }
     if (isset($fields['Block']) && !empty($fields['Block'])) {
         $criteria->add(SapAddress::BLOCK, $fields['Block']);
     }
     if (isset($fields['County']) && !empty($fields['County'])) {
         $criteria->add(SapAddress::COUNTY, $fields['County']);
     }
     if (isset($fields['State']) && !empty($fields['State'])) {
         $criteria->add(SapAddress::STATE, $fields['State']);
     }
     if (isset($fields['Country']) && !empty($fields['Country'])) {
         $criteria->add(SapAddress::COUNTRY, $fields['Country']);
     }
     $criteria->endPrefix();
 }
예제 #28
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'PurchaseOrderReceived')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_purchase_orders_received']) && !empty($fields['id_purchase_orders_received'])) {
         $criteria->add(PurchaseOrderReceived::ID_PURCHASE_ORDERS_RECEIVED, $fields['id_purchase_orders_received']);
     }
     if (isset($fields['id_purchase_order']) && !empty($fields['id_purchase_order'])) {
         $criteria->add(PurchaseOrderReceived::ID_PURCHASE_ORDER, $fields['id_purchase_order']);
     }
     if (isset($fields['cartons']) && !empty($fields['cartons'])) {
         $criteria->add(PurchaseOrderReceived::CARTONS, $fields['cartons']);
     }
     if (isset($fields['carton_parts']) && !empty($fields['carton_parts'])) {
         $criteria->add(PurchaseOrderReceived::CARTON_PARTS, $fields['carton_parts']);
     }
     if (isset($fields['loose_pieces']) && !empty($fields['loose_pieces'])) {
         $criteria->add(PurchaseOrderReceived::LOOSE_PIECES, $fields['loose_pieces']);
     }
     if (isset($fields['total']) && !empty($fields['total'])) {
         $criteria->add(PurchaseOrderReceived::TOTAL, $fields['total']);
     }
     if (isset($fields['invoice_total']) && !empty($fields['invoice_total'])) {
         $criteria->add(PurchaseOrderReceived::INVOICE_TOTAL, $fields['invoice_total']);
     }
     if (isset($fields['diference']) && !empty($fields['diference'])) {
         $criteria->add(PurchaseOrderReceived::DIFERENCE, $fields['diference']);
     }
     if (isset($fields['quantity_by_warehouse']) && !empty($fields['quantity_by_warehouse'])) {
         $criteria->add(PurchaseOrderReceived::QUANTITY_BY_WAREHOUSE, $fields['quantity_by_warehouse']);
     }
     if (isset($fields['document_number']) && !empty($fields['document_number'])) {
         $criteria->add(PurchaseOrderReceived::DOCUMENT_NUMBER, $fields['document_number']);
     }
     $criteria->endPrefix();
 }
예제 #29
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'SampleShipment')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['id_sample_shipment']) && !empty($fields['id_sample_shipment'])) {
         $criteria->add(SampleShipment::ID_SAMPLE_SHIPMENT, $fields['id_sample_shipment']);
     }
     if (isset($fields['guide']) && !empty($fields['guide'])) {
         $criteria->add(SampleShipment::GUIDE, $fields['guide']);
     }
     if (isset($fields['courier']) && !empty($fields['courier'])) {
         $criteria->add(SampleShipment::COURIER, $fields['courier']);
     }
     if (isset($fields['shipment_date']) && !empty($fields['shipment_date'])) {
         $criteria->add(SampleShipment::SHIPMENT_DATE, $fields['shipment_date']);
     }
     if (isset($fields['note']) && !empty($fields['note'])) {
         $criteria->add(SampleShipment::NOTE, $fields['note']);
     }
     $criteria->endPrefix();
 }
예제 #30
0
 /**
  * build fromArray
  * @param Query $query
  * @param array $fields
  * @param string $prefix
  */
 public static function build(Query $query, $fields, $prefix = 'OARG')
 {
     $criteria = $query->where();
     $criteria->prefix($prefix);
     if (isset($fields['CstGrpCode']) && !empty($fields['CstGrpCode'])) {
         $criteria->add(SapTaxCode::CSTGRPCODE, $fields['CstGrpCode']);
     }
     if (isset($fields['CstGrpName']) && !empty($fields['CstGrpName'])) {
         $criteria->add(SapTaxCode::CSTGRPNAME, $fields['CstGrpName']);
     }
     if (isset($fields['TotalTax']) && !empty($fields['TotalTax'])) {
         $criteria->add(SapTaxCode::TOTALTAX, $fields['TotalTax']);
     }
     $criteria->endPrefix();
 }