Permalink
Browse files

Fixed product order type

  • Loading branch information...
1 parent eea9625 commit 02a4a173237c7e7128196498e7d9e503b57c9ead @anti43 committed Mar 24, 2013
@@ -137,7 +137,7 @@ public JComponent getView() {
* @return the hierarchypath
*/
public synchronized String __getHierarchypath() {
- if (hierarchypath.contains(Group.GROUPSEPARATOR + Group.GROUPSEPARATOR)) {
+ if (hierarchypath != null && hierarchypath.contains(Group.GROUPSEPARATOR + Group.GROUPSEPARATOR)) {
hierarchypath = null;
}
if (hierarchypath == null || hierarchypath.equals("")) {
@@ -86,7 +86,7 @@
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="jPanel5" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
- <Component id="jSplitPane2" pref="307" max="32767" attributes="0"/>
+ <Component id="jSplitPane2" pref="299" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -811,7 +811,7 @@
<Group type="102" alignment="0" attributes="0">
<Component id="itemPanel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
- <Component id="jScrollPane3" pref="841" max="32767" attributes="0"/>
+ <Component id="jScrollPane3" pref="843" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -884,7 +884,7 @@
<Component id="upItem" min="-2" max="-2" attributes="1"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="upItem1" min="-2" max="-2" attributes="1"/>
- <EmptySpace pref="73" max="32767" attributes="0"/>
+ <EmptySpace pref="58" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -167,7 +167,7 @@ public void run() {
number.setSearchOnEnterEnabled(true);
number.setParent(this);
number.setSearchField("cname");
- number.setContext(Context.getItem());
+ number.setContext(Context.getProductOrder());
final DataPanel p = this;
status.getComboBox().addActionListener(new ActionListener() {
@@ -231,7 +231,7 @@ public void setDataOwner(DatabaseObject object, boolean populate) {
toorder.setEnabled(true);
toinvoice.setEnabled(true);
tooffer.setEnabled(true);
- type.setText(Item.getTypeString(inttype_));
+ type.setText(Messages.TYPE_PRODUCT_ORDER.getValue());
// typelabel.setIcon(dataOwner.getIcon());
this.exposeData();
@@ -1209,6 +1209,7 @@ public boolean collectData() {
datetodo_ = date2.getDate();
dateend_ = date3.getDate();
intstatus_ = Integer.valueOf(status.getSelectedItem().getId());
+ inttype_ = Constants.TYPE_PRODUCT_ORDER;
} else {
showRequiredFields();
@@ -1480,7 +1481,7 @@ public void paste(DatabaseObject... dbos) {
}
} else {
mpv5.YabsViewProxy.instance().addMessage(Messages.NOT_POSSIBLE.toString() + Messages.ACTION_PASTE.toString(), Color.RED);
- Log.Debug(this, dbo.getContext() + " to " + Context.getItem());
+ Log.Debug(this, dbo.getContext() + " to " + Context.getProductOrder());
}
}
@@ -1704,7 +1705,7 @@ public void actionPerformed(ActionEvent e) {
MPTableModel m = (MPTableModel) itemtable.getModel();
int row = itemtable.getSelectedRow();
ProductOrderSubItem.addToDeletionQueue(m.getValueAt(row, 0));
- m.setRowAt(SubItem.getDefaultItem().getRowData(row), row, 1);
+ m.setRowAt(ProductOrderSubItem.getDefaultItem().getRowData(row), row, 1);
}
});
@@ -1888,7 +1889,7 @@ public void tableChanged(TableModelEvent e) {
private void toOrder() {
Item i2 = (Item) dataOwner.clone(Context.getOrder());
- i2.setInttype(Item.TYPE_ORDER);
+ i2.setInttype(Constants.TYPE_ORDER);
i2.setIDS(-1);
i2.setCname(null);
i2.setCnumber(null);

0 comments on commit 02a4a17

Please sign in to comment.