public static long Add(string catalog, int officeId, int userId, long loginId, DateTime valueDate, int storeId, bool isCredit, string partyCode, Collection <StockDetail> details, int costCenterId, string referenceNumber, string statementReference, Collection <Attachment> attachments) { StockMaster stockMaster = new StockMaster(); stockMaster.PartyCode = partyCode; stockMaster.StoreId = storeId; stockMaster.IsCredit = isCredit; if (!string.IsNullOrWhiteSpace(statementReference)) { statementReference = statementReference.Replace(" ", " ").Trim(); } long transactionMasterId = GlTransaction.Add(catalog, valueDate, "Purchase.Direct", officeId, userId, loginId, costCenterId, referenceNumber, statementReference, stockMaster, details, new Collection <long>(), attachments); return(transactionMasterId); }
public static long Add(DateTime valueDate, int storeId, string partyCode, Collection <StockDetail> details, int costCenterId, string referenceNumber, string statementReference, Collection <long> transactionIdCollection, Collection <Attachment> attachments) { StockMaster stockMaster = new StockMaster(); stockMaster.PartyCode = partyCode; stockMaster.StoreId = storeId; stockMaster.IsCredit = true; if (!string.IsNullOrWhiteSpace(statementReference)) { statementReference = statementReference.Replace(" ", " ").Trim(); } long transactionMasterId = GlTransaction.Add(valueDate, "Purchase.Receipt", CurrentSession.GetOfficeId(), CurrentSession.GetUserId(), CurrentSession.GetLogOnId(), costCenterId, referenceNumber, statementReference, stockMaster, details, transactionIdCollection, attachments); return(transactionMasterId); }