This commit is contained in:
thuannd88
2024-09-05 15:58:31 +07:00
parent acfa22a83a
commit 7e927dfcc9
10 changed files with 220 additions and 20 deletions
+36 -6
View File
@@ -591,7 +591,6 @@ namespace SafeBagDE70
private bool DoCountStart()
{
bool bSuccess = true;
printerFlag = false;
string currentMethod = MethodBase.GetCurrentMethod().Name;
try
@@ -620,6 +619,14 @@ namespace SafeBagDE70
AutoSerialGet();
bIsCounted = true;
Log.Information("After AutoCount: " + GetShortInforFromCountItems());
var state=GetCDMState();
if (state.IsError>0)
{
string str = "ĐÃ XẢY RA LỖI TRONG QUÁ TRÌNH NỘP TIỀN";
Log.Information(str);
DoCheck();
EndSession(COUNTINGSTATE.FULLIFSTORE, str);
}
});
@@ -835,7 +842,7 @@ namespace SafeBagDE70
//Debug.WriteLine(quantityStored);
var previousCassetData = AppData.GetCassetteData();
if(CheckPreStoreValid(previousCassetData,300,sessions))
if(CheckPreStoreValid(previousCassetData, AppData.MaxNotes, sessions))
{
cCmdRsp.SendXXCmd((byte)Command.CMD_DE_STORESTART);
bSuccess = WaitUntilCountReady(10);
@@ -1028,18 +1035,41 @@ namespace SafeBagDE70
if (AppData.CurrentCustomerAccount != null)
{
var strTransactionCode = AppData.CurrentCustomerAccount.TransactionCode;
strNotify = strTransactionCode + "\r\n" + strNotify;
strNotify = "MÃ GD: "+strTransactionCode + "\r\n" + strNotify;
}
if(strMessage!=null)
{
strNotify += strMessage;
}
mainWindow.ShowInformationScreen(strNotify, false, false);
}
Dispatcher.Invoke(() =>
{
mainWindow.ShowInformationScreen(strNotify, false, false);
});
ResetSessions();
StartWelcomeTimer();
}
else if(strMessage!=null)
{
var strNotify = "";
if (AppData.CurrentCustomerAccount != null)
{
var strTransactionCode = AppData.CurrentCustomerAccount.TransactionCode;
strNotify = "MÃ GD: "+strTransactionCode + "\r\n" + strNotify;
}
if (strMessage != null)
{
strNotify += strMessage;
}
Dispatcher.Invoke(() =>
{
mainWindow.ShowInformationScreen(strNotify, false, false);
});
ResetSessions();
StartWelcomeTimer();
}
else
{
mainWindow.ShowWelcomeScreen();
@@ -1171,7 +1201,7 @@ namespace SafeBagDE70
var shopName = AppData.CurrentCustomerAccount.Name;
var shopCode = AppData.CurrentCustomerAccount.CustomerId;
var tradingCode = AppData.CurrentCustomerAccount.TransactionCode;// "TRA04052024CDM";
var storeAccountNumber = 686868686688;
var storeAccountNumber = AppData.CurrentCustomerAccount.CustomerId;
var currentTime = DateTime.Now;
var printDocument = new PrintDocument();