public decimal TotalPaid(CMSDataContext db) { if (totalPaid.HasValue) { return(totalPaid.Value); } totalPaid = db.TotalPaid(OrganizationId, PeopleId); return(totalPaid ?? 0); }
public decimal TotalPaid(CMSDataContext db) { if (totalPaid.HasValue) return totalPaid.Value; totalPaid = db.TotalPaid(OrganizationId, PeopleId); return totalPaid ?? 0; }
public static decimal AmountDueTrans(CMSDataContext db, Transaction ti) { var org = db.LoadOrganizationById(ti.OrgId); var tt = (from t in db.ViewTransactionSummaries where t.RegId == ti.OriginalId select t).FirstOrDefault(); if (tt == null) return 0; if (org.IsMissionTrip ?? false) return (tt.IndAmt ?? 0) - (db.TotalPaid(tt.OrganizationId, tt.PeopleId) ?? 0); return tt.TotDue ?? 0; }
public Decimal TotalPaid(CMSDataContext Db) { if (totalPaid.HasValue) return totalPaid.Value; if (Organization.IsMissionTrip == true) totalPaid = Db.TotalPaid(OrganizationId, PeopleId); else { var qq = from t in DbUtil.Db.ViewTransactionSummaries where t.RegId == TranId && t.PeopleId == PeopleId select t; var tt = qq.SingleOrDefault(); totalPaid = tt == null ? 0 : tt.IndPaid; } return totalPaid ?? 0; }