Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing some Homscreen Probs

  • Loading branch information...
commit 5cbabb6f13bbd38e3fa365d5c1638d70b91575fc 1 parent 8fcd17e
Jan Hahnisch authored
View
25 src/mpv5/handler/Scheduler.java
@@ -116,6 +116,7 @@ public void checkForOverdueEvents() {
Context c = Context.getItem();
String ItemType = "bills";
String prop = "";
+ String use = "";
try {
while (b < 5) {
QueryCriteria2 opens = new QueryCriteria2();
@@ -124,16 +125,19 @@ public void checkForOverdueEvents() {
ItemType = "bills";
prop = "hideunpaidbills";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_FINISHED, QueryParameter.EQUALS));
+ use = "usebills";
break;
case 1:
ItemType = "order";
prop = "hideunattentedorders";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS));
+ use = "useorders";
break;
case 2:
ItemType = "offer";
prop = "hideunacceptedoffers";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS));
+ use = "useoffers";
break;
case 3:
ItemType = "delivery";
@@ -141,14 +145,17 @@ public void checkForOverdueEvents() {
opens.or(
new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS),
new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_FINISHED, QueryParameter.EQUALS));
+ use = "usedeliverys";
break;
case 4:
ItemType = "confirmation";
prop = "hideunattentedconfirmations";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS));
+ use = "useconfirmations";
break;
}
- if (!mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", prop)) {
+ if (!mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", prop)
+ && mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", use)) {
opens.and(new QueryParameter(Context.getItem(), "inttype", b, QueryParameter.EQUALS));
opens.setOrder("dateadded", true);
try {
@@ -190,16 +197,19 @@ public void checkForOverdueEvents() {
ItemType = "bills";
prop = "hideunpaidbills";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_FINISHED, QueryParameter.EQUALS));
+ use = "usebills";
break;
case 1:
ItemType = "order";
prop = "hideunattentedorders";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS));
+ use = "useorders";
break;
case 2:
ItemType = "offer";
prop = "hideunacceptedoffers";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS));
+ use = "useoffers";
break;
case 3:
ItemType = "delivery";
@@ -207,15 +217,18 @@ public void checkForOverdueEvents() {
opens.or(
new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS),
new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_FINISHED, QueryParameter.EQUALS));
+ use = "usedeliverys";
break;
case 4:
ItemType = "confirmation";
prop = "hideunattentedconfirmations";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS));
+ use = "useconfirmations";
break;
}
if (mpv5.db.objects.User.getCurrentUser().getProperties().hasProperty(ItemType + ".warn.days")
- && !mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", prop)) {
+ && !mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", prop)
+ && mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", use)) {
Integer warn = Integer.valueOf(mpv5.db.objects.User.getCurrentUser().
getProperties().
getProperty(ItemType + ".warn.days"));
@@ -260,27 +273,33 @@ public void checkForOverdueEvents() {
case 0:
ItemType = "bills";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_FINISHED, QueryParameter.EQUALS));
+ use = "usebills";
break;
case 1:
ItemType = "order";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS));
+ use = "useorders";
break;
case 2:
ItemType = "offer";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS));
+ use = "useoffers";
break;
case 3:
ItemType = "delivery";
opens.or(
new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS),
new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_FINISHED, QueryParameter.EQUALS));
+ use = "usedeliverys";
break;
case 4:
ItemType = "confirmation";
opens.and(new QueryParameter(Context.getItem(), "intstatus", Item.STATUS_QUEUED, QueryParameter.EQUALS));
+ use = "useconfirmations";
break;
}
- if (mpv5.db.objects.User.getCurrentUser().getProperties().hasProperty(ItemType + ".alert.days")) {
+ if (mpv5.db.objects.User.getCurrentUser().getProperties().hasProperty(ItemType + ".alert.days")
+ && mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", use)) {
Integer alert = Integer.valueOf(mpv5.db.objects.User.getCurrentUser().
getProperties().
getProperty(ItemType + ".alert.days"));
View
5 src/mpv5/resources/languages/Panels.properties
@@ -2011,3 +2011,8 @@ ControlPanel_External.jCheckBox4.text=Start Office automatically
MPView.jMenuItem50.text=Change language from file
ContactPanel.filetab.TabConstraints.tabTitle=Files
ProductOrderPanel.groupnameselect._Label=Group
+ControlPanel_Schedule.bills1.text=Use bills at Homescreen
+ControlPanel_Schedule.deliv1.text=Use delivery notice at Homescreen
+ControlPanel_Schedule.confi1.text=Use order confirmation at Homescreen
+ControlPanel_Schedule.orders1.text=Use orders at Homescreen
+ControlPanel_Schedule.offer1.text=Use offers at Homescreen
View
133 src/mpv5/ui/dialogs/subcomponents/ControlPanel_Schedule.form
@@ -1,4 +1,4 @@
-<?xml version="1.1" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.4" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<Properties>
@@ -29,7 +29,7 @@
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="jPanel2" alignment="0" max="32767" attributes="1"/>
- <Component id="jPanel3" alignment="0" pref="278" max="32767" attributes="1"/>
+ <Component id="jPanel3" alignment="0" pref="0" max="32767" attributes="1"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
@@ -44,7 +44,7 @@
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" max="-2" attributes="0">
+ <Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="1">
<EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
@@ -88,7 +88,7 @@
<Group type="102" alignment="0" attributes="0">
<Component id="jLabel1" pref="117" max="32767" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
- <Component id="labeledCombobox2" pref="200" max="32767" attributes="0"/>
+ <Component id="labeledCombobox2" max="32767" attributes="0"/>
</Group>
<Component id="labeledTextField2" alignment="0" pref="321" max="32767" attributes="0"/>
</Group>
@@ -229,10 +229,10 @@
<SubComponents>
<Component class="javax.swing.JTable" name="jTable1">
<Properties>
- <Property name="autoCreateRowSorter" type="boolean" value="true"/>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
<Table columnCount="0" rowCount="0"/>
</Property>
+ <Property name="autoCreateRowSorter" type="boolean" value="true"/>
<Property name="name" type="java.lang.String" value="jTable1" noResource="true"/>
</Properties>
<Events>
@@ -255,12 +255,11 @@
</TitledBorder>
</Border>
</Property>
- <Property name="doubleBuffered" type="boolean" value="true"/>
<Property name="name" type="java.lang.String" value="jPanel4" noResource="true"/>
</Properties>
- <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBoxLayout">
- <Property name="axis" type="int" value="3"/>
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
+ <Property name="useNullLayout" type="boolean" value="false"/>
</Layout>
<SubComponents>
<Component class="javax.swing.JCheckBox" name="offer">
@@ -268,40 +267,150 @@
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="mpv5/resources/languages/Panels.properties" key="ControlPanel_Schedule.offer.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
</Property>
+ <Property name="enabled" type="boolean" value="false"/>
<Property name="name" type="java.lang.String" value="offer" noResource="true"/>
</Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="280" y="30" width="-1" height="-1"/>
+ </Constraint>
+ </Constraints>
</Component>
<Component class="javax.swing.JCheckBox" name="orders">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="mpv5/resources/languages/Panels.properties" key="ControlPanel_Schedule.orders.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
</Property>
+ <Property name="enabled" type="boolean" value="false"/>
<Property name="name" type="java.lang.String" value="orders" noResource="true"/>
</Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="280" y="50" width="-1" height="-1"/>
+ </Constraint>
+ </Constraints>
</Component>
<Component class="javax.swing.JCheckBox" name="confi">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="mpv5/resources/languages/Panels.properties" key="ControlPanel_Schedule.confi.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
</Property>
+ <Property name="enabled" type="boolean" value="false"/>
<Property name="name" type="java.lang.String" value="confi" noResource="true"/>
</Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="280" y="70" width="-1" height="-1"/>
+ </Constraint>
+ </Constraints>
</Component>
<Component class="javax.swing.JCheckBox" name="deliv">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="mpv5/resources/languages/Panels.properties" key="ControlPanel_Schedule.deliv.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
</Property>
+ <Property name="enabled" type="boolean" value="false"/>
<Property name="name" type="java.lang.String" value="deliv" noResource="true"/>
</Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="280" y="90" width="-1" height="30"/>
+ </Constraint>
+ </Constraints>
</Component>
<Component class="javax.swing.JCheckBox" name="bills">
<Properties>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="mpv5/resources/languages/Panels.properties" key="ControlPanel_Schedule.bills.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
</Property>
+ <Property name="enabled" type="boolean" value="false"/>
<Property name="name" type="java.lang.String" value="bills" noResource="true"/>
</Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="280" y="110" width="-1" height="30"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="offer1">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="mpv5/resources/languages/Panels.properties" key="ControlPanel_Schedule.offer1.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
+ </Property>
+ <Property name="name" type="java.lang.String" value="offer1" noResource="true"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="offer1ActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="10" y="30" width="-1" height="-1"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="orders1">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="mpv5/resources/languages/Panels.properties" key="ControlPanel_Schedule.orders1.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
+ </Property>
+ <Property name="name" type="java.lang.String" value="orders1" noResource="true"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="orders1ActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="10" y="50" width="-1" height="-1"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="confi1">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="mpv5/resources/languages/Panels.properties" key="ControlPanel_Schedule.confi1.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
+ </Property>
+ <Property name="name" type="java.lang.String" value="confi1" noResource="true"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="confi1ActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="10" y="70" width="-1" height="-1"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="deliv1">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="mpv5/resources/languages/Panels.properties" key="ControlPanel_Schedule.deliv1.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
+ </Property>
+ <Property name="name" type="java.lang.String" value="deliv1" noResource="true"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deliv1ActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="10" y="90" width="-1" height="30"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JCheckBox" name="bills1">
+ <Properties>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="mpv5/resources/languages/Panels.properties" key="ControlPanel_Schedule.bills1.text" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
+ </Property>
+ <Property name="name" type="java.lang.String" value="bills1" noResource="true"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bills1ActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="10" y="110" width="-1" height="30"/>
+ </Constraint>
+ </Constraints>
</Component>
</SubComponents>
</Container>
@@ -323,10 +432,7 @@
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" attributes="0">
- <Component id="jLabel2" pref="423" max="32767" attributes="1"/>
- <EmptySpace min="-2" max="-2" attributes="0"/>
- </Group>
+ <Component id="jLabel2" pref="423" max="32767" attributes="1"/>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
@@ -358,9 +464,10 @@
</Group>
</Group>
</Group>
- <EmptySpace max="32767" attributes="0"/>
+ <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
+ <EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
View
158 src/mpv5/ui/dialogs/subcomponents/ControlPanel_Schedule.java
@@ -42,7 +42,7 @@
/**
*
- *
+ *
*/
public class ControlPanel_Schedule extends javax.swing.JPanel implements ControlApplet {
@@ -51,7 +51,9 @@
private PropertyStore oldvalues;
private ScheduleTypes s;
- /** Creates new form GeneralListPanel */
+ /**
+ * Creates new form GeneralListPanel
+ */
public ControlPanel_Schedule() {
initComponents();
@@ -65,10 +67,10 @@ public ControlPanel_Schedule() {
loadPropertys();
}
- /** 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.
+ /**
+ * 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
@@ -102,6 +104,11 @@ public Component prepareRenderer(TableCellRenderer renderer,
confi = new javax.swing.JCheckBox();
deliv = new javax.swing.JCheckBox();
bills = new javax.swing.JCheckBox();
+ offer1 = new javax.swing.JCheckBox();
+ orders1 = new javax.swing.JCheckBox();
+ confi1 = new javax.swing.JCheckBox();
+ deliv1 = new javax.swing.JCheckBox();
+ bills1 = new javax.swing.JCheckBox();
jPanel8 = new javax.swing.JPanel();
bill_warn = new mpv5.ui.beans.LabeledTextField();
jLabel2 = new javax.swing.JLabel();
@@ -120,7 +127,7 @@ public Component prepareRenderer(TableCellRenderer renderer,
jButton1 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
- java.util.ResourceBundle bundle = mpv5.i18n.LanguageManager.getBundle(); // NOI18N
+ java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("mpv5/resources/languages/Panels"); // NOI18N
setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("RemindPanel.border.title"))); // NOI18N
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("ControlPanel_Schedule.jPanel1.border.title"))); // NOI18N
@@ -143,9 +150,9 @@ public Component prepareRenderer(TableCellRenderer renderer,
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
- .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE)
+ .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 117, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(labeledCombobox2, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE))
+ .addComponent(labeledCombobox2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(labeledTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE))
.addGap(306, 306, 306))
);
@@ -206,7 +213,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
jScrollPane2.setName("jScrollPane2"); // NOI18N
- jTable1.setAutoCreateRowSorter(true);
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
@@ -215,6 +221,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
}
));
+ jTable1.setAutoCreateRowSorter(true);
jTable1.setName("jTable1"); // NOI18N
jTable1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
@@ -226,29 +233,78 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
jPanel3.add(jScrollPane2, java.awt.BorderLayout.CENTER);
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("ControlPanel_Schedule.jPanel4.border.title"))); // NOI18N
- jPanel4.setDoubleBuffered(true);
jPanel4.setName("jPanel4"); // NOI18N
- jPanel4.setLayout(new javax.swing.BoxLayout(jPanel4, javax.swing.BoxLayout.PAGE_AXIS));
+ jPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
offer.setText(bundle.getString("ControlPanel_Schedule.offer.text")); // NOI18N
+ offer.setEnabled(false);
offer.setName("offer"); // NOI18N
- jPanel4.add(offer);
+ jPanel4.add(offer, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 30, -1, -1));
orders.setText(bundle.getString("ControlPanel_Schedule.orders.text")); // NOI18N
+ orders.setEnabled(false);
orders.setName("orders"); // NOI18N
- jPanel4.add(orders);
+ jPanel4.add(orders, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 50, -1, -1));
confi.setText(bundle.getString("ControlPanel_Schedule.confi.text")); // NOI18N
+ confi.setEnabled(false);
confi.setName("confi"); // NOI18N
- jPanel4.add(confi);
+ jPanel4.add(confi, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 70, -1, -1));
deliv.setText(bundle.getString("ControlPanel_Schedule.deliv.text")); // NOI18N
+ deliv.setEnabled(false);
deliv.setName("deliv"); // NOI18N
- jPanel4.add(deliv);
+ jPanel4.add(deliv, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 90, -1, 30));
bills.setText(bundle.getString("ControlPanel_Schedule.bills.text")); // NOI18N
+ bills.setEnabled(false);
bills.setName("bills"); // NOI18N
- jPanel4.add(bills);
+ jPanel4.add(bills, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 110, -1, 30));
+
+ offer1.setText(bundle.getString("ControlPanel_Schedule.offer1.text")); // NOI18N
+ offer1.setName("offer1"); // NOI18N
+ offer1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ offer1ActionPerformed(evt);
+ }
+ });
+ jPanel4.add(offer1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 30, -1, -1));
+
+ orders1.setText(bundle.getString("ControlPanel_Schedule.orders1.text")); // NOI18N
+ orders1.setName("orders1"); // NOI18N
+ orders1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ orders1ActionPerformed(evt);
+ }
+ });
+ jPanel4.add(orders1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 50, -1, -1));
+
+ confi1.setText(bundle.getString("ControlPanel_Schedule.confi1.text")); // NOI18N
+ confi1.setName("confi1"); // NOI18N
+ confi1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ confi1ActionPerformed(evt);
+ }
+ });
+ jPanel4.add(confi1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, -1, -1));
+
+ deliv1.setText(bundle.getString("ControlPanel_Schedule.deliv1.text")); // NOI18N
+ deliv1.setName("deliv1"); // NOI18N
+ deliv1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ deliv1ActionPerformed(evt);
+ }
+ });
+ jPanel4.add(deliv1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 90, -1, 30));
+
+ bills1.setText(bundle.getString("ControlPanel_Schedule.bills1.text")); // NOI18N
+ bills1.setName("bills1"); // NOI18N
+ bills1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ bills1ActionPerformed(evt);
+ }
+ });
+ jPanel4.add(bills1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 110, -1, 30));
jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("ControlPanel_Schedule.jPanel8.border.title"))); // NOI18N
jPanel8.setName("jPanel8"); // NOI18N
@@ -306,9 +362,7 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
.addGroup(jPanel8Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(jPanel8Layout.createSequentialGroup()
- .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE)
- .addContainerGap())
+ .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE)
.addGroup(jPanel8Layout.createSequentialGroup()
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel8Layout.createSequentialGroup()
@@ -333,7 +387,8 @@ public void mouseClicked(java.awt.event.MouseEvent evt) {
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(bill_alert, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
+ .addGap(0, 0, Short.MAX_VALUE)))
+ .addContainerGap())
);
jPanel8Layout.setVerticalGroup(
jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -402,11 +457,11 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE))
+ .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jPanel8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE)
+ .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 455, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
@@ -480,17 +535,60 @@ private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
ControlPanel_AdvancedUserProperties c = new ControlPanel_AdvancedUserProperties();
MPControlPanel.instanceOf().openDetails(c);
}//GEN-LAST:event_jButton5ActionPerformed
+
+ private void offer1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_offer1ActionPerformed
+ if (offer1.isSelected() == true) {
+ offer.setEnabled(true);
+ } else {
+ offer.setEnabled(false);
+ }
+ }//GEN-LAST:event_offer1ActionPerformed
+
+ private void orders1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_orders1ActionPerformed
+ if (orders1.isSelected() == true) {
+ orders.setEnabled(true);
+ } else {
+ orders.setEnabled(false);
+ }
+ }//GEN-LAST:event_orders1ActionPerformed
+
+ private void confi1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_confi1ActionPerformed
+ if (confi1.isSelected() == true) {
+ confi.setEnabled(true);
+ } else {
+ confi.setEnabled(false);
+ }
+ }//GEN-LAST:event_confi1ActionPerformed
+
+ private void deliv1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deliv1ActionPerformed
+ if (deliv1.isSelected() == true) {
+ deliv.setEnabled(true);
+ } else {
+ deliv.setEnabled(false);
+ }
+ }//GEN-LAST:event_deliv1ActionPerformed
+
+ private void bills1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bills1ActionPerformed
+ if (bills1.isSelected() == true) {
+ bills.setEnabled(true);
+ } else {
+ bills.setEnabled(false);
+ }
+ }//GEN-LAST:event_bills1ActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton add;
private mpv5.ui.beans.LabeledTextField bill_alert;
private mpv5.ui.beans.LabeledTextField bill_warn;
private javax.swing.JCheckBox bills;
+ private javax.swing.JCheckBox bills1;
private javax.swing.JCheckBox confi;
+ private javax.swing.JCheckBox confi1;
private mpv5.ui.beans.LabeledTextField confi_alert;
private mpv5.ui.beans.LabeledTextField confi_warn;
private javax.swing.JButton copy;
private javax.swing.JButton copy1;
private javax.swing.JCheckBox deliv;
+ private javax.swing.JCheckBox deliv1;
private mpv5.ui.beans.LabeledTextField deliv_alert;
private mpv5.ui.beans.LabeledTextField deliv_warn;
private javax.swing.JButton jButton1;
@@ -510,11 +608,13 @@ private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
private mpv5.ui.beans.LabeledCombobox labeledCombobox2;
private mpv5.ui.beans.LabeledTextField labeledTextField2;
private javax.swing.JCheckBox offer;
+ private javax.swing.JCheckBox offer1;
private mpv5.ui.beans.LabeledTextField offer_alert;
private mpv5.ui.beans.LabeledTextField offer_warn;
private mpv5.ui.beans.LabeledTextField order_alert;
private mpv5.ui.beans.LabeledTextField order_warn;
private javax.swing.JCheckBox orders;
+ private javax.swing.JCheckBox orders1;
private javax.swing.JButton remove;
// End of variables declaration//GEN-END:variables
@@ -585,6 +685,12 @@ private void setPropertys() {
mpv5.db.objects.User.getCurrentUser().getProperties().changeProperty("org.openyabs.uiproperty", "hideunacceptedoffers", offer.isSelected());
mpv5.db.objects.User.getCurrentUser().getProperties().changeProperty("org.openyabs.uiproperty", "hideunattenteddeliverys", deliv.isSelected());
mpv5.db.objects.User.getCurrentUser().getProperties().changeProperty("org.openyabs.uiproperty", "hideunattentedconfirmations", confi.isSelected());
+
+ mpv5.db.objects.User.getCurrentUser().getProperties().changeProperty("org.openyabs.uiproperty", "usebills", bills1.isSelected());
+ mpv5.db.objects.User.getCurrentUser().getProperties().changeProperty("org.openyabs.uiproperty", "useorders", orders1.isSelected());
+ mpv5.db.objects.User.getCurrentUser().getProperties().changeProperty("org.openyabs.uiproperty", "useoffers", offer1.isSelected());
+ mpv5.db.objects.User.getCurrentUser().getProperties().changeProperty("org.openyabs.uiproperty", "usedeliverys", deliv1.isSelected());
+ mpv5.db.objects.User.getCurrentUser().getProperties().changeProperty("org.openyabs.uiproperty", "confirmations", confi1.isSelected());
}
private void loadPropertys() {
@@ -594,6 +700,12 @@ private void loadPropertys() {
deliv.setSelected(mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "hideunattenteddeliverys"));
confi.setSelected(mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "hideunattentedconfirmations"));
+ bills1.setSelected(mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "usebills"));
+ orders1.setSelected(mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "useorders"));
+ offer1.setSelected(mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "useoffers"));
+ deliv1.setSelected(mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "usedeliverys"));
+ confi1.setSelected(mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("org.openyabs.uiproperty", "useconfirmations"));
+
if (mpv5.db.objects.User.getCurrentUser().getProperties().hasProperty("bills.warn.days")) {
bill_warn.setText(mpv5.db.objects.User.getCurrentUser().getProperties().getProperty("bills.warn.days"));
} else {
View
4 src/mpv5/ui/panels/HomeScreen.java
@@ -204,8 +204,8 @@ public JTable getOverdue() {
data[i][3] = "N/A";
}
type = ((Item) databaseObject).__getInttype();
- tax = Constants.BD100.add(((Item) databaseObject).__getTaxvalue()).divide(Constants.BD100, 9, BigDecimal.ROUND_HALF_UP);
- BigDecimal value = ((Item) databaseObject).__getNetvalue().multiply(tax).subtract(((Item) databaseObject).__getDiscountvalue());
+ //tax = Constants.BD100.add(((Item) databaseObject).__getTaxvalue()).divide(Constants.BD100, 9, BigDecimal.ROUND_HALF_UP);
+ BigDecimal value = ((Item) databaseObject).__getNetvalue().add(((Item) databaseObject).__getTaxvalue()).subtract(((Item) databaseObject).__getDiscountvalue());
// <li>TYPE_BILL = 0;
// <li>TYPE_ORDER = 1;
// <li>TYPE_OFFER = 2;
Please sign in to comment.
Something went wrong with that request. Please try again.