UnicentaPOS Help Wiki
Advertisement

add this in the customers tab see attachment cutemers[]

Customers

ps. do not use capital letters in the customers tab

[]

add in the property tap of each product[]

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
    <entry key="Multi price">Yes</entry>
    <entry key="price2">2.2</entry>
    <entry key="price3">3.3</entry>
    <entry key="price4">4.4</entry>
    <entry key="price5">5.5</entry>
</properties>

this is the script set it in script.Event.Addline[]

import com.openbravo.pos.forms.DataLogicSales;
import com.openbravo.pos.forms.DataLogicSystem;
import com.openbravo.data.loader.Session;
import com.openbravo.format.Formats;
import java.lang.Math;
import java.util.*;
import java.text.*;
import com.openbravo.pos.ticket.ProductInfoExt;
import com.openbravo.pos.ticket.TicketLineInfo;
import com.openbravo.format.Formats;
import com.openbravo.pos.ticket.TicketProductInfo;
import java.lang.Math;
import java.util.*;
import java.text.*;
import javax.swing.JOptionPane;
// -------------------------------------------------------------------------------------------
// Multi price 1, 2 or ... Begin
if (line.getProperty("Multi price") != null){
 if ((line.getProperty("Multi price").equals("Yes")) && (ticket.getCustomer()!= null) && ((ticket.getCustomer().getFax()) != null)){
      value = (ticket.getCustomer().getFax());
      Price = line.getProperty(value);
      Double newPrice = new Double(Price);
//      line.setPrice(newPrice);
      line.setPriceTax(newPrice);
 }
}
// Multi price 1, 2 or ... Einde
// ------------------------------------------

add this in the Ticket.Buttons[]

<event key="ticket.addline" code="script.Event.Addline"/>

This is a link with more explanation[]

https://sourceforge.net/p/unicentaopos/discussion/1126900/thread/e6d0d1d9/#bd00

Advertisement