202 |
char buffer[30]; |
char buffer[30]; |
203 |
char barcode[15]; |
char barcode[15]; |
204 |
int ack = 1; |
int ack = 1; |
205 |
CString senddata, termID, ssum; |
CString senddata, termID, ssum, hellodata1, hellodata2; |
206 |
unsigned char Output[30]; |
unsigned char Output[30]; |
207 |
unsigned int price, isum, cash, bytte; |
unsigned int price, isum, cash, bytte; |
208 |
int status; |
int status; |
209 |
unsigned char reqID; |
unsigned char reqID; |
210 |
log l; |
log l; |
211 |
|
translog tl; |
212 |
Equipment eq; |
Equipment eq; |
213 |
|
|
214 |
status = worksock.Receive(buffer,30); |
status = worksock.Receive(buffer,30); |
226 |
test = 10; |
test = 10; |
227 |
} |
} |
228 |
|
|
229 |
l.logID = "5"; |
//l.logID = "5"; |
230 |
|
|
231 |
for (int i=3; i < (3+test); i++){ |
for (int i=3; i < (3+test); i++){ |
232 |
barcode[i-3] = buffer[i]; |
barcode[i-3] = buffer[i]; |
251 |
worksock.Send(Output,7); |
worksock.Send(Output,7); |
252 |
|
|
253 |
//LOG SKAL LAVES NUUUUUUUUUUUUUUUUUUUUUUU |
//LOG SKAL LAVES NUUUUUUUUUUUUUUUUUUUUUUU |
254 |
if(atoi(l.logID) < 0) |
if(atoi(tl.logID) > 0) |
255 |
{ |
{ |
256 |
CString logantal; |
CString logantal; |
257 |
logantal.Format("%d",antal); |
logantal.Format("%d",antal-48); |
258 |
CommonStorage::Instance()->getDBLayer()->TransaktionsEnhed(l.logID, eq.price, barcode,logantal); |
CommonStorage::Instance()->getDBLayer()->TransaktionsEnhed(tl.logID, eq.price, barcode,logantal); |
259 |
} |
} |
260 |
} |
} |
261 |
|
|
270 |
|
|
271 |
senddata.Format("%d", ack); |
senddata.Format("%d", ack); |
272 |
worksock.Send(senddata, senddata.GetLength(),0); |
worksock.Send(senddata, senddata.GetLength(),0); |
273 |
CommonStorage::Instance()->getDBLayer()->Transaktionslog(termID); |
CommonStorage::Instance()->getDBLayer()->Transaktionslog(termID,0); |
274 |
break; |
break; |
275 |
|
|
276 |
case '2': |
case '2': |