Exemplo n.º 1
0
        /// <summary>
        /// 计算注册的各项费用提成
        /// </summary>
        /// <param name="zclx"></param>
        /// <param name="mainRow"></param>
        public void GetRegTC(string zclx)
        {
            TW_PaymentRow mainRow = null;

            if (TW_Payment.Rows.Count == 1)
            {
                mainRow = TW_Payment.Rows[0] as TW_PaymentRow;
            }
            else
            {
                throw new Exception("收款出错,没有TW_Payment主记录");
            }
            mainRow.BeginEdit();
            switch (zclx)
            {
            case "注册":
                mainRow.注册提成月  = GetCommissionRow().注册_单价;
                mainRow.注册团队提成 = GetCommissionRow().注册_单价 / 2;
                break;

            case "设立":
                mainRow.注册提成月  = GetCommissionRow().注册_单价;
                mainRow.注册团队提成 = GetCommissionRow().注册_单价 / 2;
                break;

            case "变更":
            case "注销":
                mainRow.注册提成月  = GetCommissionRow().注册_变更单价;
                mainRow.注册团队提成 = GetCommissionRow().注册_变更单价 / 2;
                break;

            case "验资":
                mainRow.注册提成月 = GetCommissionRow().注册_验资;
                mainRow.业务提成月 = mainRow.支付金额 * GetCommissionRow().业务_一次性业务成长版;
                break;

            case "审计":
                mainRow.注册提成月 = GetCommissionRow().注册_审计;
                mainRow.业务提成月 = mainRow.支付金额 * GetCommissionRow().业务_一次性业务其他;
                break;

            case "成长版":
                mainRow.注册提成月 = GetCommissionRow().注册_成长版;
                mainRow.业务提成月 = mainRow.支付金额 * GetCommissionRow().业务_一次性业务成长版;    //业务员提1000
                break;

            case "商标":
                mainRow.注册提成月 = GetCommissionRow().注册_商标;
                mainRow.业务提成月 = mainRow.支付金额 * GetCommissionRow().业务_一次性业务其他;
                break;

            default:
                mainRow.注册提成月 = GetCommissionRow().注册_变更单价;
                break;
            }
            mainRow.EndEdit();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 选择付款明细
        /// </summary>
        /// <param name="zclx">注册类型</param>
        /// <param name="mainID">付款ID</param>
        public void ImpPaymentDetail(string mainID, out string zclx)
        {
            foreach (DataRow row in VW_PaymentDetail.Rows)
            {
                var newRow = TW_PaymentDetail.NewTW_PaymentDetailRow();
                newRow.TW_BusinessRegID   = row["TW_BusinessRegID"].ToString();
                newRow.TW_PaymentDetailID = Guid.NewGuid().ToString();
                newRow.业务员          = row["业务员"].ToString();
                newRow.业务员ID        = row["业务员ID"].ToString();
                newRow.注册员          = row["注册员"].ToString();
                newRow.注册员ID        = row["注册员ID"].ToString();
                newRow.做账会计         = row["做账会计"].ToString();
                newRow.做账会计ID       = row["做账会计ID"].ToString();
                newRow.客户名称         = row["公司预核名称"].ToString();
                newRow.客户名称ID       = row["TW_BusinessRegID"].ToString();
                newRow.注册费          = decimal.Parse(row["注册费未收款"].ToString());
                newRow.工本费          = decimal.Parse(row["工本费未收款"].ToString());
                newRow.开票费          = decimal.Parse(row["开票费未收款"].ToString());
                newRow.月做账费         = decimal.Parse(row["月做账费"].ToString());
                newRow.收款日期         = DateTime.Now;
                newRow.TW_PaymentID = mainID;
                TW_PaymentDetail.Rows.Add(newRow);
            }
            if (VW_PaymentDetail.Rows.Count == 1 && TW_Payment.Rows.Count == 1)
            {
                string payCompany   = VW_PaymentDetail.Rows[0]["公司预核名称"].ToString();
                string payCompanyID = VW_PaymentDetail.Rows[0]["TW_BusinessRegID"].ToString();
                zclx = VW_PaymentDetail.Rows[0]["注册类型"].ToString();
                DataRow detailRow = VW_PaymentDetail.Rows[0];

                TW_PaymentRow mainRow = this.TW_Payment.Rows[0] as TW_PaymentRow;
                mainRow.BeginEdit();
                mainRow["支付单位"]   = payCompany;
                mainRow["客户名称ID"] = payCompanyID;
                mainRow.业务员       = detailRow["业务员"].ToString();
                mainRow.业务员ID     = detailRow["业务员ID"].ToString();
                mainRow.注册员       = detailRow["注册员"].ToString();
                mainRow.注册员ID     = detailRow["注册员ID"].ToString();
                mainRow.做账会计      = detailRow["做账会计"].ToString();
                mainRow.做账会计ID    = detailRow["做账会计ID"].ToString();
                switch (zclx)
                {
                case "成长版":
                    mainRow["收款类别"] = "成长版收款";
                    break;

                case "验资":
                case "审计":
                case "商标":
                    mainRow["收款类别"] = "其他一次性业务收款";
                    break;

                default:
                    mainRow["收款类别"] = "注册收款";
                    break;
                }


                mainRow.EndEdit();
            }
            else
            {
                zclx = "其他";
            }
        }