3.0.0.1 Demo repository registration
This commit is contained in:
@@ -8,6 +8,7 @@ using Sarand.Net.Standard.Base.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Transactions;
|
||||
|
||||
namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
||||
{
|
||||
@@ -1000,31 +1001,6 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
||||
return false;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
public DateTime GetTaxEffectiveDate()
|
||||
{
|
||||
return GetTaxEffectiveDate(UserContext, TransactionType, Status, Raised, InProgress, Closed);
|
||||
}
|
||||
public static DateTime GetTaxEffectiveDate(ISbmUserOrganisationContext userContext, Sbm.TransactionType transactionType, SaStatus status, DateTime raised, DateTime inProgress, DateTime closed)
|
||||
{
|
||||
// Original thinking was that the status would have an effect on the tax point.
|
||||
SbmTransaction.StatusCat transactionStatusCat = GetCategoryForStatus(status);
|
||||
|
||||
// Nov-08 Current thinking is that the only differences is whether the 'In Progress' date has been specified and whether that should be used in preference to the 'Raised' date.
|
||||
if (DateUtil.IsValid(inProgress) && (transactionStatusCat == SbmTransaction.StatusCat.Open || transactionStatusCat == SbmTransaction.StatusCat.Closed))
|
||||
{
|
||||
using (SbmSessionConsole sessionConsole = SbmGlobals.System.CreateSessionConsole(userContext))
|
||||
{
|
||||
if (sessionConsole != null && sessionConsole.UseInProgressTaxDateAsTaxPoint(transactionType))
|
||||
return inProgress;
|
||||
}
|
||||
}
|
||||
// Otherwise, use 'Raised' date.
|
||||
if (DateUtil.IsValid(raised))
|
||||
return raised;
|
||||
return DateTime.Today;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
public bool RefreshTotals(List<SbmRequirement> requirements)
|
||||
{
|
||||
@@ -1070,7 +1046,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
||||
TimeEst = newTimeEst;
|
||||
TimeAct = newTimeAct;
|
||||
}
|
||||
return !HasErrorState();
|
||||
return OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -1111,7 +1087,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
||||
}
|
||||
}
|
||||
}
|
||||
return !HasErrorState();
|
||||
return OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -1148,7 +1124,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
||||
}
|
||||
}
|
||||
}
|
||||
return !HasErrorState();
|
||||
return OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
@@ -1167,7 +1143,7 @@ namespace Sarand.BusinessMgr.Net.Standard.Base.Bus
|
||||
if (!DateUtil.IsValid(Closed)) Closed = DateTime.Today;
|
||||
}
|
||||
}
|
||||
return !HasErrorState();
|
||||
return OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user