//ICS010 /// <summary> /// Function for retrieving advance issued receipt information of specific receipt no. (sp_IC_GetAdvanceReceipt) /// </summary> /// <param name="receiptNo">receipt no.</param> /// <returns></returns> public doReceipt GetAdvanceReceipt(string receiptNo) { doReceipt result = base.GetAdvanceReceipt(receiptNo).FirstOrDefault(); //Mapping Language if (result != null) { if (CommonUtil.GetCurrentLanguage() == CommonValue.DEFAULT_LANGUAGE_EN) { result.BillingClientName = result.BillingClientNameEN; result.BillingClientAddress = result.BillingClientAddressEN; } else if (CommonUtil.GetCurrentLanguage() == CommonValue.DEFAULT_LANGUAGE_JP) { result.BillingClientName = result.BillingClientNameEN; result.BillingClientAddress = result.BillingClientAddressEN; } else { result.BillingClientName = result.BillingClientNameLC; result.BillingClientAddress = result.BillingClientAddressLC; } } return(result); }
/// <summary> /// Function for retrieving receipt information of specific invoice no. and invoice occ (sp_IC_GetReceiptByInvoiceNo) /// </summary> /// <param name="invoiceNo">invoice no.</param> /// <param name="invoiceOCC">invoice occ</param> /// <returns></returns> public doReceipt GetReceiptByInvoiceNo(string invoiceNo, int invoiceOCC) { doReceipt result = base.GetReceiptByInvoiceNo(invoiceNo, invoiceOCC, CurrencyUtil.C_CURRENCY_LOCAL, CurrencyUtil.C_CURRENCY_US).FirstOrDefault(); //Mapping Language if (result != null) { if (CommonUtil.GetCurrentLanguage() == CommonValue.DEFAULT_LANGUAGE_EN) { result.BillingClientName = result.BillingClientNameEN; result.BillingClientAddress = result.BillingClientAddressEN; } else if (CommonUtil.GetCurrentLanguage() == CommonValue.DEFAULT_LANGUAGE_JP) { result.BillingClientName = result.BillingClientNameEN; result.BillingClientAddress = result.BillingClientAddressEN; } else { result.BillingClientName = result.BillingClientNameLC; result.BillingClientAddress = result.BillingClientAddressLC; } } return(result); }
//ICS060 /// <summary> /// Function for cancel receipt information. (sp_IC_CancelReceipt) /// </summary> /// <param name="doReceipt">receipt information</param> /// <returns></returns> public bool CancelReceipt(doReceipt doReceipt) { //Validate if (doReceipt == null || string.IsNullOrEmpty(doReceipt.ReceiptNo)) { throw ApplicationErrorException.ThrowErrorException(MessageUtil.MODULE_INCOME, MessageUtil.MessageList.MSG0007, null); } doReceipt doReceiptDB = this.GetReceipt(doReceipt.ReceiptNo); if (doReceipt.UpdateDate != doReceiptDB.UpdateDate) { throw ApplicationErrorException.ThrowErrorException(MessageUtil.MODULE_INCOME, MessageUtil.MessageList.MSG0019, null); } //Cancel receipt List <tbt_Receipt> result = base.CancelReceipt(doReceipt.ReceiptNo , CommonUtil.dsTransData.dtUserData.EmpNo , CommonUtil.dsTransData.dtOperationData.ProcessDateTime); if (result != null && result.Count > 0) { ILogHandler logHand = ServiceContainer.GetService <ILogHandler>() as ILogHandler; doTransactionLog logData = new doTransactionLog() { TransactionType = doTransactionLog.eTransactionType.Update, TableName = TableName.C_TBL_NAME_RECEIPT, TableData = null }; logData.TableData = CommonUtil.ConvertToXml(result); logHand.WriteTransactionLog(logData); return(true); } return(false); }