Ctrl+V

foreach (var cc in costCentres)
{
var f = new Models.JobFinancials()
{
CostCentre = cc.Title,
CostCentreCode = cc.ID,
IsBudget = false,
Cost = CalculateCostDpnLink2DS041116(purchaseOrders.Where(jc => jc.CostCentre == cc.ID).ToList(), job.CurrencyId),
Sale = (decimal)((decimal)jsales.Where(jc => jc.CostCentre == cc.ID).Sum(jc => jc.ValueUK) * (currencyExchange ?? 1))
};
f.Cost += (decimal)(job.CurrencyId == DefaultFromCurrency ? jcts.Where(jc => jc.CostCentre == cc.ID).Sum(jc => jc.ValueUK)
: (job.CurrencyId == EURCurrency ? (jcts.Where(jc => jc.CostCentre == cc.ID).Sum(jc => jc.ValueEUR))
: (jcts.Where(jc => jc.CostCentre == cc.ID).Sum(jc => jc.ValueUS))) ?? (double?)0);

f.Cost += (decimal)(job.CurrencyId == DefaultFromCurrency ? others.Where(jc => jc.CostCentre == cc.ID).Sum(jc => jc.ValueUK)
: (job.CurrencyId == EURCurrency ? (others.Where(jc => jc.CostCentre == cc.ID).Sum(jc => jc.ValueEUR))
: (others.Where(jc => jc.CostCentre == cc.ID).Sum(jc => jc.ValueUS))) ?? (double?)0);

f.Sale += jCommitedSales.Where(x => x.CostCentre == cc.ID).Sum(x => x.Value);

var childCostCentres = DB.CostCentres.Where(x => x.ParentID == cc.ID);
 
4ab49b6eb6a7dfd37bea1c1322d731dade8535163c5af859f977fd4af56d6453

(Was cmd + v though because I'm a filthy mac man)
 
for (i = 1; i < FILTMIDPOINT; i++)
{
fBPOut_r += ((*pfDown1)*(*pfCoeffs1)) + ((*pfUp1)*(*pfCoeffs1--));
fBPOut_i += ((*pfDown1--)*(*pfCoeffs2)) + ((*pfUp1++)*(-*pfCoeffs2--));
}
 
Back
Top Bottom