Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void parseDetail(str _fileLine, ConfLayoutLines_BR _confLayoutLines, EPSegment_BR _segment)
- {
- EPSegment_BR segmentInFile;
- ConfLayoutFields_BR confLayoutFields, confLayoutFieldsAux;
- str fieldContentInFile, ourNumber;
- ConfImportValueParser_BR confImportValueParser;
- LedgerJournalTransPayment_BR ledgerJournalTransPaymentLocal;
- fileLine = _fileLine;
- select confLayoutFieldsAux
- where confLayoutFieldsAux.LayoutGroupId == _confLayoutLines.LayoutGroupId
- && confLayoutFieldsAux.LayoutLineNum == _confLayoutLines.LayoutLineNum
- && confLayoutFieldsAux.TableName != 'Command'
- && confLayoutFieldsAux.FieldName != '';
- ourNumber = subStr(fileLine, confLayoutFieldsAux.StartPos, confLayoutFieldsAux.Size);
- select firstonly ledgerJournalTransPaymentLocal
- where ledgerJournalTransPaymentLocal.EPCompanyDocument_BR == ourNumber;
- while (ledgerJournalTransPaymentLocal.RecId != 0)
- {
- while select confLayoutFields
- where confLayoutFields.LayoutGroupId == _confLayoutLines.LayoutGroupId
- && confLayoutFields.LayoutLineNum == _confLayoutLines.LayoutLineNum
- && confLayoutFields.TableName != 'Command'
- && confLayoutFields.FieldName != ''
- {
- fieldContentInFile = subStr(fileLine, confLayoutFields.StartPos, confLayoutFields.Size);
- confImportValueParser = new ConfImportValueParser_BR(confLayoutFields, fieldContentInFile, fileReader.currentLineNumber());
- confImportValueParser.doParse();
- if (confImportValueParser.hasParsingErrors())
- {
- info(confImportValueParser.parsingErrorsAsString());
- }
- else
- {
- this.registerValueForTableField(confLayoutFields, confImportValueParser.parsedValue());
- }
- this.storeValuesForDocument();
- }
- ourNumber = "";
- confLayoutFieldsAux.clear();
- ledgerJournalTransPaymentLocal.clear();
- fileLine = fileReader.getNextLine();
- select confLayoutFieldsAux
- where confLayoutFieldsAux.LayoutGroupId == _confLayoutLines.LayoutGroupId
- && confLayoutFieldsAux.LayoutLineNum == _confLayoutLines.LayoutLineNum
- && confLayoutFieldsAux.TableName != 'Command'
- && confLayoutFieldsAux.FieldName != '';
- if (confLayoutFieldsAux)
- {
- ourNumber = subStr(fileLine, confLayoutFieldsAux.StartPos, confLayoutFieldsAux.Size);
- select firstonly ledgerJournalTransPaymentLocal
- where ledgerJournalTransPaymentLocal.EPCompanyDocument_BR == ourNumber;
- }
- else
- {
- ourNumber = subStr(fileLine, confLayoutFields.StartPos, confLayoutFields.Size);
- }
- select firstonly ledgerJournalTransPaymentLocal
- where ledgerJournalTransPaymentLocal.EPCompanyDocument_BR == ourNumber;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement