spc-kiosk-pb/Service/AsvDataProcess/PosReceipt.cs
2019-06-16 14:12:09 +09:00

5702 lines
353 KiB
C#

using System;
using System.Collections;
using System.Data;
using System.Windows.Forms;
using Cosmos.BaseFrame;
using Cosmos.UserFrame;
using Cosmos.Common;
using Cosmos.CommonManager;
/*-----------------------------------------------------------------------------------------------*/
// 설 명 : 영수증 출력 처리(판매 영수증)
// 작 성 자 :
// 변경 이력 :
/*-----------------------------------------------------------------------------------------------*/
namespace Cosmos.Service
{
//#20180406 로컬, 서버에 저널데이터 없는 경우 재생성 start
//기존
//class PosReceipt : PosReceiptBase, IServiceUs
//변경
class PosReceipt : PosReceiptBase, IServiceUs, IPosReceipt
//#20180406 로컬, 서버에 저널데이터 없는 경우 재생성 end
{
#region
/// <summary>
/// 거래영수증 출력 처리
/// </summary>
/// <param name="aParam"></param>
/// <returns></returns>
public string Execute(string[] aParam)
{
return UserCom.RST_ERR;
}
#endregion
#region
/// <summary>
/// 데이터 획득
/// </summary>
/// <param name="aParam"></param>
/// <returns></returns>
public string GetData(string[] aParam)
{
return "";
}
#endregion
#region
/// <summary>
/// 영수증 출력
/// </summary>
public string ExecutePrint(string[] aParam)
{
string sRet = UserCom.RST_ERR;
//#20180226 영수증 미출력시 기타영수증 출력 되도록 수정 start
bool bRecPrtNo = true; //매출 영수증 출력 여부
//#20180226 영수증 미출력시 기타영수증 출력 되도록 수정 end
try
{
//#20180226 영수증 미출력시 기타영수증 출력 되도록 수정 start
if ((aParam.Length > 1) && (aParam[1] == "RecPrtNo"))
{
bRecPrtNo = false;
}
//#20180226 영수증 미출력시 기타영수증 출력 되도록 수정 end
// 추후적립일때 직전영수증 파일 저장 안함(2017.07.21)
if (aParam.Length > 0 && m_cTrnStatus.Head.TradeKind != ItemConst.TRAN_KIND.AFTER.HP_SAVE && m_cTrnStatus.Head.TradeKind != ItemConst.TRAN_KIND.AFTER.CASH_RECEIPT)
{
// 영수증 출력 처리
//#20180226 영수증 미출력시 기타영수증 출력 되도록 수정 start
//기존
//if (PrintExecute(true, true, true) == true) sRet = UserCom.RST_OK;
//변경
if (PrintExecute(bRecPrtNo, true, true) == true) sRet = UserCom.RST_OK;
//#20180226 영수증 미출력시 기타영수증 출력 되도록 수정 end
}
else
{
// 영수증 출력 처리
if (PrintExecute(true, true, false) == true) sRet = UserCom.RST_OK;
}
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
#endregion
#region
/// <summary>
/// 직전 영수증 출력
/// </summary>
public string ExecuteRePrint(string[] aParam)
{
string sRet = UserCom.RST_ERR;
try
{
PrintBufClear();
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0034));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, "");
ReadReceiptFile("PRT_REC.TXT", m_aPrintBuf);
ReadReceiptFile("PRT_REC.TXT", m_aRecPrintBuf);
if (PrintExecute(true, true, false) == true) sRet = UserCom.RST_OK;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
#endregion
#region
/// <summary>
/// 영수증 재출력
/// </summary>
/// <param name="sPrtData"></param>
/// <returns></returns>
public bool PosSaleRePrint(string sPrtData)
{
return PosSaleRePrint(sPrtData, true);
}
/// <summary>
/// 영수증 재출력
/// </summary>
/// <param name="sPrtData"></param>
/// <returns></returns>
public bool PosSaleRePrint(string sPrtData, bool bTitle)
{
try
{
PrintBufClear();
if (bTitle == true)
{
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0034));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, "");
}
int iDataLen = 0;
while (iDataLen <= CmUtil.LenH(sPrtData))
{
AddPrintData(PosConst.PRT_ITEM.REC, CmUtil.MidH(sPrtData, iDataLen, 47));
iDataLen += 47;
}
return PrintExecute(true, true, false);
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region ( )
/// <summary>
/// 프린터 출력(해피오더 주문서 출력 시 사용)
/// </summary>
/// <param name="aPrtData"> 영수증 출력내용 </param>
/// <param name="bHPOAutoPrintYN"> 당일픽업 자동 출력 기능으로 2장 프린트 필요할 때 True, 기본 False </param>
/// <returns></returns>
//#16366 해피오더 당월누적주문내역 + 당일 해피오더주문 상세내역 자동 출력기능 start
//기존
//public bool PosPrint(string[] aPrtData)
//변경
public bool PosPrint(string[] aPrtData, bool bHPOAutoPrintYN, string sPrtGubun)
//#16366 해피오더 당월누적주문내역 + 당일 해피오더주문 상세내역 자동 출력기능 end
{
try
{
PrintBufClear();
SetTopPosPrintData(PosConst.PRT_ITEM.ETC, true, true, false, false); // 영수증 상단영역 출력
foreach (string sPrtData in aPrtData)
{
AddPrintData(PosConst.PRT_ITEM.ETC, sPrtData);
}
//#16366 해피오더 당월누적주문내역 + 당일 해피오더주문 상세내역 자동 출력기능 start
//기존
//SetBtmPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false, false); // 영수증 하단영역 출력
//변경
//당월누계 건 출력 시 하단에 보관용이라고 찍어주기 위해서
//if (sPrtGubun == "D")
//{
// //당일
// SetBtmPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false, false); // 영수증 하단영역 출력
//}
//else
//{
// //당월
// SetBtmPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false, false, 0); // 영수증 하단영역 출력
//}
if (bHPOAutoPrintYN == true && sPrtGubun == "M")
{
SetBtmPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false, false, 0); // 영수증 하단영역 출력
}
else
{
SetBtmPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false, false); // 영수증 하단영역 출력
}
//#16366 해피오더 당월누적주문내역 + 당일 해피오더주문 상세내역 자동 출력기능 end
SetEndPosPrintData(PosConst.PRT_ITEM.ETC); // 영수증 출력 완료
//#16366 해피오더 당월누적주문내역 + 당일 해피오더주문 상세내역 자동 출력기능 start
if (bHPOAutoPrintYN == true)
{
//당일픽업 건은 2장씩 출력
if (sPrtGubun == "D")
{
//옵션값으로 처리안하고 하드코딩 함
//by.SPCN 오동훈 과장
//int iCnt = CmUtil.IntParse(CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT520), "0"));
//if (iCnt > 0)
//{
// PrtDataCopy(PosConst.PRT_ITEM.ETC, iCnt, sPrtGubun);
//}
if (CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT520), "0") == "1")
{
PrtDataCopy(PosConst.PRT_ITEM.ETC, 2, sPrtGubun);
}
}
//당월픽업 건은 1장씩 출력
else if (sPrtGubun == "M")
{
//옵션값으로 처리안하고 하드코딩 함
//by.SPCN 오동훈 과장
//int iCnt = CmUtil.IntParse(CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT519), "0"));
//if (iCnt > 0)
//{
// PrtDataCopy(PosConst.PRT_ITEM.ETC, iCnt, sPrtGubun);
//}
if (CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT519), "0") == "1")
{
PrtDataCopy(PosConst.PRT_ITEM.ETC, 1, sPrtGubun);
}
}
}
//#16366 해피오더 당월누적주문내역 + 당일 해피오더주문 상세내역 자동 출력기능 end
return PrintExecute(true, true, false);
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." +
System.Reflection.MethodBase.GetCurrentMethod().Name + "()",
ex.Message);
}
return false;
}
//#16366 해피오더 당월누적주문내역 + 당일 해피오더주문 상세내역 자동 출력기능 start
protected string sReplaceString(string sData)
{
string sRet = "";
try
{
string sPrtData = "";
string sTempData = "";
if (CmUtil.LenH(sData) <= 42) { sPrtData = CmUtil.LPadH("", 21 - (CmUtil.LenH(sData) / 2)) + sData; }
//sRet = PosConst.PRT_HDR.PRT_VER + sPrtData;
sTempData = PosConst.PRT_HDR.PRT_VER + sPrtData;
sTempData = ((sTempData.Length == 0) ? " " : sTempData);
sRet = CmUtil.RPadH(PosConst.PRT_ITEM.ETC, 1) + sTempData;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
protected void PrtDataCopy(string sPrtID, int iPrintCnt, string sPrtGubun)
{
int iAddPrint = 0;
ArrayList RecPrintBuf = new ArrayList();
RecPrintBuf.Clear();
ArrayList EtcPrintBuf = new ArrayList();
EtcPrintBuf.Clear();
ArrayList PrintBuf = new ArrayList();
PrintBuf.Clear();
try
{
iAddPrint = iPrintCnt -1;
if (iAddPrint <= 0) { return; }
RecPrintBuf = (ArrayList)m_aRecPrintBuf.Clone();
EtcPrintBuf = (ArrayList)m_aEtcPrintBuf.Clone();
PrintBuf = (ArrayList)m_aPrintBuf.Clone();
for (int i = 0; i < iAddPrint; i++)
{
//if (PosConst.PRT_ITEM.ETC == sPrtID)
//{
foreach (string sEtcPrintBuf in EtcPrintBuf)
{
if (sPrtGubun == "D")
{
if (sEtcPrintBuf.IndexOf(PosConst.PRT_HDR.PRT_VER) > 0)
{
string sReplace = sReplaceString("[ 해피오더 내부관리용 ]"); // "9[VER] [ 해피오더 내부관리용 ]";
m_aEtcPrintBuf.Add(sReplace);
}
else
{
m_aEtcPrintBuf.Add(sEtcPrintBuf);
}
}
else
{
m_aEtcPrintBuf.Add(sEtcPrintBuf);
}
}
//}
//else
//{
// foreach (string sRecPrintBuf in RecPrintBuf)
// {
// m_aRecPrintBuf.Add(sRecPrintBuf);
// }
//}
foreach (string sPrintBuf in PrintBuf)
{
if (sPrtGubun == "D")
{
if (sPrintBuf.IndexOf(PosConst.PRT_HDR.PRT_VER) > 0)
{
string sReplace = sReplaceString("[ 해피오더 내부관리용 ]"); //"9[VER] [ 해피오더 내부관리용 ]";
m_aPrintBuf.Add(sReplace);
}
else
{
m_aPrintBuf.Add(sPrintBuf);
}
}
else
{
m_aPrintBuf.Add(sPrintBuf);
}
}
}
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." +
System.Reflection.MethodBase.GetCurrentMethod().Name + "()",
ex.Message);
}
return;
}
//#16366 해피오더 당월누적주문내역 + 당일 해피오더주문 상세내역 자동 출력기능 end
//#17142 [해피오더]POS로그인 시 영수증프린터로 장부재고 자동 출력 start
#region
public string BookInventoryPrint(string aPrtData)
{
string sRet = UserCom.RST_ERR;
try
{
PrintBufClear();
SetTopPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false); // 영수증 상단영역 출력
//예)
//[OO월OO일 POS장부재고 현황]
//
//중분류 상품코드 상품명 재고숫자
//케익류 231444 벨기에화이트 3
//
//※ 장부재고 추가등록은 [실시간재고등록]
//메뉴에서 변경가능합니다.
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_VER, PosConst.PRT_FMT.F103, string.Format("[{0}월{1}일 POS장부재고 현황]", DateTime.Now.ToString("MM"), DateTime.Now.ToString("dd")));
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, "");
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F406, "중분류", "상품코드", "상품명", "수량");
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
string[] aRowData = null;
string[] aColData = null;
aRowData = (aPrtData.ToString()).Split(new string[] { "#~" }, StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i <= aRowData.Length - 1; i++)
{
aColData = aRowData[i].Split(new string[] { "|" }, StringSplitOptions.None);
string stemp0 = "";
string stemp1 = "";
string stemp2 = "";
string stemp3 = "";
stemp0 = aColData[0];//중분류
stemp1 = aColData[1];//상품코드
stemp2 = aColData[2];//상품명
stemp3 = aColData[3];//재고숫자
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F406, stemp0, stemp1, stemp2, stemp3);
}
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, "");
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0331));
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0332));
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_BBM); // 영수증 하단영역 출력
SetEndPosPrintData(PosConst.PRT_ITEM.ETC); // 영수증 출력 완료
if (PrintExecute(true, true, false) == true) sRet = UserCom.RST_OK;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." +
System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
#endregion
//#17142 [해피오더]POS로그인 시 영수증프린터로 장부재고 자동 출력 end
//17.08.22 dkshin SS 해피오더
/// <summary>
/// 프린터 출력(해피오더 KDS 전송 실패 시 사용)
/// </summary>
/// <param name="aPrtData"></param>
/// <returns></returns>
public bool HappyOrderKDSPrint(ArrayList aPrtData)
{
try
{
PrintBufClear();
SetTopPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false); // 영수증 상단영역 출력
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F101, "<< KDS 전송 실패 >>");
Column.TR_HPORD.HPORD_ITEM item = null;
for (int i = 0; i < aPrtData.Count; i++)
{
item = (Column.TR_HPORD.HPORD_ITEM)aPrtData[i];
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101,
CmUtil.RPadH(item.GoodsName, 27) +
CmUtil.LPadH(item.Qty, 4));
}
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_BBM); // 영수증 하단영역 출력
SetEndPosPrintData(PosConst.PRT_ITEM.ETC); // 영수증 출력 완료
//#20180202 KDS 전송 실패시 3회 재시도, 최초 한번 영수증 출력 start
UserLog.WriteLogFile(UserCom.LOG_IOS,
System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, // Project Name (프로젝트명)
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + // Class Name (Class Name (클래스명))
System.Reflection.MethodBase.GetCurrentMethod().Name + "()", // Function Name (Function Name (함수명))
"KDS SEND FAIL. BILL PRINT!!");
//#20180202 KDS 전송 실패시 3회 재시도, 최초 한번 영수증 출력 end
return PrintExecute(true, true, false);
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
/// <summary>
/// 프린터 출력
/// </summary>
/// <param name="sPrtData"></param>
/// <returns></returns>
public bool PosRembOrderPrint(string sPrtData)
{
string sNewLineCharacter = "^!@LS";
try
{
PrintBufClear();
SetTopPosPrintData(PosConst.PRT_ITEM.REC, true, false, false, false);
//AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0034));
//AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, "");
//기념일배송 주문정보 출력 수정(2017.07.21)
//int iDataLen = 0;
//while (iDataLen <= CmUtil.LenH(sPrtData))
//{
// AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR + CmUtil.MidH(sPrtData, iDataLen, 47));
// iDataLen += 47;
//}
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0200) + " " + CmUtil.GetDataRowStr(PosMstManager.GetMstStore(), PosMst.MST_STORE.DATA.STORNM));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0201) + " " + CmUtil.GetDataRowStr(PosMstManager.GetMstStore(), PosMst.MST_STORE.DATA.STOR_OWN_NM));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0202) + " " + CmUtil.GetDataRowStr(PosMstManager.GetMstStore(), PosMst.MST_STORE.DATA.BIZ_PSN_NO));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0204) + " " + m_cPosStatus.Base.PosNo);
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0203) + " " + CmUtil.MidH(m_cPosStatus.Base.CashierName, 0, 12));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0205) + " " + m_cPosStatus.Base.SaleDate.Substring(0, 4) + "-" + m_cPosStatus.Base.SaleDate.Substring(4, 2) + "-" + m_cPosStatus.Base.SaleDate.Substring(6, 2));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0206) + " " + DateTime.Now.ToString("tt hh:mm:ss"));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR + sPrtData);
SetBtmPosPrintData(PosConst.PRT_ITEM.REC, true, false, false, false, false);
SetEndPosPrintData(PosConst.PRT_ITEM.REC); // 영수증 컷팅
return PrintExecute(true, true, false);
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 판매 영수증 데이터 생성
/// </summary>
public string MakePosSaleReceipt(string[] aParam)
{
string sRet = UserCom.RST_ERR;
int iPrintCnt = 0;
string sPrtID = "";
try
{
PrintBufClear(); // 영수증 출력버퍼 초기화
iPrintCnt = LS_BALANCE_VOUCHER_CHECK(); // 잔액교환권 발행 여부 체크
//if (sRet == UserCom.RST_OK)
//{
// iPrintCnt = 2;
//}
//else
//{
// iPrintCnt = 1;
//}
// 반품인 경우는 1장만 출력
if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND) iPrintCnt = 1;
for (int iLoop = 1; iLoop <= iPrintCnt; iLoop++)
{
if (iLoop == 1) sPrtID = PosConst.PRT_ITEM.REC;
if (iLoop == 2) sPrtID = PosConst.PRT_ITEM.ETC;
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.AFTER.HP_SAVE)
{
SetHappyPointAfterSave(); // 추후적립 영수증 출력
return UserCom.RST_OK;
}
else if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.AFTER.CASH_RECEIPT)
{
SetCashbillAfterSave(); // 현금 영수증 추후 발행 출력
return UserCom.RST_OK;
}
else if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.LOG.HOLD_DEAL) //보류
{
SetSimplicityReceipt(sPrtID); // 보류 영수증 출력
return UserCom.RST_OK;
}
//17.05.18 dkshin 쇼킹박스 추가
//else if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.LOG.SHOCKING_BOX && m_cTrnStatus.Head.ShockingBoxStat != "1") //쇼킹박스
else if (m_cTrnStatus.Head.ShockingBoxStat == "0") //쇼킹박스
{
//#15746 해피오더 '쇼킹박스' 관련 POS 시스템 개발 요청 start
//기존
/*
SetShockingBoxReceipt(sPrtID); // 쇼킹박스 영수증 출력
return UserCom.RST_OK;
*/
//변경
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.HPO_LOG.LANDOM_BOX)
{
// 상품정보출력(해피오더 랜덤박스)
SetLandomBoxReceipt(sPrtID); // 랜덤박스 영수증 출력
return UserCom.RST_OK;
}
else if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.LOG.SHOCKING_BOX)
{
// 쇼킹박스
SetShockingBoxReceipt(sPrtID); // 쇼킹박스 영수증 출력
return UserCom.RST_OK;
}
//#15746 해피오더 '쇼킹박스' 관련 POS 시스템 개발 요청 end
}
//#20171025 해피기프트(신) 충전 내역 출력 위치 변경 start
//기존 해피기프트 충전시 영수증 출력 안되는 현상
/*
//20171013 dkshin 해피기프트(신) IC/RF 충전 및 승인 - 충전/충전취소 영수증 내역
else if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.CHARGESALE.CHARGE)
{
SetHPGCardInfo(sPrtID);
return UserCom.RST_OK;
}
*/
//#20171025 해피기프트(신) 충전 내역 출력 위치 변경 end
sRet = SetEtcPrint(sPrtID); // 기타 거래 영수증 출력
if (sRet == UserCom.RST_OK)
{
return UserCom.RST_OK;
}
if (m_cPosStatus.Sale.DutchPayFlg != "2") // 더치페이 경우 현재 금액과 처리
{
SetCampaignAddBillPrint(PosConst.PRT_ITEM.ETC); // 영수캠페인(별도영수증) 데이터 출력
SetOnLineCouponPrint(PosConst.PRT_ITEM.ETC); // 온라인쿠폰 발행(중국)
}
//if (m_cPosStatus.Sale.DutchPayFlg == "") // 완료 거래 일때만 출력!
// SetCreditCardNoSignBillPrint(PosConst.PRT_ITEM.ETC);
SetTopPosPrintData(sPrtID, true, true, true, true); // 영수증 상단영역 출력
SetPosSalePluItem(sPrtID); // 영수증 상품영역 출력
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.ETC.LOSS) //판매LOSS
{
SetSaleLoss(sPrtID);
}
else
{
SetPosSaleTotal(sPrtID); // 영수증 합계영역, 결제영역 출력
}
if (m_cPosStatus.Sale.DutchPayFlg == "2") // 더치페이 경우 현재 금액과 처리
{
SetAmtDutchPaySubTotal(sPrtID);
}
SetPosSalePayment(sPrtID, iLoop); // 영수증 결제 내역 출력
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.CHARGESALE.PREPAID) //선불카드 판매 내역
{
SetPPCardInfo(sPrtID);
}
SetReservationPrint(sPrtID);
#region - SetBtmPosPrintData
//grayber@20171214 캠페인 리펀드 쿠폰 start
// 바코드 플래그 추가 하여 SetBtmPosPrintData 함수안에 활성화
//#20170807 명판 캠페인 커팅 start
//영수증 커팅시 해당 문구 양쪽에 다 출력되는 현상 수정.
//#해피앱 추후적립 start, sskim
//if (m_cPosStatus.Mst.CntryDiv == ItemConst.CNTRY_DIV.KR)
//{
// if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL)
// {
// //#20170809 해피포인트 업무 미사용시 해피앱 추후적립 기능 적용 안되도록 수정 start
// //기존
// //SetHpAppAfterSavePrint(sPrtID); // 해피앱 추후적립 문구 출력
// //변경
// if (PosMstManager.GetPosOption(POS_OPTION.OPT316) != "0") // 해피포인트 업무 사용 여부(0:사용안함, 1:사용함(한국), 2:사용함(중국))
// {
// SetHpAppAfterSavePrint(sPrtID); // 해피앱 추후적립 문구 출력
// }
// //#20170809 해피포인트 업무 미사용시 해피앱 추후적립 기능 적용 안되도록 수정 end
// }
//}
//#해피앱 추후적립 end, sskim
//#20170807 명판 캠페인 커팅 end
//grayber@20171214 캠페인 리펀드 쿠폰 end
#endregion
SetBtmPosPrintData(sPrtID, true, true, true, true, true, iLoop); // 영수증 하단영역 출력
SetEndPosPrintData(sPrtID); // 영수증 출력 완료
if (sPrtID == PosConst.PRT_ITEM.REC)
{
// 주차 바코드 출력 여부
if (PosMstManager.GetPosOption(POS_OPTION.OPT426) == "1") SetParkingBarCodePrintMain(PosConst.PRT_ITEM.ETC);
}
}
SetAmtDutchPayPayPrint();
sRet = UserCom.RST_OK;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
#endregion
#region
/// <summary>
/// 영수증 결제 내역 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetPosSalePayment(string sPrtID)
{
return SetPosSalePayment(sPrtID, 1);
}
private bool SetPosSalePayment(string sPrtID, int iPrintCnt)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
ArrayList alTrPayItem = (ArrayList)StateObject.GetItemObject(Column.TR_PAYMENT.ITEM); // 결제아이템
if (alTrPayItem.Count == 0) return false;
DataTable dtMstPayDc = PosMstManager.GetMstPayDc(); // 결제할인 마스터 획득(영수증출력 순서로 쏘팅됨)
// 결제별 합계 금액 표시
for (int i = 0; i < dtMstPayDc.Rows.Count; i++)
{
DataRow dr = dtMstPayDc.Rows[i];
string sPayWayCD = CmUtil.GetDataRowStr(dr, PosMst.MST_PAY_DC.DATA.PAY_DC_GRP_TYPE);
string sPayDtlCD = CmUtil.GetDataRowStr(dr, PosMst.MST_PAY_DC.DATA.PAY_DC_CD);
if (CmUtil.GetDataRowStr(dr, PosMst.MST_PAY_DC.DATA.USE_YN) != "1") continue;
double nPayAmt = 0;
string sPayName = "";
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (cPayItem.PAY_DTL_CD_05 != PosConst.PAY_DC_TYPE.PAY) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
//#14678 PB 평촌라이프 - 결제영수증 현금 금액 표기 수정요청 start,phj
//기존
//nPayAmt = CmUtil.DoubleAdd(nPayAmt, cPayItem.AMT_ENTRY_01);
//sPayName = cPayItem.OCCUR_ENTRY_20;
//변경
nPayAmt = CmUtil.DoubleAdd(nPayAmt, cPayItem.PAY_AMT);
sPayName = cPayItem.OCCUR_ENTRY_20;
//#14678 PB 평촌라이프 - 결제영수증 현금 금액 표기 수정요청 end,phj
}
if (nPayAmt > 0)
{
string sPayDcName = PosMstManager.GetMstPayDc(sPayWayCD, sPayDtlCD, PosMst.MST_PAY_DC.DATA.PAY_DC_NM);
if (sPayDcName == "") sPayDcName = sPayName;
//#20170905 미군기지 환율 표시 start
//기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, "[ " + sPayDcName + " ]", m_cPosStatus.Global.NumericTOCurrency(nPayAmt * nSign));
//변경
double dUsarmyEx = 0;
dUsarmyEx = CmUtil.DoubleParse(CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT509), "0"));
if (dUsarmyEx > 0)
{
nPayAmt = CmUtil.MathRounds(nPayAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, "[ " + sPayDcName + " ]", (nPayAmt * nSign).ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, "[ " + sPayDcName + " ]", m_cPosStatus.Global.NumericTOCurrency(nPayAmt * nSign));
}
//#20170905 미군기지 환율 표시 end
}
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 결제할인 마스터의 출력 순서에 따라 결제항목 영수증 출력
for (int i = 0; i < dtMstPayDc.Rows.Count; i++)
{
DataRow dr = dtMstPayDc.Rows[i];
string sPayWayCD = CmUtil.GetDataRowStr(dr, PosMst.MST_PAY_DC.DATA.PAY_DC_GRP_TYPE);
string sPayDtlCD = CmUtil.GetDataRowStr(dr, PosMst.MST_PAY_DC.DATA.PAY_DC_CD);
bool bAlreadyPrint = false;
for (int j = 0; j < i; j++)
{
DataRow drAgo = dtMstPayDc.Rows[j];
if (sPayWayCD == CmUtil.GetDataRowStr(drAgo, PosMst.MST_PAY_DC.DATA.PAY_DC_GRP_TYPE) && sPayDtlCD == CmUtil.GetDataRowStr(drAgo, PosMst.MST_PAY_DC.DATA.PAY_DC_CD))
{
bAlreadyPrint = true;
break;
}
}
if (bAlreadyPrint == true) continue;
switch (sPayWayCD)
{
case ItemConst.TR_ITEM_ID.CPI_PAY_ITEM: // 캠페인할인
case ItemConst.TR_ITEM_ID.USER_DC_ITEM: // 임의할인
break;
case ItemConst.TR_ITEM_ID.CHECK_ITEM: // 수표 결제
case ItemConst.TR_ITEM_ID.CASH_ITEM: // 현금 결제
//SetPosSalePaymentCash(sPrtID, alTrPayItem, sPayWayCD, sPayDtlCD);
break;
case ItemConst.TR_ITEM_ID.COUPON_ITEM: // 쿠폰
SetPosSaleCouponDis(sPrtID, alTrPayItem, sPayWayCD, sPayDtlCD);
break;
case ItemConst.TR_ITEM_ID.MOBILE_COM_POINT: // 제휴 할인
SetPosSaleMobileComDis(sPrtID, alTrPayItem, sPayWayCD, sPayDtlCD);
break;
case ItemConst.TR_ITEM_ID.POINT_ITEM: // 포인트 사용
SetPosSalePointUse(sPrtID, alTrPayItem, sPayWayCD, sPayDtlCD);
break;
case ItemConst.TR_ITEM_ID.CREDITCARD_ITEM: // 신용카드
SetPosSaleCreditCard(sPrtID, alTrPayItem, sPayWayCD, sPayDtlCD);
break;
case ItemConst.TR_ITEM_ID.ETC_INFO_ITEM: // 부가정보
//if (sPayDtlCD == ItemConst.TR_ITEM_ID.ETC_INFO.SAVEPOINT)
// SetPosSaleHappyPointSave(sPrtID,true); // 해피포인트 적립
//else
if (sPayDtlCD == ItemConst.TR_ITEM_ID.ETC_INFO.CASHBILL)
SetPosSaleCashBill(sPrtID); // 현금영수증
else if (sPayDtlCD == ItemConst.TR_ITEM_ID.ETC_INFO.OCB_SAVE)
SetPosSaleOkCashbackSave(sPrtID); // OCB 적립
break;
case ItemConst.TR_ITEM_ID.MOBILECASH_ITEM: // 교통카드 사용
SetPosSaleMobileCashUse(sPrtID, alTrPayItem, sPayWayCD, sPayDtlCD);
break;
case ItemConst.TR_ITEM_ID.GIFT_ITEM: // 상품권
case ItemConst.TR_ITEM_ID.PAYETC_ITEM: // 식권, 잔액교환권, 기타결제
SetPosSaleExChangeTicketBill(sPrtID, alTrPayItem, sPayWayCD, sPayDtlCD, iPrintCnt);
break;
case ItemConst.TR_ITEM_ID.CREDIT_ITEM: // 외상
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, cPayItem.OCCUR_ENTRY_20, "");
// Rhee, 2018.01.15 중국 고객번호 제외 및 고객명 마킹제외 Start
if (m_cPosStatus.Base.CmpCd.ToUpper().Equals("PCCN"))
// 변경
{
if (cPayItem.OCCUR_ENTRY_15.Trim() != "")
{
// 고객명
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0278))
, cPayItem.OCCUR_ENTRY_15.Trim());
}
}
else
// 기존
{
if (cPayItem.OCCUR_ENTRY_01.Trim() != "")
{
// 고객번호
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0306))
, CmUtil.LeftH(cPayItem.OCCUR_ENTRY_01, 6) + "**");
}
if (cPayItem.OCCUR_ENTRY_15.Trim() != "")
{
// 고객명
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0278))
, CmUtil.MidH(cPayItem.OCCUR_ENTRY_15.Trim(), 0, CmUtil.LenH(cPayItem.OCCUR_ENTRY_15.Trim()) - 2) + "*");
}
}
// Rhee, 2018.01.15 중국 고객번호 제외 및 고객명 마킹제외 End
// 결제금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
break;
case ItemConst.TR_ITEM_ID.EMP_DC_ITEM: // 임직원 할인
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
// 결제기본항목출력
SetPayDtlCommonPrintData(sPrtID, cPayItem, cPayItem.OCCUR_ENTRY_20, "0");
if (sPayDtlCD == ItemConst.TR_ITEM_ID.EMP_DC.SPC || sPayDtlCD == ItemConst.TR_ITEM_ID.EMP_DC.SPC_PAY)
{
// 잔여포인트
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0504))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_03));
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
break;
case ItemConst.TR_ITEM_ID.PPCARD_ITEM: // 선불카드
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
//#20171018, 해피기프트(코나머니) 결제코드(신용->선불) 변경 Start, srlee
//기존
// if (sPayDtlCD == ItemConst.TR_ITEM_ID.PPCARD.HP_GIFT)
if (sPayDtlCD == ItemConst.TR_ITEM_ID.PPCARD.HP_GIFT || sPayDtlCD == ItemConst.TR_ITEM_ID.PPCARD.HPGIFT_CARD)
//#20171018, 해피기프트(코나머니) 결제코드(신용->선불) 변경 End, srlee
{
if (cPayItem.OCCUR_ENTRY_01.Trim() != "")
{
//#20171018, 해피기프트(코나머니) 결제코드(신용->선불) 변경 Start, srlee
if (sPayDtlCD == ItemConst.TR_ITEM_ID.PPCARD.HPGIFT_CARD)
{
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, cPayItem.OCCUR_ENTRY_20, cPayItem.OCCUR_ENTRY_08); // 전화취소일 경우 표시
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0051), 0, 11)), cPayItem.OCCUR_ENTRY_01);
}
else
{
// 기존
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, cPayItem.OCCUR_ENTRY_20, "");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0051), 0, 11)), CmUtil.MidH(cPayItem.OCCUR_ENTRY_01, 0, 6) + "**");
}
//#20171018, 해피기프트(코나머니) 결제코드(신용->선불) 변경 End, srlee
}
//#20180620 해피기프트(신) 영수증에 '사용전잔액' 항목 미표시 start
/*
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0863), 0, 11))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_04));
*/
//#20180620 해피기프트(신) 영수증에 '사용전잔액' 항목 미표시 end
//#15597 (코나머니)해피기프트 프로모션 영수증 출력 변경 Start
//적용시 주석 해제
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0863), 0, 11))
// , m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_04));
//#15597 (코나머니)해피기프트 프로모션 영수증 출력 변경 End
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046), 0, 11))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0864), 0, 11))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_05));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
else
{
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, cPayItem.OCCUR_ENTRY_20, "");
if (cPayItem.OCCUR_ENTRY_01.Trim() != "")
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0306), 0, 11))
, cPayItem.OCCUR_ENTRY_01.Trim()); //CmUtil.MidH(cPayItem.OCCUR_ENTRY_01, 0, 6) + "**");
}
if (cPayItem.OCCUR_ENTRY_15.Trim() != "")
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0278), 0, 11))
, cPayItem.OCCUR_ENTRY_15.Trim());
}
if (cPayItem.AMT_ENTRY_03 > 0)
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0863), 0, 11))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_03));
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046), 0, 11))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(CmUtil.MidH(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0864), 0, 11))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_04));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
}
break;
case ItemConst.TR_ITEM_ID.FOREIGNEX_ITEM: // 외화
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0295), "");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F401,
CmUtil.MidH(cPayItem.OCCUR_ENTRY_20, 0, 16).Trim(), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_04 * nSign), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_03 * nSign), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
break;
case ItemConst.TR_ITEM_ID.EMP_PAY_ITEM: // 직원결제
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
// 결제기본항목출력
SetPayDtlCommonPrintData(sPrtID, cPayItem, cPayItem.OCCUR_ENTRY_20, "0");
if (cPayItem.OCCUR_ENTRY_10.Trim() != "") // 사원명
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0418))
, cPayItem.OCCUR_ENTRY_10.Trim());
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0504))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_04));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
break;
case ItemConst.TR_ITEM_ID.MOBILECON_ITEM: // 모바일콘
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
string sB2B = cPayItem.OCCUR_ENTRY_19 == "1" ? "-B2B" : "";
// 결제기본항목출력
SetPayDtlCommonPrintData(sPrtID, cPayItem, cPayItem.OCCUR_ENTRY_20 + sB2B, "1");
// 금액형인 경우 잔액 표시
if (cPayItem.OCCUR_ENTRY_10 == "1")
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0153))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_04));
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
break;
case ItemConst.TR_ITEM_ID.ORDER_ITEM: // 주문결제
if (sPayDtlCD == ItemConst.TR_ITEM_ID.ORDER.HAPPYORDER_PAY) // 해피오더 결제
{
Column.TR_PAYMENT.DATA cPayItem = (Column.TR_PAYMENT.DATA)alTrPayItem[0];
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, cPayItem.OCCUR_ENTRY_20, "");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
break;
case ItemConst.TR_ITEM_ID.PAY_ITEM: // 페이 결제
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAY.SMILE_PAY)
{
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0834), cPayItem.OCCUR_ENTRY_08); // 결제항목명
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0196)), cPayItem.OCCUR_ENTRY_19);
}
else if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAY.WECHAT_PAY)
{
if (cPayItem.OCCUR_ENTRY_10.Trim() == "10004")
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0971), cPayItem.OCCUR_ENTRY_08); // 결제항목명
else
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0172), cPayItem.OCCUR_ENTRY_08); // 결제항목명
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
else if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAY.ALIPAY_PAY)
{
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0172), cPayItem.OCCUR_ENTRY_08); // 결제항목명
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
// #Rhee, 20170922 중국 은련페이 추가 start
else if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAY.UNION_PAY)
{
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1037), cPayItem.OCCUR_ENTRY_08); // 결제항목명
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
// #Rhee, 20170922 중국 은련페이 추가 end
else
{
SetPayDtlCommonPrintName(sPrtID, cPayItem.OCCUR_ENTRY_20, cPayItem.OCCUR_ENTRY_08); // 결제항목명
}
// #Rhee, 20170922 중국 은련페이 추가 start
// 기존
//if (m_cPosStatus.Mst.CntryDiv == ItemConst.CNTRY_DIV.CN
// && (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAY.WECHAT_PAY || cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAY.ALIPAY_PAY))
// 변경
if (m_cPosStatus.Mst.CntryDiv == ItemConst.CNTRY_DIV.CN
&& (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAY.WECHAT_PAY || cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAY.ALIPAY_PAY || cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAY.UNION_PAY))
// #Rhee, 20170922 중국 은련페이 추가 end
{
// 승인번호
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101
, "[ " + CmUtil.RPadH(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047), 10) + " ]" + CmUtil.LPadH(cPayItem.OCCUR_ENTRY_02, 28));
// 결제금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200
, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
// #Rhee, 20171211 중국 페이결제 할인내역 추가 Start
if (cPayItem.AMT_ENTRY_02 != 0)
{
string eMsg = "";
if (cPayItem.OCCUR_ENTRY_10 == "10001") // 결제구분 (10001:알리페이, 10004:위챗페이, 10031:은련 페이)
{
eMsg = GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0216));
}
else if (cPayItem.OCCUR_ENTRY_10 == "10004")
{
eMsg = GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0217));
}
else if (cPayItem.OCCUR_ENTRY_10 == "10031")
{
eMsg = GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0218));
}
// 할인금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200
, eMsg
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_02 * -1.0)); // 할인금액은 결제,또는 반품시 무조건 -표기.
}
// #Rhee, 20171211 중국 페이결제 할인내역 추가 End
}
else
{
// 결제기본항목출력(카드)
SetPayDtlCommonPrintData(sPrtID, cPayItem, "", "0");
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
break;
default:
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
// 결제기본항목출력(카드)
SetPayDtlCommonPrintData(sPrtID, cPayItem, cPayItem.OCCUR_ENTRY_20, "0");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
break;
}
}
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region - -,
/// <summary>
/// 영수증 기타 매출 출력 - 해피기프티-충전,환불
/// </summary>
/// <param name="sPrtID">0:본영수증, 9:기타영수증</param>
/// <returns></returns>
protected string SetEtcPrint(string sPrtID)
{
string sRet = UserCom.RST_ERR;
string sPrintTitle = "";
string sPrintData = "";
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
ArrayList alEtcItem = (ArrayList)StateObject.GetItemObject(Column.TR_ETC.ITEM);
foreach (Column.TR_ETC.DATA cEtcItem in alEtcItem)
{
if (cEtcItem.CANCEL_DIV == ItemConst.PAY_CANCEL_DIV.CANCEL) continue;
if (cEtcItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
// 기타 - 해피기프티-충전,환불
if (cEtcItem.ETC_WAY_CD == ItemConst.TR_ITEM_ID.ETC_INFO_ITEM && cEtcItem.ETC_DTL_CD_01 == ItemConst.TR_ITEM_ID.ETC_INFO.HAPPYGIFT)
{
SetTopPosPrintData(PosConst.PRT_ITEM.REC, true, true, true, true); // 영수증 상단영역 출력
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
// 타이틀 출력
sPrintTitle = "";
if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_ACC_A)
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0060);
if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_ACC_C)
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0061);
//if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_USE_A)
// sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0062);
//if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_USE_C)
// sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0063);
sPrintTitle = "<<" + sPrintTitle + " " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0064) + ">>";
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F103, sPrintTitle);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
sPrintTitle = "";
sPrintData = "";
// 1. 카드번호
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043) + "]";
if (cEtcItem.OCCUR_ENTRY_01.Trim() != "")
{
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
/// 기존
/// sPrintData = CmUtil.MidH(cEtcItem.OCCUR_ENTRY_01.Trim(), 0, 6) + "**";
/// 변경
sPrintData = ChinaCardMarking(cEtcItem.OCCUR_ENTRY_01.Trim());
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 End
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
// 2.유효기간
if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_ACC_A || cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_USE_A)
{
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0067) + "]";
sPrintData = string.Format("{0:0000-00-00}", CmUtil.DoubleParse(cEtcItem.OCCUR_ENTRY_11));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
}
// 3.충전번호
if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_ACC_A || cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_USE_A)
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0065) + "]";
if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_ACC_C || cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_USE_C)
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0066) + "]";
sPrintData = m_cPosStatus.Base.StoreNo + m_cPosStatus.Base.PosNo + m_cPosStatus.Base.TradeNo;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
// 4.충전금액
if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_ACC_A || cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_USE_A)
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0068) + "]";
if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_ACC_C || cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_USE_C)
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0069) + "]";
sPrintData = m_cPosStatus.Global.NumericTOCurrency(cEtcItem.ETC_AMT);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
// 5.승인번호
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047) + "]";
sPrintData = cEtcItem.OCCUR_ENTRY_02;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, GetAppTypePrint(cEtcItem.OCCUR_ENTRY_08) + sPrintData);
// 6.잔액
if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_ACC_A || cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_USE_A)
{
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0070) + "]";
sPrintData = m_cPosStatus.Global.NumericTOCurrency(cEtcItem.AMT_ENTRY_04);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetBtmPosPrintData(PosConst.PRT_ITEM.REC, true, true, true, true, true); // 영수증 하단영역 출력
SetEndPosPrintData(PosConst.PRT_ITEM.REC); // 영수증 출력 완료
sRet = UserCom.RST_OK;
}
//#20171025 해피기프트(신) 충전 내역 출력 위치 변경 start
//20171019 dkshin 해피기프트(신) 충전 코드 변경
//if (cEtcItem.ETC_WAY_CD == ItemConst.TR_ITEM_ID.CREDITCARD_ITEM && cEtcItem.ETC_DTL_CD_01 == ItemConst.TR_ITEM_ID.CREDITCARD.HPGIFT_CARD)
if (cEtcItem.ETC_WAY_CD == ItemConst.TR_ITEM_ID.ETC_INFO_ITEM && cEtcItem.ETC_DTL_CD_01 == ItemConst.TR_ITEM_ID.ETC_INFO.HAPPYGIFTNEW_CHARGE)
{
SetTopPosPrintData(PosConst.PRT_ITEM.REC, true, true, true, true); // 영수증 상단영역 출력
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
// 타이틀 출력
sPrintTitle = "";
//#20180131, 해피기프트카드(신) 충전 수정 Start
//if (cEtcItem.AMT_ENTRY_01.ToString() == "0")
if (cEtcItem.OCCUR_ENTRY_06.Trim() != "")
//#20180131, 해피기프트카드(신) 충전 수정 End
{
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0061);
sPrintTitle = "<<" + sPrintTitle + " " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0064) + ">>";
}
else
{
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0060);
sPrintTitle = "<<" + sPrintTitle + " " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0064) + ">>";
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F103, sPrintTitle);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
sPrintTitle = "";
sPrintData = "";
// 1. 카드번호
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043) + "]";
//if (cEtcItem.OCCUR_ENTRY_01.Trim() != "")
{
//if (cEtcItem.OCCUR_ENTRY_05 == PosConst.POS_VAN_MASTER.INPUT_TYPE.VAN_KEYIN)
sPrintData = HPGCardMarking(cEtcItem.OCCUR_ENTRY_01.Trim());
//else
{
//sPrintData = cEtcItem.OCCUR_ENTRY_01;
//sPrintData = HPGCardMarking(cEtcItem.OCCUR_ENTRY_01.Trim());
}
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
// 2.충전금액
if (cEtcItem.AMT_ENTRY_01.ToString() != "")
{
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0068) + "]";
sPrintData = m_cPosStatus.Global.NumericTOCurrency(cEtcItem.AMT_ENTRY_01);
}
else
{
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0069) + "]";
sPrintData = "0";
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
// 3.승인번호
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047) + "]";
sPrintData = cEtcItem.OCCUR_ENTRY_02;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, GetAppTypePrint(cEtcItem.OCCUR_ENTRY_08) + sPrintData);
// 4.잔액
//if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_ACC_A || cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_USE_A)
{
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0070) + "]";
sPrintData = m_cPosStatus.Global.NumericTOCurrency(cEtcItem.AMT_ENTRY_04);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetBtmPosPrintData(PosConst.PRT_ITEM.REC, true, true, true, true, true); // 영수증 하단영역 출력
SetEndPosPrintData(PosConst.PRT_ITEM.REC); // 영수증 출력 완료
sRet = UserCom.RST_OK;
}
//#20171025 해피기프트(신) 충전 내역 출력 위치 변경 end
}
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
private string ChinaCardMarking(string strV)
{
string req = "";
if (m_cPosStatus.Base.CmpCd.ToUpper().Equals(PosConst.POS_COMPANY_CODE.PCCN) && strV != "")
{
req = CmUtil.MidH(strV, 0, 4) + "********" + CmUtil.RightH(strV, 4);
}
else
{
req = CmUtil.MidH(strV, 0, 6) + "**";
}
// 쿼리, Rhee
//UserLog.WriteLogFile(UserCom.LOG_OP, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
// System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "@@ChinaCardMarking=" + strV);
return req;
}
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 End
#endregion
#region
/// <summary>
/// 더치페이 출력 플래그 업데이트
/// </summary>
private void SetAmtDutchPayPayPrint()
{
try
{
if (m_cPosStatus.Sale.DutchPayFlg == "2")
{
ArrayList alTrPayItem = (ArrayList)StateObject.GetItemObject(Column.TR_PAYMENT.ITEM); // 결제아이템
// 잔액교환권 발행권 출력 - 고객용
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1" || cPayItem.PAY_DTL_CD_05 == PosConst.PAY_DC_TYPE.DC) continue;
cPayItem.DutchPayPrtDiv = "1";
}
}
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
}
#endregion
#region
/// <summary>
/// 영수증 상품 영역 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetPosSalePluItem(string sPrtID)
{
try
{
//#20170905 미군기지 환율 표시 start
double dUsarmyEx = CmUtil.DoubleParse(CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT509), "0"));
double dSaleAmt = 0; // 금액
double dSalePrc = 0; // 단가
double dTotDcAmt = 0; // 총할인금액
double dItemDcAmt = 0; // 단품할인
//#20170905 미군기지 환율 표시 end
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
string sOptHpCpnPluSel = PosMstManager.GetPosOption(POS_OPTION.OPT324); // 해피쿠폰상품선택여부(0:상품미선택, 1:상품선택)
ICampaignUs cCampaingMain = (ICampaignUs)sManager.InitServiceInstance(ServiceLists.ASV_CAMPAIGN.DLL, ServiceLists.ASV_CAMPAIGN.CAMPAIGN_MAIN);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F100, "-");
// 국가별 상품 상단 정의
switch (m_cPosStatus.Mst.CntryDiv)
{
case ItemConst.CNTRY_DIV.FR:
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F405, "QTE", "PRODUIT", "UNIT", "TOTAL");
break;
default:
// grayber@20180110 전자영수증 주문(대기)번호표 출력 start - 영수증 출력 : 상품 상단 컬럼 출력
// 추가
if (
//grayber@20180226 대기번호표 조건 변경 start - 조건 단순화
// 기존
// PosMstManager.GetPosOption(POS_OPTION.OPT429).Trim().Equals("1") // 전자영수증 발행 여부
//&& PosMstManager.GetPosOption(POS_OPTION.OPT008).Trim().Equals("1") // 대기(주문) 번호 사용여부
//&& m_cTrnStatus.Head.OrderNo.Trim().Equals("") != true // 주문번호가 있으면
//&& m_cTrnStatus.Head.TradeDiv != ItemConst.TRAN_DIV.REFUND // 반품이 아닐때
//&& CheckElectronic_Receipt().Equals("Y") == true // 전자영수증 발행 고객
//변경
base.m_bElectRec == true && m_cTrnStatus.Head.TradeDiv != ItemConst.TRAN_DIV.REFUND
//grayber@20180226 대기번호표 조건 변경 end
)
{
// 제품명, 수량3
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0101), MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0103));
break;
}
// grayber@20180110 전자영수증 주문(대기)번호표 출력 end
// 상품명, 수량, 금액
// 2019-04-16 - 1997fx11 : 판매상품 목록의 타이틀 인쇄
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F301
, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0101), MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0103), MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0091));
// 할인내역, 할인금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202
, "(" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0166) + ")", "(" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0079) + ")");
break;
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 2019-04-16 - 1997fx11 : 판매상품 및 수량 금액 인쇄
ArrayList alTrPluItem = (ArrayList)StateObject.GetItemObject(Column.TR_PLU.ITEM); // 상품 아이템
int nPluSeq = 0;
foreach (Column.TR_PLU.DATA cPluItem in alTrPluItem)
{
//#15746 해피오더 '쇼킹박스' 관련 POS 시스템 개발 요청 start
if (cPluItem.SLACK_FIELD.Trim() != "") continue;
//#15746 해피오더 '쇼킹박스' 관련 POS 시스템 개발 요청 end
if (cPluItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
//#20170905 미군기지 환율 표시 start
if (dUsarmyEx > 0)
{
dSaleAmt = CmUtil.MathRounds(cPluItem.SALE_AMT / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2); //
dSalePrc = CmUtil.MathRounds(cPluItem.SALE_PRC / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2); // 단가
dTotDcAmt = CmUtil.MathRounds(cPluItem.TOT_DC_AMT / dUsarmyEx, PosConst.MATH_ROUND.ROUND, 2); // 총할인금액
dItemDcAmt = CmUtil.MathRounds(cPluItem.ITEM_DC_AMT / dUsarmyEx, PosConst.MATH_ROUND.ROUND, 2); // 단품할인
}
//#20170905 미군기지 환율 표시 end
string sPRT_HDR = PosConst.PRT_HDR.PRT_NOR;
//#20170905 미군기지 환율 표시 start
//기존
//string sSALE_AMT = m_cPosStatus.Global.NumericTOCurrency(cPluItem.SALE_AMT * nSign); // 금액
//변경
string sSALE_AMT = "";
if (dUsarmyEx > 0)
{
sSALE_AMT = (dSaleAmt * nSign).ToString(); // 금액
}
else
{
sSALE_AMT = m_cPosStatus.Global.NumericTOCurrency(cPluItem.SALE_AMT * nSign); // 금액
}
//#20170905 미군기지 환율 표시 end
string sPluName = "";
// 로스거래이면 금액에 사유명 출력
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.ETC.LOSS
|| (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.LOG.HOLD_DEAL && CmUtil.LongParse(cPluItem.NONSALES_RSN_CD) != 0)) sSALE_AMT = cPluItem.NONSALES_RSN_NM;
if (cPluItem.CANCEL_DIV == "1" || cPluItem.CANCEL_DIV_MAIN == "1")
{
// 더치페이(상품)일 경우
if (m_cPosStatus.Sale.DutchPayFlg == "1" && (cPluItem.DUTCH_PAY_CAN_DIV == "0" || cPluItem.DUTCH_PAY_MAIN_CAN_DIV == "0")) continue;
sPRT_HDR = PosConst.PRT_HDR.PRT_JNL;
sSALE_AMT = "CANCEL";
}
else
{
if (cPluItem.ITEM_DIV == ItemConst.PLU_ITEM_DIV.SET_DETL && cPluItem.BILL_AMT == 0 && PosMstManager.GetPosOption(POS_OPTION.OPT423) == "0")
{
sPRT_HDR = PosConst.PRT_HDR.PRT_JNL; // 세트하위(저널출력)
}
else if (cPluItem.ITEM_DIV == ItemConst.PLU_ITEM_DIV.OPT_MENU && cPluItem.BILL_AMT == 0 && PosMstManager.GetPosOption(POS_OPTION.OPT424) == "0")
{
sPRT_HDR = PosConst.PRT_HDR.PRT_JNL; // 부가메뉴(저널출력)
}
else if (cPluItem.ITEM_DIV == ItemConst.PLU_ITEM_DIV.OPT_MENU && cPluItem.SUBPRC_MENU_KEY_DIV == "1") // 부가메뉴구분(1:속성,2:업차지,3:선택메뉴)
{
// Del, 2017.04.13, 속성도 출력
//sPRT_HDR = PosConst.PRT_HDR.PRT_JNL; // 부가메뉴 속성이면 (저널출력)
}
}
if (sPRT_HDR == PosConst.PRT_HDR.PRT_JNL)
{
sPluName = "".PadRight(7) + cPluItem.ITEM_NAME; // 순번(3)+기호(3) + 명
}
// grayber@20180110 전자영수증 주문(대기)번호표 출력 start - 영수증 출력 : 상품명 처리 (No Sequence Number)
// 추가
else if (
//grayber@20180226 대기번호표 조건 변경 start - 조건 단순화
// 기존
// PosMstManager.GetPosOption(POS_OPTION.OPT429).Trim().Equals("1") // 전자영수증 발행 여부
//&& PosMstManager.GetPosOption(POS_OPTION.OPT008).Trim().Equals("1") // 대기(주문) 번호 사용여부
//&& m_cTrnStatus.Head.OrderNo.Trim().Equals("") != true // 주문번호가 있으면
//&& m_cTrnStatus.Head.TradeDiv != ItemConst.TRAN_DIV.REFUND // 반품이 아닐때
//&& CheckElectronic_Receipt().Equals("Y") == true // 전자영수증 발행 고객
// 변경
base.m_bElectRec == true && m_cTrnStatus.Head.TradeDiv != ItemConst.TRAN_DIV.REFUND
//grayber@20180226 대기번호표 조건 변경 end
)
{
sPluName += cPluItem.ITEM_NAME;
}
// grayber@20180110 전자영수증 주문(대기)번호표 출력 end
else
{
nPluSeq++; // 순번 출력데이터 생성
sPluName = string.Format("{0:D3}", nPluSeq);
// 면세상품 구분 추가
sPluName += cPluItem.ITEM_TAX_DIV == PosConst.ITEM_TAX_DIV.FREE || cPluItem.NOTAX_DIV == PosConst.ITEM_NOTAX_DIV.YES ? "*" : " ";
// 할인불가 구분추가
sPluName += cPluItem.DC_PRMT_YN == "1" ? "N" : " ";
// 적립불가 구분추가
sPluName += cPluItem.ACCUM_PRMT_YN == "0" ? "P" : " ";
sPluName += " ";
// SPC 임직원 할인 적용 상품명 앞에 'E)' 추가
if (cPluItem.EMP_DC_DIV == ItemConst.TR_ITEM_ID.EMP_DC_ITEM + ItemConst.TR_ITEM_ID.EMP_DC.SPC
|| cPluItem.EMP_DC_DIV == ItemConst.TR_ITEM_ID.EMP_DC_ITEM + ItemConst.TR_ITEM_ID.EMP_DC.SPC_CHINA) sPluName += "E)";
sPluName += cPluItem.ITEM_NAME;
}
//#20170905 미군기지 환율 표시 start
//기존
/*
// 상품 출력데이터 생성
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.ETC.LOSS)
SetPluItemPrintData(sPrtID, sPRT_HDR, sPluName, cPluItem.SALE_PRC * nSign, cPluItem.SALE_QTY * nSign, 0, sSALE_AMT, cPluItem.TAXRATE_CD);
else
SetPluItemPrintData(sPrtID, sPRT_HDR, sPluName, cPluItem.SALE_PRC * nSign, cPluItem.SALE_QTY * nSign, cPluItem.TOT_DC_AMT * nSign, sSALE_AMT, cPluItem.TAXRATE_CD);
*/
//변경
if (dUsarmyEx > 0)
{
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.ETC.LOSS)
SetPluItemPrintData(sPrtID, sPRT_HDR, sPluName, dSalePrc * nSign, cPluItem.SALE_QTY * nSign, 0, sSALE_AMT, cPluItem.TAXRATE_CD);
else
SetPluItemPrintData(sPrtID, sPRT_HDR, sPluName, dSalePrc * nSign, cPluItem.SALE_QTY * nSign, dTotDcAmt * nSign, sSALE_AMT, cPluItem.TAXRATE_CD);
}
else
{
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.ETC.LOSS)
SetPluItemPrintData(sPrtID, sPRT_HDR, sPluName, cPluItem.SALE_PRC * nSign, cPluItem.SALE_QTY * nSign, 0, sSALE_AMT, cPluItem.TAXRATE_CD);
else
SetPluItemPrintData(sPrtID, sPRT_HDR, sPluName, cPluItem.SALE_PRC * nSign, cPluItem.SALE_QTY * nSign, cPluItem.TOT_DC_AMT * nSign, sSALE_AMT, cPluItem.TAXRATE_CD);
}
//#20170905 미군기지 환율 표시 end
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.ETC.LOSS) continue;
if (sPRT_HDR == PosConst.PRT_HDR.PRT_JNL) continue;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 할인내역 출력
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 단품 할인
if (cPluItem.ITEM_DC_AMT > 0 && cPluItem.DC_TYPE == ItemConst.PLU_DC_TYPE.DC_ITEM && cPluItem.DC_DIV.Length >= 4)
{
// Rhee, 2018.01.15 중국 "H " 문자 제외 Start
//기존
//sPluName = "".PadRight(7) + "H " + PosMstManager.GetMstPayDc(cPluItem.DC_DIV.Substring(0, 2), cPluItem.DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
// 변경
if (m_cPosStatus.Base.CmpCd.ToUpper().Equals("PCCN"))
{
sPluName = "".PadRight(7) + PosMstManager.GetMstPayDc(cPluItem.DC_DIV.Substring(0, 2), cPluItem.DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
}
else
{
sPluName = "".PadRight(7) + "H " + PosMstManager.GetMstPayDc(cPluItem.DC_DIV.Substring(0, 2), cPluItem.DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
}
// Rhee, 2018.01.15 중국 "H " 문자 제외 End
//#20170905 미군기지 환율 표시 start
//기존
//AddPrintData(sPrtID, sPRT_HDR, PosConst.PRT_FMT.F200, sPluName, m_cPosStatus.Global.NumericTOCurrency(cPluItem.ITEM_DC_AMT * nSign * -1));
//변경
if (dUsarmyEx > 0)
{
AddPrintData(sPrtID, sPRT_HDR, PosConst.PRT_FMT.F200, sPluName, (dItemDcAmt * nSign * -1).ToString());
}
else
{
AddPrintData(sPrtID, sPRT_HDR, PosConst.PRT_FMT.F200, sPluName, m_cPosStatus.Global.NumericTOCurrency(cPluItem.ITEM_DC_AMT * nSign * -1));
}
//#20170905 미군기지 환율 표시 end
}
// 캠페인 할인
if (cPluItem.CPI_DC_AMT > 0)
{
if (cPluItem.alTrSaleCpi != null)
{
foreach (Column.TR_SALE_CPI_RSLT.DATA cTrPluCpi in cPluItem.alTrSaleCpi)
{
if (cTrPluCpi.PAY_DC_DIV == PosConst.PAY_DC_TYPE.PAY) continue; // 할인결제구분 (1:결제, 2:할인)
if (cTrPluCpi.CPI_CUST_BNFT_TYPE == ItemConst.CPI_CUST_BNFT.FREEGIFT || cTrPluCpi.CPI_CUST_BNFT_TYPE == ItemConst.CPI_CUST_BNFT.FREE_SAVE
|| cTrPluCpi.ITEM_APPLY_METHD != ItemConst.CPI_ITEM_APPLY_METHD.RECTSUM)
{
if (cTrPluCpi.DC_SUM_AMT > 0)
{
// Rhee, 2018.01.15 중국 "C " 문자 제외 Start
// 기존
//sPluName = "".PadRight(7) + "C " + cCampaingMain.GetCampaignName(cTrPluCpi.CPI_CD, 1); // 캠페인명
// 변경
if (m_cPosStatus.Base.CmpCd.ToUpper().Equals("PCCN"))
{
sPluName = "".PadRight(7) + cCampaingMain.GetCampaignName(cTrPluCpi.CPI_CD, 1); // 캠페인명
}
else
{
sPluName = "".PadRight(7) + "C " + cCampaingMain.GetCampaignName(cTrPluCpi.CPI_CD, 1); // 캠페인명
}
// Rhee, 2018.01.15 중국 "C " 문자 제외 End
AddPrintData(sPrtID, sPRT_HDR, PosConst.PRT_FMT.F200, sPluName, m_cPosStatus.Global.NumericTOCurrency(cPluItem.CPI_DC_AMT * nSign * -1));
break;
}
}
}
}
}
// 쿠폰 할인
if (cPluItem.CPN_DC_AMT > 0 && cPluItem.CPN_DC_DIV.Length >= 4)
{
if (cPluItem.CPN_DC_DIV != ItemConst.TR_ITEM_ID.COUPON_ITEM + ItemConst.TR_ITEM_ID.COUPON.INCARD || sOptHpCpnPluSel == "1") // 해피쿠폰상품선택여부(0:상품미선택, 1:상품선택)
{
sPluName = "".PadRight(7) + "H " + PosMstManager.GetMstPayDc(cPluItem.CPN_DC_DIV.Substring(0, 2), cPluItem.CPN_DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
AddPrintData(sPrtID, sPRT_HDR, PosConst.PRT_FMT.F200, sPluName, m_cPosStatus.Global.NumericTOCurrency(cPluItem.CPN_DC_AMT * nSign * -1));
}
}
// 제휴 할인
if (cPluItem.COOP_CARD_DC_AMT > 0 && cPluItem.COOP_CARD_DC_DIV.Length >= 4)
{
if (cPluItem.COOP_CARD_DC_DIV == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT + ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_VIP
|| cPluItem.COOP_CARD_DC_DIV == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT + ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_DOUBLE) // KT VIP
{
sPluName = "".PadRight(7) + "H " + PosMstManager.GetMstPayDc(cPluItem.COOP_CARD_DC_DIV.Substring(0, 2), cPluItem.COOP_CARD_DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
AddPrintData(sPrtID, sPRT_HDR, PosConst.PRT_FMT.F200, sPluName, m_cPosStatus.Global.NumericTOCurrency(cPluItem.COOP_CARD_DC_AMT * nSign * -1));
}
}
// 세트 할인
if (cPluItem.SET_DC_AMT > 0)
{
sPluName = "".PadRight(7) + "H " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0167);
AddPrintData(sPrtID, sPRT_HDR, PosConst.PRT_FMT.F200, sPluName, m_cPosStatus.Global.NumericTOCurrency(cPluItem.SET_DC_AMT * nSign * -1));
}
// 환경사랑 할인
if (cPluItem.EXCEP_DC_AMT > 0 && cPluItem.EXCEP_DC_DIV == ItemConst.PLU_DC_DIV.ELOVE_DC)
{
sPluName = "".PadRight(7) + "H " + PosMstManager.GetMstPayDc(cPluItem.EXCEP_DC_DIV.Substring(0, 2), cPluItem.EXCEP_DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
AddPrintData(sPrtID, sPRT_HDR, PosConst.PRT_FMT.F200, sPluName, m_cPosStatus.Global.NumericTOCurrency(cPluItem.EXCEP_DC_AMT * nSign * -1));
}
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 영수증 합계 영역 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetPosSaleTotal(string sPrtID)
{
return SetPosSaleTotal(sPrtID, false);
}
private bool SetPosSaleTotal(string sPrtID, bool bDisplay)
{
try
{
//#20170905 미군기지 환율 표시 start
double dUsarmyEx = CmUtil.DoubleParse(CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT509), "0"));
double dTemp = 0;
double dTemp2 = 0;
//#20170905 미군기지 환율 표시 end
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
string sOptHpCpnPluSel = PosMstManager.GetPosOption(POS_OPTION.OPT324); // 해피쿠폰상품선택여부(0:상품미선택, 1:상품선택)
ICampaignUs cCampaingMain = (ICampaignUs)sManager.InitServiceInstance(ServiceLists.ASV_CAMPAIGN.DLL, ServiceLists.ASV_CAMPAIGN.CAMPAIGN_MAIN);
string sSubDisName = ""; double nSubDisAmt = 0; // 소계할인정보
string sCpiDisName = ""; double nCpiDisAmt = 0; // 캠페인할인정보
string sCpnDisName = ""; double nCpnDisAmt = 0; // 쿠폰할인정보
string sPntDisName = ""; double nPntDisAmt = 0; // 포인트할인정보
string sEmpDisName = ""; double nEmpDisAmt = 0; // 직원할인정보
string sEtcDisName = ""; double nEtcDisAmt = 0; // 기타할인정보
ArrayList alTrPluItem = (ArrayList)StateObject.GetItemObject(Column.TR_PLU.ITEM); // 상품 아이템
foreach (Column.TR_PLU.DATA cPluItem in alTrPluItem)
{
if (cPluItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPluItem.CANCEL_DIV == "1" || cPluItem.CANCEL_DIV_MAIN == "1") continue;
// 소계 할인
if (cPluItem.ITEM_DC_AMT > 0 && cPluItem.DC_TYPE == ItemConst.PLU_DC_TYPE.DC_SUM && cPluItem.DC_DIV.Length >= 4)
{
sSubDisName = PosMstManager.GetMstPayDc(cPluItem.DC_DIV.Substring(0, 2), cPluItem.DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
//#20170905 미군기지 환율 표시 start
// 기존
//nSubDisAmt += cPluItem.ITEM_DC_AMT;
if (dUsarmyEx > 0)
{
nSubDisAmt += CmUtil.MathRounds(cPluItem.ITEM_DC_AMT / dUsarmyEx, PosConst.MATH_ROUND.ROUND, 2);
}
else
{
nSubDisAmt += cPluItem.ITEM_DC_AMT;
}
//#20170905 미군기지 환율 표시 end
}
// 캠페인 할인
if (cPluItem.CPI_DC_AMT > 0)
{
if (cPluItem.alTrSaleCpi != null)
{
foreach (Column.TR_SALE_CPI_RSLT.DATA cTrPluCpi in cPluItem.alTrSaleCpi)
{
if (cTrPluCpi.PAY_DC_DIV == PosConst.PAY_DC_TYPE.PAY) continue; // 할인결제구분 (1:결제, 2:할인)
if (cTrPluCpi.CPI_CUST_BNFT_TYPE != ItemConst.CPI_CUST_BNFT.FREEGIFT && cTrPluCpi.CPI_CUST_BNFT_TYPE != ItemConst.CPI_CUST_BNFT.FREE_SAVE
&& cTrPluCpi.ITEM_APPLY_METHD == ItemConst.CPI_ITEM_APPLY_METHD.RECTSUM) // 전체상품
{
if (cTrPluCpi.DC_SUM_AMT > 0)
{
sCpiDisName = cCampaingMain.GetCampaignName(cTrPluCpi.CPI_CD, 1); // 캠페인명
nCpiDisAmt += cTrPluCpi.DC_SUM_AMT;
break;
}
}
}
}
}
// 쿠폰 할인
if (cPluItem.CPN_DC_AMT > 0 && cPluItem.CPN_DC_DIV.Length >= 4)
{
if (cPluItem.CPN_DC_DIV == ItemConst.TR_ITEM_ID.COUPON_ITEM + ItemConst.TR_ITEM_ID.COUPON.INCARD && sOptHpCpnPluSel != "1") // 해피쿠폰상품선택여부(0:상품미선택, 1:상품선택)
{
sCpnDisName = PosMstManager.GetMstPayDc(cPluItem.CPN_DC_DIV.Substring(0, 2), cPluItem.CPN_DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
nCpnDisAmt += cPluItem.CPN_DC_AMT;
}
}
// 포인트할인
if (cPluItem.POINT_DC_AMT > 0 && cPluItem.POINT_DC_DIV.Length >= 4)
{
sPntDisName = PosMstManager.GetMstPayDc(cPluItem.POINT_DC_DIV.Substring(0, 2), cPluItem.POINT_DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
nPntDisAmt += cPluItem.POINT_DC_AMT;
}
// 직원할인
if (cPluItem.EMP_DC_AMT > 0 && cPluItem.EMP_DC_DIV.Length >= 4)
{
sEmpDisName = PosMstManager.GetMstPayDc(cPluItem.EMP_DC_DIV.Substring(0, 2), cPluItem.EMP_DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
nEmpDisAmt += cPluItem.EMP_DC_AMT;
}
// 기타할인
if (cPluItem.ETC_DC_AMT > 0 && cPluItem.ETC_DC_DIV.Length >= 4)
{
sEtcDisName = PosMstManager.GetMstPayDc(cPluItem.ETC_DC_DIV.Substring(0, 2), cPluItem.ETC_DC_DIV.Substring(2, 2), PosMst.MST_PAY_DC.DATA.PAY_DC_NM); // 결제수단명
nEtcDisAmt += cPluItem.ETC_DC_AMT;
}
}
bool bSubDisPrint = false;
if (nSubDisAmt > 0) // 소계 할인
{
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, sSubDisName, m_cPosStatus.Global.NumericTOCurrency(nSubDisAmt * nSign * -1));
if (dUsarmyEx > 0)
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, sSubDisName, (nSubDisAmt * nSign * -1).ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, sSubDisName, m_cPosStatus.Global.NumericTOCurrency(nSubDisAmt * nSign * -1));
}
//#20170905 미군기지 환율 표시 end
bSubDisPrint = true;
}
if (nCpiDisAmt > 0) // 캠페인 할인
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, sCpiDisName, m_cPosStatus.Global.NumericTOCurrency(nCpiDisAmt * nSign * -1));
bSubDisPrint = true;
}
if (nCpnDisAmt > 0) // 쿠폰 할인
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, sCpnDisName, m_cPosStatus.Global.NumericTOCurrency(nCpnDisAmt * nSign * -1));
bSubDisPrint = true;
}
if (nPntDisAmt > 0) // 포인트 할인
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, sPntDisName, m_cPosStatus.Global.NumericTOCurrency(nPntDisAmt * nSign * -1));
bSubDisPrint = true;
}
if (nEmpDisAmt > 0) // 직원 할인
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, sEmpDisName, m_cPosStatus.Global.NumericTOCurrency(nEmpDisAmt * nSign * -1));
bSubDisPrint = true;
}
if (nEtcDisAmt > 0) // 기타 할인
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, sEtcDisName, m_cPosStatus.Global.NumericTOCurrency(nEtcDisAmt * nSign * -1));
bSubDisPrint = true;
}
// 제휴 할인
ArrayList alTrPayItem = (ArrayList)StateObject.GetItemObject(Column.TR_PAYMENT.ITEM); // 결제아이템
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != ItemConst.TR_ITEM_ID.MOBILE_COM_POINT) continue; // 제휴 할인
if (cPayItem.PAY_DTL_CD_05 != PosConst.PAY_DC_TYPE.DC) continue;
//#20180413 웰컴카드 신규기능 추가 start,phj
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.WELCOMECARD) // MC
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0329), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_10 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0330), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign * -1));
}
//#20180413 웰컴카드 신규기능 추가 end,phj
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_SKT) // SKT
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0168), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_10 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0169), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign * -1));
}
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KTF) // KT
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0170), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_10 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0171), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign * -1));
}
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_LGT) // LGT
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0172), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_10 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0173), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign * -1));
}
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.OILBANK_POINT) // OILBANK
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0174), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_10 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0175), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign * -1));
}
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.HBLUE_M_POINT) // BLUE
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0176), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_10 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0177), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign * -1));
}
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.KRED_M_POINT) // RED
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0178), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_10 * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0179), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign * -1));
}
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_VIP || cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_DOUBLE) // KT VIP
{
continue;
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0180), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_10 * nSign));
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0181), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign * -1));
}
bSubDisPrint = true;
}
if (bSubDisPrint == true) AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
//#20180529 소계 할인 후 보류 처리시 보류영수증에 할인 내역 출력 되도록 수정 start
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.LOG.HOLD_DEAL)
{
return true;
}
//#20180529 소계 할인 후 보류 처리시 보류영수증에 할인 내역 출력 되도록 수정 end
// 합계정보 출력
if (PosMstManager.GetPosOption(POS_OPTION.OPT419) == "1" && bDisplay == false)
{
ArrayList alPrtTagData = new ArrayList();
//#20170905 미군기지 환율 표시 start
// 기존
/*
alPrtTagData.Add(new string[] { "<TAXTOTAL>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0005)
, m_cTrnStatus.Sale.VatPluAmt > 0 ? m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.VatPluAmt * nSign) : "" }); //과세물품가액
alPrtTagData.Add(new string[] { "<TAXFREETOTAL>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0004)
, m_cTrnStatus.Sale.NoVatPluAmt > 0 ? m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.NoVatPluAmt * nSign) : "" }); //면세물품가액
alPrtTagData.Add(new string[] { "<TAXAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0006)
, m_cTrnStatus.Head.TotVatAmt > 0 ? m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotVatAmt * nSign) : "" }); //세금
alPrtTagData.Add(new string[] { "<TOTALAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0007)
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Head.TotSaleAmt
, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.TotVatAmt : 0) * nSign)}); //합계(총매출)
alPrtTagData.Add(new string[] { "<TOTDISCOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0008)
, m_cTrnStatus.Head.TotDcAmt > 0 ? m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotDcAmt * nSign) : "" }); //할인
alPrtTagData.Add(new string[] { "<GRATUITYAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0152)
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt
, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0) * nSign) }); //봉사료
alPrtTagData.Add(new string[] { "<NSALEAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0010)
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Sale.NetSaleAmt, CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt
, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0)) * nSign)}); //합계금액
alPrtTagData.Add(new string[] { "<RECEIVEDAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0018)
,m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Sale.RecvedPayAmt, m_cPosStatus.Sale.ChangeCashAmt) * nSign)});//받은금액
alPrtTagData.Add(new string[] { "<CHANGEAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0012)
, m_cPosStatus.Sale.ChangeCashAmt > 0 ? m_cPosStatus.Global.NumericTOCurrency(m_cPosStatus.Sale.ChangeCashAmt) : "" }); //거스름
*/
//변경
if (dUsarmyEx > 0)
{
alPrtTagData.Add(new string[] { "<TAXTOTAL>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0005)
, m_cTrnStatus.Sale.VatPluAmt > 0 ? (CmUtil.MathRounds(m_cTrnStatus.Sale.VatPluAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign).ToString() : "" }); //과세물품가액
alPrtTagData.Add(new string[] { "<TAXFREETOTAL>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0004)
, m_cTrnStatus.Sale.NoVatPluAmt > 0 ? (CmUtil.MathRounds(m_cTrnStatus.Sale.NoVatPluAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign).ToString() : "" }); //면세물품가액
//#20170905 미군기지 환율 표시 start - 20170911 start
// 부가세 = 합계금액 - 과세금액
//기존
//alPrtTagData.Add(new string[] { "<TAXAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0006)
// , m_cTrnStatus.Head.TotVatAmt > 0 ? (CmUtil.MathRounds(m_cTrnStatus.Head.TotVatAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign).ToString() : "" }); //세금
//변경
double dTotAmt = 0;
double dVatPluamt = 0;
double dTotVatamt = 0;
dTotAmt = (CmUtil.MathRounds(CmUtil.DoubleAdd(m_cTrnStatus.Sale.NetSaleAmt, CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0)) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign);
if (m_cTrnStatus.Sale.VatPluAmt > 0) { dVatPluamt = CmUtil.MathRounds(m_cTrnStatus.Sale.VatPluAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign; }
dTotVatamt = dTotAmt - dVatPluamt;
alPrtTagData.Add(new string[] { "<TAXAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0006)
, m_cTrnStatus.Head.TotVatAmt > 0 ? dTotVatamt.ToString() : ""}); //세금
//#20170905 미군기지 환율 표시 end - 20170911 end
alPrtTagData.Add(new string[] { "<TOTALAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0007)
, (CmUtil.MathRounds(CmUtil.DoubleAdd(m_cTrnStatus.Head.TotSaleAmt
, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.TotVatAmt : 0) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign).ToString()}); //합계(총매출)
alPrtTagData.Add(new string[] { "<TOTDISCOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0008)
, m_cTrnStatus.Head.TotDcAmt > 0 ? (CmUtil.MathRounds(m_cTrnStatus.Head.TotDcAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign).ToString() : "" }); //할인
alPrtTagData.Add(new string[] { "<GRATUITYAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0152)
, (CmUtil.MathRounds(CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt
, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign).ToString() }); //봉사료
alPrtTagData.Add(new string[] { "<NSALEAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0010)
, (CmUtil.MathRounds(CmUtil.DoubleAdd(m_cTrnStatus.Sale.NetSaleAmt, CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt
, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0)) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign).ToString() }); //합계금액
alPrtTagData.Add(new string[] { "<RECEIVEDAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0018)
, (CmUtil.MathRounds(CmUtil.DoubleAdd(m_cTrnStatus.Sale.RecvedPayAmt, m_cPosStatus.Sale.ChangeCashAmt) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign).ToString() });//받은금액
alPrtTagData.Add(new string[] { "<CHANGEAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0012)
, m_cPosStatus.Sale.ChangeCashAmt > 0 ? (CmUtil.MathRounds(m_cPosStatus.Sale.ChangeCashAmt/ dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2)).ToString() : "" }); //거스름
}
else
{
alPrtTagData.Add(new string[] { "<TAXTOTAL>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0005)
, m_cTrnStatus.Sale.VatPluAmt > 0 ? m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.VatPluAmt * nSign) : "" }); //과세물품가액
alPrtTagData.Add(new string[] { "<TAXFREETOTAL>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0004)
, m_cTrnStatus.Sale.NoVatPluAmt > 0 ? m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.NoVatPluAmt * nSign) : "" }); //면세물품가액
alPrtTagData.Add(new string[] { "<TAXAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0006)
, m_cTrnStatus.Head.TotVatAmt > 0 ? m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotVatAmt * nSign) : "" }); //세금
alPrtTagData.Add(new string[] { "<TOTALAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0007)
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Head.TotSaleAmt
, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.TotVatAmt : 0) * nSign)}); //합계(총매출)
alPrtTagData.Add(new string[] { "<TOTDISCOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0008)
, m_cTrnStatus.Head.TotDcAmt > 0 ? m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotDcAmt * nSign) : "" }); //할인
alPrtTagData.Add(new string[] { "<GRATUITYAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0152)
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt
, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0) * nSign) }); //봉사료
alPrtTagData.Add(new string[] { "<NSALEAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0010)
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Sale.NetSaleAmt, CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt
, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0)) * nSign)}); //합계금액
alPrtTagData.Add(new string[] { "<RECEIVEDAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0018)
,m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Sale.RecvedPayAmt, m_cPosStatus.Sale.ChangeCashAmt) * nSign)});//받은금액
alPrtTagData.Add(new string[] { "<CHANGEAMOUNT>", MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0012)
, m_cPosStatus.Sale.ChangeCashAmt > 0 ? m_cPosStatus.Global.NumericTOCurrency(m_cPosStatus.Sale.ChangeCashAmt) : "" }); //거스름
}
//#20170905 미군기지 환율 표시 end
SetBillTypePaymentPrintData(sPrtID, PosConst.BILL_TYPE_DIV.TOTAL, alPrtTagData);
return true;
}
else
{
//과세/부가세 출력 유무(0 : 미 출력, 1 : 출력)
if (PosMstManager.GetPosOption(POS_OPTION.OPT402) != "0")
{
// 세금항목(면세,과세,부가세)
if (m_cTrnStatus.Sale.NoVatPluAmt > 0)
{
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
// "(*)" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0004), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.NoVatPluAmt * nSign));
if (dUsarmyEx > 0)
{
dTemp = CmUtil.MathRounds(m_cTrnStatus.Sale.NoVatPluAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
"(*)" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0004), dTemp.ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
"(*)" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0004), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.NoVatPluAmt * nSign));
}
//#20170905 미군기지 환율 표시 end
}
if (m_cTrnStatus.Sale.VatPluAmt > 0)
{
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0005), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.VatPluAmt * nSign));
if (dUsarmyEx > 0)
{
dTemp = CmUtil.MathRounds(m_cTrnStatus.Sale.VatPluAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0005), dTemp.ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0005), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.VatPluAmt * nSign));
}
//#20170905 미군기지 환율 표시 end
}
if (m_cTrnStatus.Head.TotVatAmt > 0)
{
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0006), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotVatAmt * nSign));
if (dUsarmyEx > 0)
{
//#20170905 미군기지 환율 표시 start - 20170911 start
// 부가세 = 합계금액 - 과세금액
//기존
//dTemp = CmUtil.MathRounds(m_cTrnStatus.Head.TotVatAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
//변경
double dTotAmt = 0;
double dVatAmt = 0;
dTotAmt = CmUtil.MathRounds(CmUtil.DoubleAdd(m_cTrnStatus.Sale.NetSaleAmt, CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0)) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
dVatAmt = CmUtil.MathRounds(m_cTrnStatus.Sale.VatPluAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
dTemp = (dTotAmt - dVatAmt) * nSign;
//#20170905 미군기지 환율 표시 end - 20170911 end
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0006), dTemp.ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0006), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotVatAmt * nSign));
}
//#20170905 미군기지 환율 표시 end
}
if (m_cTrnStatus.Head.SvcFeeAmt > 0)
{
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0150), m_cPosStatus.Global.NumericTOCurrency(
// m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeAmt : CmUtil.DoubleSubtraction(m_cTrnStatus.Head.SvcFeeAmt, m_cTrnStatus.Head.SvcFeeVat) * nSign));
if (dUsarmyEx > 0)
{
dTemp = CmUtil.MathRounds(
m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeAmt : CmUtil.DoubleSubtraction(m_cTrnStatus.Head.SvcFeeAmt, m_cTrnStatus.Head.SvcFeeVat) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0150), dTemp.ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0150), m_cPosStatus.Global.NumericTOCurrency(
m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeAmt : CmUtil.DoubleSubtraction(m_cTrnStatus.Head.SvcFeeAmt, m_cTrnStatus.Head.SvcFeeVat) * nSign));
}
//#20170905 미군기지 환율 표시 end
}
if (m_cTrnStatus.Head.SvcFeeVat > 0)
{
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0151), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.SvcFeeVat * nSign));
if (dUsarmyEx > 0)
{
dTemp = CmUtil.MathRounds(m_cTrnStatus.Head.SvcFeeVat / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0151), dTemp.ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0151), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.SvcFeeVat * nSign));
}
//#20170905 미군기지 환율 표시 end
}
//프랑스 과세 코드별 출력!
if (m_cPosStatus.Mst.CntryDiv == ItemConst.CNTRY_DIV.FR) SumOfTaxRate(sPrtID);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "=");
}
// 영수금액(총매출,상품할인,합계금액)
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0007), m_cPosStatus.Global.NumericTOCurrency(
// CmUtil.DoubleAdd(m_cTrnStatus.Head.TotSaleAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.TotVatAmt : 0) * nSign));
if (dUsarmyEx > 0)
{
dTemp = CmUtil.MathRounds(CmUtil.DoubleAdd(m_cTrnStatus.Head.TotSaleAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.TotVatAmt : 0) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0007), dTemp.ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0007), m_cPosStatus.Global.NumericTOCurrency(
CmUtil.DoubleAdd(m_cTrnStatus.Head.TotSaleAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.TotVatAmt : 0) * nSign));
}
//#20170905 미군기지 환율 표시 end
if (m_cTrnStatus.Head.TotDcAmt > 0 && m_cTrnStatus.Head.TradeKind != ItemConst.TRAN_KIND.ETC.LOSS)
{
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0008), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotDcAmt * nSign));
if (dUsarmyEx > 0)
{
dTemp = CmUtil.MathRounds(m_cTrnStatus.Head.TotDcAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0008), dTemp.ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0008), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotDcAmt * nSign));
}
//#20170905 미군기지 환율 표시 end
}
if (CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt, m_cTrnStatus.Head.SvcFeeVat) > 0)
{
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0152), m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0) * nSign));
if (dUsarmyEx > 0)
{
dTemp = CmUtil.MathRounds(CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0152), dTemp.ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0152), m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0) * nSign));
}
//#20170905 미군기지 환율 표시 end
}
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, bDisplay == true ? PosConst.PRT_HDR.PRT_NOR : PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F200,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0010), m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Sale.NetSaleAmt, CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0)) * nSign));
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0018), m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Sale.RecvedPayAmt, m_cPosStatus.Sale.ChangeCashAmt) * nSign));
if (dUsarmyEx > 0)
{
dTemp = CmUtil.MathRounds(CmUtil.DoubleAdd(m_cTrnStatus.Sale.NetSaleAmt, CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0)) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
dTemp2 = CmUtil.MathRounds(CmUtil.DoubleAdd(m_cTrnStatus.Sale.RecvedPayAmt, m_cPosStatus.Sale.ChangeCashAmt) / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2) * nSign;
AddPrintData(sPrtID, bDisplay == true ? PosConst.PRT_HDR.PRT_NOR : PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0010), dTemp.ToString());
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0018), dTemp2.ToString());
}
else
{
AddPrintData(sPrtID, bDisplay == true ? PosConst.PRT_HDR.PRT_NOR : PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0010), m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Sale.NetSaleAmt, CmUtil.DoubleAdd(m_cTrnStatus.Head.SvcFeeAmt, m_cPosStatus.Mst.TaxAmtIncludeYn == ItemConst.TAX_AMT_INCLUDE_YN.NOT_INCLUDED ? m_cTrnStatus.Head.SvcFeeVat : 0)) * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0018), m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Sale.RecvedPayAmt, m_cPosStatus.Sale.ChangeCashAmt) * nSign));
}
//#20170905 미군기지 환율 표시 end
if (m_cPosStatus.Sale.ChangeCashAmt > 0)
{
//#20170905 미군기지 환율 표시 start
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0012), m_cPosStatus.Global.NumericTOCurrency(m_cPosStatus.Sale.ChangeCashAmt));
if (dUsarmyEx > 0)
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0012), CmUtil.MathRounds(m_cPosStatus.Sale.ChangeCashAmt / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2).ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0012), m_cPosStatus.Global.NumericTOCurrency(m_cPosStatus.Sale.ChangeCashAmt));
}
//#20170905 미군기지 환율 표시 end
}
//if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL)
//{
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0018), m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleAdd(m_cTrnStatus.Sale.RecvedPayAmt, m_cPosStatus.Sale.ChangeCashAmt) * nSign));
// if (m_cPosStatus.Sale.ChangeCashAmt > 0)
// {
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
// MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0012), m_cPosStatus.Global.NumericTOCurrency(m_cPosStatus.Sale.ChangeCashAmt * nSign));
// }
//}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F100, "=");
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
/// <summary>
/// 상품별 과세 합 출력
/// </summary>
private void SumOfTaxRate(string sPrtID)
{
try
{
Hashtable htList = new Hashtable();
//IDataCommonUs cDataCommon = (IDataCommonUs)sManager.InitServiceInstance(ServiceLists.ASV_DATA_PROCESS.DLL, ServiceLists.ASV_DATA_PROCESS.DATA_COMMON);
//DataTable dt = null;
ArrayList alTrPluItem = (ArrayList)StateObject.GetItemObject(Column.TR_PLU.ITEM); // 상품 아이템
foreach (Column.TR_PLU.DATA cPluItem in alTrPluItem)
{
if (cPluItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (htList.Contains(cPluItem.TAXRATE_CD) == false)
{
//double dTaxRate = 0;
//dt = cDataCommon.SeletCommonCode(PosConst.COMMON_CODE_GROUP.M0101, cPluItem.TAXRATE_CD);
//if (!(dt == null || dt.Rows.Count == 0))
//{
// DataRow dr = dt.Rows[0];
// dTaxRate = CmUtil.GetDataRowDouble(dr, PosMst.MST_COMMON.DATA.NUM_VAL_TITLE_VAL_01);
//}
htList.Add(cPluItem.TAXRATE_CD, new double[] { cPluItem.TAX_RATE
, CmUtil.DoubleSubtraction(cPluItem.SALE_AMT, cPluItem.APPLY_TAX_AMT), cPluItem.APPLY_TAX_AMT, cPluItem.BILL_AMT });
}
else
{
double[] dHashValues = (double[])htList[cPluItem.TAXRATE_CD];
dHashValues[1] = CmUtil.DoubleAdd(dHashValues[1], CmUtil.DoubleSubtraction(cPluItem.SALE_AMT, cPluItem.APPLY_TAX_AMT));
dHashValues[2] = CmUtil.DoubleAdd(dHashValues[2], cPluItem.APPLY_TAX_AMT);
dHashValues[3] = CmUtil.DoubleAdd(dHashValues[3], cPluItem.BILL_AMT);
}
}
if (htList != null && htList.Count > 0)
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
foreach (DictionaryEntry entry in htList)
{
double[] dHashPrtValues = (double[])entry.Value;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F502, string.Format("[{0}]", entry.Key), m_cPosStatus.Global.NumericTOCurrency(dHashPrtValues[0]) + "%", m_cPosStatus.Global.NumericTOCurrency(dHashPrtValues[1]), m_cPosStatus.Global.NumericTOCurrency(dHashPrtValues[2]), m_cPosStatus.Global.NumericTOCurrency(dHashPrtValues[3]));
}
}
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
}
#endregion
#region ()
/// <summary>
/// 영수 캠페인(별도영수증) 출력 데이터 설정
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetCampaignAddBillPrint(string sPrtID)
{
try
{
if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND) return true;
// 영수 캠페인 출력 데이터 설정
ICampaignUs cCampaingMain = (ICampaignUs)sManager.InitServiceInstance(ServiceLists.ASV_CAMPAIGN.DLL, ServiceLists.ASV_CAMPAIGN.CAMPAIGN_MAIN);
// 복권 명판 캠페인 출력 데이터 설정
ArrayList alTrSaleCpi = (ArrayList)StateObject.GetItemObject(Column.TR_SALE_CPI_RSLT.ITEM); // 캠페인트란 아이템
foreach (Column.TR_SALE_CPI_RSLT.DATA cTrSaleCpi in alTrSaleCpi)
{
if (cTrSaleCpi.CANCEL_DIV == "1") continue;
if (cTrSaleCpi.CPI_CUST_BNFT_TYPE == ItemConst.CPI_CUST_BNFT.LOTTERY || cTrSaleCpi.CPI_CUST_BNFT_TYPE == ItemConst.CPI_CUST_BNFT.LOTT_REC
//#20170807 명판 캠페인 커팅 start
|| cTrSaleCpi.CPI_CUST_BNFT_TYPE == ItemConst.CPI_CUST_BNFT.RECEIPT
//#20170807 명판 캠페인 커팅 end
|| cTrSaleCpi.CPI_CUST_BNFT_TYPE == ItemConst.CPI_CUST_BNFT.ENTRY || cTrSaleCpi.CPI_CUST_BNFT_TYPE == ItemConst.CPI_CUST_BNFT.ENTR_REC)
{
//#20170807 명판 캠페인 커팅 start
//기존
//if (cTrSaleCpi.LTTR_NMPLAT_NO.Trim() == "") continue;
//변경
if (cTrSaleCpi.CPI_CUST_BNFT_TYPE != ItemConst.CPI_CUST_BNFT.RECEIPT)
{
if (cTrSaleCpi.LTTR_NMPLAT_NO.Trim() == "") continue;
}
//#20170807 명판 캠페인 커팅 end
// 캠페인 복권 출력정보 획득
SetTopPosPrintData(sPrtID, true, true, false, false); // 영수증 상단영역 출력
ArrayList alPrtBuf = cCampaingMain.GetCampaignPrintDataAddBill(new string[] { cTrSaleCpi.CPI_CD });
if (alPrtBuf == null || alPrtBuf.Count <= 0) return true;
foreach (string sPrtData in alPrtBuf)
{
AddPrintData(sPrtID, sPrtData);
}
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetBtmPosPrintData(sPrtID, true, false, false, false, false); // 영수증 하단영역 출력
SetEndPosPrintData(sPrtID); // 영수증 출력 완료
}
else if (cTrSaleCpi.CPI_CUST_BNFT_TYPE == ItemConst.CPI_CUST_BNFT.HP_STAMP)
{
if (cTrSaleCpi.HP_STAMP_COUPON.Trim() == "") continue;
// 캠페인별 구분자 파싱
string[] saCouponNo = cTrSaleCpi.HP_STAMP_COUPON.Split(new string[] { "," }, StringSplitOptions.None);
cTrSaleCpi.DC_QTY = 0;
for (int i = 0; i < saCouponNo.Length; i++)
{
if (saCouponNo[i].Trim() == "") continue;
// 캠페인 스템프 출력정보 획득
SetTopPosPrintData(sPrtID, true, true, false, false); // 영수증 상단영역 출력
ArrayList alPrtBuf = cCampaingMain.GetCampaignPrintDataAddBill(new string[] { cTrSaleCpi.CPI_CD, saCouponNo[i].Trim() });
if (alPrtBuf == null || alPrtBuf.Count <= 0) return true;
foreach (string sPrtData in alPrtBuf)
{
AddPrintData(sPrtID, sPrtData);
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetBtmPosPrintData(sPrtID, true, false, false, false, false); // 영수증 하단영역 출력
SetEndPosPrintData(sPrtID); // 영수증 출력 완료
cTrSaleCpi.DC_QTY++;
}
}
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
/// <summary>
/// 신용카드 무서명 전표 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetCreditCardNoSignBillPrint(string sPrtID)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
ArrayList alTrPayItem = (ArrayList)StateObject.GetItemObject(Column.TR_PAYMENT.ITEM); // 결제아이템
if (alTrPayItem.Count == 0) return false;
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.PAY_WAY_CD != ItemConst.TR_ITEM_ID.CREDITCARD_ITEM || cPayItem.PAY_DTL_CD_01 != ItemConst.TR_ITEM_ID.CREDITCARD.CREDIT_CARD) continue;
if (cPayItem.OCCUR_ENTRY_17 != "0") continue;
SetTopPosPrintData(sPrtID, true, true, true, true, "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0142) + " ]"); // 영수증 상단영역 출력
if (m_cPosStatus.Sale.DutchPayFlg == "2")
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
else
{
SetPosSalePluItem(sPrtID); // 영수증 상품영역 출력
SetPosSaleTotal(sPrtID); // 영수증 합계영역, 결제영역 출력
}
//카드 매출
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0092), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign));
//카드 매출 외
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0093), m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleSubtraction(m_cTrnStatus.Sale.NetSaleAmt, cPayItem.PAY_AMT) * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "=");
// 카드 결제 정보
SetPosSaleCreditCard(sPrtID, cPayItem);
SetEndPosPrintData(sPrtID); // 영수증 출력 완료
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region /
/// <summary>
/// 현금/수표 결제 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="alTrPayItem"></param>
/// <param name="sPayWayCD"></param>
/// <param name="sPayDtlCD"></param>
/// <returns></returns>
private bool SetPosSalePaymentCash(string sPrtID, ArrayList alTrPayItem, string sPayWayCD, string sPayDtlCD)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
bool bExistPrint = false;
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
if (sPayWayCD == ItemConst.TR_ITEM_ID.CHECK_ITEM)
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0053), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
else
//#14678 PB 평촌라이프 - 결제영수증 현금 금액 표기 수정요청 start,phj
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
//기존
//MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0013), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
//변경
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0013), m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign));
//#14678 PB 평촌라이프 - 결제영수증 현금 금액 표기 수정요청 end,phj
bExistPrint = true;
}
if (bExistPrint == true) AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion /
#region
/// <summary>
/// 쿠폰 할인 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="alTrPayItem"></param>
/// <param name="sPayWayCD"></param>
/// <param name="sPayDtlCD"></param>
/// <returns></returns>
private bool SetPosSaleCouponDis(string sPrtID, ArrayList alTrPayItem, string sPayWayCD, string sPayDtlCD)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.COUPON.CAKE_CHANGE) continue;
if (cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.COUPON.ONLINE) // 온라인 쿠폰
{
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, cPayItem.OCCUR_ENTRY_20, cPayItem.OCCUR_ENTRY_08);
// 쿠폰종류
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0145))
, cPayItem.OCCUR_ENTRY_19);
// 쿠폰번호(NNNN-**NN-NNNN-nn**)
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0056))
, cPayItem.OCCUR_ENTRY_01.Substring(0, 4) + "-**" + cPayItem.OCCUR_ENTRY_01.Substring(6, 2) + "-" + cPayItem.OCCUR_ENTRY_01.Substring(8, 4) + "-" + cPayItem.OCCUR_ENTRY_01.Substring(12, 2) + "**");
// 쿠폰금액
if (cPayItem.PAY_DTL_CD_05 == PosConst.PAY_DC_TYPE.PAY) // 할인결제구분 (1:결제, 2:할인)
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0144))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign));
}
}
else
{
// 결제기본항목출력(쿠폰)
SetPayDtlCommonPrintData(sPrtID, cPayItem, cPayItem.OCCUR_ENTRY_20, "1");
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 제휴 할인 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="alTrPayItem"></param>
/// <param name="sPayWayCD"></param>
/// <param name="sPayDtlCD"></param>
/// <returns></returns>
private bool SetPosSaleMobileComDis(string sPrtID, ArrayList alTrPayItem, string sPayWayCD, string sPayDtlCD)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (cPayItem.PAY_DTL_CD_05 == PosConst.PAY_DC_TYPE.DC && m_cPosStatus.Sale.DutchPayFlg == "2") continue; // 더치페이 금액일때 출력 안함.
// 결제기본항목출력(카드)
SetPayDtlCommonPrintData(sPrtID, cPayItem, cPayItem.OCCUR_ENTRY_20, "0");
if (cPayItem.OCCUR_ENTRY_08 == ItemConst.PAY_APP_DIV.NORMAL)
{
//#20180122 T멤버십 경우 잔여포인트를 잔여한도로 표기하기 start,phj
//기존
/*
// 잔여포인트
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_03));
*/
//변경
if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_SKT)
{
//#14450 SKT 멤버십 정책변경 start
//잔여한도 미표시
/*
// 잔여한도
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0322))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_03));
*/
//#14450 SKT 멤버십 정책변경 end
}
//#20180413 웰컴카드 신규기능 추가 start,phj
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.WELCOMECARD)
{
//
}
//#20180413 웰컴카드 신규기능 추가 end,phj
else
{
// 잔여포인트
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_03));
//KT 고객일 경우 아래와 같이 영수증 문구 추가 start,phj
if (KTDoubleMsgCheck() == true)
{
//string sMsg = string.Format(MessageManager.GetErrorMessage(POS_MESSAGE.PRINT.MSG_0324), "test1", "test2");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0324));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0325));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0326));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0327));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0328));
}
//KT 고객일 경우 아래와 같이 영수증 문구 추가 end,phj
}
//#20180122 T멤버십 경우 잔여포인트를 잔여한도로 표기하기 end,phj
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 신용카드 내역 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="alTrPayItem"></param>
/// <param name="sPayWayCD"></param>
/// <param name="sPayDtlCD"></param>
/// <returns></returns>
private bool SetPosSaleCreditCard(string sPrtID, ArrayList alTrPayItem, string sPayWayCD, string sPayDtlCD)
{
bool bRet = false;
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
// 신용카드 상세 내역 출력
bRet = SetPosSaleCreditCard(sPrtID, cPayItem);
}
// 카드 영수증 메시지 출력
if (bRet == true) SetStampGuidePrintData(sPrtID, PosConst.BILL_PRT_LOC.CARD);
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
/// <summary>
/// 신용카드 상세 내역 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="cPayItem"></param>
/// <returns></returns>
private bool SetPosSaleCreditCard(string sPrtID, Column.TR_PAYMENT.DATA cPayItem)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
if (PosMstManager.GetPosOption(POS_OPTION.OPT420) == "1")
{
#region
ArrayList alPrtTagData = new ArrayList();
alPrtTagData.Add(new string[] { "<CARDNAME>", ""
, "[ " + cPayItem.OCCUR_ENTRY_20.Trim() + " ]" }); //<CARDNAME> 카드사명
alPrtTagData.Add(new string[] { "<CARDNO>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043) + " ]"
, CmUtil.MidH(cPayItem.OCCUR_ENTRY_01, 0, 6) + "******" + "****" }); //<CARDNO> 카드번호 + " ]"
alPrtTagData.Add(new string[] { "<DIVISIONMONTH>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0045)
,(cPayItem.OCCUR_ENTRY_14 == "00") ? MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0036) : cPayItem.OCCUR_ENTRY_14 + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0037) }); //<DIVISIONMONTH> 할부개월
//#20170905 미군기지 환율 표시 start
//기존
//alPrtTagData.Add(new string[] { "<PAYAMOUNT>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046) + " ]"
// , m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign) }); //<PAYAMOUNT> 결제금액
//변경
double dUsarmyEx = 0;
dUsarmyEx = CmUtil.DoubleParse(CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT509), "0"));
if (dUsarmyEx > 0)
{
double dPayAmt = 0;
dPayAmt = CmUtil.MathRounds(cPayItem.PAY_AMT / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2);
alPrtTagData.Add(new string[] { "<PAYAMOUNT>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046) + " ]"
, m_cPosStatus.Global.NumericTOCurrency(dPayAmt * nSign) }); //<PAYAMOUNT> 결제금액
}
else
{
alPrtTagData.Add(new string[] { "<PAYAMOUNT>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046) + " ]"
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign) }); //<PAYAMOUNT> 결제금액
}
//#20170905 미군기지 환율 표시 end
alPrtTagData.Add(new string[] { "<APPROVALNO>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047) + " ]"
, GetAppTypePrint(cPayItem.OCCUR_ENTRY_08) + cPayItem.OCCUR_ENTRY_02 }); //<APPROVALNO> 승인번호
alPrtTagData.Add(new string[] { "<JOINSTORENO>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0048)+ " ]"
, cPayItem.OCCUR_ENTRY_18 }); //<JOINSTORENO> 가맹점번호
alPrtTagData.Add(new string[] { "<USEPOINT>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0049)+ " ]"
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_06 * nSign) }); //<USEPOINT> 사용포인트
alPrtTagData.Add(new string[] { "<USEABLEPOINT>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050)+ " ]"
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_05 * nSign) }); //<USEABLEPOINT> 잔여포인트
SetBillTypePaymentPrintData(sPrtID, PosConst.BILL_TYPE_DIV.CREDTCARD, alPrtTagData);
#endregion
}
else
{
// 결제항목명 표시
//기존 소스
//SetPayDtlCommonPrintName(sPrtID, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0184), cPayItem.OCCUR_ENTRY_08);//원래 소스
//2017.11.14; 중국 임의 등록 결제 시 카드사명 노출 하게 수정(결제 방식 추가된 오버로딩 된 메소드 호출);girak.kim;start
if(m_cPosStatus.Base.CmpCd.ToUpper().Equals(PosConst.POS_COMPANY_CODE.PCCN) && cPayItem.PAY_WAY_CD.Equals(ItemConst.TR_ITEM_ID.CREDITCARD_ITEM))
{
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0184), cPayItem);
}
else
{
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0184), cPayItem.OCCUR_ENTRY_08);//원래 소스
}
//2017.11.14; 중국 임의 등록 결제 시 카드사명 노출 하게 수정(결제 방식 추가된 오버로딩 된 메소드 호출);girak.kim;end
// 할부 결제 부분 수정(일시불,할수,포인트결제)
string sAppMonthTxt = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0036) + "]";
if (CmUtil.IntParse(cPayItem.OCCUR_ENTRY_14) > 0)
{
if (CmUtil.IntParse(cPayItem.OCCUR_ENTRY_14) >= 60)
{
sAppMonthTxt = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0137) + "]";
}
else
{
sAppMonthTxt = "[" + cPayItem.OCCUR_ENTRY_14 + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0037) + "]";
}
}
// 카드사명
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202
, GetPayDtlNameFmt(cPayItem.OCCUR_ENTRY_12.Trim() == "" ? MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0184) : cPayItem.OCCUR_ENTRY_12.Trim())
, cPayItem.OCCUR_ENTRY_20.Trim() + sAppMonthTxt);
if (cPayItem.OCCUR_ENTRY_08 == ItemConst.PAY_APP_DIV.X_CHARGE)
{
// 카드번호
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043)), cPayItem.OCCUR_ENTRY_01);
// 승인번호
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047))
, GetAppTypePrint(cPayItem.OCCUR_ENTRY_08) + cPayItem.OCCUR_ENTRY_02);
}
else
{
// 카드/승인번호
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
/// 기존
///AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
/// , CmUtil.LeftH(cPayItem.OCCUR_ENTRY_01, 6) + "**", cPayItem.OCCUR_ENTRY_02.Trim());
/// 변경
//2019.04.22 카드번호/승인번호 나오게 처리
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
, ChinaCardMarking(cPayItem.OCCUR_ENTRY_01), cPayItem.OCCUR_ENTRY_02.Trim());
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 end
}
//#20170905 미군기지 환율 표시 start
//기존
// 결제금액
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046))
// , m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign));
//변경
// 결제금액
double dUsarmyEx = 0;
dUsarmyEx = CmUtil.DoubleParse(CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT509), "0"));
if (dUsarmyEx > 0)
{
double dPayAmt = 0;
dPayAmt = CmUtil.MathRounds(cPayItem.PAY_AMT / dUsarmyEx, PosConst.MATH_ROUND.CEILING, 2);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046))
, (dPayAmt * nSign).ToString());
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign));
}
//#20170905 미군기지 환율 표시 end
if (cPayItem.OCCUR_ENTRY_22.Trim() != "")
{
//신한카드 일때 포인트로 변경! - BRK제외
//if (m_cPosStatus.Mst.CorpDiv != ItemConst.CORP_DIV.BR && (cPayItem.OCCUR_ENTRY_11 == "01" || cPayItem.OCCUR_ENTRY_11 == "05"))
//{
// if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL && CmUtil.IntParse(cPayItem.OCCUR_ENTRY_14) >= 60)
// {
// //신한카드 잔여포인트 출력!
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
// , m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleParse(cPayItem.OCCUR_ENTRY_22)));
// //사용 문구 출력 => 문구 변경(2017.07.18)
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0140));
// //AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0139));
// //#20180316 신한카드 잔여포인트 문구 짤리는 증상 수정 start
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0220));
// //#20180316 신한카드 잔여포인트 문구 짤리는 증상 수정 end
// }
// else if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND && CmUtil.IntParse(cPayItem.OCCUR_ENTRY_14) >= 60)
// {
// //취소 문구 출력! => 문구 변경(2017.07.18)
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0139));
// //AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0140));
// //#20180316 신한카드 잔여포인트 문구 짤리는 증상 수정 start
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0219));
// //#20180316 신한카드 잔여포인트 문구 짤리는 증상 수정 end
// }
// else
// {
// //신한카드 잔여포인트 출력!
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
// , m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleParse(cPayItem.OCCUR_ENTRY_22)));
// }
//}
//else
//{
//선불카드 잔액 출력!
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0077))
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleParse(cPayItem.OCCUR_ENTRY_22)));
//}
}
else if (CmUtil.DoubleParse(cPayItem.OCCUR_ENTRY_14.Trim()) >= 60)
{
// Cat단말기 펨웨어 미적용시 사용 금액 안나와 임시 수정!
if (cPayItem.OCCUR_ENTRY_08 == ItemConst.PAY_APP_DIV.CAT_TERMINAL)
{
if (cPayItem.AMT_ENTRY_06 > 0)
{
// grayber@20180108 우리모아포인트 추가 start - 우리모아카드 포인트관련 내용 출력 CAT 단말기 예외 처리
if (cPayItem.PAY_DTL_CD_02.Equals(ItemConst.CREDITCARD_DC_TY.WOORIMORE_POINTS) != true)
{
// 삼성포인트
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0049))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_06 * nSign));
//매입사코드 08 현대카드
if (!cPayItem.OCCUR_ENTRY_11.Equals("08"))
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_05));
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101
, string.Format(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0108), CmUtil.MidH(cPayItem.OCCUR_ENTRY_20, 0, 12), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_06)));
if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL)
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0109));
else
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0110));
}
// grayber@20180108 우리모아포인트 추가 end
}
}
else
{
// grayber@20180102 우리모아포인트 추가 start - 우리모아카드 포인트관련 내용 출력 예외 처리
if (cPayItem.PAY_DTL_CD_02.Equals(ItemConst.CREDITCARD_DC_TY.WOORIMORE_POINTS) != true)
{
// 삼성포인트
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0049))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_06 * nSign));
//매입사코드 08 현대카드
if (!cPayItem.OCCUR_ENTRY_11.Equals("08"))
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_05));
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101
, string.Format(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0108), CmUtil.MidH(cPayItem.OCCUR_ENTRY_20, 0, 12), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_06)));
if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL)
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0109));
else
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0110));
}
// grayber@20180102 우리모아포인트 추가 end
}
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
if (cPayItem.OCCUR_ENTRY_17 == "0")
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0094));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
else
{
// 사인 영수증 출력 구분
if (CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT405), "0") == "1")
{
// 사인 영수증 출력 수정(20170608)
//string sSignPath = string.Format("{0}{1}{2}{3}{4}{5}.BMP", BaseCom.NxDataPath, "SIGN\\", m_cPosStatus.Base.SaleDate, m_cPosStatus.Base.PosNo, m_cPosStatus.Base.TradeNo, cPayItem.OCCUR_ENTRY_02);
//if (System.IO.File.Exists(sSignPath) == true)
//{
// // 출력 추가 명령어 셋팅!
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BMP, sSignPath);
//}
string sSignPath = string.Format("{0}{1}{2}{3}.BMP", m_cPosStatus.Base.SaleDate, m_cPosStatus.Base.PosNo, m_cPosStatus.Base.TradeNo, cPayItem.OCCUR_ENTRY_02);
//if(System.IO.File.Exists(BaseCom.NxDataPath + "SIGN\\" + sSignPath) == true)
{
// 출력 추가 명령어 셋팅!
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_SGN, sSignPath);
}
}
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 교통카드 사용 내역 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="alTrPayItem"></param>
/// <param name="sPayWayCD"></param>
/// <param name="sPayDtlCD"></param>
/// <returns></returns>
private bool SetPosSaleMobileCashUse(string sPrtID, ArrayList alTrPayItem, string sPayWayCD, string sPayDtlCD)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
// 결제기본항목출력(카드)
SetPayDtlCommonPrintData(sPrtID, cPayItem, cPayItem.OCCUR_ENTRY_20, "0");
// 잔액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0070))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_04 * nSign));
if (cPayItem.OCCUR_ENTRY_12.Trim() == "1")
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103, "<<" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0134) + ">>");
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 포인트 사용 내역 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="alTrPayItem"></param>
/// <param name="sPayWayCD"></param>
/// <param name="sPayDtlCD"></param>
/// <returns></returns>
private bool SetPosSalePointUse(string sPrtID, ArrayList alTrPayItem, string sPayWayCD, string sPayDtlCD)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
bool bPayExist = false;
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
//grayber@20180208 코레일 마일리지 입력 start - 영수증 포인트 사용 내역 출력 제거
if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.POINT_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.POINT_USE.KORAIL_MILEAGE) continue;
//grayber@20180208 코레일 마일리지 입력 end
if ((cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.POINT_USE.HAPPY_POINT || cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.POINT_USE.HAPPY_POINT_USE_CHINA)
&& PosMstManager.GetPosOption(POS_OPTION.OPT420) == "1")
{
ArrayList alPrtTagData = new ArrayList();
alPrtTagData.Add(new string[] { "<CARDNO>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043) + " ]"
, cPayItem.OCCUR_ENTRY_01 }); //카드번호
if (sPayDtlCD == ItemConst.TR_ITEM_ID.POINT_USE.HAPPY_POINT || cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.POINT_USE.HAPPY_POINT_USE_CHINA)
{
alPrtTagData.Add(new string[] { "<CARDNAME>", ""
, cPayItem.OCCUR_ENTRY_12 == "Y" ? "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0107) + " ]" : "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0106) + " ]"});
}
else
{
alPrtTagData.Add(new string[] { "<CARDNAME>", "", "[ " + cPayItem.OCCUR_ENTRY_20 + " ]" });
}
alPrtTagData.Add(new string[] { "<USEPOINT>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0049) + " ]"
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign) }); //사용포인트
alPrtTagData.Add(new string[] { "<USABLEPOINT>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050) + " ]"
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_05 * nSign) }); //잔여포인트
alPrtTagData.Add(new string[] { "<APPROVALNO>","[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047) + " ]"
, GetAppTypePrint(cPayItem.OCCUR_ENTRY_08) + cPayItem.OCCUR_ENTRY_02 }); //승인번호
SetBillTypePaymentPrintData(sPrtID, PosConst.BILL_TYPE_DIV.POINT_USE, alPrtTagData);
}
else
{
//2019 - 04 - 19 - 1997fx11: 해피포인트 전액사용시 적립내용 인쇄 제외로 처리
if (sPayDtlCD == ItemConst.TR_ITEM_ID.POINT_USE.HAPPY_POINT || cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.POINT_USE.HAPPY_POINT_USE_CHINA)
{
if (bPayExist == false)
{
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0185), "");
}
string sCustInfo = "< ";
//#20180821 해피포인트 고객이름 마스킹 start
//기존
//if (cPayItem.HP_CUST_NAME.Length > 2)
//{
// sCustInfo += cPayItem.HP_CUST_NAME.Substring(0, 1) + "*" + cPayItem.HP_CUST_NAME.Substring(2) + " ";
//}
//변경
IDataCommonUs m_cDataCommon = (IDataCommonUs)sManager.InitServiceInstance(ServiceLists.ASV_DATA_PROCESS.DLL, ServiceLists.ASV_DATA_PROCESS.DATA_COMMON);
if (cPayItem.HP_CUST_NAME != "") { sCustInfo += m_cDataCommon.NameMasking(cPayItem.HP_CUST_NAME) + " "; }
//#20180821 해피포인트 고객이름 마스킹 end
sCustInfo += MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0138) + " - " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0186);
sCustInfo += cPayItem.OCCUR_ENTRY_12 == "Y" ? "[APP]" : "";
sCustInfo += " >";
// <고객명 + -사용 + APP카드여부>
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, sCustInfo + GetAppTypePrint(cPayItem.OCCUR_ENTRY_08));
}
else
{
//결제항목명
SetPayDtlCommonPrintName(sPrtID, cPayItem.OCCUR_ENTRY_20, cPayItem.OCCUR_ENTRY_08);
}
// 카드/승인번호
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
/// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
// , CmUtil.LeftH(cPayItem.OCCUR_ENTRY_01, 6) + "**", cPayItem.OCCUR_ENTRY_02.Trim());
// 변경
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
, ChinaCardMarking(cPayItem.OCCUR_ENTRY_01), cPayItem.OCCUR_ENTRY_02.Trim());
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 end
// 사용포인트
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0049))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
if (cPayItem.OCCUR_ENTRY_08 == ItemConst.PAY_APP_DIV.NORMAL)
{
// 잔여포인트
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_03));
}
if (sPayDtlCD != ItemConst.TR_ITEM_ID.POINT_USE.HAPPY_POINT && sPayDtlCD != ItemConst.TR_ITEM_ID.POINT_USE.HAPPY_POINT_USE_CHINA)
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
bPayExist = true;
}
// 해피포인트 적립 내역 출력
// 2019-04-16 - 1997fx11 : 해피포인트 적립 내역 출력
//if (sPayDtlCD == ItemConst.TR_ITEM_ID.POINT_USE.HAPPY_POINT || sPayDtlCD == ItemConst.TR_ITEM_ID.POINT_USE.HAPPY_POINT_USE_CHINA)
//{
//bool bRet = SetPosSaleHappyPointSave(sPrtID, bPayExist);
//if (bPayExist == true || bRet == true) AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
//}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 해피포인트 적립 내역 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="bPayExist"></param>
/// <returns></returns>
private bool SetPosSaleHappyPointSave(string sPrtID, bool bPayExist)
{
try
{
if (m_cPosStatus.Sale.DutchPayFlg == "2") return false; // 더치페이 금액일때 출력 안함.
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
ArrayList alEtcItem = (ArrayList)StateObject.GetItemObject(Column.TR_ETC.ITEM);
foreach (Column.TR_ETC.DATA cEtcItem in alEtcItem)
{
if (cEtcItem.CANCEL_DIV == ItemConst.PAY_CANCEL_DIV.CANCEL) continue;
if (cEtcItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cEtcItem.ETC_DTL_CD_01 != ItemConst.TR_ITEM_ID.ETC_INFO.SAVEPOINT
&& cEtcItem.ETC_DTL_CD_01 != ItemConst.TR_ITEM_ID.ETC_INFO.POINT_SAVE_CHINA) continue;
if (PosMstManager.GetPosOption(POS_OPTION.OPT420) == "1")
{
ArrayList alPrtTagData = new ArrayList();
// 카드명
alPrtTagData.Add(new string[] { "<CARDNAME>", ""
, cEtcItem.OCCUR_ENTRY_12 == "Y" ? "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0016) + " ]" : "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0014) + " ]" });
alPrtTagData.Add(new string[] { "<CARDNO>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043) + " ]"
, CmUtil.MidH(cEtcItem.OCCUR_ENTRY_01, 0, 6) + "******" + "****" }); //카드번호
alPrtTagData.Add(new string[] { "<APPROVALNO>","[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047) + " ]"
, GetAppTypePrint(cEtcItem.OCCUR_ENTRY_08) + cEtcItem.OCCUR_ENTRY_02 }); //승인번호
alPrtTagData.Add(new string[] { "<NOWPOINT>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0051) + " ]"
, m_cPosStatus.Global.NumericTOCurrency( (cEtcItem.AMT_ENTRY_01 - cEtcItem.AMT_ENTRY_07) * nSign) }); //적립포인트
alPrtTagData.Add(new string[] { "<ADDPOINT>", "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0052) + " ]"
, m_cPosStatus.Global.NumericTOCurrency( cEtcItem.AMT_ENTRY_07) }); //추가포인트
alPrtTagData.Add(new string[] { "<USABLEPOINT>","[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050) + " ]"
, m_cPosStatus.Global.NumericTOCurrency( cEtcItem.AMT_ENTRY_05) }); //잔여포인트
if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL)
{
// 정상
if (cEtcItem.HP_EXT_POINT > 0)
{
alPrtTagData.Add(new string[] { "<EXTPOINT>","[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0017) + " ]"
, m_cPosStatus.Global.NumericTOCurrency( cEtcItem.HP_EXT_POINT) }); //소명예정포인트
}
else
{
alPrtTagData.Add(new string[] { "<EXTPOINT>", "", "" }); // 소명예정포인트
}
}
else
{
// 반품
alPrtTagData.Add(new string[] { "<EXTPOINT>", "", "" }); // 소명예정포인트
}
SetBillTypePaymentPrintData(sPrtID, PosConst.BILL_TYPE_DIV.POINT_USE, alPrtTagData);
}
else
{
if (bPayExist == false)
{
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0185), "");
}
string sCustInfo = "< ";
//#20180821 해피포인트 고객이름 마스킹 start
//기존
//if (cEtcItem.HP_CUST_NAME.Length > 2)
//{
// sCustInfo += cEtcItem.HP_CUST_NAME.Substring(0, 1) + "*" + cEtcItem.HP_CUST_NAME.Substring(2) + " ";
//}
//변경
IDataCommonUs m_cDataCommon = (IDataCommonUs)sManager.InitServiceInstance(ServiceLists.ASV_DATA_PROCESS.DLL, ServiceLists.ASV_DATA_PROCESS.DATA_COMMON);
if (cEtcItem.HP_CUST_NAME != "") { sCustInfo += m_cDataCommon.NameMasking(cEtcItem.HP_CUST_NAME) + " "; }
//#20180821 해피포인트 고객이름 마스킹 end
sCustInfo += MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0138) + " - " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0187);
sCustInfo += cEtcItem.OCCUR_ENTRY_12 == "Y" ? "[APP]" : "";
sCustInfo += " >";
// <고객명 + -적립 + APP카드여부>
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, sCustInfo + GetAppTypePrint(cEtcItem.OCCUR_ENTRY_08));
// 카드/승인번호
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
/// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
// , CmUtil.LeftH(cEtcItem.OCCUR_ENTRY_01, 6) + "**", cEtcItem.OCCUR_ENTRY_02.Trim());
// 변경
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
, ChinaCardMarking(cEtcItem.OCCUR_ENTRY_01), cEtcItem.OCCUR_ENTRY_02.Trim());
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 end
// 적립포인트
// 2019-04-16 - 1997fx11 : 해피포인트 사용/적립출력
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0051))
// , m_cPosStatus.Global.NumericTOCurrency((CmUtil.DoubleSubtraction(cEtcItem.AMT_ENTRY_01, cEtcItem.AMT_ENTRY_07)) * nSign));
// 추가포인트
if (cEtcItem.AMT_ENTRY_07 > 0)
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0052))
, m_cPosStatus.Global.NumericTOCurrency(cEtcItem.AMT_ENTRY_07 * nSign));
}
if (cEtcItem.OCCUR_ENTRY_08 == ItemConst.PAY_APP_DIV.NORMAL)
{
// 잔여포인트
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
, m_cPosStatus.Global.NumericTOCurrency(cEtcItem.AMT_ENTRY_05));
}
if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL)
{
//#12500 해피포인트 실효정책 변경에 따른 프로그램 수정 start, phj
//기존
/*
// 소멸예정포인트 안내 메지시(2017.05.31)
if (cEtcItem.HP_EXT_POINT > 0 && CmUtil.LongParse(DateTime.Now.ToString("MM")) == 6)
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101
, " " + string.Format(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0190), DateTime.Now.ToString("yyyy")));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101
, " " + string.Format(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0191), m_cPosStatus.Global.NumericTOCurrency(cEtcItem.HP_EXT_POINT)));
}
*/
//변경
if (cEtcItem.HP_EXT_POINT > 0)
{
//#20180821 해피포인트 고객이름 마스킹 start
if (cEtcItem.HP_CUST_NAME != "") { cEtcItem.HP_CUST_NAME = m_cDataCommon.NameMasking(cEtcItem.HP_CUST_NAME); }
//#20180821 해피포인트 고객이름 마스킹 end
string sHPPName = cEtcItem.HP_CUST_NAME;
sHPPName = sHPPName.Substring(0, 1) + ("XX");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101
, " " + string.Format(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0213), sHPPName));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101
, " " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0214));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101
, " " + string.Format(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0215), m_cPosStatus.Global.NumericTOCurrency(cEtcItem.HP_EXT_POINT)));
}
//#12500 해피포인트 실효정책 변경에 따른 프로그램 수정 end, phj
//// 소멸예정 포인트
//if (cEtcItem.HP_EXT_POINT > 0)
//{
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0017))
// , m_cPosStatus.Global.NumericTOCurrency(cEtcItem.HP_EXT_POINT));
//}
}
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
bPayExist = true;
}
return bPayExist;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region OKCASHBACK
/// <summary>
/// OKCASHBACK 적립 내역 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetPosSaleOkCashbackSave(string sPrtID)
{
try
{
if (m_cPosStatus.Sale.DutchPayFlg == "2") return false; // 더치페이 금액일때 출력 안함.
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
ArrayList alEtcItem = (ArrayList)StateObject.GetItemObject(Column.TR_ETC.ITEM);
foreach (Column.TR_ETC.DATA cEtcItem in alEtcItem)
{
if (cEtcItem.CANCEL_DIV == ItemConst.PAY_CANCEL_DIV.CANCEL) continue;
if (cEtcItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cEtcItem.ETC_WAY_CD != ItemConst.TR_ITEM_ID.ETC_INFO_ITEM || cEtcItem.ETC_DTL_CD_01 != ItemConst.TR_ITEM_ID.ETC_INFO.OCB_SAVE) continue;
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, cEtcItem.OCCUR_ENTRY_20, cEtcItem.OCCUR_ENTRY_08);
// 카드/승인번호
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
/// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
// , CmUtil.LeftH(cEtcItem.OCCUR_ENTRY_01, 6) + "**", cEtcItem.OCCUR_ENTRY_02.Trim());
// 변경
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
, ChinaCardMarking(cEtcItem.OCCUR_ENTRY_01), cEtcItem.OCCUR_ENTRY_02.Trim());
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 end
// 적립포인트,
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0051))
, m_cPosStatus.Global.NumericTOCurrency(cEtcItem.AMT_ENTRY_01 * nSign));
if (cEtcItem.OCCUR_ENTRY_08 == ItemConst.PAY_APP_DIV.NORMAL)
{
// 잔여포인트
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
, m_cPosStatus.Global.NumericTOCurrency(cEtcItem.AMT_ENTRY_03));
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 현금영수증 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetPosSaleCashBill(string sPrtID)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
ArrayList alEtcItem = (ArrayList)StateObject.GetItemObject(Column.TR_ETC.ITEM);
foreach (Column.TR_ETC.DATA cEtcItem in alEtcItem)
{
if (cEtcItem.CANCEL_DIV == ItemConst.PAY_CANCEL_DIV.CANCEL) continue;
if (cEtcItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cEtcItem.ETC_WAY_CD != ItemConst.TR_ITEM_ID.ETC_INFO_ITEM || cEtcItem.ETC_DTL_CD_01 != ItemConst.TR_ITEM_ID.ETC_INFO.CASHBILL) continue;
// 결제항목명
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0038) + " (" + (cEtcItem.OCCUR_ENTRY_11 == "0" ? MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0041) : MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0042)) + ")", "");
// 신분번호
// Mod, 2017.08.31, 신분확인번호 마스킹 변경
// 전화번호/사업자번호 뒷 4자리만 마스킹 처리 / 카드번호 앞6자리 외 마스킹
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0104))
// , CmUtil.LeftH(cEtcItem.OCCUR_ENTRY_01, 6) + "**");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0104))
, cEtcItem.OCCUR_ENTRY_01);
// 승인금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0105))
, m_cPosStatus.Global.NumericTOCurrency(cEtcItem.ETC_AMT * nSign));
// 승인번호
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047))
, GetAppTypePrint(cEtcItem.OCCUR_ENTRY_08) + cEtcItem.OCCUR_ENTRY_02);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0040));
//#20180426 현금영수증 마스킹 변경 및 영수증 문구 변경 start
if (MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0221) != "")
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0221));
}
if (MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0222) != "")
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0222));
}
//#20180426 현금영수증 마스킹 변경 및 영수증 문구 변경 end
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 예약 그룹 내역 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="alTrPayItem"></param>
/// <param name="sPayWayCD"></param>
/// <param name="sPayDtlCD"></param>
/// <returns></returns>
private bool SetPosSalePaymentReservation(string sPrtID, ArrayList alTrPayItem, string sPayWayCD, string sPayDtlCD)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
bool bExistPrint = false;
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (sPayDtlCD == ItemConst.TR_ITEM_ID.RESERVATION.BALANCE_PAY)
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0055), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
else
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0054), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
bExistPrint = true;
}
if (bExistPrint == true) AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 해피포인트 추후적립 내역 출력
/// </summary>
/// <returns></returns>
private bool SetHappyPointAfterSave()
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
SetTopPosPrintData(PosConst.PRT_ITEM.ETC, true, true, false, true); // 영수증 상단영역 출력
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F103, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0058));
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_JNL, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0059)
+ " : " + m_cTrnStatus.Head.OrgSaleDate + "-" + m_cTrnStatus.Head.OrgPosNo + "-" + m_cTrnStatus.Head.OrgTradeNo);
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetPosSaleHappyPointSave(PosConst.PRT_ITEM.ETC, false); // 해피포인트 적립 내역 출력
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetBtmPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false, false); // 영수증 하단영역 출력
SetEndPosPrintData(PosConst.PRT_ITEM.ETC); // 영수증 출력 완료
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 현금영수증 추후발행 내역 출력
/// </summary>
/// <returns></returns>
private bool SetCashbillAfterSave()
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
SetTopPosPrintData(PosConst.PRT_ITEM.ETC, true, true, false, true); // 영수증 상단영역 출력
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F103, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0141));
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_JNL, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0059)
+ " : " + m_cTrnStatus.Head.OrgSaleDate + "-" + m_cTrnStatus.Head.OrgPosNo + "-" + m_cTrnStatus.Head.OrgTradeNo);
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetPosSaleCashBill(PosConst.PRT_ITEM.ETC); // 현금영수증 내역 출력
SetBtmPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false, false); // 영수증 하단영역 출력
SetEndPosPrintData(PosConst.PRT_ITEM.ETC); // 영수증 출력 완료
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region ADD
/// <summary>
/// 원거래에 해피포인트 추후적립 내역 출력정보 ADD
/// </summary>
/// <returns></returns>
public string AddHappyPointAfterSave(string sSaleDate, string sPosNo, string sTradeNo)
{
string sJnlData = "";
try
{
//#20171227 거래데이터 저장 오류 관련 로그추가 start
UserLog.WriteLogFile(UserCom.LOG_DEBUG,
System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, // Project Name (프로젝트명)
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + // Class Name (Class Name (클래스명))
System.Reflection.MethodBase.GetCurrentMethod().Name + "()", // Function Name (Function Name (함수명))
"AddHappyPointAfterSave STEP 1");
//#20171227 거래데이터 저장 오류 관련 로그추가 end
PrintBufClear(); // 영수증 출력버퍼 초기화
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
//#20171227 거래데이터 저장 오류 관련 로그추가 start
UserLog.WriteLogFile(UserCom.LOG_DEBUG,
System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, // Project Name (프로젝트명)
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + // Class Name (Class Name (클래스명))
System.Reflection.MethodBase.GetCurrentMethod().Name + "()", // Function Name (Function Name (함수명))
"AddHappyPointAfterSave STEP 2");
//#20171227 거래데이터 저장 오류 관련 로그추가 end
// 추후 거래 내역
string sQuery = "";
sQuery += " SELECT '#~' + '06' + '|' + '000000' + '|' + CONVERT(VARCHAR, ISNULL(SEQ, 0)) + '|' + ISNULL(ETC_WAY_CD, '') + '|' + CONVERT(VARCHAR, ISNULL(ETC_AMT, 0)) + '|' + ";
sQuery += " ISNULL(ETC_DTL_CD_01, '') + '|' + ISNULL(ETC_DTL_CD_02, '') + '|' + ISNULL(ETC_DTL_CD_03, '') + '|' + ISNULL(ETC_DTL_CD_04, '') + '|' + ISNULL(ETC_DTL_CD_05, '') + '|' + ";
sQuery += " CONVERT(VARCHAR, ISNULL(QTY_ENTRY_01, 0)) + '|' + CONVERT(VARCHAR, ISNULL(QTY_ENTRY_02, 0)) + '|' + CONVERT(VARCHAR, ISNULL(QTY_ENTRY_03, 0)) + '|' + CONVERT(VARCHAR, ISNULL(QTY_ENTRY_04, 0)) + '|' + CONVERT(VARCHAR, ISNULL(QTY_ENTRY_05, 0)) + '|' + ";
sQuery += " CONVERT(VARCHAR, ISNULL(AMT_ENTRY_01, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_02, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_03, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_04, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_05, 0)) + '|' + ";
sQuery += " CONVERT(VARCHAR, ISNULL(AMT_ENTRY_06, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_07, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_08, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_09, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_10, 0)) + '|' + ";
sQuery += " ISNULL(OCCUR_ENTRY_01, '') + '|' + ISNULL(OCCUR_ENTRY_02, '') + '|' + ISNULL(OCCUR_ENTRY_03, '') + '|' + ISNULL(OCCUR_ENTRY_04, '') + '|' + ISNULL(OCCUR_ENTRY_05, '') + '|' + ";
sQuery += " ISNULL(OCCUR_ENTRY_06, '') + '|' + ISNULL(OCCUR_ENTRY_07, '') + '|' + ISNULL(OCCUR_ENTRY_08, '') + '|' + ISNULL(OCCUR_ENTRY_09, '') + '|' + ISNULL(OCCUR_ENTRY_10, '') + '|' + ";
sQuery += " ISNULL(OCCUR_ENTRY_11, '') + '|' + ISNULL(OCCUR_ENTRY_12, '') + '|' + ISNULL(OCCUR_ENTRY_13, '') + '|' + ISNULL(OCCUR_ENTRY_14, '') + '|' + ISNULL(OCCUR_ENTRY_15, '') + '|' + ";
sQuery += " ISNULL(OCCUR_ENTRY_16, '') + '|' + ISNULL(OCCUR_ENTRY_17, '') + '|' + ISNULL(OCCUR_ENTRY_18, '') + '|' + ISNULL(OCCUR_ENTRY_19, '') + '|' + ISNULL(OCCUR_ENTRY_20, '') + '|' + ";
sQuery += " ISNULL(OCCUR_ENTRY_21, '') + '|' + ISNULL(OCCUR_ENTRY_22, '') + '|' + ISNULL(OCCUR_ENTRY_23, '') + '|' + ISNULL(OCCUR_ENTRY_24, '') + '|' + ISNULL(OCCUR_ENTRY_25, '') + '|' + ";
sQuery += " CONVERT(VARCHAR, ISNULL(BILLSPR_NO, 0)) + '|' + ISNULL(CANCEL_DIV, '') AS TR_ETC";
sQuery += " FROM ( SELECT B.* FROM POSLOG..ETC_SALE_HEADER A ";
sQuery += " JOIN POSLOG..ETC_SALE_ETC B ON A.CMP_CD=B.CMP_CD AND A.SALE_DT=B.SALE_DT AND A.STOR_CD=B.STOR_CD AND A.POS_NO=B.POS_NO AND A.REG_NO=B.REG_NO ";
sQuery += " WHERE A.CMP_CD = '" + m_cPosStatus.Base.CmpCd + "' ";
sQuery += " AND A.STOR_CD = '" + m_cPosStatus.Base.StoreNo + "' ";
sQuery += " AND A.TRADE_KINDPER IN('" + ItemConst.TRAN_KIND.AFTER.HP_SAVE + "','" + ItemConst.TRAN_KIND.AFTER.CASH_RECEIPT + "') ";
sQuery += " AND A.ORG_BILLDT = '" + sSaleDate + "' ";
sQuery += " AND A.ORG_BILL_POSNO = '" + sPosNo + "' ";
sQuery += " AND A.ORG_BILL_NO = '" + sTradeNo + "' ";
sQuery += " AND B.CANCEL_DIV = '" + ItemConst.PAY_CANCEL_DIV.NORMAL + "' ) ETC_SALE_ETC ";
/*
UserLog.WriteLogFile(UserCom.LOG_DEBUG,
System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, // Project Name (프로젝트명)
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + // Class Name (Class Name (클래스명))
System.Reflection.MethodBase.GetCurrentMethod().Name + "()", // Function Name (Function Name (함수명))
"AddHappyPointAfterSave sQuery : " + sQuery);
*/
DataTable dtEtcEtc = m_cMstService.Select(new string[] { sQuery });
/*
UserLog.WriteLogFile(UserCom.LOG_DEBUG,
System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, // Project Name (프로젝트명)
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + // Class Name (Class Name (클래스명))
System.Reflection.MethodBase.GetCurrentMethod().Name + "()", // Function Name (Function Name (함수명))
"AddHappyPointAfterSave dtEtcEtc.Rows.Count : " + dtEtcEtc.Rows.Count.ToString());
*/
if (dtEtcEtc == null || dtEtcEtc.Rows.Count == 0) return "";
/*
UserLog.WriteLogFile(UserCom.LOG_DEBUG,
System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, // Project Name (프로젝트명)
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + // Class Name (Class Name (클래스명))
System.Reflection.MethodBase.GetCurrentMethod().Name + "()", // Function Name (Function Name (함수명))
"AddHappyPointAfterSave AddPrintData Start");
*/
foreach (DataRow dr in dtEtcEtc.Rows)
{
string[] aTrData = dr[0].ToString().Split('|');
string sAppTypePrt = GetAppTypePrint(aTrData[32]);
if (aTrData[3] == ItemConst.TR_ITEM_ID.ETC_INFO_ITEM && (aTrData[5] == ItemConst.TR_ITEM_ID.ETC_INFO.SAVEPOINT || aTrData[5] == ItemConst.TR_ITEM_ID.ETC_INFO.POINT_SAVE_CHINA))
{
// 해피포인트 추후 적립
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F103, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0058));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 결제항목명
SetPayDtlCommonPrintName(PosConst.PRT_ITEM.REC, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0185), "");
string sCustInfo = "< ";
sCustInfo += "***" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0138) + " - " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0187);
sCustInfo += aTrData[36] == "Y" ? "[APP]" : "";
sCustInfo += " >";
// <고객명 + -적립 + APP카드여부>
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, sCustInfo);
// 카드/승인번호
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
/// 기존
//AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
// , CmUtil.LeftH(aTrData[25], 6) + "**", aTrData[26]);
// 변경
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
, ChinaCardMarking(aTrData[25]), aTrData[26]);
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 end
// 적립포인트
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0051))
, m_cPosStatus.Global.NumericTOCurrency((CmUtil.DoubleSubtraction(CmUtil.DoubleParse(aTrData[15]), CmUtil.DoubleParse(aTrData[21]))) * nSign));
// 추가포인트
if (CmUtil.DoubleParse(aTrData[21]) > 0)
{
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0052))
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleParse(aTrData[21]) * nSign));
}
// 잔여포인트
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleParse(aTrData[17])));
}
else if (aTrData[3] == ItemConst.TR_ITEM_ID.ETC_INFO_ITEM && aTrData[5] == ItemConst.TR_ITEM_ID.ETC_INFO.CASHBILL)
{
// 현금영수증 추후 발행
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F103, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0141));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 결제항목명
SetPayDtlCommonPrintName(PosConst.PRT_ITEM.REC, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0038) + " (" + (aTrData[35] == "0" ? MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0041) : MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0042)) + ")", "");
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0104))
, CmUtil.LeftH(aTrData[25], 6) + "**");
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0105))
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleParse(aTrData[4]) * nSign));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047))
, sAppTypePrt + aTrData[26]);
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0040));
}
}
//#20171227 거래데이터 저장 오류 관련 로그추가 start
UserLog.WriteLogFile(UserCom.LOG_DEBUG,
System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, // Project Name (프로젝트명)
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + // Class Name (Class Name (클래스명))
System.Reflection.MethodBase.GetCurrentMethod().Name + "()", // Function Name (Function Name (함수명))
"AddHappyPointAfterSave STEP 3");
//#20171227 거래데이터 저장 오류 관련 로그추가 end
SetEndPosPrintData(PosConst.PRT_ITEM.REC); // 영수증 출력 완료
for (int i = 0; i < m_aRecPrintBuf.Count; i++)
{
if (m_aRecPrintBuf[i].ToString().Length > 0)
{
if (m_aRecPrintBuf[i].ToString().StartsWith(PosConst.PRT_ITEM.REC) == true) sJnlData += CmUtil.RPadH(m_aRecPrintBuf[i].ToString().Substring(1), 47);
}
}
//#20171227 거래데이터 저장 오류 관련 로그추가 start
UserLog.WriteLogFile(UserCom.LOG_DEBUG,
System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, // Project Name (프로젝트명)
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + // Class Name (Class Name (클래스명))
System.Reflection.MethodBase.GetCurrentMethod().Name + "()", // Function Name (Function Name (함수명))
"AddHappyPointAfterSave STEP 4");
//#20171227 거래데이터 저장 오류 관련 로그추가 end
return sJnlData;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sJnlData;
}
#endregion
//#해피앱 추후적립 start, sskim
#region ADD
/// <summary>
/// 원거래에 해피포인트 해피앱 추후적립 내역 출력정보 ADD
/// </summary>
/// <returns></returns>
public string AddHappyPointHpAppAfterSave(string sSaleDate, string sPosNo, string sTradeNo)
{
string sJnlData = "";
try
{
PrintBufClear(); // 영수증 출력버퍼 초기화
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
// 해피앱 추후 거래 내역
string sQuery = "";
sQuery += " SELECT '#~' + '06' + '|' + '000000' + '|' + CONVERT(VARCHAR, ISNULL(SEQ, 0)) + '|' + ISNULL(ETC_WAY_CD, '') + '|' + CONVERT(VARCHAR, ISNULL(ETC_AMT, 0)) + '|' + ";
sQuery += " ISNULL(ETC_DTL_CD_01, '') + '|' + ISNULL(ETC_DTL_CD_02, '') + '|' + ISNULL(ETC_DTL_CD_03, '') + '|' + ISNULL(ETC_DTL_CD_04, '') + '|' + ISNULL(ETC_DTL_CD_05, '') + '|' + ";
sQuery += " CONVERT(VARCHAR, ISNULL(QTY_ENTRY_01, 0)) + '|' + CONVERT(VARCHAR, ISNULL(QTY_ENTRY_02, 0)) + '|' + CONVERT(VARCHAR, ISNULL(QTY_ENTRY_03, 0)) + '|' + CONVERT(VARCHAR, ISNULL(QTY_ENTRY_04, 0)) + '|' + CONVERT(VARCHAR, ISNULL(QTY_ENTRY_05, 0)) + '|' + ";
sQuery += " CONVERT(VARCHAR, ISNULL(AMT_ENTRY_01, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_02, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_03, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_04, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_05, 0)) + '|' + ";
sQuery += " CONVERT(VARCHAR, ISNULL(AMT_ENTRY_06, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_07, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_08, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_09, 0)) + '|' + CONVERT(VARCHAR, ISNULL(AMT_ENTRY_10, 0)) + '|' + ";
sQuery += " ISNULL(OCCUR_ENTRY_01, '') + '|' + ISNULL(OCCUR_ENTRY_02, '') + '|' + ISNULL(OCCUR_ENTRY_03, '') + '|' + ISNULL(OCCUR_ENTRY_04, '') + '|' + ISNULL(OCCUR_ENTRY_05, '') + '|' + ";
sQuery += " ISNULL(OCCUR_ENTRY_06, '') + '|' + ISNULL(OCCUR_ENTRY_07, '') + '|' + ISNULL(OCCUR_ENTRY_08, '') + '|' + ISNULL(OCCUR_ENTRY_09, '') + '|' + ISNULL(OCCUR_ENTRY_10, '') + '|' + ";
sQuery += " ISNULL(OCCUR_ENTRY_11, '') + '|' + ISNULL(OCCUR_ENTRY_12, '') + '|' + ISNULL(OCCUR_ENTRY_13, '') + '|' + ISNULL(OCCUR_ENTRY_14, '') + '|' + ISNULL(OCCUR_ENTRY_15, '') + '|' + ";
sQuery += " ISNULL(OCCUR_ENTRY_16, '') + '|' + ISNULL(OCCUR_ENTRY_17, '') + '|' + ISNULL(OCCUR_ENTRY_18, '') + '|' + ISNULL(OCCUR_ENTRY_19, '') + '|' + ISNULL(OCCUR_ENTRY_20, '') + '|' + ";
sQuery += " ISNULL(OCCUR_ENTRY_21, '') + '|' + ISNULL(OCCUR_ENTRY_22, '') + '|' + ISNULL(OCCUR_ENTRY_23, '') + '|' + ISNULL(OCCUR_ENTRY_24, '') + '|' + ISNULL(OCCUR_ENTRY_25, '') + '|' + ";
sQuery += " CONVERT(VARCHAR, ISNULL(BILLSPR_NO, 0)) + '|' + ISNULL(CANCEL_DIV, '') AS TR_ETC";
sQuery += " FROM POSLOG..TR_SALE_ETC ";
sQuery += " WHERE CMP_CD = '" + m_cPosStatus.Base.CmpCd + "' ";
sQuery += " AND SALE_DT = '" + sSaleDate + "' ";
sQuery += " AND STOR_CD = '" + m_cPosStatus.Base.StoreNo + "' ";
sQuery += " AND POS_NO = '" + sPosNo + "' ";
sQuery += " AND TRADE_NO = '" + sTradeNo + "' ";
sQuery += " AND ETC_WAY_CD = '" + ItemConst.TR_ITEM_ID.ETC_INFO_ITEM + "' ";
sQuery += " AND ETC_DTL_CD_01 IN ('" + ItemConst.TR_ITEM_ID.ETC_INFO.SAVEPOINT + "', '" + ItemConst.TR_ITEM_ID.ETC_INFO.POINT_SAVE_CHINA + "') ";
sQuery += " AND OCCUR_ENTRY_22 = '1' ";
sQuery += " AND CANCEL_DIV = '" + ItemConst.PAY_CANCEL_DIV.NORMAL + "' ";
DataTable dtEtcEtc = m_cMstService.Select(new string[] { sQuery });
if (dtEtcEtc == null || dtEtcEtc.Rows.Count == 0) return "";
foreach (DataRow dr in dtEtcEtc.Rows)
{
string[] aTrData = dr[0].ToString().Split('|');
string sAppTypePrt = GetAppTypePrint(aTrData[32]);
if (aTrData[3] == ItemConst.TR_ITEM_ID.ETC_INFO_ITEM && (aTrData[5] == ItemConst.TR_ITEM_ID.ETC_INFO.SAVEPOINT || aTrData[5] == ItemConst.TR_ITEM_ID.ETC_INFO.POINT_SAVE_CHINA))
{
// 해피포인트 추후 적립
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F103, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0058));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 결제항목명
SetPayDtlCommonPrintName(PosConst.PRT_ITEM.REC, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0185), "");
string sCustInfo = "< ";
sCustInfo += "***" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0138) + " - " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0187);
sCustInfo += aTrData[36] == "Y" ? "[APP]" : "";
sCustInfo += " >";
// <고객명 + -적립 + APP카드여부>
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, sCustInfo);
// 카드/승인번호
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
/// 기존
//AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
// , CmUtil.LeftH(aTrData[25], 6) + "**", aTrData[26]);
// 변경
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
, ChinaCardMarking(aTrData[25]), aTrData[26]);
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 end
// 적립포인트
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0051))
, m_cPosStatus.Global.NumericTOCurrency((CmUtil.DoubleSubtraction(CmUtil.DoubleParse(aTrData[15]), CmUtil.DoubleParse(aTrData[21]))) * nSign));
// 추가포인트
if (CmUtil.DoubleParse(aTrData[21]) > 0)
{
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0052))
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleParse(aTrData[21]) * nSign));
}
// 잔여포인트
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0050))
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleParse(aTrData[17])));
}
else if (aTrData[3] == ItemConst.TR_ITEM_ID.ETC_INFO_ITEM && aTrData[5] == ItemConst.TR_ITEM_ID.ETC_INFO.CASHBILL)
{
// 현금영수증 추후 발행
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F103, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0141));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 결제항목명
SetPayDtlCommonPrintName(PosConst.PRT_ITEM.REC, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0038) + " (" + (aTrData[35] == "0" ? MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0041) : MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0042)) + ")", "");
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0104))
, CmUtil.LeftH(aTrData[25], 6) + "**");
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0105))
, m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleParse(aTrData[4]) * nSign));
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047))
, sAppTypePrt + aTrData[26]);
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0040));
}
}
SetEndPosPrintData(PosConst.PRT_ITEM.REC); // 영수증 출력 완료
for (int i = 0; i < m_aRecPrintBuf.Count; i++)
{
if (m_aRecPrintBuf[i].ToString().Length > 0)
{
if (m_aRecPrintBuf[i].ToString().StartsWith(PosConst.PRT_ITEM.REC) == true) sJnlData += CmUtil.RPadH(m_aRecPrintBuf[i].ToString().Substring(1), 47);
}
}
return sJnlData;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sJnlData;
}
#endregion
//#해피앱 추후적립 end, sskim
#region
/// <summary>
/// 간략 영수증 출력
/// </summary>
/// <returns></returns>
private bool SetSimplicityReceipt(string sPrtID)
{
try
{
SetTopPosPrintData(sPrtID, true, false, false, true, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0078)); // 영수증 상단영역 출력
SetPosSalePluItem(sPrtID); // 영수증 상품영역 출력
//#20180529 소계 할인 후 보류 처리시 보류영수증에 할인 내역 출력 되도록 수정 start
SetPosSaleTotal(sPrtID);
//#20180529 소계 할인 후 보류 처리시 보류영수증에 할인 내역 출력 되도록 수정 end
// 보류영수증에 합계금액 표기(PB한양대 요청, 2017.07.10)
// 합계금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F302,
MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0231),m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotQty)
, m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.NetSaleAmt));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetBtmPosPrintData(sPrtID, true, false, false, false, false); // 영수증 하단영역 출력
SetEndPosPrintData(sPrtID); // 영수증 출력 완료
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region LOSS
/// <summary>
/// 판매 LOSS
/// </summary>
/// <returns></returns>
private bool SetSaleLoss(string sPrtID)
{
return SetSaleLoss(sPrtID, false);
}
private bool SetSaleLoss(string sPrtID, bool bDisplay)
{
try
{
double dTotAmt = 0;
ArrayList alTrPluItem = (ArrayList)StateObject.GetItemObject(Column.TR_PLU.ITEM); // 상품 아이템
IDataCommonUs m_cDataCommon = (IDataCommonUs)sManager.InitServiceInstance(ServiceLists.ASV_DATA_PROCESS.DLL, ServiceLists.ASV_DATA_PROCESS.DATA_COMMON);
// 미매출 사유별 리스트 출력
DataTable dtFuncKey = m_cDataCommon.SeletCommonCode(PosConst.COMMON_CODE_GROUP.S0001, "");
if (dtFuncKey != null && dtFuncKey.Rows.Count > 0)
{
foreach (DataRow dr in dtFuncKey.Rows)
{
string sRsnCode = CmUtil.GetDataRowStr(dr, PosMst.MST_COMMON.DATA.CMM_CD);
string sTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0135) + "[" + CmUtil.GetDataRowStr(dr, PosMst.MST_COMMON.DATA.CD_NM) + "]";
long nQty = 0;
double nAmt = 0;
foreach (Column.TR_PLU.DATA cPluItem in alTrPluItem)
{
if (cPluItem.CANCEL_DIV == PosConst.CANCEL_DIV.CANCEL || cPluItem.CANCEL_DIV_MAIN == PosConst.CANCEL_DIV.CANCEL) continue;
if (cPluItem.NONSALES_RSN_CD == sRsnCode)
{
nQty += cPluItem.SALE_QTY;
nAmt = CmUtil.DoubleAdd(nAmt, cPluItem.SALE_PRC * cPluItem.SALE_QTY);
}
}
if (nAmt > 0)
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F301, sTitle, nQty.ToString(), m_cPosStatus.Global.NumericTOCurrency(nAmt));
dTotAmt = CmUtil.DoubleAdd(dTotAmt, nAmt);
}
}
}
// 비매출 합계 출력
if (dTotAmt > 0)
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, bDisplay == true ? PosConst.PRT_HDR.PRT_NOR : PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0010), m_cPosStatus.Global.NumericTOCurrency(dTotAmt));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region // -
/// <summary>
/// 상품권/식권/잔액교환권 - 잔액교환권 발행 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="alTrPayItem"></param>
/// <param name="sPayWayCD"></param>
/// <param name="sPayDtlCD"></param>
/// <returns></returns>
private bool SetPosSaleExChangeTicketBill(string sPrtID, ArrayList alTrPayItem, string sPayWayCD, string sPayDtlCD, int iPrintCnt)
{
string sPrintMsg = "";
string sPrintMsg2 = "";
double nQty = 0;
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.GIFT_ITEM)
{
// 인증 상품권인 경우만 출력
if (cPayItem.OCCUR_ENTRY_14 != "1") continue;
// 상품권
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0268) + " " + MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0790)
+ " (" + cPayItem.OCCUR_ENTRY_18 + ")", "");
// [상품권번호]
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
/// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0269))
// , CmUtil.LeftH(cPayItem.OCCUR_ENTRY_01, 6) + "**");
// 변경
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0269))
, ChinaCardMarking(cPayItem.OCCUR_ENTRY_01));
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 end
// [상품권명칭]
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0270)), cPayItem.OCCUR_ENTRY_18);
// [승인번호]
if (cPayItem.OCCUR_ENTRY_02.Trim() != "")
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0053))
, GetAppTypePrint(cPayItem.OCCUR_ENTRY_08) + cPayItem.OCCUR_ENTRY_02);
}
// [상품권금액]
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0271))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
nQty++;
}
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.MEAL_TIKET)
{
// 식권 내역 (식권명칭)
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0258) + " " + MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0790)
+ " (" + cPayItem.OCCUR_ENTRY_19 + ")", "");
// [식권번호]
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0259)), cPayItem.OCCUR_ENTRY_01);
// [식권명칭]
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0260)), cPayItem.OCCUR_ENTRY_19);
// [식권수량/금액]
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F302
, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0262) + "/" + MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0019))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.QTY_ENTRY_01), m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
//// [식권수량]
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0262))
// , m_cPosStatus.Global.NumericTOCurrency(cPayItem.QTY_ENTRY_01));
//// [식권금액]
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0261))
// , m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
nQty = CmUtil.DoubleAdd(cPayItem.QTY_ENTRY_01, nQty);
}
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.BALANCE_VOUCHER)
{
// <<잔액교환권 내역>>
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0265) + " " + MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0790), "");
// [잔액교환권번호]
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0791))
, CmUtil.MidH(cPayItem.OCCUR_ENTRY_01, 0, 6) + "**");
// [잔액교환권금액]
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0792))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
nQty++;
}
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.PAYETC_ITEM)
{
// 기타결제 (종류명칭)
SetPayDtlCommonPrintName(sPrtID, cPayItem.OCCUR_ENTRY_20 + " (" + cPayItem.OCCUR_ENTRY_10 + ")", "");
// 결제금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.PAY_AMT * nSign));
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
if (sPayWayCD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && sPayDtlCD == ItemConst.TR_ITEM_ID.PAYETC.PAYETC_ITEM) return true;
// 잔액교환권 발행권 출력 - 고객용
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPayItem.PAY_WAY_CD != sPayWayCD || cPayItem.PAY_DTL_CD_01 != sPayDtlCD) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
// 잔액 교환권
if (((cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.GIFT_ITEM)
|| (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.MEAL_TIKET)
|| (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.BALANCE_VOUCHER))
&& (cPayItem.OCCUR_ENTRY_12.Length > 0))
{
if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.GIFT_ITEM)
sPrintMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0786);
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.MEAL_TIKET)
sPrintMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0785);
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.BALANCE_VOUCHER)
sPrintMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0265);
sPrintMsg = CmUtil.MidH(sPrintMsg, 0, 42).Trim();
// <<TITLE>>
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F103, "<<" + sPrintMsg + ">>");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.GIFT_ITEM)
sPrintMsg = cPayItem.OCCUR_ENTRY_18;
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.MEAL_TIKET)
sPrintMsg = cPayItem.OCCUR_ENTRY_19;
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.BALANCE_VOUCHER)
sPrintMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0265);
sPrintMsg = CmUtil.MidH(sPrintMsg, 0, 42).Trim();
// 잔액교환권
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, sPrintMsg);
// 사용매수:
sPrintMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0772);
sPrintMsg = CmUtil.MidH(sPrintMsg, 0, 12).Trim();
// 결재금액:
sPrintMsg2 = string.Format("{0}:", MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0049));
sPrintMsg2 = CmUtil.MidH(sPrintMsg2, 0, 12).Trim();
// 사용매수: 1 결재금액: 2,000
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F404, sPrintMsg, m_cPosStatus.Global.NumericTOCurrency(nQty), sPrintMsg2, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
// ▶▶ 결제후 잔액 금액:
if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.GIFT_ITEM)
sPrintMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0784);
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.MEAL_TIKET)
sPrintMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0783);
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.BALANCE_VOUCHER)
sPrintMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0782);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F201, sPrintMsg, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_03 * nSign));
// [잔액교환권 발행 서명]____________________
sPrintMsg = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0457);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, sPrintMsg);
// 본 잔액교환권은 발행점에서만 사용 가능합니다.
sPrintMsg = MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0456);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, sPrintMsg);
// 정상인 경우만 잔액 교환권 번호 출력
if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL)
{
if (iPrintCnt == 1)
{
sPrintMsg = MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0265);
sPrintMsg = CmUtil.MidH(sPrintMsg, 0, 42).Trim();
// 잔액교환권
AddPrintData(PosConst.PRT_ITEM.REC_TEMP, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F103, sPrintMsg);
AddPrintData(PosConst.PRT_ITEM.REC_TEMP, PosConst.PRT_HDR.PRT_BAR, cPayItem.OCCUR_ENTRY_12.Trim());
//// 고객용
//sPrintMsg = CmUtil.MidH(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0136), 0, 42).Trim();
}
}
//cPayItem.DutchPayPrtDiv = "1";
}
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 더치페이 서브 합계 생성
/// </summary>
/// <param name="sPrtID"></param>
private void SetAmtDutchPaySubTotal(string sPrtID)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
double dNowPay = 0;
ArrayList alTrPayItem = (ArrayList)StateObject.GetItemObject(Column.TR_PAYMENT.ITEM); // 결제아이템
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPayItem.DutchPayPrtDiv != "1" && cPayItem.PAY_DTL_CD_05 == PosConst.PAY_DC_TYPE.PAY)
{
//현재 결제내역
dNowPay += cPayItem.PAY_AMT;
}
}
// 매출 금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0095), m_cPosStatus.Global.NumericTOCurrency(dNowPay * nSign));
// 매출외금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0096), m_cPosStatus.Global.NumericTOCurrency(CmUtil.DoubleSubtraction(m_cTrnStatus.Sale.NetSaleAmt, dNowPay) * nSign));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
}
#endregion
#region
/// <summary>
/// 선불카드 판매 내역 생성
/// </summary>
/// <param name="sPrtID"></param>
private void SetPPCardInfo(string sPrtID)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND)
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0122), "");
else
SetPayDtlCommonPrintName(sPrtID, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0119), "");
if (PosMstManager.GetPosOption(POS_OPTION.OPT046) == "1")
{
// 선불카드 판매 - 중국
ArrayList alTrPluItem = (ArrayList)StateObject.GetItemObject(Column.TR_PLU.ITEM); // 상품 아이템
foreach (Column.TR_PLU.DATA cPluItem in alTrPluItem)
{
if (cPluItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cPluItem.CANCEL_DIV == "1" || cPluItem.CANCEL_DIV_MAIN == "1") continue;
if (cPluItem.ITEM_DIV == ItemConst.PLU_ITEM_DIV.PREPAID)
{
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
/// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043))
// , CmUtil.MidH(cPluItem.SALE_GIFT_NO, 0, 6) + "******" + CmUtil.RightH(cPluItem.SALE_GIFT_NO, 4));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043))
, CmUtil.MidH(cPluItem.SALE_GIFT_NO, 0, 4) + "****" + CmUtil.RightH(cPluItem.SALE_GIFT_NO, 4));
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 end
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0091))
, m_cPosStatus.Global.NumericTOCurrency(cPluItem.BILL_AMT * nSign));
}
}
}
else
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0120))
, m_cTrnStatus.Head.PpCardCustId);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0121))
, m_cTrnStatus.Head.PpCardCustNm); // CmUtil.MidH(cPayItem.OCCUR_ENTRY_01, 0, 6) + "******" + "****");
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
}
#endregion
#region
private int LS_BALANCE_VOUCHER_CHECK()
{
//string sRet = UserCom.RST_ERR;
int iRet = 1;
bool bCreadit = false; //신용카드 존재 유무
try
{
ArrayList alTrPayItem = (ArrayList)StateObject.GetItemObject(Column.TR_PAYMENT.ITEM); // 결제아이템
if (alTrPayItem.Count == 0) return iRet;
// 잔액교환권 발행 여부 체크
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (m_cPosStatus.Sale.DutchPayFlg == "2" && cPayItem.DutchPayPrtDiv == "1") continue;
// 잔액 교환권
if (((cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.GIFT_ITEM)
|| (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.MEAL_TIKET)
|| (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.PAYETC_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.PAYETC.BALANCE_VOUCHER))
&& (cPayItem.OCCUR_ENTRY_12.Length > 0))
{
iRet = 2;
//break;
}
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.CREDITCARD_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.CREDITCARD.CREDIT_CARD
&& cPayItem.OCCUR_ENTRY_17 == "0" && cPayItem.OCCUR_ENTRY_08 == ItemConst.PAY_APP_DIV.NORMAL)
{
//신용카드 무서명 추가!
iRet = 2;
bCreadit = true;
//break;
}
else if (cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.CREDITCARD_ITEM && cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.CREDITCARD.CREDIT_CARD)
{
bCreadit = true;
}
}
// 신용카드가 포함되어 있으면!
if (bCreadit == true)
{
// 신용카드 출력 매수 옵션
int iOptCreditPrtCnt = CmUtil.IntParse(CmUtil.IsNull(PosMstManager.GetPosOption(POS_OPTION.OPT404), "0"));
if (iOptCreditPrtCnt > iRet)
{
iRet = iOptCreditPrtCnt;
}
}
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return iRet;
}
#endregion
#region
/// <summary>
/// 화면에 표시된는 영수증 출력 데이터 생성
/// </summary>
/// <returns></returns>
public string GetDisplayPrintData(string sSaleDate, string sPosNo, string sTradeNo)
{
string sPrtData = "";
try
{
PrintBufClear(); // 영수증 출력버퍼 초기화
SetTopPosPrintData(PosConst.PRT_ITEM.REC, false, false, false, true, "", true); // 영수증 상단영역 출력
SetPosSalePluItem(PosConst.PRT_ITEM.REC); // 영수증 상품영역 출력
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.ETC.LOSS)
{
SetSaleLoss(PosConst.PRT_ITEM.REC, true); // 판매LOSS
}
else
{
SetPosSaleTotal(PosConst.PRT_ITEM.REC, true); // 영수증 합계영역, 결제영역 출력
}
SetPosSalePayment(PosConst.PRT_ITEM.REC); // 영수증 결제 내역 출력
if (m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.CHARGESALE.PREPAID)
{
SetPPCardInfo(PosConst.PRT_ITEM.REC); // 선불카드 판매 내역
}
SetBtmPosPrintData(PosConst.PRT_ITEM.REC, false, false, true, false, false, 0);// 영수증 하단영역 출력
for (int i = 0; i < m_aPrintBuf.Count; i++)
{
if (m_aPrintBuf[i].ToString().Length > 0)
{
sPrtData += CmUtil.RPadH(m_aPrintBuf[i].ToString().Substring(1), 47);
}
}
return sPrtData;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return "";
}
#endregion
#region
/// <summary>
/// 승인 구분 표시
/// </summary>
/// <param name="sAppType"></param>
/// <returns></returns>
private string GetAppTypePrint(string sAppType)
{
string sRet = "";
try
{
if (sAppType == ItemConst.PAY_APP_DIV.COMPULSION || sAppType == ItemConst.PAY_APP_DIV.PDA_APPR)
sRet = "(" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0132) + ")";
else if (sAppType == ItemConst.PAY_APP_DIV.PHON_CANCEL)
sRet = "(" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0143) + ")";
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
//2017.11.14; 중국 임의 등록 결제 시 카드사명 노출 하게 수정(결제 방식 추가하여 메소드 오버로딩 함);girak.kim;start
/// <summary>
/// 승인 구분 표시
/// </summary>
/// <param name="cPayItem"> 정보</param>
/// <returns></returns>
private string GetAppTypePrint(Column.TR_PAYMENT.DATA cPayItem)
{
string sRet = "";
string sAppType = cPayItem.OCCUR_ENTRY_08;//승인구분코드(중국은 1= 임의)
try
{
if (sAppType == ItemConst.PAY_APP_DIV.COMPULSION || sAppType == ItemConst.PAY_APP_DIV.PDA_APPR)
{
if (m_cPosStatus.Base.CmpCd.ToUpper().Equals(PosConst.POS_COMPANY_CODE.PCCN) && cPayItem.PAY_WAY_CD.Equals(ItemConst.TR_ITEM_ID.CREDITCARD_ITEM))
{
sRet = "(" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0132) + "-" + cPayItem.OCCUR_ENTRY_23 + ")";
}
else
sRet = "(" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0132) + ")";
}
else if (sAppType == ItemConst.PAY_APP_DIV.PHON_CANCEL)
sRet = "(" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0143) + ")";
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
//2017.11.14; 중국 임의 등록 결제 시 카드사명 노출 하게 수정(결제 방식 추가하여 메소드 오버로딩 함);girak.kim;end
#endregion
#region ()
/// <summary>
/// 온라인쿠폰 발행(중국) 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetOnLineCouponPrint(string sPrtID)
{
try
{
if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND) return true;
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
ArrayList alEtcItem = (ArrayList)StateObject.GetItemObject(Column.TR_ETC.ITEM);
foreach (Column.TR_ETC.DATA cEtcItem in alEtcItem)
{
if (cEtcItem.CANCEL_DIV == ItemConst.PAY_CANCEL_DIV.CANCEL) continue;
if (cEtcItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
if (cEtcItem.ETC_DTL_CD_01 != ItemConst.TR_ITEM_ID.ETC_INFO.ONLINE_CPN) continue;
SetTopPosPrintData(sPrtID, true, true, false, false); // 영수증 상단영역 출력
// AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 온라인 쿠폰
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103, "[ " + CmUtil.MidH(cEtcItem.OCCUR_ENTRY_20, 0, 38).Trim() + " ]");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 유효기간
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F101, "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0067) + " ]");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F101
, m_cPosStatus.Global.DateToCulture(cEtcItem.OCCUR_ENTRY_12) + "~" + m_cPosStatus.Global.DateToCulture(cEtcItem.OCCUR_ENTRY_13));
// 쿠폰번호
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0056) + " ]");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F101
, cEtcItem.OCCUR_ENTRY_01.Substring(0, 4) + "-" + cEtcItem.OCCUR_ENTRY_01.Substring(4, 4) + "-" + cEtcItem.OCCUR_ENTRY_01.Substring(8, 4) + "-" + cEtcItem.OCCUR_ENTRY_01.Substring(12, 4));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BAR, cEtcItem.OCCUR_ENTRY_01);
// 영수증 출력 정보
if (cEtcItem.HP_RESERVED.Trim() != "")
{
string[] saPrtData = cEtcItem.HP_RESERVED.Split(new string[] { "\n\r", "\r\n" }, StringSplitOptions.None);
foreach (string sData in saPrtData)
{
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, sData);
}
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetBtmPosPrintData(sPrtID, true, false, false, false, false); // 영수증 하단영역 출력
SetEndPosPrintData(sPrtID); // 영수증 출력 완료
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 주차 바코드 출력 메인
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetParkingBarCodePrintMain(string sPrtID)
{
try
{
double dNetSale = 0;
//반품 체크
if (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND) return true;
//정상 매출 체크
if (!(m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.NORMAL.SALE || m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.UNDECIDED.RESERVATION_REG ||
m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.FORIGN.O2O || m_cTrnStatus.Head.TradeKind == ItemConst.TRAN_KIND.FORIGN.SHOPPINGMALL)) return true;
if (m_cTrnStatus.Head.TradeKind != ItemConst.TRAN_KIND.NORMAL.SALE) return true;
//더치페이 금액 완료 일때 스킵!
if (m_cTrnStatus.Head.AmtDutchPayYn == "1" && m_cPosStatus.Sale.DutchPayFlg == "") return true;
//더치 페이 금액 일때!
if (m_cPosStatus.Sale.DutchPayFlg == "2")
{
ArrayList alTrPayItem = (ArrayList)StateObject.GetItemObject(Column.TR_PAYMENT.ITEM); // 결제아이템
// 잔액교환권 발행권 출력 - 고객용
foreach (Column.TR_PAYMENT.DATA cPayItem in alTrPayItem)
{
if (cPayItem.CANCEL_DIV == "1") continue;
if (cPayItem.DutchPayPrtDiv == "")
dNetSale = CmUtil.DoubleAdd(dNetSale, cPayItem.PAY_AMT);
}
}
else
{
dNetSale = m_cTrnStatus.Head.NetSaleAmt;
}
//금액 체크
if (dNetSale <= 0) return true;
SetParkingBarCodePrint(sPrtID, dNetSale);
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return true;
}
/// <summary>
/// 주차바코드 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetParkingBarCodePrint(string sPrtID, double SaleAmt)
{
try
{
//일자
string sDate = DateTime.Now.ToString("MMddHHmm");
//점포코드
string sStorCd = CmUtil.MidH(m_cPosStatus.Base.StoreNo, 2, 5);
//백만원 이상 체크
int iNetSale = (int)CmUtil.DoubleDivision(SaleAmt, 1000);
string sNetSale = iNetSale > 999 ? "999" : iNetSale.ToString().PadLeft(3, '0');
string sTmpBar = string.Format("{0}-{1}-{2}", sDate, sStorCd, sNetSale);
char[] achr = sTmpBar.Replace("-", "").ToCharArray();
if (achr.Length == 16)
{
// 월 | 일 | 시간 | 분 | 점포코드 | 승인금액
//-------------------------------------------------------------------
// 자리수 0 - 1 | 2 - 3 | 4 - 5 | 6 - 7 | 8 - 9 -10-11-12 | 13-14-15
// 바코드 7 -13 -12 -15 - 6 - 0 - 9 - 2 -10 -14 - 8-11- 1 - 4- 3- 5
string sBarCode = string.Format("{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}"
, achr[7]
, achr[13]
, achr[12]
, achr[15]
, achr[6]
, achr[0]
, achr[9]
, achr[2]
, achr[10]
, achr[14]
, achr[8]
, achr[11]
, achr[1]
, achr[4]
, achr[3]
, achr[5]
);
//주차 바코드
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BGB, PosConst.PRT_FMT.F101, "<< " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0188) + " >>");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BA1, sBarCode);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_CUT, ""); // 영수증 커팅
}
else
{
//바코드 조합 이상!
UserLog.WriteLogFile(UserCom.LOG_DEBUG,
System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name, // Project Name (프로젝트명)
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + // Class Name (Class Name (클래스명))
System.Reflection.MethodBase.GetCurrentMethod().Name + "()", // Function Name (Function Name (함수명))
"바코드 조합 길이 : " + achr.Length.ToString() + " | 조합코드 : " + sTmpBar);
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region
/// <summary>
/// 후불 주문내역서 출력 처리
/// </summary>
public string ExecuteOrderBillReceipt()
{
string sRet = UserCom.RST_ERR;
try
{
PrintBufClear(); // 영수증 출력버퍼 초기화
// 영수증 상단영역 출력
SetTopPosPrintData(PosConst.PRT_ITEM.ETC, true, true, false, false, "- " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0147) + " -");
// 출력일자
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101
, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0072) + ": " + m_cPosStatus.Global.DateToCulture(m_cTrnStatus.Head.SysYmd) + " " + CmUtil.StrToTime(m_cTrnStatus.Head.PayHms));
// 주문(대기)번호
if (m_cTrnStatus.Head.OrderNo != "")
{
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101
, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0097) + ": " + m_cTrnStatus.Head.OrderNo);
}
// 테이블번호
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103
, "[ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0148) + " ]");
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_BIG, PosConst.PRT_FMT.F103
, m_cTrnStatus.Head.FloorNm + "-" + m_cTrnStatus.Head.TableNm);
SetPosSalePluItem(PosConst.PRT_ITEM.ETC); // 영수증 상품영역 출력
//과세/부가세 출력 유무(0 : 미 출력, 1 : 출력)
if (PosMstManager.GetPosOption(POS_OPTION.OPT402) != "0")
{
// 세금항목(면세,과세,부가세)
if (m_cTrnStatus.Sale.NoVatPluAmt > 0)
{
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0004), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.NoVatPluAmt));
}
if (m_cTrnStatus.Sale.VatPluAmt > 0)
{
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0005), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.VatPluAmt));
}
if (m_cTrnStatus.Head.TotVatAmt > 0)
{
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F201,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0006), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotVatAmt));
}
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "=");
}
// 총주문액
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0149), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotSaleAmt));
if (m_cTrnStatus.Head.TotDcAmt > 0 && m_cTrnStatus.Head.TradeKind != ItemConst.TRAN_KIND.ETC.LOSS)
{
// 상품할인
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0008), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Head.TotDcAmt));
}
// 합계금액
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F200,
MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0010), m_cPosStatus.Global.NumericTOCurrency(m_cTrnStatus.Sale.NetSaleAmt));
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "=");
SetBtmPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false, false, 0); // 영수증 하단영역 출력
SetEndPosPrintData(PosConst.PRT_ITEM.ETC); // 영수증 출력 완료
// 영수증 출력 처리
if (PrintExecute(true, true, true) == true) sRet = UserCom.RST_OK;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
#endregion
#region
/// <summary>
/// 예약정보 출력
/// </summary>
/// <param name="sPrtID"></param>
/// <returns></returns>
private bool SetReservationPrint(string sPrtID)
{
try
{
ArrayList alReservItem = (ArrayList)StateObject.GetItemObject(Column.TR_RESERV_INFO.ITEM);
if (alReservItem.Count > 0)
{
foreach (Column.TR_RESERV_INFO.DATA cReservItem in alReservItem)
{
//string sTmpDate = cReservItem.RESERV_DT.ToString() + cReservItem.RESERV_TM.ToString();
//string sReservDate = string.Format("{0}-{1]-{2} {3}:{4}", CmUtil.MidH(sTmpDate, 0, 4), CmUtil.MidH(sTmpDate, 5, 2), CmUtil.MidH(sTmpDate, 7, 2), CmUtil.MidH(sTmpDate, 9, 2), CmUtil.MidH(sTmpDate, 11, 2));
string sReservDate = CmUtil.MidH(cReservItem.RESERV_DT, 0, 4) + "-" + CmUtil.MidH(cReservItem.RESERV_DT, 4, 2) + "-" + CmUtil.MidH(cReservItem.RESERV_DT, 6, 2) + " " + CmUtil.MidH(cReservItem.RESERV_TM, 0, 2) + ":" + CmUtil.MidH(cReservItem.RESERV_TM, 2, 2);
//예약일시
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F203, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0292), sReservDate);
//연락처
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F203, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0192), cReservItem.CUST_PHN_NO);
//정보
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR + CmUtil.RPadH(MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0663), 11) + cReservItem.RESERV_MEMO.Replace("\r\n", ""));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
//예약번호
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F203, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0188), CmUtil.MidH(cReservItem.RESERV_NO, 0, 8) + "-" + CmUtil.MidH(cReservItem.RESERV_NO, 8, 2) + "-" + CmUtil.MidH(cReservItem.RESERV_NO, 10, 5));
//고객명
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F203, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_0278), cReservItem.CUSTNM);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
}
}
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
#region GetPayDtlNameFmt( )
/// <summary>
/// 결제상세항목명 포멧
/// </summary>
/// <param name="sDtlName"></param>
/// <returns></returns>
private string GetPayDtlNameFmt(string sDtlName)
{
try
{
if (CmUtil.LenH(sDtlName) <= 13)
return "[ " + CmUtil.RPadH(sDtlName, 13) + " ]";
else if (CmUtil.LenH(sDtlName) <= 15)
return "[" + CmUtil.RPadH(sDtlName, 15) + "]";
else
return "[" + sDtlName + "]";
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return "";
}
#endregion
#region
/// <summary>
/// 결제항목 타이틀 출력 데이터 생성
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="sPayName">결제명</param>
/// <param name="sAppType">승인구분코드</param>
private void SetPayDtlCommonPrintName(string sPrtID, string sPayName, string sAppType)
{
try
{
// 결제 항목명
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F101, "■ " + CmUtil.LeftH(sPayName, 33).Trim() + GetAppTypePrint(sAppType));
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
}
//2017.11.14; 중국 임의 등록 결제 시 카드사명 노출 하게 수정(결제 방식 추가하여 메소드 오버로딩 함);girak.kim;start
/// <summary>
/// 결제항목 타이틀 출력 데이터 생성
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="sPayName">결제명</param>
/// <param name="cPayItem">결제 정보</param>
private void SetPayDtlCommonPrintName(string sPrtID, string sPayName, Column.TR_PAYMENT.DATA cPayItem)
{
try
{
// 결제 항목명
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F101, "■ " + CmUtil.LeftH(sPayName, 33).Trim() + GetAppTypePrint(cPayItem));
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
}
//2017.11.14; 중국 임의 등록 결제 시 카드사명 노출 하게 수정(결제 방식 추가하여 메소드 오버로딩 함);girak.kim;end
/// <summary>
/// 결제 기본 항목 출력 데이터 생성(타이틀, 카드번호/승인번호, 결제금액)
/// </summary>
/// <param name="sPrtID"></param>
/// <param name="cPayItem"></param>
/// <param name="sPayName">결제명</param>
/// <param name="sPayDiv">구분(0:카드, 1:쿠폰)</param>
private void SetPayDtlCommonPrintData(string sPrtID, Column.TR_PAYMENT.DATA cPayItem, string sPayName, string sPayDiv)
{
try
{
int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
// 결제 항목명
if (sPayName.Trim() != "") SetPayDtlCommonPrintName(sPrtID, sPayName, cPayItem.OCCUR_ENTRY_08);
// 카드번호/승인번호
if (cPayItem.OCCUR_ENTRY_01.Trim() != "" && cPayItem.OCCUR_ENTRY_02.Trim() != "")
{
if (sPayDiv == "1") // 쿠폰
{
// 쿠폰/승인번호
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
// 기존
////AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0182))
//// , CmUtil.LeftH(cPayItem.OCCUR_ENTRY_01, 6) + "**", cPayItem.OCCUR_ENTRY_02.Trim());
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0182))
, ChinaCardMarking(cPayItem.OCCUR_ENTRY_01), cPayItem.OCCUR_ENTRY_02.Trim());
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 End
}
else
{
// 카드/승인번호
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
// 기존
////AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
//// , CmUtil.LeftH(cPayItem.OCCUR_ENTRY_01, 6) + "**", cPayItem.OCCUR_ENTRY_02.Trim());
/////////////////////////////////
//#20180618_웰컴카드 수정_grayber
// 카드/승인번호 1줄로 표시되는 것을 -> 카드번호,승인번호 두줄로 표시되게 변경
// 기존
//AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F302, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0183))
// , ChinaCardMarking(cPayItem.OCCUR_ENTRY_01), cPayItem.OCCUR_ENTRY_02.Trim());
// 변경
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043))
, ChinaCardMarking(cPayItem.OCCUR_ENTRY_01));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047))
, cPayItem.OCCUR_ENTRY_02.Trim());
/////////////////////////////////
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 End
}
// 쿼리, Rhee
//#20180329 프린터 간헐적 미출력 증상 수정 start
//로그 생성 위치 변경
//기존
/*
UserLog.WriteLogFile(UserCom.LOG_OP, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "@@SetPayDtlCommonPrintData=" + cPayItem.OCCUR_ENTRY_01);
*/
//변경
UserLog.WriteLogFile(UserCom.LOG_OP, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "@@SetPayDtlCommonPrintData=" + cPayItem.OCCUR_ENTRY_01);
//#20180329 프린터 간헐적 미출력 증상 수정 end
}
else if (cPayItem.OCCUR_ENTRY_01.Trim() != "")
{
if (sPayDiv == "1") // 쿠폰
{
// 쿠폰번호
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
// 기존
////AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0056))
//// , CmUtil.LeftH(cPayItem.OCCUR_ENTRY_01, 6) + "**");
// 변경
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0056))
, ChinaCardMarking(cPayItem.OCCUR_ENTRY_01));
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 End
}
else
{
// 카드번호
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 Start
// 기존
////AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043))
//// , CmUtil.LeftH(cPayItem.OCCUR_ENTRY_01, 6) + "**");
// 변경
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043))
, ChinaCardMarking(cPayItem.OCCUR_ENTRY_01));
//Rhee, #2017/08/28 중국 카드번호 프린트 마킹예외처리 End
}
}
else if (cPayItem.OCCUR_ENTRY_02.Trim() != "")
{
// 승인번호
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047))
, GetAppTypePrint(cPayItem.OCCUR_ENTRY_08) + cPayItem.OCCUR_ENTRY_02);
}
// 결제금액
if (cPayItem.PAY_DTL_CD_05 == PosConst.PAY_DC_TYPE.DC)
{
// 할인금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0079))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
}
else
{
// 결제금액
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F200, GetPayDtlNameFmt(MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0046))
, m_cPosStatus.Global.NumericTOCurrency(cPayItem.AMT_ENTRY_01 * nSign));
}
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
}
#endregion
//17.05.18 dkshin 쇼킹박스 추가
#region
/// <summary>
/// 쇼킹박스 영수증 출력
/// </summary>
/// <returns></returns>
private bool SetShockingBoxReceipt(string sPrtID)
{
try
{
// 영수증 상단영역 출력
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103, "<< 쇼 킹 박 스 >>");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_TBM);
// 영수증 상품 영역 출력
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F100, "-");
string RemainPayAmt = string.Format("{0:#,##0}", m_cTrnStatus.Sale.RemainPayAmt);
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103, "[ 금액 ] " + RemainPayAmt);
//AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103, "[ 금액 ] " + sPrtData);
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 바코드 출력
//PrintBarcodeData(BarcodeType.CODE128, Alignment.CENTER, HRIPosition.BELOW, sData))
//string BarcodeData = "[BA1]" + m_cTrnStatus.Head.SaleDate + m_cTrnStatus.Head.RegNo;
string BarcodeData = "[BAR]" + m_cTrnStatus.Head.SaleDate + m_cTrnStatus.Head.RegNo;
AddPrintData(PosConst.PRT_ITEM.REC, BarcodeData);
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 하단이미지 출력
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BBM);
SetEndPosPrintData(sPrtID); // 영수증 출력 완료
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion
// Add, 2017.09.04, 근무시간 확인서 출력
#region
/// <summary>
/// 근무시간 확인서 출력
/// </summary>
/// <param name="empNo">직원코드</param>
/// <param name="empNm">직원성명</param>
/// <param name="strTime">출근일시 (yyyyMMddHHmmss)</param>
/// <param name="endTime">퇴근일시 (yyyyMMddHHmmss)</param>
/// <returns></returns>
public string ExecuteWorkTimeReceipt(string empNo, string empNm, string strTime, string endTime)
{
var ret = UserCom.RST_ERR;
try
{
var tmp = string.Empty;
// 출근시간
tmp = strTime.Replace("-", "").Replace(".", "").Replace(":", "").Replace(" ", "").Trim();
//#20180312 근무시간 확인서 출근시간 오표시되는 증상 수정 start
//기존
//var strTm = m_cPosStatus.Global.DateToCulture(tmp.Substring(0, 8)) + " " + CmUtil.StrToTime(tmp.Substring(6, 6));
//변경
var strTm = m_cPosStatus.Global.DateToCulture(tmp.Substring(0, 8)) + " " + CmUtil.StrToTime(tmp.Substring(8, 6));
//#20180312 근무시간 확인서 출근시간 오표시되는 증상 수정 end
// 퇴근시간
tmp = endTime.Replace("-", "").Replace(".", "").Replace(":", "").Replace(" ", "").Trim();
//#13513 PB 농협양주유통센터_근태관리 퇴근시간 오등록되는 증상 수정 요청. start, phj
//기존
//var endTm = m_cPosStatus.Global.DateToCulture(tmp.Substring(0, 8)) + " " + CmUtil.StrToTime(tmp.Substring(6, 6));
//변경
var endTm = m_cPosStatus.Global.DateToCulture(tmp.Substring(0, 8)) + " " + CmUtil.StrToTime(tmp.Substring(8, 6));
//#13513 PB 농협양주유통센터_근태관리 퇴근시간 오등록되는 증상 수정 요청. end, phj
// 영수증 출력버퍼 초기화
PrintBufClear();
// 영수증 상단영역 출력
SetTopPosPrintData(PosConst.PRT_ITEM.ETC, true, true, false, false, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0208));
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "*");
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0209).TrimEnd() + " " + empNo);
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0210).TrimEnd() + " " + empNm);
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0211).TrimEnd() + " " + strTm);
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0212).TrimEnd() + " " + endTm);
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "*");
// 영수증 하단영역 출력
SetBtmPosPrintData(PosConst.PRT_ITEM.ETC, true, false, true, false, false, 0);
// 영수증 출력 완료
SetEndPosPrintData(PosConst.PRT_ITEM.ETC);
ret = PrintExecute(true, true, true) == true ? UserCom.RST_OK : UserCom.RST_ERR;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
ret = UserCom.RST_ERR;
}
return ret;
}
#endregion
//#20170918 기념일 배송 출력 start
#region
public string ExecuteAnniversary(string aParam)
{
string sRet = UserCom.RST_ERR;
try
{
PrintBufClear();
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_TBM);
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1034));
ReadAnniversaryFile(aParam, m_aRecPrintBuf);
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BBM);
SetEndPosPrintData(PosConst.PRT_ITEM.ETC); // 영수증 출력 완료
if (PrintExecute(true, true, false) == true) sRet = UserCom.RST_OK;
return sRet;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
#endregion
//#20170918 기념일 배송 출력 end
//20171013 dkshin 해피기프트(신) IC/RF 충전 및 승인
#region ()
/// <summary>
/// 선불카드 판매 내역 생성 -- 사용안함
/// </summary>
/// <param name="sPrtID"></param>
private string SetHPGCardInfo(string sPrtID)
{
string sRet = UserCom.RST_ERR;
string sPrintTitle = "";
string sPrintData = "";
try
{
//int nSign = m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.REFUND ? -1 : 1;
ArrayList alEtcItem = (ArrayList)StateObject.GetItemObject(Column.TR_ETC.ITEM);
foreach (Column.TR_ETC.DATA cEtcItem in alEtcItem)
{
if (cEtcItem.CANCEL_DIV == ItemConst.PAY_CANCEL_DIV.CANCEL) continue;
if (cEtcItem.BILLSPR_NO != m_cTrnStatus.Sale.BillSplitNo) continue;
// 해피기프트카드-충전,충전취소
//20171019 dkshin 해피기프트(신) 충전 코드 변경
//if (cEtcItem.ETC_WAY_CD == ItemConst.TR_ITEM_ID.CREDITCARD_ITEM && cEtcItem.ETC_DTL_CD_01 == ItemConst.TR_ITEM_ID.CREDITCARD.HPGIFT_CARD)
if (cEtcItem.ETC_WAY_CD == ItemConst.TR_ITEM_ID.ETC_INFO_ITEM && cEtcItem.ETC_DTL_CD_01 == ItemConst.TR_ITEM_ID.ETC_INFO.HAPPYGIFTNEW_CHARGE)
{
SetTopPosPrintData(PosConst.PRT_ITEM.REC, true, true, true, true); // 영수증 상단영역 출력
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
// 타이틀 출력
sPrintTitle = "";
//#20180131, 해피기프트카드(신) 충전 수정 Start
//if (cEtcItem.AMT_ENTRY_01.ToString() == "0")
if (cEtcItem.OCCUR_ENTRY_06.Trim() != "")
//#20180131, 해피기프트카드(신) 충전 수정 End
{
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0061);
sPrintTitle = "<<" + sPrintTitle + " " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0064) + ">>";
}
else
{
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0060);
sPrintTitle = "<<" + sPrintTitle + " " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0064) + ">>";
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F103, sPrintTitle);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
sPrintTitle = "";
sPrintData = "";
// 1. 카드번호
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0043) + "]";
//if (cEtcItem.OCCUR_ENTRY_01.Trim() != "")
{
//if (cEtcItem.OCCUR_ENTRY_05 == PosConst.POS_VAN_MASTER.INPUT_TYPE.VAN_KEYIN)
sPrintData = HPGCardMarking(cEtcItem.OCCUR_ENTRY_01.Trim());
//else
{
//sPrintData = cEtcItem.OCCUR_ENTRY_01;
//sPrintData = HPGCardMarking(cEtcItem.OCCUR_ENTRY_01.Trim());
}
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
// 2.충전금액
if (cEtcItem.AMT_ENTRY_01.ToString() != "")
{
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0068) + "]";
sPrintData = m_cPosStatus.Global.NumericTOCurrency(cEtcItem.AMT_ENTRY_01);
}
else
{
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0069) + "]";
sPrintData = "0";
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
// 3.승인번호
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0047) + "]";
sPrintData = cEtcItem.OCCUR_ENTRY_02;
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F202, sPrintTitle, GetAppTypePrint(cEtcItem.OCCUR_ENTRY_08) + sPrintData);
// 4.잔액
//if (cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_ACC_A || cEtcItem.OCCUR_ENTRY_10 == PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_USE_A)
{
sPrintTitle = "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0070) + "]";
sPrintData = m_cPosStatus.Global.NumericTOCurrency(cEtcItem.AMT_ENTRY_04);
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_HOR, PosConst.PRT_FMT.F202, sPrintTitle, sPrintData);
}
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetBtmPosPrintData(PosConst.PRT_ITEM.REC, true, true, true, true, true); // 영수증 하단영역 출력
SetEndPosPrintData(PosConst.PRT_ITEM.REC); // 영수증 출력 완료
sRet = UserCom.RST_OK;
}
}
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
private string HPGCardMarking(string strV)
{
string req = "";
//if (m_cPosStatus.Base.CmpCd.ToUpper().Equals(PosConst.POS_COMPANY_CODE.PCCN) && strV != "")
{
//req = CmUtil.MidH(strV, 0, 4) + "********" + CmUtil.RightH(strV, 4);
}
//else
{
//req = CmUtil.MidH(strV, 0, 6) + "**";
req = CmUtil.MidH(strV, 0, 6) + "**********";
}
//UserLog.WriteLogFile(UserCom.LOG_OP, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
// System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", "@@ChinaCardMarking=" + strV);
return req;
}
#endregion ()
//#20171227, 예약증 양식 출력 Start
#region
public string ExecuteReservationForm()
{
string sRet = UserCom.RST_ERR;
string sPrtID = PosConst.PRT_ITEM.ETC;
string sPrtHead = PosConst.PRT_HDR.PRT_NOR;
string sPrintTitle = "";
string sPrintData = "";
string sPrintData2 = "";
try
{
PrintBufClear();
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F101, "※" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0300));
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0301));
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0302));
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0303));
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0304);
sPrintData = "□ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0305);
sPrintData2 = " □ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0306);
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F304, sPrintTitle, sPrintData, sPrintData2);
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0307));
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0308));
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0309));
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0310);
sPrintData = "□ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0311);
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F207, sPrintTitle, sPrintData);
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0312);
sPrintData = "□ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0146);
sPrintData2 = "□ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0187);
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F304, sPrintTitle, sPrintData, sPrintData2);
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0313);
sPrintData = "□ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0314);
sPrintData2 = "□ " + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0315);
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F304, sPrintTitle, sPrintData, sPrintData2);
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
sPrintTitle = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0316);
sPrintData = MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0317) + ":";
sPrintData2 = " /" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0318) + ":";
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F304, sPrintTitle, sPrintData, sPrintData2);
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0319));
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F101, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0320));
AddPrintData(sPrtID, sPrtHead, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BBM);
SetEndPosPrintData(PosConst.PRT_ITEM.ETC); // 영수증 출력 완료
if (PrintExecute(false, true, false) == true) sRet = UserCom.RST_OK;
return sRet;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
#endregion
//#20171227, 예약증 양식 출력 End
// grayber@20180110 전자영수증 주문(대기)번호표 출력 start - 주문(대기)번호표 출력 함수
// 추가
#region
public string ExcuteElectroBillOrderNoReceipt(bool bForce = false)
{
string sRet = UserCom.RST_ERR;
try
{
//grayber@20180226 대기번호표 개선 start - 출력 구분자 추가
//추가
//#20180228 대기번호 미사용시 영수증 상품항목에 금액 미표시 증상 start
//위치 변경. 대기번호 미사용시, 매출이 아닌 거래인 경우 대기번호가 없어서 초기화가 안됨
//base.m_bElectRec = bForce;
//#20180228 대기번호 미사용시 영수증 상품항목에 금액 미표시 증상 end
//grayber@20180226 대기번호표 개선 end
if (m_cTrnStatus.Head.OrderNo.Trim().Equals("") == true) return UserCom.RST_IGNORE;
PrintBufClear(); // 영수증 출력버퍼 초기화
// 영수증 상단영역 출력
SetTopPosPrintData(PosConst.PRT_ITEM.ETC, true, true, false, true, "[" + MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0321) + "]");
// 영수증 상품영역 출력
//#20180228 대기번호 미사용시 영수증 상품항목에 금액 미표시 증상 start
base.m_bElectRec = bForce;
//#20180228 대기번호 미사용시 영수증 상품항목에 금액 미표시 증상 end
SetPosSalePluItem(PosConst.PRT_ITEM.ETC); // 영수증 상품영역 출력
//#20180228 대기번호 미사용시 영수증 상품항목에 금액 미표시 증상 start
base.m_bElectRec = false;
//#20180228 대기번호 미사용시 영수증 상품항목에 금액 미표시 증상 end
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, " ");
// 주문(대기)번호 확인
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_BGB, PosConst.PRT_FMT.F103, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0097) + ": " + m_cTrnStatus.Head.OrderNo);
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, " ");
AddPrintData(PosConst.PRT_ITEM.ETC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
SetBtmPosPrintData(PosConst.PRT_ITEM.ETC, true, false, false, false, false, 1); // 영수증 하단영역 출력 -- 고객용
SetEndPosPrintData(PosConst.PRT_ITEM.ETC); // 영수증 생성 완료
//grayber@20180226 대기번호표 개선 start - 출력 구분자 추가
//기존
//if (PrintExecute(true, true, true) == true) sRet = UserCom.RST_OK; // 영수증 출력 처리
//변경
sRet = UserCom.RST_OK;
// grayber@20180226 대기번호표 개선 start - 초기화 처리 추가
//#20180228 대기번호 미사용시 영수증 상품항목에 금액 미표시 증상 start
//위치 변경. 대기번호 미사용시, 매출이 아닌 거래인 경우 대기번호가 없어서 초기화가 안됨
//base.m_bElectRec = false;
//#20180228 대기번호 미사용시 영수증 상품항목에 금액 미표시 증상 end
// grayber@20180226 대기번호표 개선 end
//grayber@20180226 대기번호표 개선 end
}
catch(Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return sRet;
}
#endregion
// grayber@20180110 전자영수증 주문(대기)번호표 출력 end
//KT 고객일 경우 아래와 같이 영수증 문구 추가 start,phj
#region KT
public bool KTDoubleMsgCheck()
{
bool bRet = false;
string sQry = string.Empty;
DataTable dtMstCmm = null;
try
{
sQry = " SELECT CHAR_VAL_TITLE_VAL_01,CHAR_VAL_TITLE_VAL_02 ";
sQry += " FROM POSMST..MST_CMM";
sQry += " WHERE CMP_CD = '" + m_cPosStatus.Base.CmpCd + "'";
sQry += " AND cmm_grp_cd = 'T0035'";
sQry += " AND cmm_cd = '01'";
//KT 고객일 경우 아래와 같이 영수증 문구 추가 start,phj, 20180503
//해당 영업조직만 출력 될수 있도록 수정
sQry += " AND SALES_ORG_CD = '" + m_cPosStatus.Base.BrandCd + "'";
//KT 고객일 경우 아래와 같이 영수증 문구 추가 end,phj, 20180503
sQry += " AND '" + DateTime.Now.ToString("yyyyMMdd") + "' BETWEEN CHAR_VAL_TITLE_VAL_01 AND CHAR_VAL_TITLE_VAL_02 ";
sQry += " AND use_yn = '" + PosConst.MST_USE_YN.YES + "'";
m_cSqlDbService.DBSelect(sQry, out dtMstCmm);
if (dtMstCmm != null && dtMstCmm.Rows.Count > 0)
{
bRet = true;
}
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." +
System.Reflection.MethodBase.GetCurrentMethod().Name + "()",
ex.Message);
return false;
}
return bRet;
}
#endregion
//KT 고객일 경우 아래와 같이 영수증 문구 추가 end,phj
//#15746 해피오더 '쇼킹박스' 관련 POS 시스템 개발 요청 start
#region ( )
private bool SetLandomBoxReceipt(string sPrtID)
{
try
{
// 영수증 상단영역 출력
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F103, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1165));
// 상단이미지 출력
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_TBM);
// ------------------------------------------------------------
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F100, "-");
// 품목, 수량
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0101), MessageManager.GetPrintMessage(POS_MESSAGE.PRINT.MSG_0103));
// ------------------------------------------------------------
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F100, "-");
// 상품정보
ArrayList aSaleItem = (ArrayList)StateObject.GetItemObject(Column.TR_PLU.ITEM);
for (int iRow = 0; iRow < aSaleItem.Count; iRow++)
{
Column.TR_PLU.DATA cSaleItem = (Column.TR_PLU.DATA)aSaleItem[iRow];
if (cSaleItem.CANCEL_DIV == "1" && m_cPosStatus.Sale.DutchPayFlg == "1" && (cSaleItem.DUTCH_PAY_CAN_DIV != "1" || cSaleItem.DUTCH_PAY_MAIN_CAN_DIV != "1"))
{
continue;
}
// 품목, 수량
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F200, cSaleItem.ITEM_NAME, cSaleItem.SALE_QTY.ToString());
// 원산지
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1166));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, cSaleItem.PLACE_ORIGIN);
// 영양정보
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1167));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, cSaleItem.ITEM_INFO);
// 알레르기성분
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1168));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, cSaleItem.ALLERGY);
// 상품설명
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, MessageManager.GetLabelMessage(POS_MESSAGE.LABEL.MSG_1169));
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, cSaleItem.ITEM_EXPLN);
if (aSaleItem.Count > 1 && (iRow != aSaleItem.Count - 1))
{
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_BLD, PosConst.PRT_FMT.F100, "-");
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F101, "");
}
}
// ------------------------------------------------------------
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 바코드 출력
string BarcodeData = "[BAR]" + m_cTrnStatus.Head.SaleDate + m_cTrnStatus.Head.RegNo;
AddPrintData(PosConst.PRT_ITEM.REC, BarcodeData);
// ------------------------------------------------------------
AddPrintData(PosConst.PRT_ITEM.REC, PosConst.PRT_HDR.PRT_NOR, PosConst.PRT_FMT.F100, "-");
// 하단이미지 출력
AddPrintData(sPrtID, PosConst.PRT_HDR.PRT_BBM);
SetEndPosPrintData(sPrtID); // 영수증 출력 완료
return true;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
return false;
}
#endregion ( )
//#15746 해피오더 '쇼킹박스' 관련 POS 시스템 개발 요청 end
}
}