oglinked / Receipt

0 stars 1 forks source link

SCRIPT#1 - Accounting. Improvement1. #1

Open FutureITCorp opened 1 year ago

FutureITCorp commented 1 year ago

Critical - 2,7,8,6

  1. CUSTOM DATE.
    • Would be good to enter date manually. If nothing is typed, then current system date is taken.
  2. PATH TO .CSV FILE.
    • Make the program presenting the path of .csv file to which the data write happens.
  3. 2 NEW FIELDS FOR .CSV FILES.
    • "CashRegistrarIn"
    • "CashRegistrarOut"
      • still 2 custom filed in CSV files.
  4. FIELDS VALIDATION.
    • No Russian symbols, or no other except English.
    • No digits in "Currency1" and "Currency2" fields.
    • No empty values for "AmountX" and "CurrencyX" fields.
  5. CYCLE. Make a cycle - do not close the program after the receipt is generated, ask to start from the beginning.
  6. CID field should be the first in the commandline.
  7. CSV "TIME" FIELD. GMT should go the .txt file.
  8. COMMAND-LINE. FIELDS RENAMING. Currency1 -> CurrencyIn Amount1 -> AmountIn Currency2 -> CurrencyOut Amount2 -> AmountOut
  9. Transaction ID - not enough digits to make the number unique.
FutureITCorp commented 1 year ago

POINT 7. CLARIFICATION. It about log.csv. Currently time is presented in the following way: "95783173,69,08/13/2023,03:25 PM,PLN,131,RUB,3000,22.90,,," ,however Time should have the same representation as in Receipt.txt, e.g. "10:46 AM (GMT+2)". Or maybe, make a separate field "TimeZone"?

FutureITCorp commented 1 year ago

POINT 3. The following fields should be in CSV: TransactionID,CID,Date,Time,TZ,Currency1,Amount1,Currency2,Amount2,Rate,Comment,CashRegistrarIN,CashRegistrarOUT,General1,General2

TZ - is a time zone. CashRegistrarIN and CashRegistrarOUT - cash money received during transaction.

FutureITCorp commented 1 year ago

CSV FILE. FIELDS. Case-sensitive: TransactionID,Date,Time,TZ,CID,Currency1,Amount1,Currency2,Amount2,Rate,Comment,CashRegistrarIN,CashRegistrarOUT,NewData,General1,General2

COMMAND-LINE. FIELDS.: CID: Currency IN: Amount IN: Currency OUT: Amount OUT: Comment: Cash Registrar IN: Cash Registrar OUT: New data about client: Date: * - if nothing is entered, then the current system date is taken. If date is entered manually then date is taken from the input. No questions to user.

  1. Log path should be only for information. No questions to user. The path has to be full path including disk name.
  2. CYCLE. Erase the window contents after each cycle.
FutureITCorp commented 1 year ago

v3.02 REVIEW.

  1. CSV FILE. FIELDS. Case-sensitive: Verify these names --------> TransactionID,Date,Time,TZ,CID,Currency1,Amount1,Currency2,Amount2,Rate,Comment,CashRegistrarIN,CashRegistrarOUT,NewData,General1,General2

  2. PROMPT IN THE BEGINNING OF THE PROGRAM. Leave the original prompt for the previous version and add the path to the log. "Hello host ...... Please in put ...... -----blank line----- Full path ......." Path to the log should be in the beginning of the program, not in the end.

  3. RECOMMENDATION. 08/15/2023. If you can, specify the program version in file properties, see "File version" field. image

Everything else seems to be look good.

FutureITCorp commented 1 year ago

3.02 REVIEW. VALIDATION RULES.

CID: - No rules Currency IN: - Capital letters only. No numbers. Amount IN: - Numbers only. Commas and Dots are allowed as digit separators. Currency OUT: - Capital letters only. No numbers. Amount OUT: - Numbers only. Commas and Dots are allowed as digit separators. Comment: - No rules Cash Registrar IN: - Numbers only. Commas and Dots are allowed as digit separators. Cash Registrar OUT: - Numbers only. Commas and Dots are allowed as digit separators. New data about client: - No rules Date: - 2 forwardslashes ?? and 4 digits in the end?

FutureITCorp commented 1 year ago

3.04 REVIEW.

  1. The header with welcome message and the path should always be present. In other words, persistent across multiple transactions. Otherwise by the time I start to fill "CID" field, I don't see the file path, to which program writes.
  2. If time in GMT+2 then the date should be in GMT +2 as well. Otherwise if I enter dates on real date 08/18/2023 00:58 AM GMT +3, the program writes to log 08/18/2023 11:58 PM GMT +2, which is not real, should be 08/17/2023 11:58 PM GMT +2.
    1. When program asks "Another Transaction? (y/n)", if I press Enter, program accepts Enter as "n" reply, however should ask again (y/n).
    2. VALIDATION RULES.
      1. Program should ask user infinitely to input the correct date.
      2. If wrong value is entered in e.g. "Amount OUT" field "1k" or "10000.50", then in the end, program gets exception and then terminates itself, before prompting to fill in "Date:" field. "1k" is a mistake, however "100.50" is critically needed, because clients might bring groshes and kopeks as well. Dots and commas should be allowed in corresponding fields as stated in '3.02 REVIEW'
      3. Program should state what the rule is, e.g. "Error: Only number are allowed in this field!", instead of ["Your imput was" - I see what my input was 1 line above]. Do not remove "Please repeat input:"
      4. 'Date: - 2 forwardslashes ?? and 4 digits in the end?' not implemented.

