Jump to content
xt:Commerce Community Forum

Netto summe


Long

Recommended Posts

Hallo zusammen,

ich habe über google eine Formel gefunden damit auf Rechnungen die Netto summe ab 150 Euro angezeigt wird und zwar diese Formel:

function process() {

global $order, $xtPrice;

if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {

if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == 1) {

$sub_total_price = $order->info['subtotal'] - ($order->info['subtotal'] / 100 * $_SESSION['customers_status']['customers_status_ot_discount']);

} else {

$sub_total_price = $order->info['subtotal'];

}

$sub_total_price += $xtPrice->xtcFormat($order->info['shipping_cost'], false,0,true);

$this->output[] = array(

'title' => $this->title . ':',

'text' => '<b>' . $xtPrice->xtcFormat($sub_total_price, true).'</b>',

'value' => $xtPrice->xtcFormat($sub_total_price, false));

} elseif ($_SESSION['customers_status']['customers_status_show_price_tax'] == 1 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0 && ($order->info['subtotal'] - $order->info['tax']) >= 150.0) {

if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == 1) {

$sub_total_price = $order->info['subtotal'] - $order->info['tax'];

$sub_total_price -= ($sub_total_price / 100 * $_SESSION['customers_status']['customers_status_ot_discount']);

} else {

$sub_total_price = $order->info['subtotal'] - $order->info['tax'];

}

$sub_total_price += $xtPrice->xtcFormat($order->info['shipping_cost'], false,0,true);

$this->output[] = array(

'title' => $this->title . ':',

'text' => '<b>' . $xtPrice->xtcFormat($sub_total_price, true).'</b>',

'value' => $xtPrice->xtcFormat($sub_total_price, false));

}

}

dies klappt ab 150 Euro auch so wie es soll, nur nicht wenn ich manuell Rechnungen schreibe.

Dazu habe ich 2 Fragen:

1. Ich würde gerne die Netto summe ab den 1 Euro haben wollen damit alle Rechnungen gleich aussehen.

2. Ist es möglich das bei manueller Rechnungsstellung die Netto summe auch automatisch kommt.

Vielen Dank für eure Hilfe,

Gruß

Der Long

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...