Skip to content

Instantly share code, notes, and snippets.

@trikitrok
Created February 8, 2026 22:31
Show Gist options
  • Select an option

  • Save trikitrok/567579f8e19b4409134378d7183ed361 to your computer and use it in GitHub Desktop.

Select an option

Save trikitrok/567579f8e19b4409134378d7183ed361 to your computer and use it in GitHub Desktop.
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