UPDATED VALIDATION RULES: Rule 1 {

CID: - No rules Currency IN: -Rule1 Amount IN: - Rule2 Currency OUT: - Rule1 Amount OUT: - Rule2 Comment: - No rules Cash Registrar IN: - Rule2 Cash Registrar OUT: - Rule2 New data about client: - No rules General1: - No rules General2: - No rules Date: - 2 forwardslashes ?? and 4 digits in the end?

TIP: Implement repeated validation via do-while. Example:

do { $answer = Read-Host -Prompt " Do you want to run the program from the beginning?[n/y]" } while (($answer -cne "y") -and ($answer -cne "yes") -and ($answer -cne "n"))

FutureITCorp commented 1 year ago

3.05 REVIEW.

Review the latest commit

FutureITCorp commented 1 year ago

3.06 REVIEW.

  1. Grammar. wone -> one

2.RECOMMENDATION. If you can, specify the program version:

  1. in file properties, see "File version" field.
  2. or in the program welcome message.
  3. Name of the file.
  1. 'Date: - 2 forwardslashes ?? and 4 digits in the end?' not implemented.
    • no letters as additional validation condition.
FutureITCorp commented 1 year ago
FutureITCorp commented 1 year ago

3.07 REVIEW.

Issues left: 2.RECOMMENDATION. If you can, specify the program version:

  1. in file properties, see "File version" field.
  2. or in the program welcome message.
  3. Name of the file.

4.'"Enter" to continue' -> '"Enter" to start all over'

  1. Q - shouldn't be case sensitive
FutureITCorp commented 1 year ago

3.07 REVIEW. UPDATE. 2. - was fixed

4.'"Enter" to continue' -> '"Enter" to start all over'

  1. Q - shouldn't be case sensitive
FutureITCorp commented 1 year ago

3.07 REVIEW. UPDATE.

4.'"Enter" to continue' -> '"Enter" to start all over'

  1. Q - shouldn't be case sensitive

Improvement: Would be good to see the number of transaction within a day and with in a month.

FutureITCorp commented 1 year ago

3.07 REVIEW. UPDATE.

4.'"Enter" to continue' -> '"Enter" to start all over'

  1. Q - shouldn't be case sensitive

Improvement: Would be good to see the number of transaction within a day and with in a month.

08/23/2023. "General1" field - replace to "Covered" Y/N.

FutureITCorp commented 1 year ago

3.09 REVIEW.

  1. CID - Basically should have no rules except Russian characters, however now I can't enter any symbols, except numbers. Change the warning message: "No cyrillic letters are allowed in this field!" -> "Only Latin letters are allowed in this field!". Actually it is better to make a check for presence of any Non-Latin characters, P.S. Chinese characters are not allowed as well. The check for non-Latin character would be good to have for every field which allows any letters.
  2. Tab character is still allowed, e.g. "Amount OUT" field. This Tab character gets into the CSV file, it shouldn't.
  3. Minor: In CLI - the space between time and time zone is larger than in receipt.exe '06:05 PM (GMT+2)' -> '06:05 PM (GMT+2)'.
  4. "Covered" field: "Y" or "N" should get into the .csv file. Now "Yes" gets into the .csv file.
  5. Q - should be case sensitive. I did a mistake in review of v00.07.
  6. CLI: Rename field from "Covered (Y/N):" to "Covered:"
  7. After "Coverted:" add "General1" and "General2" fields. "General2" already exists.

Date module is good.

FutureITCorp commented 1 year ago

UPDATED VALIDATION RULES:

FOR ALL FIELDS:

  1. Where text is allowed - only Latin characters are accepted.
  2. Tab character and other non-printed characters are not allowed

RULE 0 {

RULE 1 {

RULE 2 {

RULE 3 {

CID: - Rule3, Currency IN: -Rule1 Amount IN: - Rule2 Currency OUT: - Rule1 Amount OUT: - Rule2 Comment: - No Rules Cash Registrar IN: - Rule2 Cash Registrar OUT: - Rule2 New data about client: - No rules Covered: - Only capital "Y" or "N" are allowed. Rule 0. General1: - No rules General2: - No rules Date: - The module was already developed.

FutureITCorp commented 1 year ago

3.11 REVIEW.

3.09.1 + 3.09.2 + 3.09.3+ 3.09.4 + 3.09.5 - 'Q - should be case sensitive. I did a mistake in review of v00.07.' 3.09.6 + 3.09.7 +

  1. Grammar corrections - see the pull request.
  2. CSV FILE: "General1General2" -> "General1,General2"
FutureITCorp commented 1 year ago

3.12 REVIEW.

3.09.5 + 3.11.8. + All corrected, except "Inputted" -> "Input"? 3.11.9. +

    • negative values and "0000" should not be allowed in fields with [Float type] and [Decimal numbers only].

Improvements for the future. Minor:

  1. No automatic replacement. rejection of the input.
  2. 'Improvement: Would be good to see the number of transaction within a day and with in a month.'
  3. "Repeat Input" -> Name of the field value for which is going to be entered.
  4. In Program and the resulting receipts - different number of spaces CLI: "RUB 36000 --> PLN 1500" Txt: "RUB 36000 --> PLN 1500"
  5. Make warnings in Yellow for readability.
FutureITCorp commented 11 months ago

1