nus-cs2103-AY2324S1 / pe-dev-response

0 stars 0 forks source link

Invalid pdf file created when running invalid command #4221

Open nus-se-script opened 1 year ago

nus-se-script commented 1 year ago

First, I ran payslip 1 /t 11/11/2023 which created a correct pdf file in payslips folder.

However, when I ran payslip 1 /t 12/12/2023 which throws an error,

image.png

the correct pdf file got replaced by a wrong file which was unable to be opened.

image.png

Really cool feature though!


[original: nus-cs2103-AY2324S1/pe-interim#3235] [original labels: severity.Low type.FunctionalityBug]

jibtaf commented 1 year ago

Team's Response

Thanks for raising this! The file was unable to be opened because upon trying to generate payslips for payroll periods which do not have a payroll, the app will just remove the corrupted file, however, the file is still being opened (This error is explained in the UG). The remedy is to run the command payslip 1 /t 11/11/2023 again to restore the old payslip. This could probably be improved in the future by creating different files for different payroll periods.

Duplicate status (if any):

--