5.0 Source Code
Committing 5.0 Source Code
This commit is contained in:
@@ -0,0 +1,242 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.*;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.BeanFactoryDataSingle;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author JG uniCenta
|
||||
*/
|
||||
public class DataLogicSuppliers extends BeanFactoryDataSingle {
|
||||
|
||||
/**
|
||||
* Main Method for supplier object
|
||||
*/
|
||||
protected Session s;
|
||||
private TableDefinition tsuppliers;
|
||||
private static final Datas[] supplierdatas = new Datas[] {
|
||||
Datas.STRING,
|
||||
Datas.STRING,
|
||||
Datas.STRING,
|
||||
Datas.STRING,
|
||||
Datas.STRING,
|
||||
Datas.STRING,
|
||||
Datas.STRING};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param s
|
||||
*/
|
||||
@Override
|
||||
public void init(Session s){
|
||||
this.s = s;
|
||||
tsuppliers = new TableDefinition(s
|
||||
, "suppliers"
|
||||
, new String[] {
|
||||
"ID",
|
||||
"SEARCHKEY",
|
||||
"TAXID",
|
||||
"NAME",
|
||||
"MAXDEBT",
|
||||
"ADDRESS",
|
||||
"ADDRESS2",
|
||||
"POSTAL",
|
||||
"CITY",
|
||||
"REGION",
|
||||
"COUNTRY",
|
||||
"FIRSTNAME",
|
||||
"LASTNAME",
|
||||
"EMAIL",
|
||||
"PHONE",
|
||||
"PHONE2",
|
||||
"FAX",
|
||||
"NOTES",
|
||||
"VISIBLE",
|
||||
"CURDATE",
|
||||
"CURDEBT",
|
||||
"VATID" }
|
||||
, new String[] {
|
||||
"ID",
|
||||
AppLocal.getIntString("label.searchkey"),
|
||||
AppLocal.getIntString("label.suppliertaxid"),
|
||||
AppLocal.getIntString("label.name"),
|
||||
|
||||
AppLocal.getIntString("label.maxdebt"),
|
||||
AppLocal.getIntString("label.address"),
|
||||
AppLocal.getIntString("label.address2"),
|
||||
AppLocal.getIntString("label.postal"),
|
||||
|
||||
AppLocal.getIntString("label.city"),
|
||||
AppLocal.getIntString("label.region"),
|
||||
AppLocal.getIntString("label.country"),
|
||||
AppLocal.getIntString("label.firstname"),
|
||||
|
||||
AppLocal.getIntString("label.lastname"),
|
||||
AppLocal.getIntString("label.email"),
|
||||
AppLocal.getIntString("label.phone"),
|
||||
AppLocal.getIntString("label.phone2"),
|
||||
|
||||
AppLocal.getIntString("label.fax"),
|
||||
AppLocal.getIntString("label.notes"),
|
||||
"VISIBLE",
|
||||
AppLocal.getIntString("label.curdate"),
|
||||
|
||||
AppLocal.getIntString("label.curdebt"),
|
||||
AppLocal.getIntString("label.suppliervatid") }
|
||||
, new Datas[] {
|
||||
Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING,
|
||||
Datas.DOUBLE, Datas.STRING, Datas.STRING, Datas.STRING,
|
||||
Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING,
|
||||
Datas.STRING, Datas.STRING, Datas.STRING, Datas.STRING,
|
||||
Datas.STRING, Datas.STRING, Datas.BOOLEAN, Datas.TIMESTAMP,
|
||||
Datas.DOUBLE, Datas.STRING }
|
||||
, new Formats[] {
|
||||
Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING,
|
||||
Formats.CURRENCY, Formats.STRING, Formats.STRING, Formats.STRING,
|
||||
Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING,
|
||||
Formats.STRING, Formats.STRING, Formats.STRING, Formats.STRING,
|
||||
Formats.STRING, Formats.STRING, Formats.BOOLEAN, Formats.TIMESTAMP,
|
||||
Formats.CURRENCY, Formats.STRING }
|
||||
, new int[] {0}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return supplier data
|
||||
*/
|
||||
public SentenceList getSupplierList() {
|
||||
return new StaticSentence(s
|
||||
, new QBFBuilder("SELECT "
|
||||
+ "ID, SEARCHKEY, TAXID, NAME, "
|
||||
+ "POSTAL, PHONE, EMAIL "
|
||||
+ "FROM suppliers "
|
||||
+ "WHERE VISIBLE = " + s.DB.TRUE() + " AND ?(QBF_FILTER) ORDER BY NAME"
|
||||
, new String[] {"SEARCHKEY", "TAXID", "NAME", "POSTAL", "PHONE", "EMAIL"})
|
||||
, new SerializerWriteBasic(new Datas[] {
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING})
|
||||
, (DataRead dr) -> {
|
||||
SupplierInfo s1 = new SupplierInfo(dr.getString(1));
|
||||
s1.setSearchkey(dr.getString(2));
|
||||
s1.setTaxid(dr.getString(3));
|
||||
s1.setName(dr.getString(4));
|
||||
s1.setPostal(dr.getString(5));
|
||||
s1.setPhone(dr.getString(6));
|
||||
s1.setEmail(dr.getString(7));
|
||||
return s1;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return supplier data
|
||||
*/
|
||||
public SentenceList getSuppList() {
|
||||
return new StaticSentence(s
|
||||
, new QBFBuilder("SELECT "
|
||||
+ "ID, SEARCHKEY, TAXID, NAME, "
|
||||
+ "POSTAL, PHONE, EMAIL "
|
||||
+ "FROM suppliers "
|
||||
+ "WHERE VISIBLE = " + s.DB.TRUE() + " ORDER BY NAME"
|
||||
, new String[] {"SEARCHKEY", "TAXID", "NAME", "POSTAL", "PHONE", "EMAIL"})
|
||||
, new SerializerWriteBasic(new Datas[] {
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING,
|
||||
Datas.OBJECT, Datas.STRING})
|
||||
, (DataRead dr) -> {
|
||||
SupplierInfo s1 = new SupplierInfo(dr.getString(1));
|
||||
s1.setSearchkey(dr.getString(2));
|
||||
s1.setTaxid(dr.getString(3));
|
||||
s1.setName(dr.getString(4));
|
||||
s1.setPostal(dr.getString(5));
|
||||
s1.setPhone(dr.getString(6));
|
||||
s1.setEmail(dr.getString(7));
|
||||
return s1;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param supplier
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
public int updateSupplierExt(final SupplierInfoExt supplier) throws BasicException {
|
||||
|
||||
return new PreparedSentence(s
|
||||
, "UPDATE suppliers SET NOTES = ? WHERE ID = ?"
|
||||
, SerializerWriteParams.INSTANCE )
|
||||
.exec(new DataParams() {
|
||||
@Override
|
||||
public void writeValues() throws BasicException {
|
||||
setString(1, supplier.getNotes());
|
||||
setString(2, supplier.getID());
|
||||
}
|
||||
});
|
||||
}
|
||||
public final TableDefinition getTableSuppliers() {
|
||||
return tsuppliers;
|
||||
}
|
||||
|
||||
/**
|
||||
* JG Aug 2017 - Return Supplier Id - sId param
|
||||
* @param sId
|
||||
* @return
|
||||
* @throws BasicException
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public final List<SupplierTransaction> getSuppliersTransactionList(String sId) throws BasicException {
|
||||
|
||||
return new PreparedSentence(s,
|
||||
"SELECT "
|
||||
+ "stockdiary.datenew, "
|
||||
+ "products.NAME, "
|
||||
+ "stockdiary.units, "
|
||||
+ "stockdiary.price, "
|
||||
+ "stockdiary.reason, "
|
||||
+ "suppliers.id "
|
||||
+ "FROM (stockdiary stockdiary "
|
||||
+ "INNER JOIN suppliers suppliers "
|
||||
+ "ON (stockdiary.supplier = suppliers.id)) "
|
||||
+ "INNER JOIN products products "
|
||||
+ "ON (stockdiary.product = products.ID) "
|
||||
+ "WHERE suppliers.id = ? "
|
||||
+ "GROUP BY "
|
||||
+ "stockdiary.datenew, "
|
||||
+ "products.NAME, "
|
||||
+ "stockdiary.reason "
|
||||
+ "ORDER BY stockdiary.datenew DESC",
|
||||
SerializerWriteString.INSTANCE,
|
||||
SupplierTransaction.getSerializerRead()).list(sId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,424 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.supplier" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="resizable" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-57,0,0,2,116"/>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="0"/>
|
||||
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,26,0,0,4,11"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblEmail" alignment="0" max="-2" attributes="1"/>
|
||||
<Component id="jLblTelephone1" alignment="0" max="-2" attributes="1"/>
|
||||
<Component id="jLblTelephone2" alignment="1" max="-2" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="txtPhone" max="-2" attributes="2"/>
|
||||
<Component id="txtEmail" max="-2" attributes="2"/>
|
||||
<Component id="txtPhone2" max="-2" attributes="1"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="103" alignment="0" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblFirstName" max="-2" attributes="1"/>
|
||||
<Component id="jLblLastName" alignment="1" max="-2" attributes="1"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="txtLastName" max="-2" attributes="2"/>
|
||||
<Component id="txtFirstName" max="-2" attributes="1"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="103" alignment="0" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLblTaxID" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="m_jTaxID" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
|
||||
<Component id="jLblSearchkey" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="m_jSearchkey" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLblName" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="m_jName" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="34" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblSearchkey" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jSearchkey" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="m_jTaxID" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblTaxID" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="txtFirstName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblFirstName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblLastName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtLastName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblEmail" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtEmail" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblTelephone1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtPhone" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLblTelephone2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtPhone2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLblTaxID">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.taxid" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jTaxID">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="CustomersView_m_jTaxID"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblSearchkey">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.searchkeym" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[82, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jSearchkey">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Text Cursor"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblName">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.supplier" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[140, 25]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="m_jName">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[400, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblFirstName">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.firstname" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="alignmentX" type="float" value="0.5"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtFirstName">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblLastName">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.lastname" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtLastName">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblEmail">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.email" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtEmail">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblTelephone1">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.phone" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtPhone">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblTelephone2">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.phone2" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtPhone2">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="South"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
|
||||
<Property name="alignment" type="int" value="2"/>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="m_jBtnOK">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="Button.OK" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="m_jBtnOKActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="m_jBtnCancel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/cancel.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="Button.Cancel" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[80, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="m_jBtnCancelActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,399 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.MessageInf;
|
||||
import com.unicenta.data.loader.LocalRes;
|
||||
import com.unicenta.data.loader.TableDefinition;
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.AppView;
|
||||
import com.unicenta.pos.forms.DataLogicSales;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dialog;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Window;
|
||||
import java.util.UUID;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
public class JDialogNewSupplier extends javax.swing.JDialog {
|
||||
|
||||
private DataLogicSuppliers dlSupplier;
|
||||
private DataLogicSales dlSales;
|
||||
private TableDefinition tsuppliers;
|
||||
private SupplierInfoExt selectedSupplier;
|
||||
private Object m_oId;
|
||||
|
||||
/** Creates new form quick New Supplier
|
||||
* @param parent */
|
||||
protected JDialogNewSupplier(java.awt.Frame parent) {
|
||||
super(parent, true);
|
||||
}
|
||||
|
||||
/** Creates new form quick New Supplier
|
||||
* @param parent */
|
||||
protected JDialogNewSupplier(java.awt.Dialog parent) {
|
||||
super(parent, true);
|
||||
}
|
||||
|
||||
private void init(AppView app) {
|
||||
|
||||
dlSales = (DataLogicSales) app.getBean("com.unicenta.pos.forms.DataLogicSales");
|
||||
dlSupplier = (DataLogicSuppliers) app.getBean("com.unicenta.pos.suppliers.DataLogicSuppliers");
|
||||
tsuppliers = dlSupplier.getTableSuppliers();
|
||||
|
||||
initComponents();
|
||||
|
||||
getRootPane().setDefaultButton(m_jBtnOK);
|
||||
|
||||
}
|
||||
|
||||
public Object createValue() throws BasicException {
|
||||
Object[] supplier = new Object[22];
|
||||
supplier[0] = m_oId;
|
||||
supplier[1] = m_jSearchkey.getText();
|
||||
supplier[2] = m_jTaxID.getText();
|
||||
supplier[3] = m_jName.getText();
|
||||
supplier[4] = 0.0;
|
||||
supplier[5] = null;
|
||||
supplier[6] = null;
|
||||
supplier[7] = null;
|
||||
supplier[8] = null;
|
||||
supplier[9] = null;
|
||||
supplier[10] = null;
|
||||
supplier[11] = Formats.STRING.parseValue(txtFirstName.getText());
|
||||
supplier[12] = Formats.STRING.parseValue(txtLastName.getText());
|
||||
supplier[13] = Formats.STRING.parseValue(txtEmail.getText());
|
||||
supplier[14] = Formats.STRING.parseValue(txtPhone.getText());
|
||||
supplier[15] = Formats.STRING.parseValue(txtPhone2.getText());
|
||||
supplier[16] = null;
|
||||
supplier[17] = null;
|
||||
supplier[18] = true;
|
||||
supplier[19] = null;
|
||||
supplier[20] = 0.0;
|
||||
supplier[21] = null;
|
||||
|
||||
return supplier;
|
||||
}
|
||||
|
||||
|
||||
public static JDialogNewSupplier getDialog(Component parent,AppView app) {
|
||||
|
||||
Window window = getWindow(parent);
|
||||
|
||||
JDialogNewSupplier quicknewsupplier;
|
||||
|
||||
if (window instanceof Frame) {
|
||||
quicknewsupplier = new JDialogNewSupplier((Frame) window);
|
||||
} else {
|
||||
quicknewsupplier = new JDialogNewSupplier((Dialog) window);
|
||||
}
|
||||
|
||||
quicknewsupplier.init(app);
|
||||
|
||||
return quicknewsupplier;
|
||||
}
|
||||
|
||||
protected static Window getWindow(Component parent) {
|
||||
if (parent == null) {
|
||||
return new JFrame();
|
||||
} else if (parent instanceof Frame || parent instanceof Dialog) {
|
||||
return (Window)parent;
|
||||
} else {
|
||||
return getWindow(parent.getParent());
|
||||
}
|
||||
}
|
||||
|
||||
public SupplierInfoExt getSelectedSupplier() {
|
||||
return selectedSupplier;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is
|
||||
* always regenerated by the Form Editor.
|
||||
*/
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jLblTaxID = new javax.swing.JLabel();
|
||||
m_jTaxID = new javax.swing.JTextField();
|
||||
jLblSearchkey = new javax.swing.JLabel();
|
||||
m_jSearchkey = new javax.swing.JTextField();
|
||||
jLblName = new javax.swing.JLabel();
|
||||
m_jName = new javax.swing.JTextField();
|
||||
jLblFirstName = new javax.swing.JLabel();
|
||||
txtFirstName = new javax.swing.JTextField();
|
||||
jLblLastName = new javax.swing.JLabel();
|
||||
txtLastName = new javax.swing.JTextField();
|
||||
jLblEmail = new javax.swing.JLabel();
|
||||
txtEmail = new javax.swing.JTextField();
|
||||
jLblTelephone1 = new javax.swing.JLabel();
|
||||
txtPhone = new javax.swing.JTextField();
|
||||
jLblTelephone2 = new javax.swing.JLabel();
|
||||
txtPhone2 = new javax.swing.JTextField();
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
m_jBtnOK = new javax.swing.JButton();
|
||||
m_jBtnCancel = new javax.swing.JButton();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setTitle(AppLocal.getIntString("label.supplier")); // NOI18N
|
||||
setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
setResizable(false);
|
||||
|
||||
jPanel3.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
|
||||
jLblTaxID.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblTaxID.setText(AppLocal.getIntString("label.taxid")); // NOI18N
|
||||
jLblTaxID.setMaximumSize(new java.awt.Dimension(150, 30));
|
||||
jLblTaxID.setMinimumSize(new java.awt.Dimension(140, 25));
|
||||
jLblTaxID.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
m_jTaxID.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jTaxID.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLblSearchkey.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblSearchkey.setText(AppLocal.getIntString("label.searchkeym")); // NOI18N
|
||||
jLblSearchkey.setPreferredSize(new java.awt.Dimension(82, 30));
|
||||
|
||||
m_jSearchkey.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jSearchkey.setHorizontalAlignment(javax.swing.JTextField.LEFT);
|
||||
m_jSearchkey.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
|
||||
m_jSearchkey.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
jLblName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblName.setText(AppLocal.getIntString("label.supplier")); // NOI18N
|
||||
jLblName.setMaximumSize(new java.awt.Dimension(140, 25));
|
||||
jLblName.setMinimumSize(new java.awt.Dimension(140, 25));
|
||||
jLblName.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
m_jName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jName.setPreferredSize(new java.awt.Dimension(400, 30));
|
||||
|
||||
jLblFirstName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblFirstName.setText(AppLocal.getIntString("label.firstname")); // NOI18N
|
||||
jLblFirstName.setAlignmentX(0.5F);
|
||||
jLblFirstName.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtFirstName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtFirstName.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLblLastName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblLastName.setText(AppLocal.getIntString("label.lastname")); // NOI18N
|
||||
jLblLastName.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtLastName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtLastName.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLblEmail.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblEmail.setText(AppLocal.getIntString("label.email")); // NOI18N
|
||||
jLblEmail.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtEmail.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtEmail.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLblTelephone1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblTelephone1.setText(AppLocal.getIntString("label.phone")); // NOI18N
|
||||
jLblTelephone1.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtPhone.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtPhone.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLblTelephone2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblTelephone2.setText(AppLocal.getIntString("label.phone2")); // NOI18N
|
||||
jLblTelephone2.setPreferredSize(new java.awt.Dimension(150, 30));
|
||||
|
||||
txtPhone2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
txtPhone2.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
|
||||
jPanel3.setLayout(jPanel3Layout);
|
||||
jPanel3Layout.setHorizontalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblEmail, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblTelephone1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblTelephone2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(txtPhone, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtEmail, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtPhone2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblFirstName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblLastName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(txtLastName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtFirstName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addComponent(jLblTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(m_jTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(24, 24, 24)
|
||||
.addComponent(jLblSearchkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(m_jSearchkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addComponent(jLblName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
|
||||
.addContainerGap(34, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel3Layout.setVerticalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblSearchkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jSearchkey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(m_jTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(txtFirstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblFirstName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblLastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtLastName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblTelephone1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLblTelephone2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtPhone2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
);
|
||||
|
||||
getContentPane().add(jPanel3, java.awt.BorderLayout.NORTH);
|
||||
jPanel3.getAccessibleContext().setAccessibleName("");
|
||||
|
||||
jPanel2.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
|
||||
|
||||
m_jBtnOK.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jBtnOK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
m_jBtnOK.setText(AppLocal.getIntString("Button.OK")); // NOI18N
|
||||
m_jBtnOK.setFocusPainted(false);
|
||||
m_jBtnOK.setFocusable(false);
|
||||
m_jBtnOK.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
m_jBtnOK.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
m_jBtnOK.setRequestFocusEnabled(false);
|
||||
m_jBtnOK.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
m_jBtnOKActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel2.add(m_jBtnOK);
|
||||
|
||||
m_jBtnCancel.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jBtnCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/cancel.png"))); // NOI18N
|
||||
m_jBtnCancel.setText(AppLocal.getIntString("Button.Cancel")); // NOI18N
|
||||
m_jBtnCancel.setFocusPainted(false);
|
||||
m_jBtnCancel.setFocusable(false);
|
||||
m_jBtnCancel.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
m_jBtnCancel.setPreferredSize(new java.awt.Dimension(80, 45));
|
||||
m_jBtnCancel.setRequestFocusEnabled(false);
|
||||
m_jBtnCancel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
m_jBtnCancelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel2.add(m_jBtnCancel);
|
||||
|
||||
getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);
|
||||
|
||||
setSize(new java.awt.Dimension(628, 455));
|
||||
setLocationRelativeTo(null);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void m_jBtnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jBtnOKActionPerformed
|
||||
try {
|
||||
m_oId = UUID.randomUUID().toString();
|
||||
Object supplier = createValue() ;
|
||||
int status = tsuppliers.getInsertSentence().exec(supplier);
|
||||
if (status>0){
|
||||
selectedSupplier = dlSales.loadSupplierExt(m_oId.toString());
|
||||
dispose();
|
||||
}else{
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE,
|
||||
LocalRes.getIntString("message.nosave"), "Error save");
|
||||
msg.show(this);
|
||||
}
|
||||
} catch (BasicException ex) {
|
||||
MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE,
|
||||
LocalRes.getIntString("message.nosave"), ex);
|
||||
msg.show(this);
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_m_jBtnOKActionPerformed
|
||||
|
||||
private void m_jBtnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jBtnCancelActionPerformed
|
||||
|
||||
dispose();
|
||||
|
||||
}//GEN-LAST:event_m_jBtnCancelActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JLabel jLblEmail;
|
||||
private javax.swing.JLabel jLblFirstName;
|
||||
private javax.swing.JLabel jLblLastName;
|
||||
private javax.swing.JLabel jLblName;
|
||||
private javax.swing.JLabel jLblSearchkey;
|
||||
private javax.swing.JLabel jLblTaxID;
|
||||
private javax.swing.JLabel jLblTelephone1;
|
||||
private javax.swing.JLabel jLblTelephone2;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JButton m_jBtnCancel;
|
||||
private javax.swing.JButton m_jBtnOK;
|
||||
private javax.swing.JTextField m_jName;
|
||||
private javax.swing.JTextField m_jSearchkey;
|
||||
private javax.swing.JTextField m_jTaxID;
|
||||
private javax.swing.JTextField txtEmail;
|
||||
private javax.swing.JTextField txtFirstName;
|
||||
private javax.swing.JTextField txtLastName;
|
||||
private javax.swing.JTextField txtPhone;
|
||||
private javax.swing.JTextField txtPhone2;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
||||
@@ -0,0 +1,545 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="2"/>
|
||||
<Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="form.customertitle" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,122,0,0,2,-10"/>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="0"/>
|
||||
<SyntheticProperty name="generateSize" type="boolean" value="true"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="true"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel2">
|
||||
<Properties>
|
||||
<Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor">
|
||||
<Color id="Default Cursor"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="com.unicenta.editor.JEditorKeys" name="m_jKeys">
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="JCustomerFinder_m_jKeys"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="North"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel8">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Last"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jcmdCancel">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/cancel.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.Cancel" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jcmdCancelActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jcmdOK">
|
||||
<Properties>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.OK" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
|
||||
<Insets value="[8, 16, 8, 16]"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 44]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[103, 44]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jcmdOKActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="com.unicenta.data.gui.JImageViewerCustomer" name="jImageViewerSupplier">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[450, 0]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel5">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="First"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanel7">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblName" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblSearchKey" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblPostal" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jtxtSearchKey" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtPostal" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLblTaxID" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtTaxID" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="jLblEmail" max="-2" attributes="0"/>
|
||||
<Component id="jLblPhone" alignment="0" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jtxtPhone" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jtxtTaxID" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblTaxID" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jtxtSearchKey" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblSearchKey" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblPostal" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtPostal" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLblName" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="m_jtxtPhone" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLblPhone" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLblEmail" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="m_jtxtName2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLblTaxID">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.taxid" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtTaxID">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[200, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblSearchKey">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.searchkey" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtSearchKey">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblPostal">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Postal"/>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="JCustomerFinder_jLblPostal"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtPostal">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_SerializeTo" type="java.lang.String" value="JCustomerFinder_m_jtxtPostal"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblName">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.prodname" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[60, 15]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtName">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblPhone">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.companytelephone" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLblEmail">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="label.companyemail" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtPhone">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="com.unicenta.editor.JEditorString" name="m_jtxtName2">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[150, 30]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[250, 30]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel4">
|
||||
<Properties>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[450, 140]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<Properties>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[400, 147]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JList" name="jListSuppliers">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="requestFocusEnabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jListSuppliersMouseClicked"/>
|
||||
<EventHandler event="valueChanged" listener="javax.swing.event.ListSelectionListener" parameters="javax.swing.event.ListSelectionEvent" handler="jListSuppliersValueChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel6">
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="First"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="jbtnReset">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/reload.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.reset" replaceFormat="java.util.ResourceBundle.getBundle("{bundleNameSlashes}").getString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Clear Filter"/>
|
||||
<Property name="actionCommand" type="java.lang.String" value="Reset "/>
|
||||
<Property name="focusable" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnResetActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jbtnExecute">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="12" style="0"/>
|
||||
</Property>
|
||||
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
|
||||
<Image iconType="3" name="/com/unicenta/images/ok.png"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="pos_messages.properties" key="button.executefilter" replaceFormat="AppLocal.getIntString("{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Execute Filter"/>
|
||||
<Property name="focusPainted" type="boolean" value="false"/>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[110, 45]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value=""/>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jbtnExecuteActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,692 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta & previous Openbravo POS works
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.QBFCompareEnum;
|
||||
import com.unicenta.data.user.EditorCreator;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.AppView;
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.*;
|
||||
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author adrianromero
|
||||
*/
|
||||
public class JSupplierFinder extends javax.swing.JDialog implements EditorCreator {
|
||||
|
||||
private SupplierInfo m_ReturnSupplier;
|
||||
private ListProvider lpr;
|
||||
private AppView appView;
|
||||
|
||||
public class Global {
|
||||
|
||||
}
|
||||
|
||||
public void searchKey() {
|
||||
jbtnExecute.setMnemonic(KeyEvent.VK_E);
|
||||
executeSearch();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void resetKey() {
|
||||
jbtnReset.setMnemonic(KeyEvent.VK_R);
|
||||
m_jtxtTaxID.reset();
|
||||
m_jtxtSearchKey.reset();
|
||||
m_jtxtName.reset();
|
||||
m_jtxtPostal.reset();
|
||||
m_jtxtPhone.reset();
|
||||
m_jtxtName2.reset();
|
||||
|
||||
m_jtxtTaxID.activate();
|
||||
|
||||
cleanSearch();
|
||||
|
||||
}
|
||||
|
||||
public void setAppView(AppView appView) {
|
||||
this.appView = appView;
|
||||
}
|
||||
|
||||
/** Creates new form JSupplierFinder */
|
||||
private JSupplierFinder(java.awt.Frame parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new form JSupplierFinder
|
||||
*/
|
||||
private JSupplierFinder(java.awt.Dialog parent, boolean modal) {
|
||||
super(parent, modal);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parent
|
||||
* @param dlSuppliers
|
||||
* @return
|
||||
*/
|
||||
public static JSupplierFinder getSupplierFinder(Component parent, DataLogicSuppliers dlSuppliers) {
|
||||
Window window = getWindow(parent);
|
||||
|
||||
JSupplierFinder myMsg;
|
||||
if (window instanceof Frame) {
|
||||
myMsg = new JSupplierFinder((Frame) window, true);
|
||||
} else {
|
||||
myMsg = new JSupplierFinder((Dialog) window, true);
|
||||
}
|
||||
myMsg.init(dlSuppliers);
|
||||
myMsg.applyComponentOrientation(parent.getComponentOrientation());
|
||||
|
||||
return myMsg;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public SupplierInfo getSelectedSupplier() {
|
||||
return m_ReturnSupplier;
|
||||
}
|
||||
|
||||
private void init(DataLogicSuppliers dlSuppliers) {
|
||||
|
||||
initComponents();
|
||||
|
||||
jImageViewerSupplier.setVisible(false);
|
||||
|
||||
jScrollPane1.getVerticalScrollBar().setPreferredSize(new Dimension(35, 35));
|
||||
|
||||
m_jtxtTaxID.addEditorKeys(m_jKeys);
|
||||
m_jtxtSearchKey.addEditorKeys(m_jKeys);
|
||||
m_jtxtName.addEditorKeys(m_jKeys);
|
||||
m_jtxtPostal.addEditorKeys(m_jKeys);
|
||||
m_jtxtPhone.addEditorKeys(m_jKeys);
|
||||
m_jtxtName2.addEditorKeys(m_jKeys);
|
||||
|
||||
m_jtxtTaxID.reset();
|
||||
m_jtxtSearchKey.reset();
|
||||
m_jtxtName.reset();
|
||||
m_jtxtPostal.reset();
|
||||
m_jtxtPhone.reset();
|
||||
m_jtxtName2.reset();
|
||||
|
||||
m_jtxtTaxID.activate();
|
||||
|
||||
lpr = new ListProviderCreator(dlSuppliers.getSupplierList(), this);
|
||||
|
||||
jListSuppliers.setCellRenderer(new SupplierRenderer());
|
||||
|
||||
getRootPane().setDefaultButton(jcmdOK);
|
||||
|
||||
m_ReturnSupplier = null;
|
||||
// m_jKeys.setSupplierFinder(this);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param supplier
|
||||
*/
|
||||
public void search(SupplierInfo supplier) {
|
||||
|
||||
if (supplier == null || supplier.getName() == null || supplier.getName().equals("")) {
|
||||
|
||||
m_jtxtTaxID.reset();
|
||||
m_jtxtSearchKey.reset();
|
||||
m_jtxtName.reset();
|
||||
m_jtxtPostal.reset();
|
||||
m_jtxtPhone.reset();
|
||||
m_jtxtName2.reset();
|
||||
|
||||
m_jtxtTaxID.activate();
|
||||
|
||||
cleanSearch();
|
||||
} else {
|
||||
|
||||
m_jtxtTaxID.setText(supplier.getTaxid());
|
||||
m_jtxtSearchKey.setText(supplier.getSearchkey());
|
||||
m_jtxtName.setText(supplier.getName());
|
||||
m_jtxtPostal.setText(supplier.getPostal());
|
||||
m_jtxtPhone.setText(supplier.getPhone());
|
||||
m_jtxtName2.setText(supplier.getEmail());
|
||||
|
||||
m_jtxtTaxID.activate();
|
||||
|
||||
executeSearch();
|
||||
}
|
||||
}
|
||||
|
||||
private void cleanSearch() {
|
||||
m_jtxtTaxID.setText("");
|
||||
m_jtxtSearchKey.setText("");
|
||||
m_jtxtName.setText("");
|
||||
m_jtxtPostal.setText("");
|
||||
m_jtxtPhone.setText("");
|
||||
m_jtxtName2.setText("");
|
||||
|
||||
jListSuppliers.setModel(new MyListData(new ArrayList()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method actions the Supplier data search
|
||||
*/
|
||||
public void executeSearch() {
|
||||
|
||||
try {
|
||||
jListSuppliers.setModel(new MyListData(lpr.loadData()));
|
||||
if (jListSuppliers.getModel().getSize() > 0) {
|
||||
jListSuppliers.setSelectedIndex(0);
|
||||
} else {
|
||||
if(!m_jtxtName.getText().equals("")) {
|
||||
|
||||
int n = JOptionPane.showConfirmDialog(
|
||||
null,
|
||||
AppLocal.getIntString("message.suppliernotfound"),
|
||||
AppLocal.getIntString("title.editor"),
|
||||
JOptionPane.YES_NO_OPTION);
|
||||
|
||||
if (n != 1) {
|
||||
SupplierInfoGlobal supplierInfoGlobal = SupplierInfoGlobal.getInstance();
|
||||
SupplierInfoExt supplierInfoExt = supplierInfoGlobal.getSupplierInfoExt();
|
||||
this.setVisible(false);
|
||||
appView.getAppUserView().showTask("com.unicenta.pos.suppliers.SuppliersPanel");
|
||||
JOptionPane.showMessageDialog(null,
|
||||
"You must complete Account and Search Key Then Save to add to Ticket",
|
||||
"Create Supplier",JOptionPane.OK_OPTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (BasicException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return creates object for search method
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public Object createValue() throws BasicException {
|
||||
|
||||
Object[] afilter = new Object[12];
|
||||
|
||||
// TaxID
|
||||
if (m_jtxtTaxID.getText() == null || m_jtxtTaxID.getText().equals("")) {
|
||||
afilter[0] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[1] = null;
|
||||
} else {
|
||||
afilter[0] = QBFCompareEnum.COMP_RE;
|
||||
afilter[1] = "%" + m_jtxtTaxID.getText() + "%";
|
||||
}
|
||||
|
||||
// SearchKey
|
||||
if (m_jtxtSearchKey.getText() == null || m_jtxtSearchKey.getText().equals("")) {
|
||||
afilter[2] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[3] = null;
|
||||
} else {
|
||||
afilter[2] = QBFCompareEnum.COMP_RE;
|
||||
afilter[3] = "%" + m_jtxtSearchKey.getText() + "%";
|
||||
}
|
||||
|
||||
// Name
|
||||
if (m_jtxtName.getText() == null || m_jtxtName.getText().equals("")) {
|
||||
afilter[4] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[5] = null;
|
||||
} else {
|
||||
afilter[4] = QBFCompareEnum.COMP_RE;
|
||||
afilter[5] = "%" + m_jtxtName.getText() + "%";
|
||||
}
|
||||
|
||||
// Postal
|
||||
if (m_jtxtPostal.getText() == null || m_jtxtPostal.getText().equals("")) {
|
||||
afilter[6] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[7] = null;
|
||||
} else {
|
||||
afilter[6] = QBFCompareEnum.COMP_RE;
|
||||
afilter[7] = "%" + m_jtxtPostal.getText() + "%";
|
||||
}
|
||||
|
||||
// Phone
|
||||
if (m_jtxtPhone.getText() == null || m_jtxtPhone.getText().equals("")) {
|
||||
afilter[8] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[9] = null;
|
||||
} else {
|
||||
afilter[8] = QBFCompareEnum.COMP_RE;
|
||||
afilter[9] = "%" + m_jtxtPhone.getText() + "%";
|
||||
}
|
||||
|
||||
// Email
|
||||
if (m_jtxtName2.getText() == null || m_jtxtName2.getText().equals("")) {
|
||||
afilter[10] = QBFCompareEnum.COMP_NONE;
|
||||
afilter[11] = null;
|
||||
} else {
|
||||
afilter[10] = QBFCompareEnum.COMP_RE;
|
||||
afilter[11] = "%" + m_jtxtName2.getText() + "%";
|
||||
}
|
||||
|
||||
return afilter;
|
||||
}
|
||||
|
||||
private static Window getWindow(Component parent) {
|
||||
if (parent == null) {
|
||||
return new JFrame();
|
||||
} else if (parent instanceof Frame || parent instanceof Dialog) {
|
||||
return (Window) parent;
|
||||
} else {
|
||||
return getWindow(parent.getParent());
|
||||
}
|
||||
}
|
||||
|
||||
private static class MyListData extends javax.swing.AbstractListModel {
|
||||
|
||||
private final java.util.List m_data;
|
||||
|
||||
public MyListData(java.util.List data) {
|
||||
m_data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getElementAt(int index) {
|
||||
return m_data.get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return m_data.size();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
m_jKeys = new com.unicenta.editor.JEditorKeys();
|
||||
jPanel8 = new javax.swing.JPanel();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jcmdCancel = new javax.swing.JButton();
|
||||
jcmdOK = new javax.swing.JButton();
|
||||
jImageViewerSupplier = new com.unicenta.data.gui.JImageViewerCustomer();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jPanel5 = new javax.swing.JPanel();
|
||||
jPanel7 = new javax.swing.JPanel();
|
||||
jLblTaxID = new javax.swing.JLabel();
|
||||
m_jtxtTaxID = new com.unicenta.editor.JEditorString();
|
||||
jLblSearchKey = new javax.swing.JLabel();
|
||||
m_jtxtSearchKey = new com.unicenta.editor.JEditorString();
|
||||
jLblPostal = new javax.swing.JLabel();
|
||||
m_jtxtPostal = new com.unicenta.editor.JEditorString();
|
||||
jLblName = new javax.swing.JLabel();
|
||||
m_jtxtName = new com.unicenta.editor.JEditorString();
|
||||
jLblPhone = new javax.swing.JLabel();
|
||||
jLblEmail = new javax.swing.JLabel();
|
||||
m_jtxtPhone = new com.unicenta.editor.JEditorString();
|
||||
m_jtxtName2 = new com.unicenta.editor.JEditorString();
|
||||
jPanel4 = new javax.swing.JPanel();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
jListSuppliers = new javax.swing.JList();
|
||||
jPanel6 = new javax.swing.JPanel();
|
||||
jbtnReset = new javax.swing.JButton();
|
||||
jbtnExecute = new javax.swing.JButton();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
|
||||
setTitle(AppLocal.getIntString("form.customertitle")); // NOI18N
|
||||
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
|
||||
jPanel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||
jPanel2.setLayout(new java.awt.BorderLayout());
|
||||
jPanel2.add(m_jKeys, java.awt.BorderLayout.NORTH);
|
||||
|
||||
jPanel8.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jcmdCancel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jcmdCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/cancel.png"))); // NOI18N
|
||||
jcmdCancel.setText(AppLocal.getIntString("button.Cancel")); // NOI18N
|
||||
jcmdCancel.setFocusPainted(false);
|
||||
jcmdCancel.setFocusable(false);
|
||||
jcmdCancel.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
jcmdCancel.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jcmdCancel.setRequestFocusEnabled(false);
|
||||
jcmdCancel.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jcmdCancelActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel1.add(jcmdCancel);
|
||||
|
||||
jcmdOK.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
jcmdOK.setText(AppLocal.getIntString("button.OK")); // NOI18N
|
||||
jcmdOK.setEnabled(false);
|
||||
jcmdOK.setFocusPainted(false);
|
||||
jcmdOK.setFocusable(false);
|
||||
jcmdOK.setMargin(new java.awt.Insets(8, 16, 8, 16));
|
||||
jcmdOK.setMaximumSize(new java.awt.Dimension(103, 44));
|
||||
jcmdOK.setMinimumSize(new java.awt.Dimension(103, 44));
|
||||
jcmdOK.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jcmdOK.setRequestFocusEnabled(false);
|
||||
jcmdOK.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jcmdOKActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel1.add(jcmdOK);
|
||||
|
||||
jPanel8.add(jPanel1, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
jPanel2.add(jPanel8, java.awt.BorderLayout.PAGE_END);
|
||||
jPanel2.add(jImageViewerSupplier, java.awt.BorderLayout.CENTER);
|
||||
|
||||
getContentPane().add(jPanel2, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
jPanel3.setPreferredSize(new java.awt.Dimension(450, 0));
|
||||
jPanel3.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanel5.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jLblTaxID.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblTaxID.setText(AppLocal.getIntString("label.taxid")); // NOI18N
|
||||
jLblTaxID.setMaximumSize(new java.awt.Dimension(60, 15));
|
||||
jLblTaxID.setMinimumSize(new java.awt.Dimension(60, 15));
|
||||
jLblTaxID.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtTaxID.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtTaxID.setPreferredSize(new java.awt.Dimension(200, 30));
|
||||
|
||||
jLblSearchKey.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblSearchKey.setText(AppLocal.getIntString("label.searchkey")); // NOI18N
|
||||
jLblSearchKey.setMaximumSize(new java.awt.Dimension(60, 15));
|
||||
jLblSearchKey.setMinimumSize(new java.awt.Dimension(60, 15));
|
||||
jLblSearchKey.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtSearchKey.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtSearchKey.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jLblPostal.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblPostal.setText("Postal");
|
||||
jLblPostal.setMaximumSize(new java.awt.Dimension(60, 15));
|
||||
jLblPostal.setMinimumSize(new java.awt.Dimension(60, 15));
|
||||
jLblPostal.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtPostal.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtPostal.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jLblName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblName.setText(AppLocal.getIntString("label.prodname")); // NOI18N
|
||||
jLblName.setMaximumSize(new java.awt.Dimension(60, 15));
|
||||
jLblName.setMinimumSize(new java.awt.Dimension(60, 15));
|
||||
jLblName.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtName.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtName.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
jLblPhone.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("pos_messages"); // NOI18N
|
||||
jLblPhone.setText(bundle.getString("label.companytelephone")); // NOI18N
|
||||
jLblPhone.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
jLblEmail.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jLblEmail.setText(bundle.getString("label.companyemail")); // NOI18N
|
||||
jLblEmail.setPreferredSize(new java.awt.Dimension(110, 30));
|
||||
|
||||
m_jtxtPhone.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtPhone.setMinimumSize(new java.awt.Dimension(150, 30));
|
||||
m_jtxtPhone.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
m_jtxtName2.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
m_jtxtName2.setMinimumSize(new java.awt.Dimension(150, 30));
|
||||
m_jtxtName2.setPreferredSize(new java.awt.Dimension(250, 30));
|
||||
|
||||
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
|
||||
jPanel7.setLayout(jPanel7Layout);
|
||||
jPanel7Layout.setHorizontalGroup(
|
||||
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblPostal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jtxtSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtPostal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addComponent(jLblTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(m_jtxtTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||
.addComponent(jLblEmail, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblPhone, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jtxtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtName2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel7Layout.setVerticalGroup(
|
||||
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jtxtTaxID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblTaxID, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jtxtSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblSearchKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(jPanel7Layout.createSequentialGroup()
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblPostal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtPostal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(m_jtxtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jLblName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(m_jtxtPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLblPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLblEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(m_jtxtName2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
m_jtxtName.getAccessibleContext().setAccessibleName("");
|
||||
|
||||
jPanel5.add(jPanel7, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jPanel3.add(jPanel5, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
jPanel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
jPanel4.setPreferredSize(new java.awt.Dimension(450, 140));
|
||||
jPanel4.setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jScrollPane1.setPreferredSize(new java.awt.Dimension(400, 147));
|
||||
|
||||
jListSuppliers.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jListSuppliers.setFocusable(false);
|
||||
jListSuppliers.setRequestFocusEnabled(false);
|
||||
jListSuppliers.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
jListSuppliersMouseClicked(evt);
|
||||
}
|
||||
});
|
||||
jListSuppliers.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
|
||||
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
|
||||
jListSuppliersValueChanged(evt);
|
||||
}
|
||||
});
|
||||
jScrollPane1.setViewportView(jListSuppliers);
|
||||
|
||||
jPanel4.add(jScrollPane1, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jbtnReset.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jbtnReset.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/reload.png"))); // NOI18N
|
||||
jbtnReset.setText(bundle.getString("button.reset")); // NOI18N
|
||||
jbtnReset.setToolTipText("Clear Filter");
|
||||
jbtnReset.setActionCommand("Reset ");
|
||||
jbtnReset.setFocusable(false);
|
||||
jbtnReset.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jbtnReset.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnResetActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(jbtnReset);
|
||||
jbtnReset.getAccessibleContext().setAccessibleDescription("");
|
||||
|
||||
jbtnExecute.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
|
||||
jbtnExecute.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/unicenta/images/ok.png"))); // NOI18N
|
||||
jbtnExecute.setText(AppLocal.getIntString("button.executefilter")); // NOI18N
|
||||
jbtnExecute.setToolTipText("Execute Filter");
|
||||
jbtnExecute.setFocusPainted(false);
|
||||
jbtnExecute.setPreferredSize(new java.awt.Dimension(110, 45));
|
||||
jbtnExecute.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jbtnExecuteActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel6.add(jbtnExecute);
|
||||
jbtnExecute.getAccessibleContext().setAccessibleDescription("");
|
||||
|
||||
jPanel4.add(jPanel6, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
jPanel3.add(jPanel4, java.awt.BorderLayout.CENTER);
|
||||
|
||||
getContentPane().add(jPanel3, java.awt.BorderLayout.CENTER);
|
||||
|
||||
setSize(new java.awt.Dimension(758, 634));
|
||||
setLocationRelativeTo(null);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
private void jcmdOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmdOKActionPerformed
|
||||
|
||||
m_ReturnSupplier = (SupplierInfo) jListSuppliers.getSelectedValue();
|
||||
dispose();
|
||||
|
||||
}//GEN-LAST:event_jcmdOKActionPerformed
|
||||
|
||||
private void jcmdCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcmdCancelActionPerformed
|
||||
|
||||
dispose();
|
||||
|
||||
}//GEN-LAST:event_jcmdCancelActionPerformed
|
||||
|
||||
private void jbtnExecuteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnExecuteActionPerformed
|
||||
|
||||
m_ReturnSupplier=null;
|
||||
executeSearch();
|
||||
|
||||
}//GEN-LAST:event_jbtnExecuteActionPerformed
|
||||
|
||||
private void jListSuppliersValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_jListSuppliersValueChanged
|
||||
|
||||
m_ReturnSupplier = (SupplierInfo) jListSuppliers.getSelectedValue();
|
||||
|
||||
if (m_ReturnSupplier != null) {
|
||||
m_ReturnSupplier = (SupplierInfo) jListSuppliers.getSelectedValue();
|
||||
|
||||
// if (m_ReturnSupplier != null) {
|
||||
// jImageViewerSupplier.setImage(m_ReturnSupplier.getImage());
|
||||
// }
|
||||
}
|
||||
|
||||
jcmdOK.setEnabled(jListSuppliers.getSelectedValue() != null);
|
||||
|
||||
}//GEN-LAST:event_jListSuppliersValueChanged
|
||||
|
||||
private void jListSuppliersMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jListSuppliersMouseClicked
|
||||
|
||||
m_ReturnSupplier = (SupplierInfo) jListSuppliers.getSelectedValue();
|
||||
|
||||
if (m_ReturnSupplier != null) {
|
||||
m_ReturnSupplier = (SupplierInfo) jListSuppliers.getSelectedValue();
|
||||
|
||||
// if (m_ReturnSupplier != null) {
|
||||
// jImageViewerSupplier.setImage(m_ReturnSupplier.getImage());
|
||||
// }
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_jListSuppliersMouseClicked
|
||||
|
||||
private void jbtnResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnResetActionPerformed
|
||||
|
||||
m_jtxtTaxID.reset();
|
||||
m_jtxtSearchKey.reset();
|
||||
m_jtxtName.reset();
|
||||
m_jtxtPostal.reset();
|
||||
m_jtxtPhone.reset();
|
||||
m_jtxtName2.reset();
|
||||
|
||||
m_jtxtTaxID.activate();
|
||||
|
||||
cleanSearch();
|
||||
}//GEN-LAST:event_jbtnResetActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private com.unicenta.data.gui.JImageViewerCustomer jImageViewerSupplier;
|
||||
private javax.swing.JLabel jLblEmail;
|
||||
private javax.swing.JLabel jLblName;
|
||||
private javax.swing.JLabel jLblPhone;
|
||||
private javax.swing.JLabel jLblPostal;
|
||||
private javax.swing.JLabel jLblSearchKey;
|
||||
private javax.swing.JLabel jLblTaxID;
|
||||
private javax.swing.JList jListSuppliers;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JPanel jPanel4;
|
||||
private javax.swing.JPanel jPanel5;
|
||||
private javax.swing.JPanel jPanel6;
|
||||
private javax.swing.JPanel jPanel7;
|
||||
private javax.swing.JPanel jPanel8;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JButton jbtnExecute;
|
||||
private javax.swing.JButton jbtnReset;
|
||||
private javax.swing.JButton jcmdCancel;
|
||||
private javax.swing.JButton jcmdOK;
|
||||
private com.unicenta.editor.JEditorKeys m_jKeys;
|
||||
private com.unicenta.editor.JEditorString m_jtxtName;
|
||||
private com.unicenta.editor.JEditorString m_jtxtName2;
|
||||
private com.unicenta.editor.JEditorString m_jtxtPhone;
|
||||
private com.unicenta.editor.JEditorString m_jtxtPostal;
|
||||
private com.unicenta.editor.JEditorString m_jtxtSearchKey;
|
||||
private com.unicenta.editor.JEditorString m_jtxtTaxID;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<Properties>
|
||||
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[256, 560]"/>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[256, 560]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,88,0,0,1,44"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="jPanelSuppliers">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Arial" size="14" style="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignCardLayout"/>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
@@ -0,0 +1,334 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.MessageInf;
|
||||
import com.unicenta.pos.catalog.JCatalogTab;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.forms.AppView;
|
||||
import com.unicenta.pos.sales.DataLogicReceipts;
|
||||
import com.unicenta.pos.sales.SharedTicketInfo;
|
||||
import com.unicenta.pos.sales.TicketsEditor;
|
||||
import com.unicenta.pos.ticket.TicketInfo;
|
||||
import com.unicenta.pos.util.ThumbNailBuilder;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.EventListenerList;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JG uniCenta - outline/prep for uniCenta mobile + eCommerce connector
|
||||
*/
|
||||
@Slf4j
|
||||
public class OrderSupplierList extends JPanel implements SupplierTicketSelector {
|
||||
|
||||
/**
|
||||
* Source origin and Ticket
|
||||
*/
|
||||
protected AppView application;
|
||||
private String currentTicket;
|
||||
|
||||
/**
|
||||
* This instance interface
|
||||
*/
|
||||
protected TicketsEditor panelticket;
|
||||
|
||||
/**
|
||||
* Set listeners for new/change Supplier/Receipt events
|
||||
*/
|
||||
protected EventListenerList listeners = new EventListenerList();
|
||||
private final DataLogicSuppliers dataLogicSuppliers;
|
||||
private final DataLogicReceipts dataLogicReceipts;
|
||||
private final ThumbNailBuilder tnbbutton;
|
||||
|
||||
/**
|
||||
* Creates new form SuppliersList
|
||||
* @param dlSuppliers
|
||||
* @param app
|
||||
* @param panelticket
|
||||
*/
|
||||
public OrderSupplierList(DataLogicSuppliers dlSuppliers, AppView app, TicketsEditor panelticket) {
|
||||
this.application = app;
|
||||
this.panelticket = panelticket;
|
||||
this.dataLogicSuppliers = dlSuppliers;
|
||||
this.dataLogicReceipts = (DataLogicReceipts) application.getBean("com.unicenta.pos.sales.DataLogicReceipts");
|
||||
tnbbutton = new ThumbNailBuilder(90, 98);
|
||||
|
||||
initComponents();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Component getComponent() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
public void reloadSuppliers() throws BasicException {
|
||||
// synchroniseData();
|
||||
loadSuppliers();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
|
||||
public void loadSuppliers() throws BasicException {
|
||||
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
long time = System.currentTimeMillis();
|
||||
jPanelSuppliers.removeAll();
|
||||
|
||||
JCatalogTab flowTab = new JCatalogTab();
|
||||
jPanelSuppliers.add(flowTab);
|
||||
|
||||
List<SupplierInfoExt> suppliers = null;
|
||||
List<SharedTicketInfo> ticketList = null;
|
||||
try {
|
||||
log.info("Time of getSuppliersWithOutImage {}", (System.currentTimeMillis() - time));
|
||||
|
||||
time = System.currentTimeMillis();
|
||||
|
||||
ticketList = dataLogicReceipts.getSharedTicketList();
|
||||
log.info("Time of getSharedTicketList {}", (System.currentTimeMillis() - time));
|
||||
time = System.currentTimeMillis();
|
||||
|
||||
|
||||
} catch (BasicException ex) {
|
||||
log.error(ex.getMessage());
|
||||
}
|
||||
HashMap<SharedTicketInfo, SupplierInfoExt> orderMap = new HashMap<>();
|
||||
|
||||
for (SharedTicketInfo sharedTicketInfo : ticketList) {
|
||||
|
||||
String ticketName = sharedTicketInfo.getName().trim();
|
||||
|
||||
if (ticketName.contains("[") && ticketName.contains("]")) {
|
||||
|
||||
// found order
|
||||
if (ticketName.startsWith("[")) {
|
||||
orderMap.put(sharedTicketInfo, null);
|
||||
} else if (!suppliers.isEmpty()) {
|
||||
for (SupplierInfoExt supplier : suppliers) {
|
||||
if (supplier != null) {
|
||||
String name = supplier.getName().trim();
|
||||
if (ticketName.startsWith(name)) {
|
||||
orderMap.put(sharedTicketInfo, supplier);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// sort
|
||||
SupplierComparator bvc = new SupplierComparator(orderMap);
|
||||
TreeMap<SharedTicketInfo, SupplierInfoExt> sortedMap = new TreeMap<>(bvc);
|
||||
sortedMap.putAll(orderMap);
|
||||
log.info("Time of orderMap {}", (System.currentTimeMillis() - time));
|
||||
time = System.currentTimeMillis();
|
||||
|
||||
// set button list
|
||||
for (Map.Entry<SharedTicketInfo, SupplierInfoExt> entry : sortedMap.entrySet()) {
|
||||
SharedTicketInfo ticket = entry.getKey();
|
||||
SupplierInfoExt supplier = entry.getValue();
|
||||
|
||||
String name = ticket.getName();
|
||||
BufferedImage image = null;
|
||||
|
||||
if (image == null) {
|
||||
try {
|
||||
InputStream is = getClass().getResourceAsStream("/com/unicenta/images/no_image.png");
|
||||
if (is != null) {
|
||||
image = ImageIO.read(is);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
log.error(ex.getMessage());
|
||||
}
|
||||
}
|
||||
String username;
|
||||
if (name.indexOf("[") != 0) {
|
||||
username = name.substring(0, name.indexOf("[") - 1);
|
||||
username = username.replace("-", "");
|
||||
} else {
|
||||
username = "unknown";
|
||||
}
|
||||
String orderId = name.substring(name.indexOf("["), name.indexOf("]") + 1);
|
||||
String text = "<html><center>" + username.trim() + "<br/>" + orderId.trim() + "</center></html>";
|
||||
|
||||
ImageIcon icon = new ImageIcon(tnbbutton.getThumbNailText(image, text));
|
||||
// flowTab.addButton(icon, new SelectedSupplierAction(ticket.getId()));
|
||||
}
|
||||
log.info("Time of finished loadSupplierOrders {}", (System.currentTimeMillis() - time));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
|
||||
public void setComponentEnabled(boolean value) {
|
||||
jPanelSuppliers.setEnabled(value);
|
||||
|
||||
synchronized (jPanelSuppliers.getTreeLock()) {
|
||||
int compCount = jPanelSuppliers.getComponentCount();
|
||||
for (int i = 0; i < compCount; i++) {
|
||||
jPanelSuppliers.getComponent(i).setEnabled(value);
|
||||
}
|
||||
}
|
||||
this.setEnabled(value);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
|
||||
public void addActionListener(ActionListener l) {
|
||||
listeners.add(ActionListener.class, l);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
|
||||
public void removeActionListener(ActionListener l) {
|
||||
listeners.remove(ActionListener.class, l);
|
||||
}
|
||||
|
||||
private void setActiveTicket(String id) throws BasicException {
|
||||
|
||||
currentTicket = panelticket.getActiveTicket().getId();
|
||||
|
||||
TicketInfo ticket = dataLogicReceipts.getSharedTicket(id);
|
||||
if (ticket == null) {
|
||||
throw new BasicException(AppLocal.getIntString("message.noticket"));
|
||||
} else {
|
||||
dataLogicReceipts.deleteSharedTicket(id);
|
||||
currentTicket = id;
|
||||
panelticket.setActiveTicket(ticket, null);
|
||||
fireTicketSelectionChanged(ticket.getId());
|
||||
}
|
||||
}
|
||||
|
||||
private void fireTicketSelectionChanged(String ticketId) {
|
||||
EventListener[] l = listeners.getListeners(ActionListener.class);
|
||||
ActionEvent e = null;
|
||||
for (EventListener l1 : l) {
|
||||
if (e == null) {
|
||||
e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, ticketId);
|
||||
}
|
||||
((ActionListener) l1).actionPerformed(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadSupplierss() throws BasicException {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
private class SelectedSupplierAction implements ActionListener {
|
||||
|
||||
private final String ticketId;
|
||||
|
||||
public SelectedSupplierAction(String ticketId) {
|
||||
this.ticketId = ticketId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
if (ticketId != null) {
|
||||
setActiveTicket(ticketId);
|
||||
}
|
||||
} catch (BasicException ex) {
|
||||
new MessageInf(ex).show(OrderSupplierList.this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class SupplierComparator implements Comparator<SharedTicketInfo> {
|
||||
|
||||
Map<SharedTicketInfo, SupplierInfoExt> base;
|
||||
|
||||
public SupplierComparator(Map<SharedTicketInfo, SupplierInfoExt> base) {
|
||||
this.base = base;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compare(SharedTicketInfo a, SharedTicketInfo b) {
|
||||
String nameA = base.get(a).getName();
|
||||
String nameB = base.get(b).getName();
|
||||
|
||||
if (nameA.compareToIgnoreCase(nameB) < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
jPanelSuppliers = new javax.swing.JPanel();
|
||||
|
||||
setMinimumSize(new java.awt.Dimension(256, 560));
|
||||
setPreferredSize(new java.awt.Dimension(256, 560));
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
|
||||
jPanelSuppliers.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
|
||||
jPanelSuppliers.setLayout(new java.awt.CardLayout());
|
||||
add(jPanelSuppliers, java.awt.BorderLayout.CENTER);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JPanel jPanelSuppliers;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.DataRead;
|
||||
import com.unicenta.data.loader.IKeyed;
|
||||
import com.unicenta.pos.util.StringUtils;
|
||||
import java.io.Serializable;
|
||||
|
||||
/** @author Jack Gerrard */
|
||||
|
||||
|
||||
public class SupplierInfo implements Serializable, IKeyed {
|
||||
|
||||
private static final long serialVersionUID = 9093257536541L;
|
||||
|
||||
protected String m_sID;
|
||||
protected String m_sSearchkey;
|
||||
protected String m_sTaxid;
|
||||
protected String m_sName;
|
||||
protected String m_sPostal;
|
||||
protected String m_sPhone;
|
||||
protected String m_sEmail;
|
||||
|
||||
/** Creates a new instance of SupplierInfo
|
||||
* @param id */
|
||||
public SupplierInfo(String id) {
|
||||
|
||||
m_sID = id;
|
||||
m_sSearchkey = null;
|
||||
m_sTaxid = null;
|
||||
m_sName = null;
|
||||
m_sPostal = null;
|
||||
m_sPhone = null;
|
||||
m_sEmail = null;
|
||||
}
|
||||
|
||||
public SupplierInfo(String id, String searchkey, String name) {
|
||||
m_sID = id;
|
||||
m_sSearchkey = searchkey;
|
||||
m_sName = name;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object getKey() {
|
||||
return m_sID;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dr
|
||||
* @throws BasicException
|
||||
*/
|
||||
public void readValues(DataRead dr) throws BasicException {
|
||||
m_sID = dr.getString(1);
|
||||
m_sName = dr.getString(2);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return id string
|
||||
*/
|
||||
public String getID() {
|
||||
return m_sID;
|
||||
}
|
||||
public void setID(String sID) {
|
||||
m_sID = sID;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return taxid string
|
||||
*/
|
||||
|
||||
public String getTaxid() {
|
||||
return m_sTaxid;
|
||||
}
|
||||
public void setTaxid(String sTaxid) {
|
||||
m_sTaxid = sTaxid;
|
||||
}
|
||||
public String printTaxid() {
|
||||
return StringUtils.encodeXML(m_sTaxid);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return searchkey string
|
||||
*/
|
||||
public String getSearchkey() {
|
||||
return m_sSearchkey;
|
||||
}
|
||||
public void setSearchkey(String sSearchkey) {
|
||||
m_sSearchkey = sSearchkey;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return name string
|
||||
*/
|
||||
public String getName() {
|
||||
return m_sName;
|
||||
}
|
||||
public void setName(String sName) {
|
||||
m_sName = sName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return postal/zip code string
|
||||
*/
|
||||
public String getPostal() {
|
||||
return m_sPostal;
|
||||
}
|
||||
public void setPostal(String sPostal) {
|
||||
m_sPostal = sPostal;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Primary Telephone string
|
||||
*/
|
||||
public String getPhone() {
|
||||
return m_sPhone;
|
||||
}
|
||||
public void setPhone(String sPhone) {
|
||||
m_sPhone = sPhone;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return email string
|
||||
*/
|
||||
public String getEmail() {
|
||||
return m_sEmail;
|
||||
}
|
||||
|
||||
public void setEmail(String sEmail) {
|
||||
m_sEmail = sEmail;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String printName() {
|
||||
return StringUtils.encodeXML(m_sName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.util.RoundUtils;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JG uniCenta
|
||||
*/
|
||||
public class SupplierInfoExt extends SupplierInfo {
|
||||
|
||||
protected String suppliertaxid;
|
||||
protected String suppliervatid;
|
||||
protected String notes;
|
||||
protected boolean visible;
|
||||
protected String card;
|
||||
protected Double maxdebt;
|
||||
protected Date curdate;
|
||||
protected Double curdebt;
|
||||
protected String firstname;
|
||||
protected String lastname;
|
||||
protected String email;
|
||||
protected String phone;
|
||||
protected String phone2;
|
||||
protected String fax;
|
||||
protected String address;
|
||||
protected String address2;
|
||||
protected String postal;
|
||||
protected String city;
|
||||
protected String region;
|
||||
protected String country;
|
||||
|
||||
/** Creates a new instance of SupplierInfoExt
|
||||
* @param id */
|
||||
public SupplierInfoExt(String id) {
|
||||
super(id);
|
||||
}
|
||||
|
||||
public String getSupplierTaxID() {
|
||||
return suppliertaxid;
|
||||
}
|
||||
public void setSupplierTAXID(String suppliertaxid) {
|
||||
this.suppliertaxid = suppliertaxid;
|
||||
}
|
||||
public String printSupplierTaxID() {
|
||||
return Formats.STRING.formatValue(suppliertaxid);
|
||||
}
|
||||
|
||||
public String getSupplierVATID() {
|
||||
return suppliervatid;
|
||||
}
|
||||
public void setSupplierVATID(String suppliervatid) {
|
||||
this.suppliervatid = suppliervatid;
|
||||
}
|
||||
public String printSupplierVATID() {
|
||||
return Formats.STRING.formatValue(suppliervatid);
|
||||
}
|
||||
|
||||
public String getNotes() {
|
||||
return notes;
|
||||
}
|
||||
public void setNotes(String notes) {
|
||||
this.notes = notes;
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
return visible;
|
||||
}
|
||||
public void setVisible(boolean visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
public Double getMaxdebt() {
|
||||
return maxdebt;
|
||||
}
|
||||
public void setMaxdebt(Double maxdebt) {
|
||||
this.maxdebt = maxdebt;
|
||||
}
|
||||
public String printMaxDebt() {
|
||||
return Formats.CURRENCY.formatValue(RoundUtils.getValue(getMaxdebt()));
|
||||
}
|
||||
|
||||
public Date getCurdate() {
|
||||
return curdate;
|
||||
}
|
||||
public void setCurdate(Date curdate) {
|
||||
this.curdate = curdate;
|
||||
}
|
||||
public String printCurDate() {
|
||||
return Formats.DATE.formatValue(getCurdate());
|
||||
}
|
||||
|
||||
public Double getCurdebt() {
|
||||
return curdebt;
|
||||
}
|
||||
public void setCurdebt(Double curdebt) {
|
||||
this.curdebt = curdebt;
|
||||
}
|
||||
public String printCurDebt() {
|
||||
return Formats.CURRENCY.formatValue(RoundUtils.getValue(getCurdebt()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param amount
|
||||
* @param d
|
||||
*/
|
||||
public void updateCurDebt(Double amount, Date d) {
|
||||
|
||||
curdebt = curdebt == null ? amount : curdebt + amount;
|
||||
curdate = (new Date());
|
||||
|
||||
if (RoundUtils.compare(curdebt, 0.0) > 0) {
|
||||
if (curdate == null) {
|
||||
curdate = d;
|
||||
}
|
||||
} else if (RoundUtils.compare(curdebt, 0.0) == 0) {
|
||||
curdebt = null;
|
||||
curdate = null;
|
||||
} else { // < 0
|
||||
curdate = null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getFirstname() {
|
||||
return firstname;
|
||||
}
|
||||
|
||||
public void setFirstname(String firstname) {
|
||||
this.firstname = firstname;
|
||||
}
|
||||
|
||||
public String getLastname() {
|
||||
return lastname;
|
||||
}
|
||||
|
||||
public void setLastname(String lastname) {
|
||||
this.lastname = lastname;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
@Override
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
public String printPhone() {
|
||||
return Formats.STRING.formatValue(phone);
|
||||
}
|
||||
|
||||
public String getPhone2() {
|
||||
return phone2;
|
||||
}
|
||||
public void setPhone2(String phone2) {
|
||||
this.phone2 = phone2;
|
||||
}
|
||||
|
||||
public String getFax() {
|
||||
return fax;
|
||||
}
|
||||
public void setFax(String fax) {
|
||||
this.fax = fax;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return supplier's address line 1 string
|
||||
*/
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
public String printAddress() {
|
||||
return Formats.STRING.formatValue(address);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return supplier's address line 2 string
|
||||
*/
|
||||
public String getAddress2() {
|
||||
return address2;
|
||||
}
|
||||
public void setAddress2(String address2) {
|
||||
this.address2 = address2;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return supplier's postal/zip code string
|
||||
*/
|
||||
@Override
|
||||
public String getPostal() {
|
||||
return postal;
|
||||
}
|
||||
@Override
|
||||
public void setPostal(String postal) {
|
||||
this.postal = postal;
|
||||
}
|
||||
public String printPostal() {
|
||||
return Formats.STRING.formatValue(postal);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return supplier's address city string
|
||||
*/
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return supplier's address region/state/county string
|
||||
*/
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return supplier's address country string
|
||||
*/
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
// For BrowseEditableData
|
||||
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import com.unicenta.data.user.BrowsableEditableData;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jack Gerrard
|
||||
*/
|
||||
public class SupplierInfoGlobal {
|
||||
|
||||
private static SupplierInfoGlobal INSTANCE;
|
||||
private SupplierInfoExt supplierInfoExt;
|
||||
private BrowsableEditableData editableData;
|
||||
|
||||
private SupplierInfoGlobal() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static SupplierInfoGlobal getInstance() {
|
||||
if (INSTANCE == null) {
|
||||
INSTANCE = new SupplierInfoGlobal();
|
||||
}
|
||||
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public SupplierInfoExt getSupplierInfoExt() {
|
||||
return supplierInfoExt;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param supplierInfoExt
|
||||
*/
|
||||
public void setSupplierInfoExt(SupplierInfoExt supplierInfoExt) {
|
||||
this.supplierInfoExt = supplierInfoExt;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public BrowsableEditableData getEditableData() {
|
||||
return editableData;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param editableData
|
||||
*/
|
||||
public void setEditableData(BrowsableEditableData editableData) {
|
||||
this.editableData = editableData;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import java.awt.Component;
|
||||
import javax.swing.DefaultListCellRenderer;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JList;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jack Gerrard
|
||||
*/
|
||||
public class SupplierRenderer extends DefaultListCellRenderer {
|
||||
|
||||
private Icon icosupplier;
|
||||
|
||||
/** Creates a new instance of SupplierRenderer */
|
||||
public SupplierRenderer() {
|
||||
|
||||
icosupplier = new ImageIcon(getClass().getClassLoader().getResource("com/unicenta/images/supplier_sml.png"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
|
||||
super.getListCellRendererComponent(list, null, index, isSelected, cellHasFocus);
|
||||
setText(value.toString());
|
||||
setIcon(icosupplier);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import java.awt.Component;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JG uniCenta - outline/prep for uniCenta mobile + eCommerce connector
|
||||
*/
|
||||
public interface SupplierTicketSelector {
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
public void loadSupplierss() throws BasicException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
public void setComponentEnabled(boolean value);
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Component getComponent();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
public void addActionListener(ActionListener l);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param l
|
||||
*/
|
||||
public void removeActionListener(ActionListener l);
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.loader.DataRead;
|
||||
import com.unicenta.data.loader.SerializerRead;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jack Gerrard
|
||||
* Used in Supplier's transactions tab to display all this Supplier's
|
||||
* ticketline values
|
||||
*/
|
||||
@Slf4j
|
||||
public class SupplierTransaction {
|
||||
|
||||
Date transactionDate;
|
||||
String productName;
|
||||
String unit;
|
||||
Double price;
|
||||
Integer reason;
|
||||
|
||||
String supplierId;
|
||||
|
||||
/**
|
||||
* Main method to return all supplier's transactions from StockDiary
|
||||
*/
|
||||
public SupplierTransaction() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param transactionDate
|
||||
* @param productName
|
||||
* @param unit
|
||||
* @param price
|
||||
* @param reason
|
||||
* @param sId
|
||||
*/
|
||||
public SupplierTransaction(Date transactionDate, String productName, String unit, Double price, Integer reason, String sId) {
|
||||
this.transactionDate = transactionDate;
|
||||
this.productName = productName;
|
||||
this.unit = unit;
|
||||
this.price = price;
|
||||
this.reason = reason;
|
||||
|
||||
this.supplierId = sId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return ticket's transaction date
|
||||
*/
|
||||
public Date getTransactionDate() {
|
||||
return transactionDate;
|
||||
}
|
||||
public void setTransactionDate(Date transactionDate) {
|
||||
this.transactionDate = transactionDate;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return product name string
|
||||
*/
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return quantity string value
|
||||
*/
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return price value
|
||||
*/
|
||||
public Double getPrice() {
|
||||
return price;
|
||||
}
|
||||
public void setPrice(Double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Integer getReason() {
|
||||
return reason;
|
||||
}
|
||||
public void setReason(Integer reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return supplier's account name string
|
||||
*/
|
||||
public String getSupplierId() {
|
||||
return supplierId;
|
||||
}
|
||||
public void setSupplierId(String supplierId) {
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return stockdiary for this supplier
|
||||
*/
|
||||
public static SerializerRead getSerializerRead() {
|
||||
return new SerializerRead() {
|
||||
|
||||
@Override
|
||||
public Object readValues(DataRead dr) throws BasicException {
|
||||
|
||||
String dateValue = dr.getString(1);
|
||||
String productName = dr.getString(2);
|
||||
String unit = dr.getString(3);
|
||||
Double price = dr.getDouble(4);
|
||||
Integer reason = dr.getInt(5);
|
||||
|
||||
String supplierId = dr.getString(6);
|
||||
|
||||
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||
Date date = null;
|
||||
try {
|
||||
date = formatter.parse(dateValue);
|
||||
} catch (ParseException ex) {
|
||||
log.error(ex.getMessage());
|
||||
}
|
||||
return new SupplierTransaction(date, productName, unit, price, reason, supplierId);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// https://unicenta.com
|
||||
//
|
||||
// This file is part of uniCenta oPOS
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package com.unicenta.pos.suppliers;
|
||||
|
||||
import com.unicenta.basic.BasicException;
|
||||
import com.unicenta.data.gui.ListCellRendererBasic;
|
||||
import com.unicenta.data.loader.ComparatorCreator;
|
||||
import com.unicenta.data.loader.TableDefinition;
|
||||
import com.unicenta.data.loader.Vectorer;
|
||||
import com.unicenta.data.user.EditorRecord;
|
||||
import com.unicenta.data.user.ListProvider;
|
||||
import com.unicenta.data.user.ListProviderCreator;
|
||||
import com.unicenta.data.user.SaveProvider;
|
||||
import com.unicenta.pos.forms.AppLocal;
|
||||
import com.unicenta.pos.panels.JPanelTable;
|
||||
import javax.swing.ListCellRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jack Gerrard
|
||||
*/
|
||||
public class SuppliersPanel extends JPanelTable {
|
||||
|
||||
private TableDefinition tsuppliers;
|
||||
private SuppliersView jeditor;
|
||||
|
||||
/** Creates a new instance of SuppliersPanel */
|
||||
public SuppliersPanel() {
|
||||
SupplierInfoGlobal.getInstance().setEditableData(bd);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
protected void init() {
|
||||
DataLogicSuppliers dlSuppliers = (DataLogicSuppliers) app.getBean("com.unicenta.pos.suppliers.DataLogicSuppliers");
|
||||
tsuppliers = dlSuppliers.getTableSuppliers();
|
||||
jeditor = new SuppliersView(app, dirty);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @throws BasicException
|
||||
*/
|
||||
@Override
|
||||
public void activate() throws BasicException {
|
||||
jeditor.activate();
|
||||
super.activate();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListProvider getListProvider() {
|
||||
return new ListProviderCreator(tsuppliers);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SaveProvider getSaveProvider() {
|
||||
return new SaveProvider(tsuppliers, new int[] {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Vectorer getVectorer() {
|
||||
return tsuppliers.getVectorerBasic(new int[]{1, 2, 3, 4});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ComparatorCreator getComparatorCreator() {
|
||||
return tsuppliers.getComparatorCreator(new int[] {1, 2, 3, 4});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ListCellRenderer getListCellRenderer() {
|
||||
return new ListCellRendererBasic(tsuppliers.getRenderStringBasic(new int[]{3}));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public EditorRecord getEditor() {
|
||||
return jeditor;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return AppLocal.getIntString("Menu.SuppliersManagement");
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user