Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.26 KB | None | 0 0
  1. protected void parseDetail(str _fileLine, ConfLayoutLines_BR _confLayoutLines, EPSegment_BR _segment)
  2. {
  3. EPSegment_BR segmentInFile;
  4. ConfLayoutFields_BR confLayoutFields, confLayoutFieldsAux;
  5. str fieldContentInFile, ourNumber;
  6. ConfImportValueParser_BR confImportValueParser;
  7. LedgerJournalTransPayment_BR ledgerJournalTransPaymentLocal;
  8.  
  9. fileLine = _fileLine;
  10.  
  11. select confLayoutFieldsAux
  12. where confLayoutFieldsAux.LayoutGroupId == _confLayoutLines.LayoutGroupId
  13. && confLayoutFieldsAux.LayoutLineNum == _confLayoutLines.LayoutLineNum
  14. && confLayoutFieldsAux.TableName != 'Command'
  15. && confLayoutFieldsAux.FieldName != '';
  16.  
  17. ourNumber = subStr(fileLine, confLayoutFieldsAux.StartPos, confLayoutFieldsAux.Size);
  18.  
  19. select firstonly ledgerJournalTransPaymentLocal
  20. where ledgerJournalTransPaymentLocal.EPCompanyDocument_BR == ourNumber;
  21.  
  22. while (ledgerJournalTransPaymentLocal.RecId != 0)
  23. {
  24. while select confLayoutFields
  25. where confLayoutFields.LayoutGroupId == _confLayoutLines.LayoutGroupId
  26. && confLayoutFields.LayoutLineNum == _confLayoutLines.LayoutLineNum
  27. && confLayoutFields.TableName != 'Command'
  28. && confLayoutFields.FieldName != ''
  29. {
  30. fieldContentInFile = subStr(fileLine, confLayoutFields.StartPos, confLayoutFields.Size);
  31.  
  32. confImportValueParser = new ConfImportValueParser_BR(confLayoutFields, fieldContentInFile, fileReader.currentLineNumber());
  33. confImportValueParser.doParse();
  34. if (confImportValueParser.hasParsingErrors())
  35. {
  36. info(confImportValueParser.parsingErrorsAsString());
  37. }
  38. else
  39. {
  40. this.registerValueForTableField(confLayoutFields, confImportValueParser.parsedValue());
  41. }
  42.  
  43. this.storeValuesForDocument();
  44. }
  45. ourNumber = "";
  46. confLayoutFieldsAux.clear();
  47. ledgerJournalTransPaymentLocal.clear();
  48.  
  49. fileLine = fileReader.getNextLine();
  50.  
  51. select confLayoutFieldsAux
  52. where confLayoutFieldsAux.LayoutGroupId == _confLayoutLines.LayoutGroupId
  53. && confLayoutFieldsAux.LayoutLineNum == _confLayoutLines.LayoutLineNum
  54. && confLayoutFieldsAux.TableName != 'Command'
  55. && confLayoutFieldsAux.FieldName != '';
  56.  
  57. if (confLayoutFieldsAux)
  58. {
  59. ourNumber = subStr(fileLine, confLayoutFieldsAux.StartPos, confLayoutFieldsAux.Size);
  60.  
  61. select firstonly ledgerJournalTransPaymentLocal
  62. where ledgerJournalTransPaymentLocal.EPCompanyDocument_BR == ourNumber;
  63. }
  64. else
  65. {
  66. ourNumber = subStr(fileLine, confLayoutFields.StartPos, confLayoutFields.Size);
  67. }
  68.  
  69. select firstonly ledgerJournalTransPaymentLocal
  70. where ledgerJournalTransPaymentLocal.EPCompanyDocument_BR == ourNumber;
  71. }
  72.  
  73.  
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement