Created
February 8, 2026 22:31
-
-
Save trikitrok/567579f8e19b4409134378d7183ed361 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Invoice { | |
| //... | |
| public Money getValue() { | |
| Money total = this.itemsSum(); | |
| if (this.billingDate.after(OurDate.yearEnd(this.openingDate))) { | |
| if ( | |
| this.originator.getState().equals("FL") || | |
| this.originator.getState().equals("NY") | |
| ) { | |
| total.add(this.getLocalShipping()); | |
| } else { | |
| total.add(this.getDefaultShipping()); | |
| } | |
| } else { | |
| total.add(this.getSpanningShipping()); | |
| } | |
| total.add(this.getTax()); | |
| return total; | |
| } | |
| //... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment