0
If possible, adapt the script.
for in 'Article Name'. 'Products' do
// Verify that the required fields exist and are valid
if Product.'Cost Price' > 0 and product.Markup != null then
// Increase markup by 15%
Product.Markup := Product.Markup * 1.15;
// Recalculate sales price (rounded to 2 decimal places)
product.'Sale Price' := round(Product.'Costo Price' * (1 + (Product.Markup / 100)), 2);
// Save Changes
update product;
else
// Error log
log('Error en producto ID: ' + product.id +
' | Costo: ' + toText(product.Costo) +
' | Markup: ' + toText(product.Markup));
end
end
5 replies
-
do as server
for loop in select Products where 'Cost Price' > 0 and 'Markup %' != null do
loop.('Markup %' := number(loop.'Markup %') + 0.5)
end
endWorks
-
Hi Rafael
Why do you have these lines?
let response := true; if response then
Regards John
Content aside
- Status Answered
- 3 days agoLast active
- 5Replies
- 50Views
-
3
Following