I’m running OpenBravo POS, and need to remove the select customer-button, so that only customers swiping their card can but debt on their account in OpenBravo POS. To do this, I have to remove the button in source code. This is my howto:
Install JDK 1.6
Install Apache ANT
Add the bin-directory of ANT to %PATH%
Set %JAVA_HOME% to the JDK directory
Set %ANT_HOME% to the ANT directory
reboot
Download source code of OpenBravo POS
Go to the src-pos\com\openbravo\pos\sales\JPanelTicket.java file
Around line 1226 (version 2.30) You’l find:
btnCustomer.setIcon(new javax.swing.ImageIcon(getClass().getResource(«/com/openbravo/images/kuser.png»))); // NOI18N
btnCustomer.setFocusPainted(false);
btnCustomer.setFocusable(false);
btnCustomer.setMargin(new java.awt.Insets(8, 14, 8, 14));
btnCustomer.setRequestFocusEnabled(false);
btnCustomer.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCustomerActionPerformed(evt);
}
});
m_jButtons.add(btnCustomer);
Set a comment before m_jButtons.add(btnCustomer); so that it looks like this:
btnCustomer.setIcon(new javax.swing.ImageIcon(getClass().getResource(«/com/openbravo/images/kuser.png»))); // NOI18N
btnCustomer.setFocusPainted(false);
btnCustomer.setFocusable(false);
btnCustomer.setMargin(new java.awt.Insets(8, 14, 8, 14));
btnCustomer.setRequestFocusEnabled(false);
btnCustomer.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnCustomerActionPerformed(evt);
}
});
//m_jButtons.add(btnCustomer);
Start cmd, and go to the openbravopos root folder, type «ant dist»
New .jar-file is in build\jar-folder, but into installed openbravopos-folder