/****** Object:  View [dbo].[ViwAccFactorDaysEnd]    Script Date: 6/5/2024 10:15:21 ق.ظ ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

ALTER VIEW [dbo].[ViwAccFactorDaysEnd]
AS
SELECT       ID, Type, Number, UserNumber, Date, SeriallID, PersonTotalID, PersonControlID, PersonDetailID1, PersonDetailID2, PersonAddress, PersonFinancialCode, PersonTel, PersonFax, PersonEmail, PersonWeb, Description, Discont, 
                         DiscontIsPercent, PayType, UpdateDate, Updater, DiscontTotalID, DiscontControlID, DiscontDetailID1, DiscontDetailID2, WarehouseID, WareOutID, FromWarehouse, Avarez, AvarezIsPercent, AvarezTotalID, AvarezControlID, 
                         AvarezDetailID1, AvarezDetailID2, Haml, HamlIsPercent, HamlTotalID, HamlControlID, HamlDetailID1, HamlDetailID2, PayTime, Paid, IsPermanent, DATEDIFF(Day, GETDATE(), DATEADD(Day, PayTime, Date)) AS DaysEnd, SellType, 
                         VizitorDetailID2, VizitorDetailID1, VizitorControlID, VizitorTotalID, Project, CostCenter, PersonShenase, PersonSabt, PersonCodePosti, OrderID, IsFalsi, Zir5Darsad, HaghAmalKari, Type1Code, CityCode, KalaTypeID, PrePayment
FROM            dbo.AccFactor AS Factor WITH (nolock)
where PayType<>1
GO


