Tranferring scanned data to Job Journal

xesus_1
xesus_1 Member Posts: 4
Using Intermec 2410 bar code scanner we batch process data at day's end.

Currently there is one function not working correctly. Once data has been input from scanner to system there are three functions. One function is to issue inventory using a sales journal which dumps all the scanned data from temporary form, where the data is collected, to the sales order journal where parts can be posted to a specific Sales order.

Can someone recommend me a way to change the code to have it transferred to the Job Journal lines instead to post out to a job rather than a Sales order.

Thanx a million!

Code below...

MakeJournal(JournalType : 'Receive,Issue,Cycle')
// get EP Setup Values
recInventorySetup.GET('');

// setup for type of journal
CASE JournalType OF
JournalType::Receive: BEGIN
//MESSAGE('Receive');
xFunctionCode := '1';
recItemJournalTemplate.GET(recInventorySetup."2410 Receive Journal Template");
JTN := recInventorySetup."2410 Receive Journal Template";
JBN := recInventorySetup."2410 Receive Journal Batch";
DefaultLocation := recInventorySetup."2410 Location";
NewLocation := '';
ET := recItemJournalLine."Entry Type"::Purchase;
txttype := 'a Receive Item Purchase';
END;

JournalType::Issue: BEGIN
//MESSAGE('Issue');
xFunctionCode := '2';
recItemJournalTemplate.GET(recInventorySetup."2410 Issue Journal Template");
JTN := recInventorySetup."2410 Issue Journal Template";
JBN := recInventorySetup."2410 Issue Journal batch";
DefaultLocation := recInventorySetup."2410 Location";
NewLocation := '';
ET := recItemJournalLine."Entry Type"::Sale;
txttype := 'an Issue Item Sale';
END;

JournalType::Cycle: BEGIN
//MESSAGE('Cycle');
xFunctionCode := '3';
recItemJournalTemplate.GET(recInventorySetup."2410 Cycle Journal Template");
JTN := recInventorySetup."2410 Cycle Journal Template";
JBN := recInventorySetup."2410 Cycle Journal Batch";
//defaultlocation assigned below.
NewLocation := '';
ET := recItemJournalLine."Entry Type"::"Positive Adjmt.";
txttype := 'a Cycle Positive Adjustment';
END;
END;


// get last line no. in "Item Journal Line" table
intLastLine := 10000;
CLEAR(recItemJournalLine);
recItemJournalLine.SETRANGE("Journal Template Name", JTN );
recItemJournalLine.SETRANGE("Journal Batch Name", JBN );
IF recItemJournalLine.FIND('+') THEN
intLastLine := recItemJournalLine."Line No." + 10000;

// make the Item Journal Line's for this engine.
CLEAR(recScannerReadIn);
recScannerReadIn.SETRANGE(FunctionCode, xFunctionCode);

IF recScannerReadIn.COUNT > 0 THEN BEGIN
IF CONFIRM('Do you want to create %1 Journal for these %2 Item(s)?',FALSE,txttype, recScannerReadIn.COUNT) THEN BEGIN
IF recScannerReadIn.FIND('-') THEN REPEAT
WITH recItemJournalLine DO BEGIN
INIT;

CASE xFunctionCode OF
'1':
"Document No." := recScannerReadIn.PurchaseOrder;
'2':
"Document No." := recScannerReadIn.SalesOrder;
'3': BEGIN
"Document No." := '2410 Issue';
DefaultLocation := recScannerReadIn.Location;
END;
END;

"Journal Template Name" := JTN;
"Journal Batch Name" := JBN;
"Line No." := intLastLine;
VALIDATE("Item No.", recScannerReadIn.PartNumber);
"Posting Date" := WORKDATE;
VALIDATE("Entry Type", ET);

VALIDATE("Location Code", DefaultLocation);
"New Location Code" := NewLocation;

EVALUATE(intQty,recScannerReadIn.Qty);
VALIDATE(Quantity, intQty);
"Source Code" := recItemJournalTemplate."Source Code";
"Document Date" := WORKDATE;
Type := Type::" ";

COMMIT;
ItemCheckAvail.ItemJnlCheckLine(recItemJournalLine);

//insert Item Journal line
INSERT;

// if "Item Tracking Code" make a reservation entry on that "Item No."/"Serial No."
//recItem.GET(recScannerReadIn.PartNumber);
//IF (recItem."Item Tracking Code" <> '') AND ((recScannerReadIn.SerialNumber <> '')
//OR (recScannerReadIn.LotNumber <> '')) THEN
//IF intQty > 1 THEN
//MESSAGE(text001)

//ELSE
//MakeISReservation(intLastLine,JTN,JBN,DefaultLocation,intQty);

//Delete recScannerReadIn line
recScannerReadIn.DELETE;

intLastLine := intLastLine + 10000;
END;
UNTIL recScannerReadIn.NEXT=0;
END;
END
ELSE
MESSAGE('All Items have been Item Journaled.');