Esempio n. 1
0
        /// <summary>
        ///  订单出库后 普票改增票
        /// </summary>
        /// <param name="entity"></param>
        public void SetSOVATInvoiveWhenSOOutStock(SOInfo entity)
        {
            SOInfo OriginalSOInfo = ObjectFactory <SOProcessor> .Instance.GetSOBySOSysNo(entity.SysNo.Value);

            SODA.UpdateSOVATInvoice(entity.InvoiceInfo.VATInvoiceInfo);
            ECCentral.BizEntity.SO.SOInvoiceChangeLogInfo invoiceChanageLog = new SOInvoiceChangeLogInfo();
            invoiceChanageLog.SOSysNo     = entity.BaseInfo.SysNo.Value;
            invoiceChanageLog.StockSysNo  = entity.Items[0].StockSysNo > 0 ? entity.Items[0].StockSysNo.Value : 0;
            invoiceChanageLog.ChangeTime  = DateTime.Now;
            invoiceChanageLog.CompanyCode = entity.BaseInfo.CompanyCode;
            invoiceChanageLog.UserSysNo   = ServiceContext.Current.UserSysNo;
            if (OriginalSOInfo != null && OriginalSOInfo.InvoiceInfo != null && OriginalSOInfo.InvoiceInfo.IsVAT == true)
            {
                invoiceChanageLog.ChangeType = InvoiceChangeType.VATChange;
                invoiceChanageLog.Note       = string.Format(ResouceManager.GetMessageString("SO.SOInfo", "Res_SO_VATInvoice_ChangeInfo")
                                                             , entity.InvoiceInfo.VATInvoiceInfo.SysNo
                                                             , entity.InvoiceInfo.VATInvoiceInfo.CompanyName
                                                             , entity.InvoiceInfo.VATInvoiceInfo.TaxNumber
                                                             , entity.InvoiceInfo.VATInvoiceInfo.BankAccount);
            }
            else
            {
                invoiceChanageLog.ChangeType = InvoiceChangeType.GeneralToVAT;
                invoiceChanageLog.Note       = ResourceHelper.Get("Res_SO_InvoiceTOVAT_Change", entity.InvoiceInfo.VATInvoiceInfo.SysNo);
            }
            ObjectFactory <ISOLogDA> .Instance.InsertSOInvoiceChangeLogInfo(invoiceChanageLog);
        }
Esempio n. 2
0
        public void InsertSOInvoiceChangeLogInfo(SOInvoiceChangeLogInfo logInfo)
        {
            DataCommand command = DataCommandManager.GetDataCommand("SO_Insert_SOInvoiceChangeLog");

            command.SetParameterValue <SOInvoiceChangeLogInfo>(logInfo, true, false);
            command.SetParameterValue("@ChangeType", EnumHelper.GetDescription(logInfo.ChangeType));
            command.ExecuteNonQuery();
        }
Esempio n. 3
0
 private void WriteSOChangeVATLog(List <SOInfo> subSOList)
 {
     if (subSOList != null && subSOList.Count > 0)
     {
         foreach (SOInfo subSO in subSOList)
         {
             if (!subSO.InvoiceInfo.IsVAT.Value)
             {
                 ECCentral.BizEntity.SO.SOInvoiceChangeLogInfo invoiceChanageLog = new SOInvoiceChangeLogInfo
                 {
                     SOSysNo     = subSO.SysNo.Value,
                     ChangeTime  = DateTime.Now,
                     ChangeType  = InvoiceChangeType.VATToGeneral,
                     CompanyCode = subSO.CouponCode,
                     UserSysNo   = ServiceContext.Current.UserSysNo,
                     Note        = ResourceHelper.Get("Res_SO_Invoice_Change", subSO.InvoiceInfo.VATInvoiceInfo.TaxNumber, subSO.InvoiceInfo.InvoiceNo)
                 };
                 ObjectFactory <ISOLogDA> .Instance.InsertSOInvoiceChangeLogInfo(invoiceChanageLog);
             }
         }
     }
 }