|
@@ -3822,6 +3822,7 @@ function updateProductTotalMessage(billingcycle) {
|
|
|
switch(billingcycle) {
|
|
switch(billingcycle) {
|
|
|
case 'monthly':
|
|
case 'monthly':
|
|
|
billingDate = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
|
billingDate = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
|
|
|
|
+ periodString = 'Monats';
|
|
|
break;
|
|
break;
|
|
|
case 'quarterly':
|
|
case 'quarterly':
|
|
|
if (now.getMonth() < 3) {
|
|
if (now.getMonth() < 3) {
|
|
@@ -3833,6 +3834,7 @@ function updateProductTotalMessage(billingcycle) {
|
|
|
} else {
|
|
} else {
|
|
|
billingDate = new Date(now.getFullYear(), 11, 31); // 31.12.
|
|
billingDate = new Date(now.getFullYear(), 11, 31); // 31.12.
|
|
|
}
|
|
}
|
|
|
|
|
+ periodString = 'Quartals';
|
|
|
break;
|
|
break;
|
|
|
case 'semiannually':
|
|
case 'semiannually':
|
|
|
if (now.getMonth() < 6) {
|
|
if (now.getMonth() < 6) {
|
|
@@ -3840,16 +3842,18 @@ function updateProductTotalMessage(billingcycle) {
|
|
|
} else {
|
|
} else {
|
|
|
billingDate = new Date(now.getFullYear(), 11, 31); // 31.12.
|
|
billingDate = new Date(now.getFullYear(), 11, 31); // 31.12.
|
|
|
}
|
|
}
|
|
|
|
|
+ periodString = 'Halbjahres';
|
|
|
break;
|
|
break;
|
|
|
case 'annually':
|
|
case 'annually':
|
|
|
billingDate = new Date(now.getFullYear(), 11, 31);
|
|
billingDate = new Date(now.getFullYear(), 11, 31);
|
|
|
|
|
+ periodString = 'Jahres';
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
billingDay = daysIntoYear(billingDate);
|
|
billingDay = daysIntoYear(billingDate);
|
|
|
if ((billingDay - orderDay) < 12) {
|
|
if ((billingDay - orderDay) < 12) {
|
|
|
- jQuery('#producttotalmessage').html('Der Preis summiert sich aus den verbleibenden ' + (billingDay - orderDay) + ' Tagen der aktuellen Zahlungsperiode und der folgenden.<br>Nächste Fälligkeit ist am ' + billingDate.toLocaleDateString());
|
|
|
|
|
|
|
+ jQuery('#producttotalmessage').html('Der Preis summiert sich aus den verbleibenden ' + (billingDay - orderDay) + ' Tagen bis zum Ende dieses ' + periodString + ' und des nächsten ' + periodString + '.<br>Nächste Fälligkeit ist am ' + billingDate.toLocaleDateString());
|
|
|
} else {
|
|
} else {
|
|
|
- jQuery('#producttotalmessage').html('Der Preis berechnet die letzten ' + (billingDay - orderDay) + ' Tage der aktuellen Zahlungsperiode.<br>Nächste Fälligkeit ist am ' + billingDate.toLocaleDateString());
|
|
|
|
|
|
|
+ jQuery('#producttotalmessage').html('Der Preis berechnet die letzten ' + (billingDay - orderDay) + ' Tage dieses ' + periodString + '.<br>Nächste Fälligkeit ist am ' + billingDate.toLocaleDateString());
|
|
|
}
|
|
}
|
|
|
console.log((billingDay - orderDay)) + 'Zahltag: ' + billingDate;
|
|
console.log((billingDay - orderDay)) + 'Zahltag: ' + billingDate;
|
|
|
}
|
|
}
|