Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ecaresoft Java Code Refactoring #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

OscarCordova
Copy link

Changes in file X_Tax.java:

  • Change the filename and Class name to XTax for standards

Changes in file Readme.md:

  • Change the name of the source class (X_Tax.java -> XTax.java).

Changes in file MTax.java

  • Change the name of the method (validate -> validateTaxes) to make it more readable.
  • Change the error messages to english.
  • Clean the commented code to use only the necessary code.
  • Avoid unecessary if - else statement validating if the xTaxList is null or not.
  • Change the logic to set the Tax Created Date:
    Write the record directly if the tax has and Id instead of creating a String list to loop it after
    validations making a XTax list again using the strings to make a HasMap collection to loop
    it by index to write it finally.
  • Change the logic with the variable cont to validate if there non-local taxes.
  • Instead it is implemented the bool variable 'noLocalTax' which is only true if even once there
  • is a non-local tax.
  • Add comments in each if statement.
  • Indentation Adjusting.

* Change the class name (X_Tax -> XTax) according to java conventions.
* Change the name and getter and setter methods of some attributes
  in order to use the same language in the class:
    - tasaOCuota -> fee
    - trasladado -> transferred
* Change the support class (X_Tax.java -> XTax.java).
 * Change the name of the method (validate -> validateTaxes) to make it more readable.
 * Change the error messages to english.
 * Clean the commented code to use only the necessary code.
 * Avoid unecessary if - else statement validating if the xTaxList is null or not.
 * Change the logic to set the Tax Created Date:
     - Write the record directly if the tax has and Id instead of creating a String list to loop it after
       validations making a XTax list again using the strings to make a HasMap collection to loop
       it by index to write it finally.
 * Change the logic with the variable cont to validate if there non-local taxes.
   Instead it is implemented the bool variable 'noLocalTax' which is only true if even once there
   is a non-local tax.
 * Add comments in each if statement.
 * Indentation Adjusting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant