"ecmstockdocins", 'comment' => 'EcmStockDocIns', 'duplicate_merge' => true, 'unified_search' => true, //FIELDS SECTION 'fields' => array ( //STANDARD FIELDS SECTION 'id' => array ( 'name' => 'id', 'vname' => 'LBL_ID', 'type' => 'id', 'required' => true, 'reportable' => false, 'comment' => 'Unique identifier' ), 'name' => array ( 'name' => 'name', 'vname' => 'LBL_NAME', 'type' => 'name', //'required' => true, 'dbType' => 'varchar', 'len' => 255, 'unified_search' => true, 'comment' => 'The short description of the record contents', 'massupdate' => true, 'merge_filter' => 'selected', ), 'description' => array ( 'type' => 'text', 'name' => 'description', 'vname' => 'LBL_DESCRIPTION', 'comment' => 'Description', //'required' => true, ), 'date_entered' => array ( 'name' => 'date_entered', 'vname' => 'LBL_DATE_ENTERED', 'type' => 'datetime', 'required' => true, 'comment' => 'Date record created' ), 'date_modified' => array ( 'name' => 'date_modified', 'vname' => 'LBL_DATE_MODIFIED', 'type' => 'datetime', 'required' => true, 'comment' => 'Date record last modified' ), 'modified_user_id' => array ( 'name' => 'modified_user_id', 'rname' => 'user_name', 'id_name' => 'modified_user_id', 'vname' => 'LBL_MODIFIED', 'type' => 'assigned_user_name', 'table' => 'modified_user_id_users', 'isnull' => 'false', 'dbType' => 'varchar', 'len' => 36, 'required' => true, 'reportable' => true, 'comment' => 'User who last modified record' ), 'assigned_user_id' => array ( 'name' => 'assigned_user_id', 'rname' => 'user_name', 'id_name' => 'assigned_user_id', 'vname' => 'LBL_ASSIGNED_TO_ID', 'group' => 'assigned_user_name', 'type' => 'relate', 'table' => 'users', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'comment' => 'User ID assigned to record', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'assigned_user_name' => array ( 'name' => 'assigned_user_name', 'vname' => 'LBL_ASSIGNED_TO', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'users', 'id_name' => 'assigned_user_id', 'module' => 'Users', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'created_by' => array ( 'name' => 'created_by', 'rname' => 'user_name', 'id_name' => 'created_by', 'vname' => 'LBL_CREATED', 'type' => 'assigned_user_name', 'table' => 'created_by_users', 'isnull' => 'false', 'dbType' => 'varchar', 'len' => 36, 'comment' => 'User that created the record' ), 'created_by_link' => array ( 'name' => 'created_by_link', 'type' => 'link', 'relationship' => 'ecmstockdocins'.'_created_by', 'vname' => 'LBL_CREATED_BY_USER', 'link_type' => 'one', 'module' => 'Users', 'bean_name' => 'User', 'source' => 'non-db', ), 'modified_user_link' => array ( 'name' => 'modified_user_link', 'type' => 'link', 'relationship' => 'ecmstockdocins'.'_modified_user', 'vname' => 'LBL_MODIFIED_BY_USER', 'link_type' => 'one', 'module' => 'Users', 'bean_name' => 'User', 'source' => 'non-db', ), 'assigned_user_link' => array ( 'name' => 'assigned_user_link', 'type' => 'link', 'relationship' => 'ecmstockdocins'.'_assigned_user', 'vname' => 'LBL_ASSIGNED_TO_USER', 'link_type' => 'one', 'module' => 'Users', 'bean_name' => 'User', 'source' => 'non-db', 'duplicate_merge' => 'enabled', 'rname' => 'user_name', 'id_name' => 'assigned_user_id', 'table' => 'users', ), 'deleted' => array ( 'name' => 'deleted', 'vname' => 'LBL_DELETED_BY', 'type' => 'bool', 'required' => true, 'reportable' => false, 'comment' => 'Record deletion indicator' ), //NEW FIELDS SECTION 'number' => array( 'name' => 'number', 'vname' => 'LBL_NUMBER', 'type' => 'varchar', 'required_option' => true, 'unified_search' => true, 'required' => true, 'len' => '20', ), 'documents' => array ( 'name' => 'documents', 'type' => 'link', 'relationship' => 'ecmstockdocins_documents', 'source' => 'non-db', 'vname' => 'LBL_NOTES' ), 'document_no' => array( 'name' => 'document_no', 'vname' => 'LBL_DOCUMENT_NO', 'type' => 'varchar', 'required_option' => true, 'unified_search' => true, 'required' => true, 'len' => '30', ), 'parent_id' => array ( 'name' => 'parent_id', 'rname' => 'name', 'id_name' => 'parent_id', 'vname' => 'LBL_PARENT_ID', 'group' => 'parent_name', 'type' => 'relate', 'table' => 'accounts', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'parent_name' => array ( 'name' => 'parent_name', 'vname' => 'LBL_PARENT_NAME', 'type' => 'relate', 'reportable' => false, 'required' => true, 'source' => 'non-db', 'table' => 'accounts', 'id_name' => 'parent_id', 'module' => 'Accounts', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'type' => array ( 'name' => 'type', 'vname' => 'LBL_TYPE', 'required' => true, 'type' => 'enum', 'options' => 'ecmstockdocins_type_dom', 'massupdate' => false, ), 'kind' => array ( 'name' => 'kind', 'vname' => 'LBL_KIND', 'required' => false, 'type' => 'enum', 'options' => 'ecmstockdocins_kind_dom', 'massupdate' => false, ), 'status' => array ( 'name' => 'status', 'vname' => 'LBL_STATUS', 'type' => 'enum', 'size' => '3', 'options' => 'ecmstockdocins_status_dom', 'massupdate' => false, ), 'register_date' => array ( 'name' => 'register_date', 'vname' => 'LBL_REGISTER_DATE', 'type' => 'date', 'reportable' => false, 'showFormats' => true, 'massupdate' => false, 'required' => true, ), 'validtill_date' => array ( 'name' => 'validtill_date', 'vname' => 'LBL_VALIDTILL_DATE', 'type' => 'date', 'reportable' => false, 'showFormats' => true, 'massupdate' => false, 'required' => false, ), 'parent_name_copy' => array( 'name' => 'parent_name_copy', 'vname' => 'LBL_PARENT_NAME_COPY', 'type' => 'varchar', 'source' => 'non-db', ), 'ecmproduct_id' => array( 'name' => 'ecmproduct_id', 'vname' => 'produkt', 'type' => 'varchar', 'source' => 'non-db', ), 'parent_contact_name' => array ( 'name' => 'parent_contact_name', 'vname' => 'LBL_PARENT_CONTACT_NAME', 'type' => 'varchar', 'len' => '255', 'merge_filter' => 'enabled', ), 'parent_contact_title' => array ( 'name' => 'parent_contact_title', 'vname' => 'LBL_PARENT_CONTACT_TITLE', 'type' => 'varchar', 'len' => '255', 'merge_filter' => 'enabled', ), 'parent_address_street' => array ( 'name' => 'parent_address_street', 'vname' => 'LBL_PARENT_ADDRESS_STREET', 'type' => 'varchar', 'len' => '150', 'comment' => 'The street address used for parent address', 'group' => 'parent_address', 'merge_filter' => 'enabled', ), 'parent_address_city' => array ( 'name' => 'parent_address_city', 'vname' => 'LBL_PARENT_ADDRESS_CITY', 'type' => 'varchar', 'len' => '100', 'comment' => 'The city used for parent address', 'group' => 'parent_address', 'merge_filter' => 'enabled', ), 'parent_address_postalcode' => array ( 'name' => 'parent_address_postalcode', 'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE', 'type' => 'varchar', 'len' => '20', 'group' => 'parent_address', 'comment' => 'The postal code used for parent address', 'merge_filter' => 'enabled', ), 'parent_address_country' => array ( 'name' => 'parent_address_country', 'vname' => 'LBL_PARENT_ADDRESS_COUNTRY', 'type' => 'varchar', 'group' => 'parent_address', 'comment' => 'The country used for the parent address', 'merge_filter' => 'enabled', ), 'subtotal' => array ( 'name' => 'subtotal', 'vname' => 'LBL_SUBTOTAL', 'type' => 'decimal', 'len' => '15,2', 'required' => true, ), 'total' => array ( 'name' => 'total', 'vname' => 'LBL_TOTAL', 'type' => 'decimal', 'len' => '15,2', 'required' => true, ), 'discount' => array ( 'name' => 'discount', 'vname' => 'LBL_DISCOUNT', 'type' => 'decimal', 'len' => '15,2', 'default' => 0, ), 'to_vatid' => array ( 'name' => 'to_vatid', 'vname' => 'LBL_TO_VATID', 'type' => 'varchar', 'len' => 15, 'comment' => 'VAT-ID', ), 'ecmlanguage' => array( 'name' => 'ecmlanguage', 'vname' => 'LBL_ECMLANGUAGE', 'type' => 'enum', 'options' => 'ecmlanguages_dom', 'required' => true, 'len' => 35, 'massupdate' => false, ), 'to_is_vat_free' => array ( 'massupdate' => false, 'name' => 'to_is_vat_free', 'vname' => 'LBL_TO_IS_VAT_FREE', 'type' => 'bool', 'default' => '0', 'comment' => 'Is vat free?', ), 'header_text' => array( 'name' => 'header_text', 'vname' => 'LBL_HEADER_TEXT', 'type' => 'text', ), 'footer_text' => array( 'name' => 'footer_text', 'vname' => 'LBL_FOOTER_TEXT', 'type' => 'text', ), 'ads_text' => array( 'name' => 'ads_text', 'vname' => 'LBL_ADS_TEXT', 'type' => 'text', ), 'template_id' => array ( 'name' => 'template_id', 'vname' => 'LBL_TEMPLATE_ID', 'type' => 'id', 'required_option' => true, 'required' => true, ), 'template_name' => array ( 'name' => 'template_name', 'vname' => 'LBL_TEMPLATE_NAME', 'type' => 'varchar', 'len' => '100', 'required_option' => true, 'unified_search' => true, 'required' => true, ), 'contact_id' => array ( 'name' => 'contact_id', 'rname' => 'name', 'id_name' => 'contact_id', 'vname' => 'LBL_CONTACT_ID', 'group' => 'contact_name', 'type' => 'relate', 'table' => 'contacts', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => false, 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'contact_name' => array ( 'name' => 'contact_name', 'vname' => 'LBL_CONTACT_NAME', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'contacts', 'id_name' => 'contact_id', 'module' => 'Contacts', 'duplicate_merge' => 'disabled', 'massupdate' => false, 'other_data' => array( 'from_relation' => array( 'module' => 'Accounts', 'rel_name' => 'contacts', 'rel_bean_name' => 'Contact', 'field_id_name' => 'parent_id', 'field_name' => 'parent_name', 'field_id_value' => '' ) ), 'initial_filter_fields' => array('account_name'=>'parent_name'), ), 'accepted' => array ( 'massupdate' => false, 'name' => 'accepted', 'vname' => 'LBL_ACCEPTED', 'type' => 'bool', 'default' => '0', ), 'email_id' => array ( 'name' => 'email_id', 'type' => 'id', 'reportable'=>false, ), 'order_origin' => array( 'name' => 'order_origin', 'vname' => 'LBL_ORDER_ORIGIN', 'type' => 'enum', 'options' => 'ecmstockdocins_order_origin_dom', 'required' => false, 'len' => 35, 'massupdate' => false, ), 'ecmpaymentcondition_id' => array ( 'name' => 'ecmpaymentcondition_id', 'rname' => 'name', 'id_name' => 'ecmpaymentcondition_id', 'vname' => 'LBL_PAYMENTCONDITION_ID', 'group' => 'ecmpaymentcondition_name', 'type' => 'relate', 'table' => 'ecmpaymentconditions', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'ecmpaymentcondition_name' => array ( 'name' => 'ecmpaymentcondition_name', 'vname' => 'LBL_PAYMENTCONDITION_NAME', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'ecmpaymentcondition', 'id_name' => 'ecmpaymentcondition_id', 'module' => 'EcmPaymentConditions', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'ecmpaymentcondition_text' => array ( 'name' => 'ecmpaymentcondition_text', 'vname' => 'LBL_PAYMENTCONDITION_TEXT', 'type' => 'text', 'reportable' => false, 'module' => 'EcmPaymentConditions', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'ecmdeliverycondition_id' => array ( 'name' => 'ecmdeliverycondition_id', 'rname' => 'name', 'id_name' => 'ecmdeliverycondition_id', 'vname' => 'LBL_DELIVERYCONDITION_ID', 'group' => 'ecmdeliverycondition_name', 'type' => 'relate', 'table' => 'ecmdeliveryconditions', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'ecmdeliverycondition_name' => array ( 'name' => 'ecmdeliverycondition_name', 'vname' => 'LBL_DELIVERYCONDITION_NAME', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'ecmdeliverycondition', 'id_name' => 'ecmdeliverycondition_id', 'module' => 'EcmDeliveryConditions', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'ecmdeliverycondition_text' => array ( 'name' => 'ecmdeliverycondition_text', 'vname' => 'LBL_DELIVERYCONDITION_TEXT', 'type' => 'text', 'reportable' => false, 'module' => 'EcmDeliveryConditions', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'show_images_on_offers' => array ( 'name' => 'show_images_on_offers', 'vname' => 'LBL_SHOW_IMAGES_ON_OFFERS', 'type' => 'bool', 'massupdate' => false, ), //FIELDS ADDED BY MICHAL MEYZA 'stock_id' => array ( 'name' => 'stock_id', 'rname' => 'name', 'id_name' => 'stock_id', 'vname' => 'LBL_STOCK_ID', 'group' => 'stock_name', 'type' => 'relate', 'table' => 'ecmstocks', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false, 'required' => true, 'required_option' => true, ), 'stock_name' => array ( 'name' => 'stock_name', 'vname' => 'LBL_STOCK_NAME', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'ecmstocks', 'id_name' => 'stock_id', 'module' => 'EcmStocks', 'duplicate_merge' => 'disabled', 'massupdate' => false, 'required_option' => true, 'required' => true, ), 'po_id' => array ( 'name' => 'po_id', 'type' => 'id', 'reportable'=>false, ), 'show_images_on_offers' => array ( 'name' => 'show_images_on_offers', 'vname' => 'LBL_SHOW_IMAGES_ON_OFFERS', 'type' => 'bool', 'massupdate' => false, ), 'to_informations' => array( 'name' => 'to_informations', 'vname' => 'LBL_TO_INFORMATIONS', 'type' => 'text', 'source' => 'non-db', ), 'items_list_panel' => array( 'name' => 'items_list_panel', 'vname' => 'LBL_ITEMS', 'type' => 'text', 'source' => 'non-db', ), 'preview_panel' => array( 'name' => 'preview_panel', 'vname' => 'LBL_PREVIEW', 'type' => 'text', 'source' => 'non-db', ), 'email_panel' => array( 'name' => 'email_panel', 'vname' => 'LBL_EMAILS', 'type' => 'text', 'source' => 'non-db', ), 'pdflanguages' => array( 'name' => 'pdflanguages', 'vname' => 'LBL_PDFLANGUAGES', 'type' => 'text', ), 'correct_id' => array ( 'name' => 'correct_id', 'rname' => 'name', 'id_name' => 'correct_id', 'vname' => 'LBL_CORRECT_ID', 'group' => 'correct_name', 'type' => 'relate', 'table' => 'ecmstockdocinsideins', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'correct_name' => array ( 'name' => 'correct_name', 'vname' => 'LBL_CORRECT_NAME', 'type' => 'relate', 'reportable' => false, 'required' => true, 'source' => 'non-db', 'table' => 'ecmstockdocinsideins', 'id_name' => 'correct_id', 'module' => 'EcmStockDocInsideIns', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), 'foreign_transport_val' => array ( 'name' => 'foreign_transport_val', 'vname' => 'LBL_FOREIGN_TRANSPORT_VAL', 'type' => 'decimal', 'len' => '15,2', ), 'foreign_transport_cur_id' => array ( 'name' => 'foreign_transport_cur_id', 'vname' => 'LBL_FOREIGN_TRANSPORT_CUR_ID', 'type' => 'varchar', 'len' => '36', ), 'foreign_transport_cur_val' => array ( 'name' => 'foreign_transport_cur_val', 'vname' => 'LBL_FOREIGN_TRANSPORT_CUR_VAL', 'type' => 'decimal', 'len' => '15,2', ), 'country_transport_val' => array ( 'name' => 'country_transport_val', 'vname' => 'LBL_COUNTRY_TRANSPORT_VAL', 'type' => 'decimal', 'len' => '15,2', ), 'country_transport_cur_id' => array ( 'name' => 'country_transport_cur_id', 'vname' => 'LBL_COUNTRY_TRANSPORT_CUR_ID', 'type' => 'varchar', 'len' => '36', ), 'country_transport_cur_val' => array ( 'name' => 'country_transport_cur_val', 'vname' => 'LBL_COUNTRY_TRANSPORT_CUR_VAL', 'type' => 'decimal', 'len' => '15,2', ), 'addition_cost_val' => array ( 'name' => 'addition_cost_val', 'vname' => 'LBL_ADDITION_TRANSPORT_VAL', 'type' => 'decimal', 'len' => '15,2', ), 'addition_cost_cur_id' => array ( 'name' => 'addition_cost_cur_id', 'vname' => 'LBL_ADDITION_TRANSPORT_CUR_ID', 'type' => 'varchar', 'len' => '36', ), 'addition_cost_cur_val' => array ( 'name' => 'addition_cost_cur_val', 'vname' => 'LBL_ADDITION_TRANSPORT_CUR_VAL', 'type' => 'decimal', 'len' => '15,2', ), //currency 'left_to_pay' => array ( 'name' => 'left_to_pay', 'vname' => 'LBL_LEFT_TO_PAY', 'type' => 'decimal', 'len' => '15,5', ), 'payment_date' => array ( 'name' => 'payment_date', 'vname' => 'LBL_PAYMENT_DATE', 'type' => 'datetime', 'required' => true, 'comment' => 'Date record created' ), 'data_fk' => array ( 'name' => 'data_fk', 'vname' => 'LBL_DATA_FK', 'type' => 'datetime', 'required' => true, 'comment' => 'Date record created' ), 'currency_id' => array ( 'name' => 'currency_id', 'type' => 'varchar', 'len' => '36', 'label' => 'LBL_CURRENCY', ), 'currency_value' => array ( 'name' => 'currency_value', 'vname' => 'LBL_CURRENCY_VALUE', 'type' => 'decimal', 'len' => '15,5', ), 'currency_sad_value' => array ( 'name' => 'currency_sad_value', 'vname' => 'LBL_CURRENCY_SAD_VALUE', 'type' => 'decimal', 'len' => '15,5', ), //FOR SUBPANELS 'account' => array ( 'name' => 'account', 'type' => 'link', 'relationship' => 'ecmstockdocins_account', 'source'=>'non-db', 'vname'=>'LBL_ACCOUNTS' ), 'contact' => array ( 'name' => 'contact', 'type' => 'link', 'relationship' => 'ecmstockdocins_contact', 'source'=>'non-db', 'vname'=>'LBL_CONTACTS' ), 'bugs' => array ( 'name' => 'bugs', 'type' => 'link', 'relationship' => 'ecmstockdocins_bug', 'source'=>'non-db', 'vname'=>'LBL_BUGS' ), 'notes' => array ( 'name' => 'notes', 'type' => 'link', 'relationship' => 'ecmstockdocins_notes', 'source'=>'non-db', 'vname'=>'LBL_NOTES' ), 'emails' => array ( 'name' => 'emails', 'type' => 'link', 'relationship' => 'ecmstockdocins_emails', 'source'=>'non-db', 'vname'=>'LBL_EMAILS' ), 'tasks' => array ( 'name' => 'tasks', 'type' => 'link', 'relationship' => 'ecmstockdocins_task', 'source'=>'non-db', 'vname'=>'LBL_TASKS' ), //FOR SUBPANELS ADDED BY MICHAL MEYZA 'ecmpurchaseorders' => array ( 'name' => 'ecmpurchaseorders', 'type' => 'link', 'relationship' => 'ecmstockdocins_ecmpurchaseorders', 'source'=>'non-db', 'vname'=>'LBL_ECMPURCHASEORDERS', ),/* 'ecmstockins' => array ( 'name' => 'ecmstockins', 'type' => 'link', 'relationship' => 'ecmstockins_ecmstockdocins', 'source'=>'non-db', 'vname'=>'LBL_ECMSTOCKINS', ),*/ 'ecmsales' => array ( 'name' => 'ecmsales', 'type' => 'link', 'relationship' => 'ecmsales_ecmstockdocins', 'source'=>'non-db', 'vname'=>'LBL_ECMSALES', ), 'ecmstockdocouts' => array ( 'name' => 'ecmstockdocouts', 'type' => 'link', 'relationship' => 'ecmstockdocouts_ecmstockdocins', 'source'=>'non-db', 'vname'=>'LBL_ECMSTOCKDOCOUTS', ), 'ecminvoiceouts' => array ( 'name' => 'ecminvoiceouts', 'type' => 'link', 'relationship' => 'ecminvoiceouts_ecmstockdocins', 'source'=>'non-db', 'vname'=>'LBL_ECMINVOICEOUTS', ), 'ecmdeliverynotes' => array ( 'name' => 'ecmdeliverynotes', 'type' => 'link', 'relationship' => 'ecmdeliverynotes_ecmstockdocins', 'source'=>'non-db', 'vname'=>'LBL_ECMDELIVERYNOTES', ), 'ecmstockdocins' => array ( 'name' => 'ecmstockdocins', 'type' => 'link', 'relationship' => 'ecmstockdocins_ecmstockdocins', 'source'=>'non-db', 'vname'=>'LBL_ECMSTOCKDOCINS', ), ), //INDICES SECTION 'indices' => array ( array('name' => 'ecmstockdocins'.'pk', 'type' => 'primary', 'fields' => array('id')), array('name' => 'idx_'.'ecmstockdocins'.'_name', 'type' => 'index', 'fields' => array('name')) ), //RELATIONSHIPS SECTION 'relationships' => array ( 'ecmstockdocins'.'_assigned_user' => array ( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocIns', 'rhs_table' => 'ecmstockdocins', 'rhs_key' => 'assigned_user_id', 'relationship_type' => 'one-to-many' ), 'ecmstockdocins'.'_modified_user' => array ( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocIns', 'rhs_table' => 'ecmstockdocins', 'rhs_key' => 'modified_user_id', 'relationship_type' => 'one-to-many' ), 'ecmstockdocins'.'_created_by' => array ( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocIns', 'rhs_table' => 'ecmstockdocins', 'rhs_key' => 'created_by', 'relationship_type' => 'one-to-many' ), 'ecmstockdocins'.'_account' => array ( 'lhs_module' => 'Accounts', 'lhs_table' => 'accounts', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocIns', 'rhs_table' => 'ecmstockdocins', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many' ), 'ecmstockdocins'.'_contact' => array ( 'lhs_module' => 'Contacts', 'lhs_table' => 'contacts', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocIns', 'rhs_table' => 'ecmstockdocins', 'rhs_key' => 'contact_id', 'relationship_type' => 'one-to-many' ), 'ecmstockdocins'.'_project' => array ( 'lhs_module' => 'Project', 'lhs_table' => 'project', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocIns', 'rhs_table' => 'ecmstockdocins', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many' ), 'ecmstockdocins'.'_bug' => array ( 'lhs_module' => 'Bugs', 'lhs_table' => 'bugs', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocIns', 'rhs_table' => 'ecmstockdocins', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many' ), 'ecmstockdocins'.'_case' => array ( 'lhs_module' => 'Cases', 'lhs_table' => 'cases', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocIns', 'rhs_table' => 'ecmstockdocins', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many' ), 'ecmstockdocins_notes' => array ( 'lhs_module' => 'EcmStockDocIns', 'lhs_table' => 'ecmstockdocins', 'lhs_key' => 'id', 'rhs_module' => 'Notes', 'rhs_table' => 'notes', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many', 'relationship_role_column' => 'parent_type', 'relationship_role_column_value' => 'EcmStockDocIns' ), 'ecmstockdocins'.'_task' => array ( 'lhs_module' => 'Tasks', 'lhs_table' => 'tasks', 'lhs_key' => 'id', 'rhs_module' => 'EcmStockDocIns', 'rhs_table' => 'ecmstockdocins', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many' ), 'ecmstockdocins_documents' => array ( 'lhs_module' => 'EcmStockDocIns', 'lhs_table' => 'ecmstockdocins', 'lhs_key' => 'id', 'rhs_module' => 'Documents', 'rhs_table' => 'documents', 'rhs_key' => 'parent_id', 'relationship_type' => 'many-to-many', 'join_table' => 'documents_accounts', 'join_key_lhs' => 'parent_id', 'join_key_rhs' => 'document_id', ), 'ecmstockdocins_ecmpurchaseorders' => array( 'lhs_module'=> 'EcmPurchaseOrders', 'lhs_table'=> 'ecmpurchaseorders', 'lhs_key' => 'id', 'rhs_module'=> 'EcmStockDocIns', 'rhs_table'=> 'ecmstockdocins', 'rhs_key' => 'po_id', 'relationship_type'=>'one-to-many'), 'ecmstockdocins_ecmstockdocins' => array( 'lhs_module'=> 'EcmStockDocIns', 'lhs_table'=> 'ecmstockdocins', 'lhs_key' => 'id', 'rhs_module'=> 'EcmStockDocIns', 'rhs_table'=> 'ecmstockdocins', 'rhs_key' => 'correct_id', 'relationship_type'=>'one-to-many') /* ,'ecmstockins_ecmstockdocins' => array( 'lhs_module'=> 'EcmStockDocIns', 'lhs_table'=> 'ecmstockdocins', 'lhs_key' => 'id', 'rhs_module'=> 'EcmStockIns', 'rhs_table'=> 'ecmstockins', 'rhs_key' => 'pz_id', 'relationship_type'=>'one-to-many') */ ), //THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW 'optimistic_locking' => true, ); ?>