/** * build fromArray * @param Query $query * @param array $fields * @param string $prefix */ public static function build(Query $query, $fields, $prefix = 'FolioImportProgrammedPayment') { parent::build($query, $fields); $criteria = $query->where(); $criteria->prefix($prefix); if (isset($fields['id_folios_import_programmed_payment']) && !empty($fields['id_folios_import_programmed_payment'])) { $criteria->add(FolioImportProgrammedPayment::ID_FOLIOS_IMPORT_PROGRAMMED_PAYMENT, $fields['id_folios_import_programmed_payment']); } if (isset($fields['id_folio_import']) && !empty($fields['id_folio_import'])) { $criteria->add(FolioImportProgrammedPayment::ID_FOLIO_IMPORT, $fields['id_folio_import']); } if (isset($fields['id_programmed_payment']) && !empty($fields['id_programmed_payment'])) { $criteria->add(FolioImportProgrammedPayment::ID_PROGRAMMED_PAYMENT, $fields['id_programmed_payment']); } if (isset($fields['concept']) && !empty($fields['concept'])) { $criteria->add(FolioImportProgrammedPayment::CONCEPT, $fields['concept']); } if (isset($fields['doc_num']) && !empty($fields['doc_num'])) { $criteria->add(FolioImportProgrammedPayment::DOC_NUM, $fields['doc_num']); } if (isset($fields['doc_entry']) && !empty($fields['doc_entry'])) { $criteria->add(FolioImportProgrammedPayment::DOC_ENTRY, $fields['doc_entry']); } $criteria->endPrefix(); }
/** * build fromArray * @param Query $query * @param array $fields * @param string $prefix */ public static function build(Query $query, $fields, $prefix = 'PurchaseOrderProgrammedPayment') { parent::build($query, $fields); $criteria = $query->where(); $criteria->prefix($prefix); if (isset($fields['id_purchase_orders_programmed_payment']) && !empty($fields['id_purchase_orders_programmed_payment'])) { $criteria->add(PurchaseOrderProgrammedPayment::ID_PURCHASE_ORDERS_PROGRAMMED_PAYMENT, $fields['id_purchase_orders_programmed_payment']); } if (isset($fields['id_programmed_payment']) && !empty($fields['id_programmed_payment'])) { $criteria->add(PurchaseOrderProgrammedPayment::ID_PROGRAMMED_PAYMENT, $fields['id_programmed_payment']); } if (isset($fields['id_purchase_order']) && !empty($fields['id_purchase_order'])) { $criteria->add(PurchaseOrderProgrammedPayment::ID_PURCHASE_ORDER, $fields['id_purchase_order']); } if (isset($fields['id_purchase_order_entry']) && !empty($fields['id_purchase_order_entry'])) { $criteria->add(PurchaseOrderProgrammedPayment::ID_PURCHASE_ORDER_ENTRY, $fields['id_purchase_order_entry']); } if (isset($fields['id_proforma_invoice_payment_term']) && !empty($fields['id_proforma_invoice_payment_term'])) { $criteria->add(PurchaseOrderProgrammedPayment::ID_PROFORMA_INVOICE_PAYMENT_TERM, $fields['id_proforma_invoice_payment_term']); } if (isset($fields['line']) && !empty($fields['line'])) { $criteria->add(PurchaseOrderProgrammedPayment::LINE, $fields['line']); } if (isset($fields['pieces']) && !empty($fields['pieces'])) { $criteria->add(PurchaseOrderProgrammedPayment::PIECES, $fields['pieces']); } if (isset($fields['id_purchase_order_payment_term']) && !empty($fields['id_purchase_order_payment_term'])) { $criteria->add(PurchaseOrderProgrammedPayment::ID_PURCHASE_ORDER_PAYMENT_TERM, $fields['id_purchase_order_payment_term']); } $criteria->endPrefix(); }