Skip to content
This repository has been archived by the owner on Feb 20, 2022. It is now read-only.

Commit

Permalink
Merge origin/master
Browse files Browse the repository at this point in the history
Conflicts:
	src/mpv5/db/objects/Contact.java
  • Loading branch information
Andreas committed May 25, 2015
2 parents 5b7e584 + e276274 commit a29b017
Show file tree
Hide file tree
Showing 24 changed files with 687 additions and 493 deletions.
1 change: 0 additions & 1 deletion mac/yabs.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
<string>$JAVAROOT/velocity-1.7.jar</string>
<string>$JAVAROOT/ws-commons-util-1.0.2.jar</string>
<string>$JAVAROOT/xdocreport-1.0.5-Mod-JH.jar</string>
<string>$JAVAROOT/xercesImpl-2.9.1.jar</string>
<string>$JAVAROOT/xercesImpl.jar</string>
<string>$JAVAROOT/xml-apis.jar</string>
<string>$JAVAROOT/xmlrpc-client-3.1.2.jar</string>
Expand Down
Binary file not shown.
Binary file modified mac/yabs.app/Contents/Resources/Java/yabs.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions src/mpv5/db/common/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@ public class Context implements Serializable, Comparable<Context> {
+ IDENTITY_ITEMS + "." + "netvalue,"
+ IDENTITY_ITEMS + "." + "taxvalue, "
+ IDENTITY_ITEMS + "." + "datetodo";
public static String DETAILS_JOURNAL = Context.IDENTITY_ITEMS + "." + "IDS," + Context.IDENTITY_CONTACTS + "." + "cname," + Context.IDENTITY_CONTACTS + "." + "prename," + Context.IDENTITY_CONTACTS + "." + "street," + Context.IDENTITY_CONTACTS + "." + "city," + Context.IDENTITY_CONTACTS + "." + "country," + Context.IDENTITY_ITEMS + "." + "{date}," + Context.IDENTITY_GROUPS + "." + "CNAME," + Context.IDENTITY_ACCOUNTS + "." + "cname," + Context.IDENTITY_ITEMS + "." + "CNAME," + Context.IDENTITY_ITEMS + "." + "inttype," + Context.IDENTITY_ITEMS + "." + "intstatus,(" + Context.IDENTITY_ITEMS + "." + "netvalue-" + Context.IDENTITY_ITEMS + "." + "discountvalue)," + Context.IDENTITY_ITEMS + "." + "taxvalue, (" + Context.IDENTITY_ITEMS + "." + "netvalue +" + Context.IDENTITY_ITEMS + "." + "taxvalue -" + Context.IDENTITY_ITEMS + "." + "discountvalue)," + Context.IDENTITY_ITEMS + "." + "discountvalue";
public static String DETAILS_JOURNAL2 = Context.IDENTITY_REVENUE + "." + "IDS," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_REVENUE + "." + "dateadded," + Context.IDENTITY_GROUPS + "." + "CNAME," + Context.IDENTITY_ACCOUNTS + "." + "cname," + Context.IDENTITY_REVENUE + "." + "CNAME," + Context.IDENTITY_REVENUE + "." + "ids," + Context.IDENTITY_REVENUE + "." + "ispaid," + Context.IDENTITY_REVENUE + "." + "netvalue, (" + Context.IDENTITY_REVENUE + "." + "brutvalue-" + Context.IDENTITY_REVENUE + "." + "netvalue)," + Context.IDENTITY_REVENUE + "." + "brutvalue, 0";
public static String DETAILS_JOURNAL3 = Context.IDENTITY_EXPENSE + "." + "IDS," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_EXPENSE + "." + "{date}," + Context.IDENTITY_GROUPS + "." + "CNAME," + Context.IDENTITY_ACCOUNTS + "." + "cname," + Context.IDENTITY_EXPENSE + "." + "CNAME," + Context.IDENTITY_EXPENSE + "." + "ids," + Context.IDENTITY_EXPENSE + "." + "ispaid," + Context.IDENTITY_EXPENSE + "." + "netvalue, (" + Context.IDENTITY_EXPENSE + "." + "brutvalue-" + Context.IDENTITY_EXPENSE + "." + "netvalue)," + Context.IDENTITY_EXPENSE + "." + "brutvalue, 0";
public static String DETAILS_JOURNAL = Context.IDENTITY_ITEMS + "." + "IDS," + Context.IDENTITY_CONTACTS + "." + "cname," + Context.IDENTITY_CONTACTS + "." + "prename," + Context.IDENTITY_CONTACTS + "." + "street," + Context.IDENTITY_CONTACTS + "." + "city," + Context.IDENTITY_CONTACTS + "." + "country," + Context.IDENTITY_ITEMS + "." + "{date}," + Context.IDENTITY_GROUPS + "." + "CNAME," + Context.IDENTITY_ACCOUNTS + "." + "cname," + Context.IDENTITY_ITEMS + "." + "CNAME," + Context.IDENTITY_ITEMS + "." + "inttype," + Context.IDENTITY_ITEMS + "." + "intstatus,(" + Context.IDENTITY_ITEMS + "." + "netvalue-" + Context.IDENTITY_ITEMS + "." + "discountvalue)," + Context.IDENTITY_ITEMS + "." + "taxvalue, (" + Context.IDENTITY_ITEMS + "." + "netvalue +" + Context.IDENTITY_ITEMS + "." + "taxvalue -" + Context.IDENTITY_ITEMS + "." + "discountvalue)," + Context.IDENTITY_ITEMS + "." + "discountvalue, 0";
public static String DETAILS_JOURNAL2 = Context.IDENTITY_REVENUE + "." + "IDS," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_REVENUE + "." + "dateadded," + Context.IDENTITY_GROUPS + "." + "CNAME," + Context.IDENTITY_ACCOUNTS + "." + "cname," + Context.IDENTITY_REVENUE + "." + "CNAME," + Context.IDENTITY_REVENUE + "." + "ids," + Context.IDENTITY_REVENUE + "." + "ispaid," + Context.IDENTITY_REVENUE + "." + "netvalue, (" + Context.IDENTITY_REVENUE + "." + "brutvalue-" + Context.IDENTITY_REVENUE + "." + "netvalue)," + Context.IDENTITY_REVENUE + "." + "brutvalue, 0 ,0";
public static String DETAILS_JOURNAL3 = Context.IDENTITY_EXPENSE + "." + "IDS," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_GROUPS + "." + "reserve2," + Context.IDENTITY_EXPENSE + "." + "{date}," + Context.IDENTITY_GROUPS + "." + "CNAME," + Context.IDENTITY_ACCOUNTS + "." + "cname," + Context.IDENTITY_EXPENSE + "." + "CNAME," + Context.IDENTITY_EXPENSE + "." + "ids," + Context.IDENTITY_EXPENSE + "." + "ispaid," + Context.IDENTITY_EXPENSE + "." + "netvalue, (" + Context.IDENTITY_EXPENSE + "." + "brutvalue-" + Context.IDENTITY_EXPENSE + "." + "netvalue)," + Context.IDENTITY_EXPENSE + "." + "brutvalue, 0, " + Context.IDENTITY_EXPENSE + ".description";
public static String DETAILS_HISTORY = getHistory().getDbIdentity() + ".ids, " + getHistory().getDbIdentity() + ".cname, " + getHistory().getDbIdentity() + ".username, " + Context.getGroup().getDbIdentity() + ".cname," + Context.getHistory().getDbIdentity() + ".dateadded";
public static String DETAILS_FILES_TO_CONTACTS = Context.getFiles().getDbIdentity() + ".cname," + getFilesToContacts().getDbIdentity() + ".cname, " + Context.getFiles().getDbIdentity() + ".dateadded," + Context.getFilesToContacts().getDbIdentity() + ".description," + Context.getFilesToContacts().getDbIdentity() + ".intsize," + Context.getFilesToContacts().getDbIdentity() + ".mimetype";
public static String DETAILS_FILES_TO_ITEMS = Context.getFiles().getDbIdentity() + ".cname," + getFilesToItems().getDbIdentity() + ".cname, " + Context.getFiles().getDbIdentity() + ".dateadded," + Context.getFilesToItems().getDbIdentity() + ".description," + Context.getFilesToItems().getDbIdentity() + ".intsize," + Context.getFilesToItems().getDbIdentity() + ".mimetype";
Expand Down
6 changes: 6 additions & 0 deletions src/mpv5/db/common/DatabaseUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ public DatabaseUpdater() {
"ALTER TABLE activitylistitems DROP CONSTRAINT SQL120925102345822",
"ALTER TABLE activitylists DROP CONSTRAINT SQL120925102345612"
});
UPDATES_DERBY.put(1.1980, new String[]{
"ALTER TABLE contacts ADD COLUMN payterm SMALLINT DEFAULT 0"
});
////////////////////////////////////////////////////////////////////////////////////////////
// mysql updates
UPDATES_MYSQL.put(1.11, new String[]{
Expand Down Expand Up @@ -559,6 +562,9 @@ public DatabaseUpdater() {
"ALTER TABLE activitylistitems DROP KEY SQL120925102345822",
"ALTER TABLE activitylists DROP KEY SQL120925102345612"
});
UPDATES_MYSQL.put(1.1980, new String[]{
"ALTER TABLE contacts ADD COLUMN payterm SMALLINT DEFAULT 0"
});
}

