Permalink
Browse files

Merge remote-tracking branch 'origin/master'

Conflicts:
	src/mpv5/resources/languages/Panels.properties
  • Loading branch information...
anti43 committed Jan 11, 2013
2 parents 045ee7a + 5cbabb6 commit b8dd561ced19f7dd557ad89dc419d094b175c74b
@@ -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,31 +125,37 @@ 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";
prop = "hideunattenteddeliverys";
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,32 +197,38 @@ 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";
prop = "hideunattenteddeliverys";
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"));
@@ -2012,3 +2012,9 @@ ControlPanel_Formats.minstart._Label=Min. Start
ControlPanel_Formats.positionstart._Label=Position
ControlPanel_External.auto.text=Start Office automatically
JournalPanel.volumeDiscount._Label=Volume Discount
+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
+
Oops, something went wrong.

0 comments on commit b8dd561

Please sign in to comment.