Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rule "Applying taxes to imported products."
- when
- $order: Order()
- $products: Product() from $order.getProducts()
- $product: Product($products.isImported())
- then
- $product.setSale_tax($product.getPrize() *5d/100);
- $order.setTotalPrize($product.getSale_tax() + $product.getPrize());
- $order.setTotalTaxes($product.getSale_tax());
- System.out.println($order.toString());
- System.out.println($order.getTotalPrize());
- System.out.println($order.getTotalTaxes());
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement