Example #1
0
 string checkRed()
 {
     if (string.IsNullOrWhiteSpace(this.InvoiceCode))
     {
         return("发票代码不能为空");
     }
     if (string.IsNullOrWhiteSpace(this.InvoiceNo))
     {
         return("发票号码不能为空");
     }
     if (string.IsNullOrWhiteSpace(this.TaxpayerNum))
     {
         return("纳税人识别号不能为空");
     }
     if (string.IsNullOrWhiteSpace(this.RedReason))
     {
         return("冲红原因不能为空");
     }
     if (string.IsNullOrWhiteSpace(this.Amount))
     {
         return("价税合计金额不能为空");
     }
     if (!StringChecking.TaxpayerNum(this.TaxpayerNum))
     {
         return("纳税人识别号格式错误,必须为15-20位的大写字母或者数字");
     }
     return(null);
 }
Example #2
0
 string checkQuery()
 {
     if (string.IsNullOrWhiteSpace(this.InvoiceReqSerialNo))
     {
         return("发票请求序列号不能为空");
     }
     if (string.IsNullOrWhiteSpace(this.TaxpayerNum))
     {
         return("纳税人识别号不能为空");
     }
     if (!StringChecking.TaxpayerNum(this.TaxpayerNum))
     {
         return("纳税人识别号格式错误,必须为15-20位的大写字母或者数字");
     }
     if (!StringChecking.InvoiceReqSerialNo(this.InvoiceReqSerialNo))
     {
         return("请求流水号格式错误,必须为20位的字母或者数字");
     }
     return(null);
 }
Example #3
0
        string checkCommon()
        {
            if (string.IsNullOrWhiteSpace(this.BuyerName))
            {
                return("公司名称不能为空");
            }
            if (string.IsNullOrWhiteSpace(this.TaxPayerNum))
            {
                return("纳税人识别号不能为空");
            }
            if (!StringChecking.TaxpayerNum(this.TaxPayerNum))
            {
                return("纳税人识别号格式错误,必须为15-20位的大写字母或者数字");
            }
            var selectTmp = this.BlueGoodses.Where(m => m.IsSelected);

            if (selectTmp == null || selectTmp.Count() <= 0)
            {
                return("请至少选择一个开票项");
            }
            return(null);
        }