<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: sf
    $Date: 2019-9-16 下午03:19:57
    $Revision: 1.0
    $Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true"
                       model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
        <a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
        <a:model-query fetchAll="true" model="gld.gld_exchangerate_type_lov" rootPath="exchangerate_type_path"/>
        <a:model-query fetchAll="true" model="csh.CSH511.fnd_financial_option" rootPath="fnd_financial_option_path"/>
        <a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type"
                       rootPath="default_exchange_rate_type_path"/>
    </a:init-procedure>
    <a:view>
        <a:link id="hn2050_upload_win_link" url="${/request/@context_path}/uploadFile.lview"/>
        <a:link id="csh_receipt_import_link"
                url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt_impiort.lview"/>
        <a:link id="csh_transaction_receipt_id"
                url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
        <a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate"
                modelaction="query"/>
        <a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
        <script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
        <a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
        <script type="text/javascript"><![CDATA[
        var transaction_id = '';

        //附件上传
        function upload_attachment_win() {
            var flag = true;
            if (transaction_id == '') {
                $L.showInfoMessage("提示", '请先保存数据', null, null);
                flag = false;
                return;
            }
            //防止并发
            if (flag) {
                var win = new Leaf.Window({
                    id: 'hn2050_upload_win',
                    url: $('hn2050_upload_win_link').getUrl(),
                    params: {
                        winid: 'hn2050_upload_win',
                        table_name: 'CSH_TRANSACTION',
                        header_id: transaction_id
                    },
                    width: 900,
                    hight: 400
                }).on('close', function () {
                    //record.ds.query();
                });
            }

        }

        <!--增加重置功能-->
        function csh511_receipt_reset() {
            $('csh_transaction_receipt_head_ds').reset();
        }

        function csh511_receipt_import_and_write_off() {
            new Leaf.Window({
                url: $('csh_receipt_import_link').getUrl(),
                params: {
                    action_type: 'TRANSACTION_AND_WRITE_OFF'
                },
                title: '收款导入并核销',
                id: 'csh_receipt_import_and_write_off_window',
                fullScreen: true
            });
        }

        function csh511_receipt_import() {
            new Leaf.Window({
                url: $('csh_receipt_import_link').getUrl(),
                params: {
                    action_type: 'TRANSACTION'
                },
                title: '收款导入',
                id: 'csh_receipt_import_window',
                fullScreen: true
            });
        }

        function csh511_receipt_save(flag) {
            $('csh511_receipt_save').disable();
            if ($('csh_transaction_receipt_head_ds').validate()) {
                var record = $('csh_transaction_receipt_head_ds').getAt(0);
                if (flag != 'Y') {
                    Leaf.Masker.mask(Ext.getBody(), '${l:HLS.SAVING}');
                }

                var saveData = [];
                record.set('receipt_type', 'MANUAL');
                if (flag == 'Y') {
                    record.set('posted_flag', 'Y');
                } else {
                    record.set('posted_flag', 'N');
                }
                record.set('_status', 'insert');
                saveData.push(record.data);
                Leaf.request({
                    url: '${/request/@context_path}/autocrud/csh.CSH511.csh_transaction_receipt_save/batch_update',
                    para: saveData,
                    success: function (res) {
                        //
                        transaction_id = res.result.transaction_id;

                        Leaf.SideBar.show({
                            msg: '${l:HLS.SUBMIT_SUCCESS}',
                            duration: 2000
                        });
                        // window.location.href = $('csh_transaction_receipt_id').getUrl();
                        $('csh511_receipt_save').enable();
                        Leaf.Masker.unmask(Ext.getBody());
                        $('csh_trx_receipt_id').close();
                    },
                    failure: function () {
                        $('csh511_receipt_save').enable();
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    error: function () {
                        $('csh511_receipt_save').enable();
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    scope: this
                });
            } else {
                $('csh511_receipt_save').enable();
            }
        }

        function csh511_receipt_posted() {
            if ($('csh_transaction_receipt_head_ds').validate()) {
                Leaf.Masker.mask(Ext.getBody(), '${l:CSH511.SAVE_AND_POST}');
                csh511_receipt_save('Y');
            }
        }

        function csh511_receipt_back() {
            history.go(-1);
        }

        function onUpdate_csh511_receipt(ds, record, name, value, oldvalue) {
            if (name == 'bp_id') {
                if (value != oldvalue) {
                    record.set('bp_bank_account_id', '');
                    record.set('bp_bank_account_code', '');
                    record.set('bp_bank_account_name', '');
                    record.set('bp_bank_account_num', '');
                    record.set('opposite_band_na', '');
                }
                record.getField('bp_bank_account_code').setLovPara('bp_id', value);
            } else if (name == 'currency_code') {
                if (value != oldvalue) {
                    record.set('exchange_rate', '');
                    record.set('exchange_rate_type', '');
                    record.set('rate_method_code', '');
                    record.set('exchange_rate_type_display', '');
                    record.set('exchange_rate_quotation', '');
                    if (oldvalue != null && oldvalue != '') {
                        //record.set('transaction_amount', '');
                        record.set('transaction_functional_amount', '');
                    }
                }
                if (value == record.get('functional_currency_code')) {
                    record.getField('exchange_rate_type_display').setRequired(false);
                    record.getField('exchange_rate_type').setReadOnly(true);
                    record.getField('exchange_rate_type_display').setReadOnly(true);
                    record.getField('exchange_rate').setReadOnly(true);
                    record.set('exchange_rate', 1);
                } else {
                    record.set('exchange_rate_type', '${/model/fnd_financial_option_path/record/@default_exchange_rate_type}');
                    record.set('rate_method_code', '${/model/fnd_financial_option_path/record/@rate_method_code}');
                    record.set('exchange_rate_type_display', '${/model/fnd_financial_option_path/record/@exchange_rate_type_display}');
                    // record.getField('exchange_rate_type_display').setRequired(true);
                    record.getField('exchange_rate_type_display').setReadOnly(false);
                }
            } else if (name == 'rate_method_code' || name == 'period_name') {
                if (record.get('currency_code') != record.get('functional_currency_code')) {
                    var rate_method_code = record.get('rate_method_code');
                    record.set('exchange_rate_quotation', '');
                    record.set('exchange_rate', '');
                    if (rate_method_code == 'PERIOD' || rate_method_code == 'DAILY' || rate_method_code == 'FIXED') {
                        record.getField('exchange_rate').setReadOnly(true);
                        record.set('exchange_rate', '');
                        getExchangeRate({
                            fromCur: record.get('functional_currency_code'),
                            toCur: record.get('currency_code'),
                            exchangeRateType: record.get('exchange_rate_type'),
                            exchangeDate: record.get('transaction_date'),
                            periodName: record.get('period_name')
                        });
                    } else {
                        record.set('exchange_rate_quotation', 'DIRECT QUOTATION');
                        record.getField('exchange_rate').setReadOnly(false);
                        record.set('exchange_rate', '');
                    }
                }
            } else if (name == 'exchange_rate') {
                if (record.get('exchange_rate') != null && record.get('exchange_rate') != '') {
                    setfunctionamount(record);
                } else {
                    record.set('transaction_functional_amount', '');
                }
            } else if (name == 'transaction_amount') {
                if (value === 0 && record.get('zero_amounts_allowed') == 'N') {
                    Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
                }
                if (record.get('currency_code') == record.get('functional_currency_code')) {
                    record.set('transaction_functional_amount', value);
                } else {
                    setfunctionamount(record);
                }
            } else if (name == 'transaction_date') {
                showPeriod(record);
            } else if (name == 'precision') {
                record.getField('transaction_amount').setPropertity('decimalprecision', value);
                record.getField('transaction_functional_amount').setPropertity('decimalprecision', value);
                if (record.get('transaction_amount') || record.get('transaction_amount') == 0) {
                    setfunctionamount(record);
                }
            } else if (name == 'bank_account_id') {
                if (record.get('zero_amounts_allowed') == 'N' && record.get('transaction_amount') === 0) {
                    Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
                }
            } else if (name == 'collection_classes') {
                if (value == 'DEPOSIT') {
                    record.set('paid_byother_flag', 'F');
                    record.set('paid_byother_flag_n', '否');
                    record.set('transaction_type', 'DEPOSIT');
                    record.set('deposit_flag', 'Y');
                    record.set('transaction_type', 'DEPOSIT');
                    record.getField('paid_byother_flag_n').setReadOnly(true);
                } else {
                    record.getField('paid_byother_flag_n').setReadOnly(false);
                    record.set('transaction_type', 'RECEIPT');
                }
            }
        }

        // function onAdd_csh511_receipt(ds, record) {
        // record.set('precision',2);
        // record.set('zero_amounts_allowed','N');
        // record.set('bank_account_id',1531);
        // record.set('bank_account_num','448165800609');
        // record.set('bank_account_name','德融国际融资租赁有限公司');
        // record.set('bank_account_code','0040101');
        // record.set('currency_code','CNY');
        // record.set('currency_name','人民币');
        // }


        function onAdd_csh511_receipt(ds, record) {
            record.set('precision', 2);
            record.set('zero_amounts_allowed', 'N');
            record.set('bank_account_id', 1531);
            // record.set('bank_account_num','448165800609');
            // record.set('bank_account_name','德融国际融资租赁有限公司');
            // record.set('bank_account_code','0040101');
            record.set('currency_code', 'CNY');
            record.set('currency_name', '人民币');
        }

        function setfunctionamount(record) {
            var quotation = record.get('exchange_rate_quotation');
            var a = record.get('transaction_amount');
            var b = record.get('exchange_rate');
            if (Ext.isDefined(a) && Ext.isDefined(b) && !Ext.isEmpty(a) && !Ext.isEmpty(b)) {
                if (quotation == 'DIRECT QUOTATION') {
                    record.set('transaction_functional_amount', parseFloat(mul(a, b).toFixed(record.get('precision'))));
                } else {
                    record.set('transaction_functional_amount', parseFloat(div(a, b).toFixed(record.get('precision'))));
                }
            }
        }

        function showPeriod(record) {
            var r_date = record.get('transaction_date');
            r_date = Leaf.formatDate(r_date);
            Leaf.request({
                url: $('get_period_name_id').getUrl(),
                para: {
                    p_date: r_date
                },
                success: periodname,
                scope: this
            });
        }

        function periodname(res) {
            var head_record = $('csh_transaction_receipt_head_ds').getAt(0);
            if (res) {
                var period_name = res.result.record.period_name,
                    internal_period_num = res.result.record.internal_period_num;
                if (period_name) {
                    head_record.set('period_name', period_name);
                    head_record.set('internal_period_num', internal_period_num);
                } else {
                    head_record.set('period_name', '');
                    head_record.set('internal_period_num', '');
                    if (head_record.get('transaction_date')) {
                        head_record.set('transaction_date', '');
                        Leaf.showMessage('${l:PROMPT}', '${l:CSH511.PERIOD_ERROR}');
                    }
                }
            }
        }

        function getExchangeRate(param) {
            Leaf.request({
                url: $('get_exchange_rate_link_id').getUrl(),
                para: {
                    from_currency: param.fromCur,
                    to_currency: param.toCur,
                    exchange_date: param.exchangeDate,
                    exchange_period_name: param.periodName,
                    exchange_rate_type: param.exchangeRateType
                },
                success: setRateAndQuotation,
                scope: this
            });
        }

        function setRateAndQuotation(res) {
            var record = $('csh_transaction_receipt_head_ds').getAt(0);
            if (Ext.isDefined(res.result.record.exchange_rate_quotation)) {
                record.set('exchange_rate_quotation', res.result.record.exchange_rate_quotation);
            } else {
                record.set('exchange_rate_quotation', 'DIRECT QUOTATION');
            }
            if (Ext.isDefined(res.result.record.exchange_rate)) {
                record.set('exchange_rate', res.result.record.exchange_rate);
            }
        }

        function attachment_upload() {
            if (transaction_id) {
                //
                // ds = $('csh_transaction_receipt_head_ds');
                // record = ds.getCurrentRecord();
                // var header_id = record.get('transaction_id');
                var header_id = transaction_id;
                var url = $('transaction_uploadFile_id').getUrl() + '?table_name=CSH_TRANSACTION&header_id=' + header_id;
                var win = new Leaf.Window({
                    url: url,
                    title: '${l:HLS.SUPPORTING_DOCUMENT}',
                    id: 'transaction_uploadFile_winid',
                    width: 850,
                    height: 400
                });
                win.on('close', function () {
                    window.location.href = $('csh_transaction_receipt_id').getUrl();
                    // var url = $('csh_transaction_receipt_id').getUrl();
                    // Leaf.go(url);
                });
            } else {
                Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
                return;
            }
        }

        ]]></script>
        <a:dataSets>
            <a:dataSet id="PAID_BYOTHER_FLAG_DS" lookupCode="PAID_BYOTHER_FLAG"/>
            <!--  <a:dataSet id="payment_method_ds">
                  <a:datas dataSource="/model/payment_method_path"/>
              </a:dataSet>-->
            <!--<a:dataSet id="currency_ds">
                <a:datas dataSource="/model/currency"/>
            </a:dataSet>-->
            <a:dataSet id="exchangerate_type_ds">
                <a:datas dataSource="/model/exchangerate_type_path"/>
            </a:dataSet>
            <!--  <a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>-->
            <a:dataSet id="csh_transaction_receipt_head_ds" autoCreate="true" loadData="true"
                       model="csh.CSH511.csh_transaction">
                <a:fields>
                    <a:field name="transaction_date" required="true"/>
                    <a:field name="bank_slip_num" required="true"/>
                    <!--<a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" readOnly="true" required="true" title="GLD_PERIODS.PERIOD_NAME">
                        <a:mapping>
                            <a:map from="period_name" to="period_name"/>
                        </a:mapping>
                    </a:field>-->
                    <!--<a:field name="internal_period_num"/>-->
                    <!--<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>-->
                    <a:field name="currency_name" displayField="currency_name" options="currency_ds" readOnly="true"
                             required="true" returnField="currency_code" valueField="currency_code">
                        <a:mapping>
                            <a:map from="precision" to="precision"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="currency_code"/>
                    <a:field name="precision"/>
                    <a:field name="functional_currency_code"
                             defaultValue="${/model/default_exchange_rate_type_path/record/@functional_currency_code}"/>
                    <a:field name="bp_name" required="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="90"
                             lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE">
                        <a:mapping>
                            <a:map from="bp_id" to="bp_id"/>
                            <a:map from="bp_name" to="bp_name"/>
                            <a:map from="bp_name" to="csh_bp_name"/>
                            <a:map from="bp_category" to="bp_category"/>
                            <a:map from="bp_category_name" to="bp_category_display"/>
                        </a:mapping>
                    </a:field>
                    <!-- <a:field name="bank_slip_num" lovGridHeight="350" lovHeight="600" lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="1200" title="合同编号">
                        <a:mapping>
                            <a:map from="bp_id" to="bp_id"/>
                            <a:map from="bp_name" to="bp_name"/>
                            <a:map from="bp_category" to="bp_category"/>
                            <a:map from="bp_category_n" to="bp_category_display"/>
                            <a:map from="contract_number" to="bank_slip_num"/>
                        </a:mapping>
                    </a:field> -->
                    <a:field name="bp_category_display" readOnly="true"/>
                    <a:field name="transaction_num" readOnly="true"/>
                    <a:field name="exchange_rate_type_display" displayField="type_name" options="exchangerate_type_ds"
                             readOnly="true" returnField="exchange_rate_type" valueField="type_code">
                        <a:mapping>
                            <a:map from="type_code" to="exchange_rate_type"/>
                            <a:map from="rate_method_code" to="rate_method_code"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="exchange_rate_type"/>
                    <a:field name="exchange_rate" readOnly="true"/>
                    <a:field name="rate_method_code"/>
                    <a:field name="transaction_amount" required="true"/>
                    <a:field name="transaction_functional_amount" readOnly="true"/>
                    <a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550"
                             lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850"
                             required="true" title="CSH511.BANK_ACCOUNT_CODE">
                        <a:mapping>
                            <a:map from="precision" to="precision"/>
                            <a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
                            <a:map from="bank_account_id" to="bank_account_id"/>
                            <a:map from="bank_account_num" to="bank_account_num"/>
                            <a:map from="bank_account_name" to="bank_account_name"/>
                            <a:map from="bank_account_code" to="bank_account_code"/>
                            <a:map from="currency_code" to="currency_code"/>
                            <a:map from="currency_name" to="currency_name"/>
                            <a:map from="bank_account_type" to="bank_account_type"/>
                            <a:map from="bank_account_type_name" to="bank_account_type_name"/>
                            <a:map from="bank_branch_name" to="bank_branch_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="zero_amounts_allowed"/>
                    <a:field name="bp_bank_account_code" autoComplete="true" lovGridHeight="350" lovHeight="550"
                             lovLabelWidth="90" lovService="basic.hls_bp_master_bank_account_v_for_lov?enabled_flag=Y"
                             lovWidth="580" title="CSH511.BP_BANK_ACCOUNT_CODE">
                        <a:mapping>
                            <a:map from="bank_account_id" to="bp_bank_account_id"/>
                            <a:map from="bank_account_num" to="bp_bank_account_num"/>
                            <a:map from="bank_account_name" to="bp_bank_account_name"/>
                            <a:map from="bank_account_code" to="bp_bank_account_code"/>
                            <a:map from="bank_branch_name" to="bp_bank_branch_name"/>
                            <a:map from="bank_full_name" to="bp_bank_name"/>
                        </a:mapping>
                    </a:field>

                    <!-- <a:field name="ref_contract_number" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH511.csh_con_contract_lov" lovWidth="580" title="CON301.CONTRACT_QUERY">
                        <a:mapping>
                            <a:map from="contract_number" to="ref_contract_number"/>
                            <a:map from="contract_id" to="ref_contract_id"/>
                        </a:mapping>
                    </a:field> -->
                    <a:field name="ref_contract_number" lovGridHeight="320" lovHeight="530"
                             lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="800" title="合同编号">
                        <a:mapping>
                            <a:map from="bp_id" to="bp_id"/>
                            <a:map from="bp_name" to="bp_name"/>
                            <a:map from="bp_category" to="bp_category"/>
                            <a:map from="bp_category_n" to="bp_category_display"/>
                            <a:map from="contract_id" to="ref_contract_id"/>
                            <a:map from="contract_number" to="ref_contract_number"/>
                            <a:map from="bp_id_agent_level1_n" to="bp_id_agent_level1_n"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_bank_account_num"/>
                    <a:field name="bp_bank_account_name" required="true"/>
                    <a:field name="collection_classes" />
                    <a:field name="collection_classes_desc" required="true" options="ds_collection_classes_ds" prompt="款项用途"
                             displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
                    <a:field name="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag"
                             displayField="code_value_name" valueField="code_value" required="true"/>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="onUpdate_csh511_receipt"/>
                    <a:event name="add" handler="onAdd_csh511_receipt"/>
                    <a:event name="load" handler="onAdd_csh511_receipt"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton id="csh511_receipt_save" click="csh511_receipt_save" text="HLS.SAVE"/>
                <a:gridButton id="csh511_receipt_reset_id" click="csh511_receipt_reset" text="HLS.RESET"/>
                <!--<a:gridButton id="csh511_receipt_posted_id" click="csh511_receipt_posted" text="HLS.POST"/>-->
                <!--<a:gridButton id="csh511_receipt_upload_id" click="attachment_upload" text="附件上传"/>-->
                <!--<a:gridButton id="csh511_receipt_back_id" click="csh511_receipt_back" text="HLS.EXIT"/>-->
            </a:screenTopToolbar>
            <!--<a:form title="CSH511.CSH_RECEIPT">-->
            <!--<a:box column="4">-->
            <!--<a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--<a:lov name="period_name" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--<a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--&lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;-->
            <!--</a:box>-->
            <!--<a:box column="4">-->
            <!--<a:lov name="ref_contract_num" bindTarget="csh_transaction_receipt_head_ds" prompt="合同编号"/>-->
            <!--<a:comboBox name="payment_method_display" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="银行凭证号"/>-->
            <!--<a:numberField name="exchange_rate" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds" decimalPrecision="-1"/>-->
            <!--</a:box>-->
            <!--<a:box column="4">-->
            <!--<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--<a:numberField name="ref_n01" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds" prompt="税额"/>-->
            <!--&lt;!&ndash;  <a:numberField name="transaction_functional_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;-->
            <!---->
            <!--<a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--<a:textField name="bp_category_display" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--</a:box>-->
            <!--<a:box column="4">-->
            <!--<a:lov name="bank_account_code" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--<a:lov name="bp_bank_account_code" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>-->
            <!--</a:box>-->
            <!--<a:box column="2">-->
            <!--<a:textField name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds" width="383"/>-->
            <!--<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds" width="383"/>-->
            <!--</a:box>-->
            <!--<a:box column="4">-->
            <!--<a:textArea name="description" bindTarget="csh_transaction_receipt_head_ds" width="383"/>-->
            <!--</a:box>-->
            <!--</a:form>-->
            <!--#删除表格头,添加fieldSet-->
            <!-- <a:form title="收款信息" width="1200">-->
            <a:fieldSet title="CSH511.CSH_TRANSACTION.MANUAL_ADD">
                <a:box column="3">
                    <a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_head_ds"/>
                    <a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true"
                                   allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/>
                    <!--  # 新增现金流字段,代付,商业伙伴,摘要字段-->
                    <a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds"
                                 prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" required="true"/>
                    <a:comboBox name="paid_byother_flag_n" prompt="代付" bindTarget="csh_transaction_receipt_head_ds"
                                required="true"/>
                    <a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds"
                           prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
                    <a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds"
                                prompt="款项用途"/>
                </a:box>
                <a:hBox style="width:800px">
                    <a:textField width="350" name="description" bindTarget="csh_transaction_receipt_head_ds"/>
                </a:hBox>
                <!--#添加备注字段-->
                <a:hBox style="width:800px">
                    <a:textField width="350" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT"
                                 bindTarget="csh_transaction_receipt_head_ds"/>
                </a:hBox>
            </a:fieldSet>
            <!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
            <!-- <a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>
             <a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
             &lt;!&ndash;<a:textField name="banka" bindTarget="csh_transaction_receipt_head_ds" prompt="账户类型"/>&ndash;&gt;
             <a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="分行名称"/>
             <a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
             <a:textField name="bank_account_type_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="账户类型"/>
             &lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;
         </a:box>-->

            <!--删除下面的两个box-->
            <!--  <a:box column="4">
                  <a:textField name="description" bindTarget="csh_transaction_receipt_head_ds"/>
                  <a:textField name="purpose" bindTarget="csh_transaction_receipt_head_ds" prompt="用途"/>
              </a:box>
              <a:box column="4">
                  <a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="银行流水号"/>
                  <a:textField name="gsber" bindTarget="csh_transaction_receipt_head_ds" prompt="业务范围"/>
                  <a:textField name="sus_belnr" bindTarget="csh_transaction_receipt_head_ds" prompt="SAP凭证号"/>
              </a:box>-->
            <!-- </a:form>-->
            <!--添加两方的账户信息和附件-->
            <a:fieldSet title="CSH511.CSH_TRANSACTION.BANK_INFO">
                <a:box column="3" labelWidth="100">
                    <a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"
                           prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>
                    <a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds"
                                 prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME" readOnly="true"/>
                    <a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds"
                                 prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME" readOnly="true"/>
                    <!--对方账户-->
                    <a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"
                                 prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
                    <a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds"
                                 prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
                    <a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"
                                 prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
                </a:box>
            </a:fieldSet>
            <a:fieldSet title="CSH511.CSH_TRANSACTION.ATTACHMENT">
                <a:hBox>
                    <a>附件上传:</a>:<a href="javascript:upload_attachment_win()" style="color:red">上传</a>
                </a:hBox>

            </a:fieldSet>


            <!-- <a:form title="对方账户信息" width="1200">
                 <a:box column="4">
                     <a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
                     <a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="银行名称"/>
                     <a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>
                 </a:box>
             </a:form>-->


        </a:screenBody>
    </a:view>
</a:screen>