/**
Expand Down
94 changes: 53 additions & 41 deletions src/mpv5/db/objects/Contact.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package mpv5.db.objects;

import enoa.handler.TemplateHandler;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import javax.swing.JComponent;
import mpv5.db.common.Context;
import mpv5.db.common.DatabaseObject;
Expand All @@ -26,40 +23,41 @@
*/
public class Contact extends DatabaseObject implements Formattable, Templateable {

private static final long serialVersionUID = 1L;
private String cnumber = "";
private String taxnumber = "";
private String title = "";
private String prename = "";
private String street = "";
private String zip = "";
private String city = "";
private String mainphone = "";
private String workphone = "";
private String fax = "";
private String mobilephone = "";
private String mailaddress = "";
private String website = "";
private String notes = "";
private String company = "";
private String department = "";
private String bankaccount = "";
private String bankid = "";
private String bankname = "";
private String bankcurrency = "";
private String bankcountry = "";
private boolean ismale = true;
private boolean isenabled = true;
private boolean iscompany = false;
private boolean iscustomer = false;
private boolean ismanufacturer = false;
private boolean issupplier = false;
private String country = "";
private FormatHandler formatHandler;
public final static int TYPE_CONTACT = 0;
public final static int TYPE_CUSTOMER = 1;
public final static int TYPE_SUPPLIER = 2;
public final static int TYPE_MANUFACTURER = 3;
private static final long serialVersionUID = 1L;
private String cnumber = "";
private String taxnumber = "";
private String title = "";
private String prename = "";
private String street = "";
private String zip = "";
private String city = "";
private String mainphone = "";
private String workphone = "";
private String fax = "";
private String mobilephone = "";
private String mailaddress = "";
private String website = "";
private String notes = "";
private String company = "";
private String department = "";
private String bankaccount = "";
private String bankid = "";
private String bankname = "";
private String bankcurrency = "";
private String bankcountry = "";
private int payterm = 0;
private boolean ismale = true;
private boolean isenabled = true;
private boolean iscompany = false;
private boolean iscustomer = false;
private boolean ismanufacturer = false;
private boolean issupplier = false;
private String country = "";
private FormatHandler formatHandler;
public final static int TYPE_CONTACT = 0;
public final static int TYPE_CUSTOMER = 1;
public final static int TYPE_SUPPLIER = 2;
public final static int TYPE_MANUFACTURER = 3;

public static String getTypeString(int typ) {
switch (typ) {
Expand Down Expand Up @@ -401,12 +399,26 @@ public void setCountry(String country) {
this.country = country;
}

@Override
public JComponent getView() {
ContactPanel x = new ContactPanel(getContext());
return (JComponent) x;
/**
* @return the payterm
*/
public int __getPayterm() {
return payterm;
}

/**
* @param payterm the payterm to set
*/
public void setPayterm(int payterm) {
this.payterm = payterm;
}

@Override
public JComponent getView() {
ContactPanel x = new ContactPanel(getContext());
return (JComponent) x;
}

@Override
public MPIcon getIcon() {
return new MPIcon("/mpv5/resources/images/22/evolution-contacts.png");
Expand Down
2 changes: 1 addition & 1 deletion src/mpv5/globals/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface Constants {
* The minimal Database Version which is compatible with
* this release
*/
public static final Double DATABASE_VERSION = 1.1979;
public static final Double DATABASE_VERSION = 1.1980;
/**
* The max Database Version which is compatible with
* this release
Expand Down
2 changes: 1 addition & 1 deletion src/mpv5/globals/Headers.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public enum Headers {
FILE_REFERENCES(new String[]{"Internal ID", "Filename", "Date", "Description", "Size", "Type"}),
HISTORY(new String[]{"Internal ID", "Description", "User", "Group", "Date"}),
IMPORT(new String[]{"Internal ID", "Import", "Type", "Name", "Data"}),
JOURNAL(new String[]{"Internal ID", "Name", "Surname", "Street", "City", "Country", "Date", "Group", "Account", "Number", "Type", "Status", "Net", "Tax","Brut","Revenue", "Discount"}),
JOURNAL(new String[]{"Internal ID", "Name", "Surname", "Street", "City", "Country", "Date", "Group", "Account", "Number", "Type", "Status", "Net", "Tax","Brut","Revenue", "Discount", "Description"}),
TRASHBIN(new String[]{"Type", "Internal ID", "Description"}),
PRODUCT_DEFAULT(new String[]{"Internal ID", "Name", "Number", "Description"}),
SUBITEMS(new String[]{"Internal ID", "Nr", "Count", "Measure", "Text", "Netto Price", "Tax Rate", "Total Price", "Tax value", "Net 2", "Product ID", "A", "C", "Link", "Optional", "Discount", "Discount Value", "Discount Value with Tax"}),
Expand Down
92 changes: 46 additions & 46 deletions src/mpv5/resources/languages/Panels.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2069,64 +2069,64 @@ Stockmanager.labeledTextField1._Label_1=Filter entries
Stockmanager.jButton1.text_1=Save entries to database
Stockmanager.auto.text_1=Send on Enter
ControlPanel_External.alternate.text=use alternate odt/pdf-Generator
ControlPanel_Userproperties.smtpport._Label=SMTP Port
ItemPanel.jLabel6.text=\ -
ItemPanel.jLabel7.text=\ +
ItemPanel.jLabel8.text=\ =
ActivityConfirmationPanel.jButton4.text=Create bill
ActivityConfirmationPanel.jLabel5.text=Activitys are alreadey accounted!
NO_ENTRY=No Entry
ContactPanel.button_activitylists.text=Activitylists
ControlPanel_Formats.jButton1.text=Save
ControlPanel_Userproperties.jPanel11.border.title=Item Date-Defaults
ControlPanel_Userproperties.transdateX.text=NOT actualize trans.-Date
ControlPanel_Userproperties.enddateX.text=NOT actualize End-Date on status change
ControlPanel_Userproperties.calcEnddateX.text=calculate End-Date by customer term of credit
ContactPanel.payterm._Label=Pay Term
ItemPanel2.toorder.text_1=Create Order
ItemPanel2.panel2.TabConstraints.tabTitle=Additional Info
ItemPanel2.jButton3.text=Show
ItemPanel2.contactcity.text=Info
ItemPanel2.contactname._Label=Name
ItemPanel2.accountselect._Label=Account
ItemPanel2.button_order2.text=+
ItemPanel2.toorder.text=Create Order
ItemPanel2.value.text=0
ItemPanel2.jLabel4.text=Group:
ItemPanel2.jLabel3.text=Value
ItemPanel2.jLabel9.text=\ =
ItemPanel2.taxvalue.text=0
ItemPanel2.addfile.toolTipText=Add a file
ItemPanel2.addfile.text=
ItemPanel2.removefile.toolTipText=Remove file
ItemPanel2.removefile.text=
ItemPanel2.dataTable.toolTipText=File attachments
ItemPanel2.status._Label=Status
ItemPanel2.jScrollPane2.toolTipText=File attachments
ItemPanel2.jScrollPane4.TabConstraints.tabTitle=Properties
ItemPanel2.jLabel2.text=Tax
ItemPanel2.netvalue.text=0
ItemPanel2.border.title_1=Item Details
ItemPanel2.jLabel1.text=Net
ItemPanel2.rightpane.border.title=Data
ItemPanel2.type.text=Type
ItemPanel2.contactname._Label=Name
ItemPanel2.number._Label=Number
ItemPanel2.jButton1.text=.
ItemPanel2.accountselect._Label=Account
ItemPanel2.staus_icon.text=
ItemPanel2.jPanel3.TabConstraints.tabTitle=Notes
ItemPanel2.status._Label=Status
ItemPanel2.labeledCombobox1._Label=Free Text
ItemPanel2.jLabel8.text=\ +
ItemPanel2.number._Label=Number
ItemPanel2.addedby.toolTipText=Added by
ItemPanel2.discount.text=0
ItemPanel2.type.text=Type
ItemPanel2.jLabel5.text_1=Discount (Net)
ItemPanel2.jLabel7.text=\ -
ItemPanel2.netvalue.text=0
ItemPanel2.notes.toolTipText=Free text description
ItemPanel2.notes.text=
ItemPanel2.jScrollPane4.TabConstraints.tabTitle=Properties
ItemPanel2.date1._Label=Add. Date
ItemPanel2.jPanel5.border.title=Dates
ItemPanel2.date3._Label=End Date
ItemPanel2.date2._Label=Tran. Date
ItemPanel2.jButton3.text=Show
ItemPanel2.contactcity.text=Info
ItemPanel2.typelabel.text=
ItemPanel2.jPanel3.TabConstraints.tabTitle=Notes
ItemPanel2.rightpane.TabConstraints.tabTitle=Item Data
ItemPanel2.rightpane.border.title=Data
ItemPanel2.checkb_pront_oc.text=Print with OC
ItemPanel2.jButton2.text=Contact Details
ItemPanel2.button_reminders.text=Remind
ItemPanel2.jLabel1.text=Net
ItemPanel2.border.title_1=Item Details
ItemPanel2.date3._Label=End Date
ItemPanel2.button_orderconf.text=Order Confirmation
ItemPanel2.button_deliverynote.text=Delivery Note
ItemPanel2.button_preview.text=Preview
ItemPanel2.button_schedule.text=Schedule
ItemPanel2.taxvalue.text=0
ItemPanel2.jLabel3.text=Value
ItemPanel2.jButton2.text=Contact Details
ItemPanel2.button_reminders.text=Remind
ItemPanel2.date2._Label=Tran. Date
ItemPanel2.date1._Label=Add. Date
ItemPanel2.toinvoice.text=Create Invoice
ItemPanel2.value.text=0
ItemPanel2.jLabel5.text_1=Discount (Net)
ItemPanel2.discount.text=0
ItemPanel2.jLabel4.text=Group:
ItemPanel2.addedby.toolTipText=Added by
ItemPanel2.addedby.text=
ItemPanel2.panel2.TabConstraints.tabTitle=Additional Info
ItemPanel2.rightpane.TabConstraints.tabTitle=Item Data
ControlPanel_Userproperties.smtpport._Label=SMTP Port
ItemPanel2.jLabel7.text=\ -
ItemPanel2.jLabel8.text=\ +
ItemPanel2.jLabel9.text=\ =
ItemPanel.jLabel6.text=\ -
ItemPanel.jLabel7.text=\ +
ItemPanel.jLabel8.text=\ =
ActivityConfirmationPanel.jButton4.text=Create bill
ActivityConfirmationPanel.jLabel5.text=Activitys are alreadey accounted!
NO_ENTRY=No Entry
ContactPanel.button_activitylists.text=Activitylists
ItemPanel2.jPanel5.border.title=Dates
3 changes: 0 additions & 3 deletions src/mpv5/ui/beans/DateChooser.form
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[20, 333]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[18, 18]"/>
</Property>
<Property name="name" type="java.lang.String" value="jButton1" noResource="true"/>
</Properties>
<Events>
Expand Down
16 changes: 12 additions & 4 deletions src/mpv5/ui/beans/DateChooser.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package mpv5.ui.beans;


import java.text.ParseException;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFormattedTextField;
import javax.swing.JSpinner;
import javax.swing.JSpinner.DateEditor;
import javax.swing.text.DefaultFormatter;
import mpv5.ui.dialogs.MiniCalendarDialog;
import mpv5.ui.dialogs.MiniCalendarFrame;
import mpv5.utils.date.DateConverter;

/**
Expand Down Expand Up @@ -63,10 +67,14 @@ public void setDate(Date date) {

public Date getDate() {
if (hasDate()) {
return DateConverter.getDate(jSpinner1.getValue());
} else {
return new Date();
try {
jSpinner1.commitEdit();
return DateConverter.getDate(jSpinner1.getValue());
} catch (ParseException ex) {
Logger.getLogger(DateChooser.class.getName()).log(Level.SEVERE, null, ex);
}
}
return new Date();
}

/** This method is called from within the constructor to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private void initComponents() {
setName("Form"); // NOI18N
setLayout(new javax.swing.BoxLayout(this, javax.swing.BoxLayout.Y_AXIS));

java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("mpv5/resources/languages/Panels"); // NOI18N
java.util.ResourceBundle bundle = mpv5.i18n.LanguageManager.getBundle(); // NOI18N
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(bundle.getString("ControlPanel_External.jPanel2.border.title"))); // NOI18N
jPanel2.setName("jPanel2"); // NOI18N

Expand Down
Loading

0 comments on commit a29b017

Please sign in to comment.