Merge branch 'refs/heads/exciler_pr' into matrixartikel

This commit is contained in:
Andreas Palm 2024-04-24 15:44:25 +02:00
commit 386d1b0f29
79 changed files with 18726 additions and 13881 deletions

View File

@ -8,6 +8,9 @@
namespace Xentral\Carrier\SendCloud\Data;
/**
* Documents object for a parcel
*/
class Document
{
public const TYPE_LABEL = 'label';

View File

@ -0,0 +1,13 @@
<?php
namespace Xentral\Carrier\SendCloud\Data;
/**
* Label object for a parcel
*/
class Label
{
public string $labelPrinter;
/** @var string[] $normalPrinter */
public array $normalPrinter;
}

View File

@ -14,26 +14,41 @@ class ParcelCreation extends ParcelBase
public function toApiRequest(): array
{
define("DEFAULT_LENGTH", 150);
// DPD-special condition, to be checked in detail
$address_2 = substr($this->Adress2, 0, 35);
$company_name = substr($this->CompanyName, 0, 35);
$length = strlen($address_2)+strlen($company_name);
if ($length > 34) {
$company_name_length = 34-strlen($address_2);
if ($company_name_length < 0) {
$company_name_lenght = 0;
}
$company_name = substr($company_name, 0, $company_name_length);
}
$data = [
'name' => $this->Name,
'company_name' => $this->CompanyName,
'address' => $this->Address,
'address_2' => $this->Address2,
'house_number' => $this->HouseNumber,
'city' => $this->City,
'postal_code' => $this->PostalCode,
'telephone' => $this->Telephone,
'name' => substr($this->Name, 0, 35),
'company_name' => $company_name,
'address' => substr($this->Address, 0, 35),
'address_2' => $address_2,
'house_number' => substr($this->HouseNumber, 0, 8),
'city' => substr($this->City, 0, 30),
'postal_code' => substr($this->PostalCode, 0, 12),
'telephone' => substr($this->Telephone, 0, 20),
'request_label' => $this->RequestLabel,
'email' => $this->EMail,
'country' => $this->Country,
'email' => substr($this->EMail, 0, DEFAULT_LENGTH),
'country' => substr($this->Country, 0, DEFAULT_LENGTH),
'shipment' => ['id' => $this->ShippingMethodId],
'weight' => number_format($this->Weight / 1000, 3, '.', null),
'order_number' => $this->OrderNumber,
'order_number' => substr($this->OrderNumber, 0, 35),
'total_order_value_currency' => $this->TotalOrderValueCurrency,
'total_order_value' => number_format($this->TotalOrderValue, 2, '.', null),
'country_state' => $this->CountryState,
'sender_address' => $this->SenderAddressId,
'external_reference' => $this->ExternalReference,
'country_state' => substr($this->CountryState, 0, DEFAULT_LENGTH),
'sender_address' => substr($this->SenderAddressId, 0, DEFAULT_LENGTH),
'external_reference' => substr($this->ExternalReference, 0, DEFAULT_LENGTH),
'total_insured_value' => $this->TotalInsuredValue ?? 0,
'parcel_items' => array_map(fn(ParcelItem $item) => $item->toApiRequest(), $this->ParcelItems),
'is_return' => $this->IsReturn,
@ -41,11 +56,14 @@ class ParcelCreation extends ParcelBase
'width' => $this->Width,
'height' => $this->Height,
];
if ($this->CustomsInvoiceNr !== null)
$data['customs_invoice_nr'] = $this->CustomsInvoiceNr;
if ($this->CustomsShipmentType !== null)
$data['customs_shipment_type'] = $this->CustomsShipmentType;
if ($this->CustomsInvoiceNr !== null) {
$data['customs_invoice_nr'] = substr($this->CustomsInvoiceNr, 0, 40);
}
if ($this->CustomsShipmentType !== null) {
$data['customs_shipment_type'] = substr($this->CustomsShipmentType, 0, DEFAULT_LENGTH);
}
return $data;
}
}
}

View File

@ -8,6 +8,9 @@
namespace Xentral\Carrier\SendCloud\Data;
/**
* Error returned during parcel creation
*/
class ParcelCreationError
{
public int $Code;

View File

@ -0,0 +1,12 @@
<?php
namespace Xentral\Carrier\SendCloud\Data;
/**
* Shipping method object for a parcel
*/
class Shipment
{
public int $id;
public int $name;
}

View File

@ -0,0 +1,12 @@
<?php
namespace Xentral\Carrier\SendCloud\Data;
/**
* Status object for a parcel
*/
class Status
{
public int $id;
public string $message;
}

View File

@ -79,7 +79,7 @@ class SendCloudApi
*/
public function CreateParcel(ParcelCreation $parcel): ParcelResponse|string|null
{
$uri = self::PROD_BASE_URI . '/parcels';
$uri = self::PROD_BASE_URI . '/parcels?errors=verbose-carrier';
$response = $this->sendRequest($uri, null, true, ['parcel' => $parcel->toApiRequest()], [200,400]);
switch ($response['code']) {
case 200:
@ -91,8 +91,8 @@ class SendCloudApi
}
break;
case 400:
if (isset($response->error))
return $response->error->message;
if (isset($response['body']->error))
return $response['body']->error->message;
break;
}
throw SendcloudApiException::fromResponse($response);

View File

@ -377,11 +377,13 @@ class ShopimportController
$stats['packages_yesterday'] = $verkaufszahlen->getPackages(
" v.versendet_am=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 day),'%Y-%m-%d') '",
sprintf('INNER JOIN `auftrag` AS `a` ON l.auftragid = a.id AND a.shop = %d', $shopId)
sprintf('INNER JOIN `auftrag` AS `a` ON l.auftragid = a.id AND a.shop = %d', $shopId),
false
);
$stats['packages_today'] = $verkaufszahlen->getPackages(
" v.versendet_am=DATE_FORMAT(NOW(),'%Y-%m-%d') '",
sprintf('INNER JOIN `auftrag` AS `a` ON l.auftragid = a.id AND a.shop = %d', $shopId)
sprintf('INNER JOIN `auftrag` AS `a` ON l.auftragid = a.id AND a.shop = %d', $shopId),
false
);
[

View File

@ -39,7 +39,7 @@ final class Bootstrap
*
* @return ImportTemplateService
*/
public function onInitImportTemplateService(ContainerInterface $container)
public static function onInitImportTemplateService(ContainerInterface $container)
{
return new ImportTemplateService(
$container->get('Database')
@ -51,7 +51,7 @@ final class Bootstrap
*
* @return ImportTemplateGateway
*/
public function onInitImportTemplateGateway(ContainerInterface $container)
public static function onInitImportTemplateGateway(ContainerInterface $container)
{
return new ImportTemplateGateway(
$container->get('Database')

View File

@ -0,0 +1,15 @@
<?php
// SPDX-FileCopyrightText: 2024 Andreas Palm
//
// SPDX-License-Identifier: AGPL-3.0-only
namespace Xentral\Modules\Onlineshop\Data;
enum OrderStatus
{
case Imported;
case InProgress;
case Completed;
case Cancelled;
}

View File

@ -0,0 +1,48 @@
<?php
// SPDX-FileCopyrightText: 2024 Andreas Palm
//
// SPDX-License-Identifier: AGPL-3.0-only
namespace Xentral\Modules\Onlineshop\Data;
class OrderStatusUpdateRequest
{
/**
* @var int ID of the (primary/imported) order (ERP domain)
*/
public int $orderId;
/**
* @var string ID of the order (Shop domain)
*/
public string $shopOrderId;
/**
* @var OrderStatus current order status
*/
public OrderStatus $orderStatus;
/**
* @var Shipment[] list of shipments for this order
*/
public array $shipments;
public function getTrackingNumberList() : array {
$list = [];
foreach ($this->shipments as $shipment) {
if (!empty($shipment->trackingNumber))
$list[] = $shipment->trackingNumber;
}
return $list;
}
public function getTrackingUrlList() : array {
$list = [];
foreach ($this->shipments as $shipment) {
if (!empty($shipment->trackingUrl))
$list[] = $shipment->trackingUrl;
}
return $list;
}
}

View File

@ -0,0 +1,30 @@
<?php
// SPDX-FileCopyrightText: 2024 Andreas Palm
//
// SPDX-License-Identifier: AGPL-3.0-only
namespace Xentral\Modules\Onlineshop\Data;
class Shipment
{
/**
* @var int ID of the shipment (ERP domain)
*/
public int $id;
/**
* @var string plain tracking number
*/
public string $trackingNumber;
/**
* @var string URL to view tracking details
*/
public string $trackingUrl;
/**
* @var string shipping method (after mapping to Shop domain)
*/
public string $shippingMethod;
}

View File

@ -129,6 +129,8 @@ final class Shopware6Client
],
],
];
if ($priceData->getEndingQuantity() > 0)
$data['quantityEnd'] = $priceData->getEndingQuantity();
return $this->request(
'POST',

View File

@ -8,6 +8,8 @@ class PriceData
{
/** @var int */
protected $startingQuantity;
/** @var int|null */
protected $endingQuantity;
/** @var float */
protected $net;
/** @var float */
@ -26,13 +28,14 @@ class PriceData
* @param $currency
* @param $groupName
*/
public function __construct(int $startingQuantity, float $net, float $gross, string $currency, string $groupName)
public function __construct(int $startingQuantity, float $net, float $gross, string $currency, string $groupName, int $endingQuantity = null)
{
$this->startingQuantity = $startingQuantity;
$this->net = $net;
$this->gross = $gross;
$this->currency = $currency;
$this->groupName = $groupName;
$this->endingQuantity = $endingQuantity;
}
/**
@ -95,6 +98,25 @@ class PriceData
return $this;
}
/**
* @return int|null
*/
public function getEndingQuantity(): int|null
{
return $this->endingQuantity;
}
/**
* @param int $endingQuantity
* @return PriceData
*/
public function setEndingQuantity(int $endingQuantity): PriceData
{
$this->endingQuantity = $endingQuantity;
return $this;
}
/**
* @return float
*/

View File

@ -387,15 +387,16 @@ function GetLaender()
$join = '';
$where = '';
$app->erp->RunHook('shop_rueckmeldung', 2, $join, $where);
$sql = "SELECT a.id,apro.zeit, a.shop, l.id as lieferschein, v.id as versandid, l.projekt
FROM auftrag AS a
LEFT JOIN lieferschein AS l on l.auftragid = a.id
LEFT JOIN auftrag_protokoll AS apro ON a.id = apro.auftrag AND apro.grund LIKE 'Auftrag importiert vom Shop'
LEFT JOIN projekt AS pr ON l.projekt = pr.id
LEFT JOIN versand AS v ON v.lieferschein = l.id
$sql = "SELECT DISTINCT a.id, a.shop
FROM auftrag a
LEFT JOIN lieferschein l on l.auftragid = a.id
LEFT JOIN projekt pr ON l.projekt = pr.id
LEFT JOIN lieferschein_position lp ON lp.lieferschein = l.id
LEFT JOIN versandpaket_lieferschein_position vlp ON vlp.lieferschein_position = lp.id
LEFT JOIN versandpakete v ON (v.lieferschein_ohne_pos = l.id OR v.id = vlp.versandpaket)
$join
WHERE a.status = 'abgeschlossen' AND $subwhere AND
DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 2 WEEK),'%Y-%m-%d') < a.datum AND
DATE_SUB(NOW(),INTERVAL 2 WEEK) < a.datum AND
a.shopextstatus <> 'abgeschlossen' AND a.shop > 0 AND
(
( v.tracking <> '' AND l.status = 'versendet') OR

View File

@ -945,7 +945,7 @@ if($shops) {
{
$onlinebestellnummer = $tmpwarenkorb['auftrag'];
}
$projekt = $app->DB->Select("SELECT projekt WHERE shopexport = '$id' LIMIT 1");
//$projekt = $app->DB->Select("SELECT projekt WHERE shopexport = '$id' LIMIT 1");
if(!empty($tmpwarenkorb['projekt']) && $app->DB->Select("SELECT id FROM projekt WHERE id = '".(int)$tmpwarenkorb['projekt']."' LIMIT 1"))$projekt = (int)$tmpwarenkorb['projekt'];
if(isset($tmpwarenkorb['subshop']) && $tmpwarenkorb['subshop'])
{

File diff suppressed because it is too large Load Diff

View File

@ -2839,21 +2839,36 @@ class YUI {
,b.waehrung, b.rabatt as rabatt,";
}else{
if ($this->app->erp->RechteVorhanden('angebot','einkaufspreise')) {
$sql .= $this->FormatPreis('einkaufspreis')." as einkaufspreis,
CONCAT(".$this->app->erp->FormatPreis("ROUND(deckungsbeitrag*100,2)",2).",'%') AS DB,
";
}
} else {
$sql = "SELECT $sortcol, CONCAT($hersteller_ansicht if(b.beschreibung!='',
if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(CONCAT(b.bezeichnung,' *'),1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),CONCAT(b.bezeichnung,' *')),
if(CHAR_LENGTH(b.bezeichnung)>" . $this->app->erp->MaxArtikelbezeichnung() . ",CONCAT(SUBSTR(b.bezeichnung,1," . $this->app->erp->MaxArtikelbezeichnung() . "),'...'),b.bezeichnung)) $erweiterte_ansicht)
as Artikel,
p.abkuerzung as projekt, a.nummer as nummer, b.nummer as nummer, DATE_FORMAT(lieferdatum,'%d.%m.%Y') as lieferdatum, trim(b.menge)+0 as menge, ".$this->FormatPreis($preiscell)." as preis
,b.waehrung, b.rabatt as rabatt,";
p.abkuerzung as projekt,
a.nummer as nummer,
b.nummer as nummer,
DATE_FORMAT(lieferdatum,
'%d.%m.%Y') as lieferdatum,
trim(b.menge)+0 as menge,
".$this->FormatPreis($preiscell)." as preis,
b.waehrung,
b.rabatt as rabatt,
'' AS Einkaufspreis,
'' AS DB,
";
}
$sql .= "b.id as id
FROM $table b
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
WHERE b.$module='$id'";
$sql .= "b.id as id
FROM $table b
LEFT JOIN artikel a ON a.id=b.artikel LEFT JOIN projekt p ON b.projekt=p.id
WHERE b.$module='$id'";
}
else if ($module == "verbindlichkeit") // OpenXE
{
@ -6766,7 +6781,11 @@ r.land as land, p.abkuerzung as projekt, r.zahlungsweise as zahlungsweise,
FORMAT(r.soll,2{$extended_mysql55} ) as soll,
ifnull(r.waehrung,'EUR'),
r.zahlungsstatus as zahlung,
if(r.soll-r.ist!=0 AND r.ist > 0,FORMAT(r.ist-r.soll,2{$extended_mysql55}),FORMAT((r.soll-r.ist)*-1,2{$extended_mysql55})) as fehlt,
if (
r.zahlungsstatus <> 'bezahlt',
if(r.soll-r.ist!=0 AND r.ist > 0,FORMAT(r.ist-r.soll,2{$extended_mysql55}),FORMAT((r.soll-r.ist)*-1,2{$extended_mysql55})),
'')
as fehlt,
if(r.status = 'storniert' AND r.teilstorno = 1,'TEILSTORNO',UPPER(r.status)) as status,
".(!empty($zusatzcols)?implode(', ',$zusatzcols).',':'')."
r.id

View File

@ -388,7 +388,7 @@ class EasyTable {
{
$editcols = array(4,5,6,7);
}else{
$einkaufspreiseerlaubt = false;
$einkaufspreiseerlaubt = true;
if($einkaufspreiseerlaubt)
{
$editcols =array(4,5,6,7,8,9);

View File

@ -28899,6 +28899,17 @@
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "keinrabatterlaubt",
"Type": "int(1)",
"Collation": null,
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
}
],
"keys": [
@ -78533,6 +78544,17 @@
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "next_lieferantengutschrift",
"Type": "text",
"Collation": "utf8mb3_general_ci",
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "freifeld1",
"Type": "text",
@ -92675,6 +92697,17 @@
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "texteuebertragen",
"Type": "tinyint(1)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "1",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "adressennichtueberschreiben",
"Type": "tinyint(1)",
@ -110984,6 +111017,628 @@
}
]
},
{
"name": "lieferantengutschrift",
"collation": "utf8mb3_general_ci",
"type": "BASE TABLE",
"columns": [
{
"Field": "id",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "PRI",
"Default": null,
"Extra": "auto_increment",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "usereditid",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "PRI",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "belegnr",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "datum",
"Type": "date",
"Collation": null,
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "status_beleg",
"Type": "varchar(64)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "schreibschutz",
"Type": "tinyint(1)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "rechnung",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "zahlbarbis",
"Type": "date",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "betrag",
"Type": "decimal(10,2)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "skonto",
"Type": "decimal(10,2)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "skontobis",
"Type": "date",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "freigabe",
"Type": "int(1)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "freigabemitarbeiter",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "adresse",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "MUL",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "projekt",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "status",
"Type": "varchar(64)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "bezahlt",
"Type": "int(1)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "firma",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "logdatei",
"Type": "timestamp",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0000-00-00 00:00:00",
"Extra": "on update current_timestamp()",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "waehrung",
"Type": "varchar(3)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": "'EUR'",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "zahlungsweise",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "eingangsdatum",
"Type": "date",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "rechnungsdatum",
"Type": "date",
"Collation": null,
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "rechnungsfreigabe",
"Type": "tinyint(1)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "kostenstelle",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "beschreibung",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "sachkonto",
"Type": "varchar(64)",
"Collation": "utf8mb3_general_ci",
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "internebemerkung",
"Type": "text",
"Collation": "utf8mb3_general_ci",
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "ust_befreit",
"Type": "int(1)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "ustid",
"Type": "varchar(64)",
"Collation": "utf8mb3_general_ci",
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
}
],
"keys": [
{
"Key_name": "PRIMARY",
"Index_type": "BTREE",
"columns": [
"id"
],
"Non_unique": ""
},
{
"Key_name": "adresse",
"Index_type": "BTREE",
"columns": [
"adresse"
],
"Non_unique": ""
}
]
},
{
"name": "lieferantengutschrift_position",
"collation": "utf8mb3_general_ci",
"type": "BASE TABLE",
"columns": [
{
"Field": "id",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "PRI",
"Default": null,
"Extra": "auto_increment",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "lieferantengutschrift",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "MUL",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "sort",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "artikel",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "projekt",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "bestellung",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "nummer",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "waehrung",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "einheit",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "vpe",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "bezeichnung",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "umsatzsteuer",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "status",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "beschreibung",
"Type": "text",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "lieferdatum",
"Type": "date",
"Collation": null,
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "steuersatz",
"Type": "decimal(5,2)",
"Collation": null,
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "steuertext",
"Type": "varchar(1024)",
"Collation": "utf8mb3_general_ci",
"Null": "YES",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "kostenstelle",
"Type": "varchar(10)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "preis",
"Type": "decimal(14,4)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0.0000",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "menge",
"Type": "decimal(14,4)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0.0000",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "verbindlichkeit_position",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "kontorahmen",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
}
],
"keys": [
{
"Key_name": "PRIMARY",
"Index_type": "BTREE",
"columns": [
"id"
],
"Non_unique": ""
},
{
"Key_name": "lieferantengutschrift",
"Index_type": "BTREE",
"columns": [
"lieferantengutschrift"
],
"Non_unique": ""
}
]
},
{
"name": "verbindlichkeit_bestellungen",
"collation": "utf8mb3_general_ci",
@ -111673,6 +112328,86 @@
}
]
},
{
"name": "lieferantengutschrift_protokoll",
"collation": "utf8mb3_general_ci",
"type": "BASE TABLE",
"columns": [
{
"Field": "id",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "PRI",
"Default": null,
"Extra": "auto_increment",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "lieferantengutschrift",
"Type": "int(11)",
"Collation": null,
"Null": "NO",
"Key": "MUL",
"Default": "0",
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "zeit",
"Type": "datetime",
"Collation": null,
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "bearbeiter",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
},
{
"Field": "grund",
"Type": "varchar(255)",
"Collation": "utf8mb3_general_ci",
"Null": "NO",
"Key": "",
"Default": null,
"Extra": "",
"Privileges": "select,insert,update,references",
"Comment": ""
}
],
"keys": [
{
"Key_name": "PRIMARY",
"Index_type": "BTREE",
"columns": [
"id"
],
"Non_unique": ""
},
{
"Key_name": "lieferantengutschrift",
"Index_type": "BTREE",
"columns": [
"lieferantengutschrift"
],
"Non_unique": ""
}
]
},
{
"name": "verbindlichkeit_regelmaessig",
"collation": "utf8mb3_general_ci",

View File

@ -119,6 +119,12 @@ if (php_sapi_name() == "cli") {
$strict_db = false;
}
if (in_array('-drop_keys', $argv)) {
$drop_keys = true;
} else {
$drop_keys = false;
}
if (in_array('-do', $argv)) {
if (!$check_git && !$check_db) {
$do_git = true;
@ -143,7 +149,8 @@ if (php_sapi_name() == "cli") {
do_db: $do_db,
force: $force,
connection: $connection,
origin: $origin);
origin: $origin,
drop_keys: $drop_keys);
} else {
info();
}
@ -155,7 +162,7 @@ if (php_sapi_name() == "cli") {
}
// -------------------------------- END
function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do_git, bool $export_db, bool $check_db, bool $strict_db, bool $do_db, bool $force, bool $connection, bool $origin) {
function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do_git, bool $export_db, bool $check_db, bool $strict_db, bool $do_db, bool $force, bool $connection, bool $origin, bool $drop_keys) {
$mainfolder = dirname($directory);
$datafolder = $directory."/data";
@ -395,7 +402,7 @@ function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do
echo_out("--------------- Calculating database upgrade for '$schema@$host'... ---------------\n");
$upgrade_sql = array();
$result = mustal_calculate_db_upgrade($compare_def, $db_def, $upgrade_sql, $mustal_replacers, $strict_db);
$result = mustal_calculate_db_upgrade($compare_def, $db_def, $upgrade_sql, $mustal_replacers, $strict_db, $drop_keys);
if (!empty($result)) {
abort(count($result)." errors.\n");
@ -411,7 +418,7 @@ function upgrade_main(string $directory,bool $verbose, bool $check_git, bool $do
foreach($upgrade_sql as $statement) {
echo_out($statement."\n");
}
}
}
echo_out(count($upgrade_sql)." upgrade statements\n");

View File

@ -21,7 +21,7 @@ function mustal_compare_table_array(array $nominal, string $nominal_name, array
Compare two database structures
Returns a structured array containing information on all the differences.
function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$upgrade_sql, bool $strict) : int
function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$upgrade_sql, array $replacers, bool $strict, bool $drop_keys) : array
Generate the SQL needed to upgrade the database to match the definition, based on a comparison.
Data structure in Array and JSON
@ -71,6 +71,9 @@ $mustal_replacers = [
// Load all db_def from a DB connection into a db_def array
function mustal_load_tables_from_db(string $host, string $schema, string $user, string $passwd, array $replacers) : array {
$tables = array();
$views = array();
// First get the contents of the database table structure
$mysqli = mysqli_connect($host, $user, $passwd, $schema);
@ -542,11 +545,22 @@ function mustal_implode_with_quote(string $quote, string $delimiter, array $arra
// 11 Table type upgrade not supported
// 12 Upgrade type not supported
function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$upgrade_sql, array $replacers, bool $strict) : array {
function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$upgrade_sql, array $replacers, bool $strict, bool $drop_keys) : array {
$result = array();
$upgrade_sql = array();
if ($drop_keys) {
foreach ($db_def['tables'] as $table_id => $table) {
foreach ($table['keys'] as $key_id => $key) {
if ($key['Key_name'] != 'PRIMARY') {
$upgrade_sql[] = "ALTER TABLE `".$table['name']. "` DROP KEY `".$key['Key_name']."`;";
unset($db_def['tables'][$table_id]['keys'][$key_id]);
}
}
}
}
$compare_differences = mustal_compare_table_array($compare_def,"in JSON",$db_def,"in DB",true,true);
foreach ($compare_differences as $compare_difference) {
@ -749,7 +763,7 @@ function mustal_calculate_db_upgrade(array $compare_def, array $db_def, array &$
}
}
$upgrade_sql = array_unique($upgrade_sql);
$upgrade_sql = array_unique($upgrade_sql);
if (count($upgrade_sql) > 0) {
array_unshift($upgrade_sql,"SET SQL_MODE='ALLOW_INVALID_DATES';");

View File

@ -22,7 +22,7 @@ include '../lib/libextern.php';
$config = new Config();
$db = new DB($config->WFdbhost, $config->WFdbname, $config->WFdbuser, $config->WFdbpass,null,$conf->WFdbport);
$db = new DB($config->WFdbhost, $config->WFdbname, $config->WFdbuser, $config->WFdbpass,null,$config->WFdbport);
//$erp = new erpAPI($app);
//$app->erp = $erp;

View File

@ -1387,7 +1387,7 @@ function processData( xmlHttp, intID )
if(typeof mySplitResult[2] != 'undefined')parent.document.getElementById('lieferunterabteilung'+commandpostfix).value=trim(mySplitResult[2]);
//parent.document.getElementById('lieferland').options[parent.document.getElementById('lieferland').selectedIndex].value=trim(mySplitResult[3]);
//if(typeof mySplitResult[3] != 'undefined')Select_Value_Set('eprooform.lieferland'+commandpostfix,trim(mySplitResult[3]));
if(typeof mySplitResult[3] != 'undefined')SelectCountry('#lieferland',trim(mySplitResult[3]));
// if(typeof mySplitResult[3] != 'undefined')SelectCountry('#lieferland',trim(mySplitResult[3]));
if(typeof mySplitResult[4] != 'undefined')parent.document.getElementById('lieferstrasse'+commandpostfix).value=trim(mySplitResult[4]);
if(typeof mySplitResult[5] != 'undefined')parent.document.getElementById('lieferort'+commandpostfix).value=trim(mySplitResult[5]);
if(typeof mySplitResult[6] != 'undefined')parent.document.getElementById('lieferplz'+commandpostfix).value=trim(mySplitResult[6]);
@ -1397,6 +1397,9 @@ function processData( xmlHttp, intID )
if(typeof mySplitResult[10] != 'undefined')parent.document.getElementById('ansprechpartnerid'+commandpostfix).value=trim(mySplitResult[10]);
if(typeof mySplitResult[15] != 'undefined')parent.document.getElementById('liefergln'+commandpostfix).value=trim(mySplitResult[15]);
if(typeof mySplitResult[11] != 'undefined')parent.document.getElementById('lieferemail'+commandpostfix).value=trim(mySplitResult[11]);
if(typeof mySplitResult[3] != 'undefined')SelectCountry('#lieferland',trim(mySplitResult[3])); // moved due to JS error
window.parent.abweichend2();
// parent.document.getElementById('lieferansprechpartner').value=trim(mySplitResult[0]);
break;

View File

@ -7191,6 +7191,7 @@ title: 'Abschicken',
$navarray['menu']['admin'][$menu]['sec'][] = array('Lohnabrechnung','lohnabrechnung','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Verbindlichkeiten','verbindlichkeit','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Lieferantengutschriften','lieferantengutschrift','list');
$navarray['menu']['admin'][$menu]['sec'][] = array('Kassenbuch','kasse','list');
@ -8620,6 +8621,7 @@ function StandardFirmendatenWerte()
$this->AddNeuenFirmendatenWert( 'next_proformarechnung', 'varchar', '128', '', '', '', 1, 1);
$this->AddNeuenFirmendatenWert( 'next_serviceauftrag', 'varchar', '128', '', '', '', 1, 1);
$this->AddNeuenFirmendatenWert( 'next_verbindlichkeit', 'varchar', '128', '', '', '', 1, 1);
$this->AddNeuenFirmendatenWert( 'next_lieferantengutschrift', 'varchar', '128', '', '', '', 1, 1);
$this->AddNeuenFirmendatenWert( 'zahlung_auftrag_sofort_de', 'text', '', '', '', '', 1, 1);
$this->AddNeuenFirmendatenWert( 'zahlung_auftrag_de', 'text', '', '', '', '', 1, 1);
@ -10517,15 +10519,19 @@ function SendPaypalFromAuftrag($auftrag, $test = false)
}
}
if($variables['datum']=="") $variables['datum']=date('d.m.Y');
if (is_array($variables)) {
if($variables['datum']=="") {
$variables['datum']=date('d.m.Y');
}
if(!empty($variables))
{
foreach($variables as $key=>$value)
{
$value = $this->UmlauteEntfernen($value);
$xml = str_replace("{".strtoupper($key)."}",$value,$xml);
}
if(!empty($variables))
{
foreach($variables as $key=>$value)
{
$value = $this->UmlauteEntfernen($value);
$xml = str_replace("{".strtoupper($key)."}",$value,$xml);
}
}
}
// y to z wenn Kein PDF -> also nur bei EPL Drucker - 09.06.2019 BS heute auf 0 gestellt bei deutschen adapterboxen eventuell
@ -13246,6 +13252,11 @@ function SendPaypalFromAuftrag($auftrag, $test = false)
return $this->ReplaceANABRELSGSBE("rechnung",$db,$value,$fromform);
}
function ReplaceVerbindlichkeit($db,$value,$fromform)
{
return $this->ReplaceANABRELSGSBE("verbindlichkeit",$db,$value,$fromform);
}
function ReplaceRetoure($db,$value,$fromform)
{
return $this->ReplaceANABRELSGSBE('retoure',$db,$value,$fromform);
@ -15877,127 +15888,6 @@ function Gegenkonto($ust_befreit,$ustid='', $doctype = '', $doctypeId = 0)
$this->app->Tpl->Parse('PAGE','emptytab.tpl');
}
/**
* @param int $id
*
* @return string
*
*/
public function GetTrackingRawLink($id)
{
return $this->GetTrackinglink($id, true);
}
/**
* @param int $id
* @param bool $returnRaw
*
* @return string
*/
public function GetTrackinglink($id, $returnRaw = false)
{
if($id > 0)
{
$versandarr = $this->app->DB->SelectRow("SELECT * FROM versand WHERE id='$id' LIMIT 1");
}
if(empty($versandarr))
{
return '';
}
$adresse = $versandarr['adresse'];
$lieferscheinid = $versandarr['lieferschein'];
if($lieferscheinid > 0){
$lieferscheinarr = $this->app->DB->SelectRow("SELECT auftragid,projekt FROM lieferschein WHERE id='$lieferscheinid' LIMIT 1");
}
if(!empty($lieferscheinarr))
{
$auftrag = $lieferscheinarr['auftragid'];
$projekt = $lieferscheinarr['projekt'];
}else{
$auftrag = 0;
$projekt = 0;
}
$auftragarr = $this->app->DB->SelectRow("SELECT belegnr,internet,ihrebestellnummer,DATE_FORMAT(datum,'%d.%m.%Y') as datum_de FROM auftrag WHERE id='$auftrag' LIMIT 1");
if(!empty($auftragarr)){
$auftragbelegnr = $auftragarr['belegnr'];
$auftraginternet = $auftragarr['internet'];
$ihrebestellnummer = $auftragarr['ihrebestellnummer'];
$auftragdatum = $auftragarr['datum_de'];
}else{
$auftragbelegnr = '';
$auftraginternet = '';
$ihrebestellnummer = '';
$auftragdatum = '';
}
$tracking = $versandarr['tracking'];
$versandunternehmen = $versandarr['versandunternehmen'];
// FIX fuer selbstabholer Mail
$versandart = $versandarr['versandart'];
if($versandart=='selbstabholer') {
$versandunternehmen='selbstabholer';
}
if($versandunternehmen=='dhl' || $versandunternehmen=="dhlpremium" || $versandunternehmen=="intraship"){
$versandmodul = false;
}
$typ = $versandunternehmen;
if($typ === ''){
$typ = $versandart;
}
//$versandartenmodul = $this->app->DB->SelectArr("SELECT id, modul FROM versanddienstleister WHERE aktiv = 1 AND modul = '".$this->app->DB->real_escape_string($typ)."' AND (projekt = 0 OR projekt = '$projekt') ORDER BY projekt DESC LIMIT 1");
$versandartenmodul = $this->app->DB->SelectArr("SELECT * FROM versandarten WHERE aktiv = 1 AND ausprojekt = 0 AND modul != '' AND type = '".$this->app->DB->real_escape_string($typ)."' AND modul != '' AND (projekt = 0 OR projekt = '$projekt') ORDER BY projekt DESC LIMIT 1");
$standard = true;
if($versandartenmodul && @is_file(dirname(__FILE__).'/versandarten/'.$versandartenmodul[0]['modul'].'.php'))
{
$obj = $this->LoadVersandModul($versandartenmodul[0]['modul'], $versandartenmodul[0]['id']);
if(!empty($obj) && method_exists($obj, 'Trackinglink'))
{
if($obj->Trackinglink($tracking, $notsend, $link, $rawlink))
{
if($returnRaw) {
return $rawlink;
}
return $link;
}
}
}elseif($versandartenmodul2 = $this->app->DB->SelectArr("SELECT * FROM versandarten WHERE aktiv = 1 AND ausprojekt = 0 AND type = '".$this->app->DB->real_escape_string($typ)."' AND (projekt = 0 OR projekt = '$projekt') ORDER BY projekt DESC LIMIT 1"))
{
$obj = $this->LoadVersandModul($versandartenmodul2[0]['modul'], $versandartenmodul2[0]['id']);
if(!empty($obj) && method_exists($obj, 'Trackinglink'))
{
if($obj->Trackinglink($tracking, $notsend, $link, $rawlink))
{
if($returnRaw) {
return $rawlink;
}
return $link;
}
}
}
if(!$versandmodul && $standard)
{
if($versandunternehmen=="dhl" || $versandunternehmen=="dhlpremium" || $versandunternehmen=="intraship")
{
return 'http://nolp.dhl.de/nextt-online-public/set_identcodes.do?lang=de&idc='.$tracking;
}
else if ($versandunternehmen=="logoix")
{
return 'http://www.logoix.com/cgi-bin/tnt.pl?q='.$tracking;
}
else if ($versandunternehmen=="dpd")
{
return 'https://tracking.dpd.de/parcelstatus/?locale=de_DE&query='.$tracking;
}
else if ($versandunternehmen=="gls")
{
return 'https://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/DE03/DE/5004.htm?txtRefNo='.$tracking;
}
}
}
/**
* @param int $id
*/
@ -25530,31 +25420,31 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
{
$signaturtext = $this->Signatur($from);
if($this->isHTML($signaturtext))
$body = utf8_decode(str_replace('\r\n',"\n",$text))."<br>".$signaturtext;
$body = str_replace('\r\n',"\n",$text)."<br>".$signaturtext;
else
$body = utf8_decode(str_replace('\r\n',"\n",$text))."<br>".nl2br($signaturtext);
$body = str_replace('\r\n',"\n",$text)."<br>".nl2br($signaturtext);
}else{
if($projekt > 0 && $this->Projektdaten($projekt,"absendesignatur")!=""){
$signaturtext = $this->Projektdaten($projekt,"absendesignatur");
if($this->isHTML($signaturtext))
$body = utf8_decode(str_replace('\r\n',"\n",$text))."<br><br>".$signaturtext;
$body = str_replace('\r\n',"\n",$text)."<br><br>".$signaturtext;
else
$body = utf8_decode(str_replace('\r\n',"\n",$text))."<br><br>".$this->ReadyForPDF(nl2br($signaturtext));
$body = str_replace('\r\n',"\n",$text)."<br><br>".$this->ReadyForPDF(nl2br($signaturtext));
}else{
if(strlen(trim($this->Signatur($from))) > 0 && $eigenesignatur == 0){
$signaturtext = $this->Signatur($from);
if($this->isHTML($signaturtext))
$body = str_replace('\r\n',"\n",$text)."<br>".$signaturtext;
else
$body = utf8_decode(str_replace('\r\n',"\n",$text))."<br>".nl2br($signaturtext);
$body = str_replace('\r\n',"\n",$text)."<br>".nl2br($signaturtext);
}else{
$body = utf8_decode(str_replace('\r\n',"\n",$text));
$body = str_replace('\r\n',"\n",$text);
}
}
}
} else {
$body = utf8_decode(str_replace('\r\n',"\n",$text));
$body = str_replace('\r\n',"\n",$text);
}
{
@ -25582,6 +25472,8 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
$recipients = [];
$to_csv = "";
$to_array = array();
$to_name_array = array();
$to_name_csv = "";
// Prepare names and addresses
@ -25799,6 +25691,7 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
$uebersetzung['dokument_artikelnummerkunde']['deutsch'] = "Ihre Artikelnummer";
$uebersetzung['dokument_menge']['deutsch'] = "Menge";
$uebersetzung['dokument_gesamt']['deutsch'] = "Gesamt";
$uebersetzung['dokument_gesamt_optional']['deutsch'] = "Gesamt optional";
$uebersetzung['dokument_gesamt_total']['deutsch'] = "Gesamt";
$uebersetzung['dokument_mwst']['deutsch'] = "MwSt.";
$uebersetzung['dokument_zzglmwst']['deutsch'] = "zzgl. MwSt.";
@ -25816,6 +25709,7 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
$uebersetzung['dokument_ursprungsregion']['deutsch'] = "Ursprungsregion";
$uebersetzung['dokument_gewicht']['deutsch'] = "Gewicht";
$uebersetzung['dokument_gesamtnetto']['deutsch'] = "Gesamt netto";
$uebersetzung['dokument_gesamtnetto_optional']['deutsch'] = "Gesamt netto optional";
$uebersetzung['dokument_seite']['deutsch'] = "Seite";
$uebersetzung['dokument_seitevon']['deutsch'] = "von";
$uebersetzung['dokument_datum']['deutsch'] = "Datum";
@ -26074,7 +25968,14 @@ function MailSendFinal($from,$from_name,$to,$to_name,$betreff,$text,$files="",$p
}
}
else {
$this->app->DB->Update("UPDATE firmendaten SET " . $field . "='$value' WHERE id='" . $firmendatenid . "'");
$column_exists = $this->app->DB->Select("SHOW COLUMNS FROM firmendaten WHERE field = '".$field."'");
if ($column_exists) {
$this->app->DB->Update("UPDATE firmendaten SET " . $field . "='$value' WHERE id='" . $firmendatenid . "'");
} else {
$this->AddNeuenFirmendatenWert($field, $typ, $typ1, $typ2, $value, $default_value, $default_null, $darf_null);
}
}
$db = $this->app->Conf->WFdbname;
if(!empty($this->firmendaten[$db])) {
@ -27720,7 +27621,7 @@ function Firmendaten($field,$projekt="")
$allowedtypes = ['angebot', 'auftrag', 'rechnung', 'lieferschein', 'arbeitsnachweis', 'reisekosten',
'bestellung', 'gutschrift', 'kundennummer', 'lieferantennummer', 'mitarbeiternummer', 'waren',
'produktion', 'sonstiges', 'anfrage', 'artikelnummer', 'kalkulation', 'preisanfrage', 'proformarechnung',
'retoure', 'verbindlichkeit', 'goodspostingdocument', 'receiptdocument'];
'retoure', 'verbindlichkeit','lieferantengutschrift', 'goodspostingdocument', 'receiptdocument'];
$dbfield = "next_$type";
$belegnr = $this->app->DB->Select("SELECT $dbfield FROM projekt WHERE id='$projekt' LIMIT 1");
@ -27846,6 +27747,11 @@ function Firmendaten($field,$projekt="")
if($belegnr == "0" || $belegnr=="") $belegnr = 10000;
$newbelegnr = $this->CalcNextNummer($belegnr);
break;
case "lieferantengutschrift":
$belegnr = $this->Firmendaten("next_lieferantengutschrift");
if($belegnr == "0" || $belegnr=="") $belegnr = 20000;
$newbelegnr = $this->CalcNextNummer($belegnr);
break;
case 'receiptdocument':
$belegnr = $this->Firmendaten('next_receiptdocument');
if($belegnr == '0' || $belegnr=='') {
@ -35373,6 +35279,7 @@ function Firmendaten($field,$projekt="")
}
$ust_befreit = $this->app->DB->Select("SELECT ust_befreit FROM $typ WHERE id = '$typid' LIMIT 1");
$ustid = $this->app->DB->Select("SELECT ustid FROM $typ WHERE id = '$typid' LIMIT 1");
$aufwendung = false;
switch($typ)
{
@ -35383,9 +35290,9 @@ function Firmendaten($field,$projekt="")
break;
}
$this->GetArtikelSteuer($artikel, $ust_befreit, $aufwendung, $tmpsteuersatz, $tmpsteuertext, $erloes, $posRow['umsatzsteuer'], null, $projekt);
$this->GetArtikelSteuer($artikel, $ust_befreit, $aufwendung, $tmpsteuersatz, $tmpsteuertext, $erloes, $posRow['umsatzsteuer'], $ustid, $projekt);
$this->getErloesFirmendaten($artikel, $ust_befreit, $aufwendung, $tmpsteuersatzFD, $tmpsteuertextFD, $tmperloesFD, $posRow['umsatzsteuer'], null, $projekt);
$this->getErloesFirmendaten($artikel, $ust_befreit, $aufwendung, $tmpsteuersatzFD, $tmpsteuertextFD, $tmperloesFD, $posRow['umsatzsteuer'], $ustid, $projekt);
if (!$tmpsteuersatz) {
$tmpsteuersatz = $tmpsteuersatzFD;
@ -37538,7 +37445,7 @@ function Firmendaten($field,$projekt="")
WHERE ds.objekt LIKE 'Artikel' AND
ds.parameter = '%d' AND
(ds.subjekt LIKE 'Shopbild' OR ds.subjekt LIKE 'Druckbild' OR ds.subjekt LIKE 'Bild')
ORDER BY ds.subjekt LIKE 'Shopbild' DESC, ds.subjekt LIKE 'Druckbild' DESC
ORDER BY ds.subjekt LIKE 'Shopbild' DESC, ds.subjekt LIKE 'Druckbild' DESC, ds.sort
LIMIT 1",
$artikel)
);

View File

@ -1,6 +1,6 @@
<?php
/*
* SPDX-FileCopyrightText: 2022 Andreas Palm
* SPDX-FileCopyrightText: 2022-2024 Andreas Palm
* SPDX-FileCopyrightText: 2019 Xentral (c) Xentral ERP Software GmbH, Fuggerstrasse 11, D-86150 Augsburg, Germany
*
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
@ -20,6 +20,10 @@
*/
?>
<?php
use Xentral\Modules\Onlineshop\Data\OrderStatus;
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
use Xentral\Modules\Onlineshop\Data\Shipment;
use Xentral\Modules\Onlineshop\Data\ShopConnectorResponseInterface;
class Remote
@ -1214,8 +1218,10 @@ class Remote
$projektlager = $this->app->DB->Select("SELECT id FROM projekt WHERE id = $projekt AND projektlager = 1 LIMIT 1");
$tmp = new ObjGenArtikel($this->app);
$cartikel_arr = !empty($artikel_arr)?count($artikel_arr):0;
for($i=0;$i<$cartikel_arr;$i++)
{
$artikel = $artikel_arr[$i];
$lagerexport = $this->app->erp->GetArtikelShopEinstellung('autolagerlampe', $artikel, $shopexportarr);
$tmp->Select($artikel);
@ -1260,6 +1266,9 @@ class Remote
$data[$i]['uebersicht_de'] = htmlspecialchars($tmp->GetUebersicht_De(),ENT_QUOTES);
$data[$i]['uebersicht_en'] = htmlspecialchars($tmp->GetUebersicht_En(),ENT_QUOTES);
$data[$i]['herkunftsland'] = $tmp->GetHerkunftsland();
$data[$i]['texteuebertragen'] = $shopexportarr['texteuebertragen'];
if(method_exists($tmp,'GetMetadescription_De'))
{
$data[$i]['metadescription_de'] = $tmp->GetMetadescription_De();
@ -1891,7 +1900,7 @@ class Remote
'altersfreigabe' => $eigenschaft['altersfreigabe'], 'ean' => $eigenschaft['ean'],
'lag' => $matrixStock,
'pseudolager' => $matrixPseudoStorage, 'pseudopreis' => $eigenschaft['pseudopreis'],
'restmenge' => $eigenschaft['restmenge'], 'steuersatz' => ($steuer - 1) * 100,
'restmenge' => $eigenschaft['restmenge'], 'steuersatz' => ($steuer - 1) * 100, 'umsatzsteuer' => $eigenschaft['umsatzsteuer'],
'bruttopreis' => $eigenschaft['preis'] * $steuer, 'inaktiv' => $eigenschaft['inaktiv'],
'name_de' => $eigenschaft['name_de'], 'name_en' => $eigenschaft['name_en'],
'uebersicht_de' => $eigenschaft['uebersicht_de'], 'uebersicht_en' => $eigenschaft['uebersicht_en']);
@ -2295,133 +2304,58 @@ class Remote
return $result;
}
public function getDataToSendForUpdateOrder(int $shopId, int $orderId): array
public function getDataToSendForUpdateOrder(int $shopId, int $orderId): ?OrderStatusUpdateRequest
{
$orderArr = $this->app->DB->SelectRow("SELECT * FROM `auftrag` WHERE `id` = {$orderId} LIMIT 1");
$status = $orderArr['status'];
$zahlungsweise = $orderArr['zahlungsweise'];
$shopextid = $orderArr['shopextid'];
$internet = $orderArr['internet'];
$deliveryNoteArr = $this->app->DB->SelectRow(
"SELECT `id`, `versandart` FROM `lieferschein` WHERE `auftragid` = {$orderId} LIMIT 1"
);
$trackingArr = null;
$versandart = '';
$tracking = '';
$shippingProduct = null;
if(!empty($deliveryNoteArr)) {
$deliveryNoteId = $deliveryNoteArr['id'];
$versandart = $deliveryNoteArr['versandart'];
$query =
"SELECT *
FROM `shopexport_versandarten`
WHERE `aktiv`=1 AND `versandart_wawision` = '{$versandart}' AND `shop` = {$shopId} AND `versandart_wawision` <> ''
LIMIT 1";
$shippingMapping = $this->app->DB->SelectRow($query);
$versandartAusgehend = $shippingMapping['versandart_ausgehend'] ?? null;
$shippingProduct = $shippingMapping['produkt_ausgehend'] ?? null;
$orderArr = $this->app->DB->SelectRow("SELECT `zahlungsweise`, `shopextid` FROM `auftrag` WHERE `id` = $orderId LIMIT 1");
if (empty($orderArr))
return null;
if(!empty($versandartAusgehend)){
$versandart = $versandartAusgehend;
}
$trackingArr = $this->app->DB->SelectPairs(
sprintf(
"SELECT `id`, `tracking`
FROM `versand`
WHERE `lieferschein` = {$deliveryNoteId} AND `tracking` <> ''
ORDER BY `id` DESC"
)
);
$tracking = '';
if(!empty($trackingArr)) {
$tracking = reset($trackingArr);
$data = new OrderStatusUpdateRequest();
$data->orderId = $orderId;
$data->shopOrderId = $orderArr['shopextid'];
$statusArr = $this->app->DB->SelectFirstCols("SELECT DISTINCT status FROM auftrag WHERE id = $orderId OR teillieferungvon = $orderId");
if (in_array('storniert', $statusArr))
$data->orderStatus = OrderStatus::Cancelled;
if (in_array('abgeschlossen', $statusArr))
$data->orderStatus = OrderStatus::Completed;
if (in_array('freigegeben', $statusArr))
$data->orderStatus = OrderStatus::InProgress;
if (in_array('angelegt', $statusArr))
$data->orderStatus = OrderStatus::Imported;
$sql = "
SELECT
v.id,
v.tracking,
v.tracking_link,
COALESCE(sv.versandart_ausgehend, sv.versandart_shop, v.versandart) versandart
FROM
auftrag a
LEFT JOIN lieferschein l ON
l.auftragid = a.id
LEFT JOIN lieferschein_position lp ON
lp.lieferschein = l.id
LEFT JOIN versandpaket_lieferschein_position vlp ON
vlp.lieferschein_position = lp.id
LEFT JOIN versandpakete v ON
vlp.versandpaket = v.id OR v.lieferschein_ohne_pos = l.id
LEFT JOIN shopexport_versandarten sv ON
sv.versandart_wawision = v.versandart AND sv.shop = $shopId
WHERE a.id = $orderId OR a.teillieferungvon = $orderId
ORDER BY v.id";
$shipments = $this->app->DB->SelectArr($sql);
foreach ($shipments as $shipment) {
$item = new Shipment();
$item->id = $shipment['id'];
$item->trackingNumber = $shipment['tracking'];
$item->trackingUrl = $shipment['tracking_link'];
$item->shippingMethod = $shipment['versandart'];
$data->shipments[] = $item;
}
$positionen = $this->app->DB->SelectArr(
"SELECT ap.webid, trim(lp.geliefert)+0 AS `geliefert`, trim(lp.menge)+0 AS `menge`, lp.id
FROM `lieferschein_position` AS `lp`
INNER JOIN `lieferschein` AS `l` ON l.id = lp.lieferschein
INNER JOIN `auftrag` AS `a` ON a.id = l.auftragid
INNER JOIN `auftrag_position` AS `ap` ON ap.id = lp.auftrag_position_id
WHERE l.id = {$deliveryNoteId} AND ap.webid <> '' "
);
$allPositions = false;
if(!empty($positionen)) {
$allPositions = true;
foreach($positionen as $position) {
if($position['geliefert'] > 0) {
$itemlist[] = array('webid'=>$position['webid'],'quantity'=>$position['geliefert']);
if($position['geliefert'] < $position['menge']) {
$allPositions = false;
}
}
elseif($this->app->DB->Select("SELECT trim(sum(geliefert))+0
FROM lieferschein_position
WHERE explodiert_parent = '".$position['id']."' AND lieferschein = '$deliveryNoteId'")) {
$itemlist[] = array('webid'=>$position['webid'],'quantity'=>$position['menge']);
}
else {
$allPositions = false;
}
}
if($allPositions && (!empty($itemlist)?count($itemlist):0) <
$this->app->DB->Select(
sprintf('SELECT count(id) FROM auftrag_position WHERE auftrag = %d', $orderId)
)
) {
$allPositions = false;
}
}
}
if(!empty($itemlist)) {
$data['itemlist'] = $itemlist;
if($allPositions) {
$data['allpositions'] = 1;
}
}
$data['orderId'] = $orderId;
$data['auftrag'] = $shopextid;
$data['internet'] = $internet;
$data['zahlungsweise'] = $zahlungsweise;
$data['versandart'] = $versandart;
if(!empty($trackingArr)) {
$data['trackinglist'] = $trackingArr;
}
if($status==='abgeschlossen') {
$data['versand']='1';
$data['zahlung']='1';
if($shippingProduct !== null) {
$data['shipping_product'] = $shippingProduct;
}
if($tracking!='') {
$data['tracking']=$tracking;
$lastShippingId = (int)$this->app->DB->Select(
sprintf(
"SELECT `id` FROM `versand` WHERE `lieferschein` = %d AND `lieferschein` > 0
ORDER BY `id` DESC LIMIT 1",
$deliveryNoteId
)
);
$trackinglink = $lastShippingId > 0 && method_exists($this->app->erp,'GetTrackinglink')
?$this->app->erp->GetTrackinglink($lastShippingId):'';
if($trackinglink) {
$data['trackinglink'] = $trackinglink;
if(!empty($trackingArr)) {
foreach($trackingArr as $versandId => $track) {
$data['trackinglinklist'][$versandId] = $this->app->erp->GetTrackinglink($versandId);
}
}
}
$trackinglinkRaw = $lastShippingId > 0 && method_exists($this->app->erp,'GetTrackingRawLink')
?$this->app->erp->GetTrackingRawLink($lastShippingId):'';
if(!empty($trackinglinkRaw)) {
$data['trackinglinkraw'] = $trackinglinkRaw;
}
}
}
return $data;
return $data;
}
/**
@ -2432,9 +2366,10 @@ class Remote
*/
public function RemoteUpdateAuftrag($shopId, $orderId)
{
$data = $this->getDataToSendForUpdateOrder((int)$shopId, (int)$orderId);
if($data['versand']=='1' || $data['zahlung']=='1')
{
$data = $this->getDataToSendForUpdateOrder((int)$shopId, (int)$orderId);
if($data?->orderStatus !== OrderStatus::Completed)
return;
$bearbeiter = 'Cronjob';
if(isset($this->app->User)){
$bearbeiter = $this->app->DB->real_escape_string($this->app->User->GetName());
@ -2459,7 +2394,6 @@ class Remote
$this->app->erp->AuftragProtokoll($orderId, 'Versandmeldung an Shop &uuml;bertragen', $bearbeiter);
$this->app->DB->Update("UPDATE `auftrag` SET `shopextstatus` = 'abgeschlossen' WHERE `id` = $orderId LIMIT 1");
}
}
/**

View File

@ -57,12 +57,6 @@ abstract class Versanddienstleister
if ($rechnungId <= 0)
$rechnungId = $this->app->DB->Select("SELECT rechnungid FROM lieferschein WHERE id='$lieferscheinId' LIMIT 1");
}
if ($sid === 'versand') {
$versandId = $id;
$lieferscheinId = $this->app->DB->Select("SELECT lieferschein FROM versand WHERE id='$versandId' LIMIT 1");
$rechnungId = $this->app->DB->Select("SELECT rechnung FROM versand WHERE id='$versandId' LIMIT 1");
$sid = 'lieferschein';
}
if ($auftragId <= 0 && $rechnungId > 0)
$auftragId = $this->app->DB->Select("SELECT auftragid FROM rechnung WHERE id=$rechnungId LIMIT 1");
@ -469,6 +463,7 @@ abstract class Versanddienstleister
CustomsInfo::CUSTOMS_TYPE_RETURN => 'Rücksendung'
];
$json['messages'] = [];
$json['submitting'] = false;
$json['form']['services'] = [
Product::SERVICE_PREMIUM => false
];

View File

@ -41,8 +41,15 @@ class AngebotPDF extends BriefpapierCustom {
{
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
$check = $this->app->erp->SteuerAusBeleg($this->doctype,$id);
if(!empty($check)?count($check):0>1)$this->ust_spalteausblende=false;
else $this->ust_spalteausblende=true;
$this->ust_spalteausblende=false;
if(!empty($check)) {
if (count($check) == 1) {
$this->ust_spalteausblende=true;
}
}
}
$briefpapier_bearbeiter_ausblenden = $this->app->erp->Firmendaten('briefpapier_bearbeiter_ausblenden');
@ -491,30 +498,29 @@ class AngebotPDF extends BriefpapierCustom {
"rabatt"=>$value['rabatt'],
"steuertext"=>$value['steuertext']));
if($positionenkaufmaenischrunden == 3){
$netto_gesamt = $value['menge'] * round($value['preis'] - ($value['preis'] / 100 * $value['rabatt']),2);
}else{
if (!$value['nicht_einrechnen']) {
$netto_gesamt = $value['menge'] * round($value['preis'] - ($value['preis'] / 100 * $value['rabatt']),2);
}
}else if (!$value['nicht_einrechnen']) {
$netto_gesamt = $value['menge'] * ($value['preis'] - ($value['preis'] / 100 * $value['rabatt']));
}
if($positionenkaufmaenischrunden)
{
$netto_gesamt = round($netto_gesamt, 2);
}
if($value['optional']!="1"){
if(!isset($summen[$value['steuersatz']])) {
$summen[$value['steuersatz']] = 0;
}
if($value['optional']!="1"){
if($value['explodiert_parent'] == 0 || !$berechnen_aus_teile)
{
$summe = $summe + $netto_gesamt;
if(!isset($summen[$value['steuersatz']]))$summen[$value['steuersatz']] = 0;
$summen[$value['steuersatz']] += ($netto_gesamt/100)*$value['steuersatz'];
$summe = $summe + $netto_gesamt;
$gesamtsteuern +=($netto_gesamt/100)*$value['steuersatz'];
}
/*
if($value['umsatzsteuer']=="" || $value['umsatzsteuer']=="normal")
{
$summeV = $summeV + (($netto_gesamt/100)*$this->app->erp->GetSteuersatzNormal(false,$id,"angebot"));
}
else {
$summeR = $summeR + (($netto_gesamt/100)*$this->app->erp->GetSteuersatzErmaessigt(false,$id,"angebot"));
}*/
}
} else {
$summe_netto_optional += $netto_gesamt;
$steuern_optional +=($netto_gesamt/100)*$value['steuersatz'];
}
}
@ -536,7 +542,7 @@ class AngebotPDF extends BriefpapierCustom {
if($this->app->erp->AngebotMitUmsatzeuer($id))
{
$this->setTotals(array("totalArticles"=>$summe,"total"=>$summe + $gesamtsteuern,"summen"=>$summen,"totalTaxV"=>0,"totalTaxR"=>0));
$this->setTotals(array("totalArticles"=>$summe,"total"=>$summe + $gesamtsteuern,"summen"=>$summen,"totalTaxV"=>0,"totalTaxR"=>0,"optional"=>$summe_netto_optional+$steuern_optional,"optional_netto"=>$summe_netto_optional));
//$this->setTotals(array("totalArticles"=>$summe,"totalTaxV"=>$summeV,"totalTaxR"=>$summeR,"total"=>$summe+$summeV+$summeR));
} else {
$this->setTotals(array("totalArticles"=>$summe,"total"=>$summe));

View File

@ -43,8 +43,13 @@ class AuftragPDF extends BriefpapierCustom {
{
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
$check = $this->app->erp->SteuerAusBeleg($this->doctype,$id);
if(!empty($check)?count($check):0>1)$this->ust_spalteausblende=false;
else $this->ust_spalteausblende=true;
$this->ust_spalteausblende=false;
if(!empty($check)) {
if (count($check) == 1) {
$this->ust_spalteausblende=true;
}
}
}
$briefpapier_bearbeiter_ausblenden = $this->app->erp->Firmendaten('briefpapier_bearbeiter_ausblenden');

View File

@ -658,7 +658,7 @@ class Briefpapier extends SuperFPDF {
public function addItem($rdata){
// add rabatt
if($rdata['price']!='-'){
if($rdata['price']!='-' && is_numeric($rdata['price'])){
if($rdata['rabatt'] == 100){
$rdata['tprice'] = round($rdata['amount'] * ((double)$rdata['price'] - (double)($rdata['price'] / 100.00 * (double)$rdata['rabatt'])), 13);
}else{
@ -1775,7 +1775,12 @@ class Briefpapier extends SuperFPDF {
$total=$totalFullTax=$totalReducedTax=0;
$citems = !empty($this->items)?count($this->items):0;
for($i=0;$i<$citems;$i++) {
$total += $this->items[$i]['tprice'];
if (!$this->items[$i]['optional']) {
$total += $this->items[$i]['tprice'];
} else {
$totalOptional += $this->items[$i]['tprice'];
}
if($this->items[$i]['tax']=="USTV") {
$totalFullTax+= $this->items[$i]['tprice']*USTV;
}
@ -1783,7 +1788,7 @@ class Briefpapier extends SuperFPDF {
$totalReducedTax+= $this->items[$i]['tprice']*USTR;
}
}
return array($total,$totalFullTax,$totalReducedTax);
return array($total,$totalFullTax,$totalReducedTax,$totalOptional);
}
function GetFont()
@ -1807,7 +1812,7 @@ class Briefpapier extends SuperFPDF {
$result = $this->app->erp->Firmendaten($key);
}
if (empty($result)) {
$result = 0;
$result = null;
}
return($result);
}
@ -2022,10 +2027,15 @@ class Briefpapier extends SuperFPDF {
//FREITEXT1
$freitext1aktiv = $this->getStyleElement('freitext1aktiv');
if($freitext1aktiv){
$freitext1inhalt = $this->app->erp->Beschriftung("freitext1inhalt");
if($freitext1inhalt=="") $freitext1inhalt = $this->getStyleElement('freitext1inhalt');
$freitext1inhalt = $this->app->erp->ParseUserVars($this->table,$this->id,$freitext1inhalt);
if (!empty($this->table)) {
$freitext1inhalt = $this->app->erp->ParseUserVars($this->table,$this->id,$freitext1inhalt);
}
$freitext1inhalt = $this->app->erp->ReadyForPDF($freitext1inhalt);
$freitext1schriftgroesse = $this->getStyleElement('freitext1schriftgroesse');
$freitext1y = $this->getStyleElement('freitext1y');
@ -2044,7 +2054,10 @@ class Briefpapier extends SuperFPDF {
$freitext2inhalt = $this->app->erp->Beschriftung("freitext2inhalt");
if($freitext2inhalt=="") $freitext1inhalt = $this->getStyleElement('freitext2inhalt');
$freitext2inhalt = $this->app->erp->ParseUserVars($this->table,$this->id,$freitext2inhalt);
if (!empty($this->table)) {
$freitext2inhalt = $this->app->erp->ParseUserVars($this->table,$this->id,$freitext2inhalt);
}
$freitext2inhalt = $this->app->erp->ReadyForPDF($freitext2inhalt);
$freitext2schriftgroesse = $this->getStyleElement('freitext2schriftgroesse');
$freitext2y = $this->getStyleElement('freitext2y');
@ -2498,7 +2511,6 @@ class Briefpapier extends SuperFPDF {
}
public function renderItems() {
$this->app->erp->RunHook('briefpapier_renderitems',1, $this);
// if($this->bestellungohnepreis) $this->doctype="lieferschein";
$posWidth = $this->getStyleElement("breite_position");
@ -2942,7 +2954,6 @@ class Briefpapier extends SuperFPDF {
if($this->doctype!=='zahlungsavis')
{
if($item['tax']!=='hidden'){
if($anzeigeBelegNettoAdrese){
//if(($this->anrede=="firma" || $this->app->erp->AnzeigeBelegNetto($this->anrede,$projekt) || $this->doctype=="bestellung" || $this->getStyleElement("immernettorechnungen",$projekt)=="1")
//&& $this->getStyleElement("immerbruttorechnungen",$projekt)!="1")
@ -3068,16 +3079,18 @@ class Briefpapier extends SuperFPDF {
// && $this->getStyleElement("immerbruttorechnungen",$projekt)!="1")
{
if(!$inventurohnepreis){
$this->Cell_typed($priceWidth,$cellhoehe,$item['ohnepreis']?'':$this->formatMoney((double)$item['tprice']),0,0,'R');
// $this->Cell_typed($priceWidth,$cellhoehe,$item['ohnepreis']?'':$this->formatMoney((double)$item['tprice']),0,0,'R');
$price_displayed = $item['ohnepreis']?'':$this->formatMoney((double)$item['tprice']);
}
}
else{
if(!$inventurohnepreis){
$this->Cell_typed($priceWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
// $this->Cell_typed($priceWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
$price_displayed = $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']);
}
}
$this->Cell_typed($rabattWidth,$cellhoehe,"",0,0,'R');
// $this->Cell_typed($rabattWidth,$cellhoehe,"",0,0,'R');
}
}
}
@ -3093,7 +3106,7 @@ class Briefpapier extends SuperFPDF {
$this->Cell_typed($priceWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['price'] * $item['tmptax']), 0, 0, 'R');
}
}
}
}
//$this->Cell_typed($sumWidth,$cellhoehe,$this->formatMoney($item['tprice']).' '.$item['currency'],0,0,'R');
if($this->rabatt=='1')
{
@ -3107,12 +3120,14 @@ class Briefpapier extends SuperFPDF {
//if(($this->anrede=="firma" || $this->app->erp->AnzeigeBelegNetto($this->anrede,$projekt) || $this->doctype=="bestellung" || $this->getStyleElement("immernettorechnungen",$projekt)=="1")
// && $this->getStyleElement("immerbruttorechnungen",$projekt)!="1")
if(!$inventurohnepreis){
$this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']), 0, 0, 'R');
// $this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']), 0, 0, 'R');
$price_displayed = $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']);
}
}
else{
if(!$inventurohnepreis){
$this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
// $this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
$price_displayed = $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']);
}
}
}
@ -3121,18 +3136,29 @@ class Briefpapier extends SuperFPDF {
// if(($this->anrede=="firma" || $this->app->erp->AnzeigeBelegNetto($this->anrede,$projekt) || $this->doctype=="bestellung" || $this->getStyleElement("immernettorechnungen",$projekt)=="1")
// && $this->getStyleElement("immerbruttorechnungen",$projekt)!="1")
if(!$inventurohnepreis){
$this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']), 0, 0, 'R');
// $this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']), 0, 0, 'R');
$price_displayed = $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice']);
}
}
else{
if(!$inventurohnepreis){
$this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
// $this->Cell_typed($sumWidth, $cellhoehe, $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']), 0, 0, 'R');
$price_displayed = $item['ohnepreis'] ? '' : $this->formatMoney((double)$item['tprice'] * $item['tmptax']);
}
}
}
}
}
// OpenXE add price here
if (!empty($price_displayed)) {
if ($item['optional']) {
$this->Cell_typed($sumWidth, $cellhoehe, "(".$price_displayed.")", 0, 0, 'R');
} else {
$this->Cell_typed($sumWidth, $cellhoehe, $price_displayed, 0, 0, 'R');
}
}
}
else if(($this->doctype==='lieferschein' || $this->doctype==='preisanfrage') && $this->getStyleElement('artikeleinheit')=='1')
{
@ -4008,7 +4034,7 @@ class Briefpapier extends SuperFPDF {
}
$beschriftung_zeile = ucfirst($zwischenpositionen[$i]['postype']);
if($data['name']=="")
$html = ($fett?"<b>":"").$beschriftung_zeile.($fett?"</b>":"");
else
@ -4029,10 +4055,10 @@ class Briefpapier extends SuperFPDF {
$abstand_links = $posWidth +$itemNoWidth;
}
$this->SetX($x+$abstand_links);
$text = $this->WriteHTML($html);
$text = empty($text)?"":$text;
$this->SetX($x+$abstand_links);
$text = $this->WriteHTML($html);
$text = empty($text)?"":$text;
$this->Cell_typed($descWidth,4,);
$this->SetX($x+$abstand_links+$descWidth);
@ -4279,7 +4305,7 @@ class Briefpapier extends SuperFPDF {
$this->Cell_typed(40,3,'',0,0,'R');
}
$this->Ln();
}
}
$this->SetY($this->GetY()+2);
//$this->Line(110, $this->GetY(), 190,$this->GetY());
}
@ -4320,6 +4346,16 @@ class Briefpapier extends SuperFPDF {
$this->Line($differenz_wegen_abstand+5, $this->GetY(), 210-$this->getStyleElement('abstand_seitenrandrechts'),$this->GetY());
$this->Line($differenz_wegen_abstand+5, $this->GetY()+1, 210-$this->getStyleElement('abstand_seitenrandrechts'),$this->GetY()+1);
}
if(!empty($this->totals['optional'])) {
$this->SetFont($this->GetFont(),'',$this->getStyleElement('schriftgroesse_gesamt'));
$this->Ln(2);
$this->Cell_typed($differenz_wegen_abstand,1,'',0);
$this->Cell_typed(30,5,"(".$this->app->erp->Beschriftung('dokument_gesamt_optional'),0,0,'L');
$this->Cell_typed(40,5,$this->formatMoney(round($this->totals['optional'],2), 2).' '.$this->waehrung.")",0,0,'R');
$this->Ln();
}
$this->SetY($this->GetY()+10);
}

View File

@ -1,201 +1,202 @@
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
<?php
use Xentral\Components\Barcode\BarcodeFactory;
include_once "class.superfpdf.php";
class EtikettenPDF extends SuperFPDF {
function __construct($app,$projekt="") {
$this->app=$app;
$this->page_definded=false;
}
function SetXML($xml)
{
if(empty($xml))return;
$xml = str_replace('&','&amp;', $xml);
try {
$label = new SimpleXMLElement($xml);
} catch (Exception $e) {
return;
}
foreach($label as $key=>$items)
{
switch($key)
{
case "settings":
if(!$this->page_definded)
{
parent::__construct('P','mm',array(trim($items->attributes()->width),trim($items->attributes()->height)));
$this->page_definded = true;
}
$this->SetAutoPageBreak(false);
$this->SetFont('Arial','B',4);
$this->SetLeftMargin(0);
$this->SetMargins(0,0,0);
$this->AddPage();
break;
case "line":
$this->SetXY(trim($items->attributes()->x),$items->attributes()->y,$items[0]);
$this->SetFont('Arial','',$items->attributes()->size*2);
$this->MultiCell(0,$items->attributes()->size,$items[0],0,'L');
break;
case "rectangle":
$attributes = $items->attributes();
$borderwidth = 1;
if(isset($attributes->size))$borderwidth = $attributes->size;
$this->SetLineWidth($borderwidth / 10);
$this->Rect($items->attributes()->x, $items->attributes()->y,trim($items->attributes()->width),trim($items->attributes()->height),'B');
break;
case "image":
$filename = '';
if(isset($items->attributes()->src))
{
$src = str_replace('&amp;','&',$items->attributes()->src);
if(stripos($src,'http://') === false && stripos($src,'https://') === false)
{
$src = 'http://'.$src;
}
$content = file_get_contents($src);
if($content)
{
$filename = rtrim($this->app->erp->GetTMP(),'/').'/'.md5(microtime(true).$items[0]);
file_put_contents($filename.'1.jpg', $content);
$bildbreite = trim($items->attributes()->width);
$bildhoehe = trim($items->attributes()->height);
if(!class_exists('image'))include_once(__DIR__.'/../class.image.php');
$img = new image($this->app);
if($bildbreite > 0)
{
$breite = $bildbreite;
}else{
$breite = 30;
}
if($bildhoehe > 0)
{
$hoehe = $bildhoehe;
}else{
$hoehe = $breite;
}
$_breite = $breite;
$_hoehe = $hoehe;
list($width, $height) = getimagesize($filename.'1.jpg');
if($width > 0 && $height > 0)
{
$scalex = $breite / $width;
$scaley = $hoehe / $height;
if($scalex < $scaley)
{
$hoehe /= $scaley / $scalex;
$hoehe = ceil($hoehe);
}else{
$breite /= $scalex / $scaley;
$breite = ceil($breite);
}
$str = $content;
$manipulator = new ImageManipulator($str);
$manipulator->resample($_breite*10, $_hoehe*10, false,true, true);
$typ = IMAGETYPE_JPEG;
$manipulator->save($filename.'2.jpg', $typ);
$items[0] = $filename.'2.jpg';
}
}
}
$type = exif_imagetype ( trim($items[0]) );
switch($type)
{
case IMAGETYPE_GIF: $type="gif"; break;
case IMAGETYPE_JPEG: $type="jpg"; break;
case IMAGETYPE_PNG: $type="png"; break;
default: $type="";
}
if($type!="")
{
$this->Image(trim($items[0]),trim($items->attributes()->x),trim($items->attributes()->y),trim($items->attributes()->width),trim($items->attributes()->height),$type);
}
if($filename != '')
{
unlink($filename.'1.jpg');
unlink($filename.'2.jpg');
}
break;
case "barcode":
if((String)($items->attributes()->type)=="E30") {
$this->EAN13($items->attributes()->x,$items->attributes()->y, $items[0],$items->attributes()->size);
}
else if((String)($items->attributes()->type)=="Code128" || (String)($items->attributes()->type)=="1") {
$this->Code128($items->attributes()->x, $items->attributes()->y, $items[0], $items->attributes()->width, $items->attributes()->size);
}
else if((String)($items->attributes()->type)=="GS1-128" || (String)($items->attributes()->type)=="1") {
//$items[0] = "!FNC1!0104012345012345!FNC1!081231!FNC1!1012345";
$tmp =explode("!FNC1!",$items[0]);
$codewithfnc1 = implode(chr(206),$tmp);
//echo chr(206)."0104012345012345".chr(206)."081231".chr(206)."1012345";
//$this->Code128($items->attributes()->x, $items->attributes()->y, chr(206)."0104012345012345".chr(206)."081231".chr(206)."1012345", $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
$this->Code128($items->attributes()->x, $items->attributes()->y, $codewithfnc1, $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
//$this->Code128($items->attributes()->x, $items->attributes()->y, chr(206).$items[0], $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
}
else { // standard auf 2 bzw default
$this->Code39($items->attributes()->x,$items->attributes()->y, $items[0], 0.5, $items->attributes()->size);//, $printText=false)
}
break;
case "qrcode":
/** @var BarcodeFactory $factory */
$factory = $this->app->Container->get('BarcodeFactory');
$ecLevel = 'M';
$type = 'png';
$filename = rtrim($this->app->erp->GetTMP(),'/').'/'.md5(microtime(true).$items[0]).'.' . $type;
$qrText = (string) $items[0];
$qrcode = $factory->createQrCode($qrText, $ecLevel);
$width = $items->attributes()->width ?? $items->attributes()->size;
$height = $items->attributes()->height ?? $items->attributes()->size;
$image = $qrcode->toPng(trim($width), trim($height));
if(file_put_contents($filename, $image) === false) {
throw new RuntimeException('qrcode image cannot be created. Perhaps due to missing write permission');
}
unset($image);
$this->Image(
trim($filename),
trim((int) $items->attributes()->x),
trim((int) $items->attributes()->y),
trim((int) $width),
trim((int) $height),
$type
);
unlink($filename);
break;
}
}
}
}
<?php
use Xentral\Components\Barcode\BarcodeFactory;
include_once "class.superfpdf.php";
class EtikettenPDF extends SuperFPDF {
function __construct($app,$projekt="") {
$this->app=$app;
$this->page_definded=false;
$this->images = array();
}
function SetXML($xml)
{
if(empty($xml))return;
$xml = str_replace('&','&amp;', $xml);
try {
$label = new SimpleXMLElement($xml);
} catch (Exception $e) {
return;
}
foreach($label as $key=>$items)
{
switch($key)
{
case "settings":
if(!$this->page_definded)
{
parent::__construct('P','mm',array(trim($items->attributes()->width),trim($items->attributes()->height)));
$this->page_definded = true;
}
$this->SetAutoPageBreak(false);
$this->SetFont('Arial','B',4);
$this->SetLeftMargin(0);
$this->SetMargins(0,0,0);
$this->AddPage();
break;
case "line":
$this->SetXY(trim($items->attributes()->x),$items->attributes()->y,$items[0]);
$this->SetFont('Arial','',$items->attributes()->size*2);
$this->MultiCell(0,$items->attributes()->size,$items[0],0,'L');
break;
case "rectangle":
$attributes = $items->attributes();
$borderwidth = 1;
if(isset($attributes->size))$borderwidth = $attributes->size;
$this->SetLineWidth($borderwidth / 10);
$this->Rect($items->attributes()->x, $items->attributes()->y,trim($items->attributes()->width),trim($items->attributes()->height),'B');
break;
case "image":
$filename = '';
if(isset($items->attributes()->src))
{
$src = str_replace('&amp;','&',$items->attributes()->src);
if(stripos($src,'http://') === false && stripos($src,'https://') === false)
{
$src = 'http://'.$src;
}
$content = file_get_contents($src);
if($content)
{
$filename = rtrim($this->app->erp->GetTMP(),'/').'/'.md5(microtime(true).$items[0]);
file_put_contents($filename.'1.jpg', $content);
$bildbreite = trim($items->attributes()->width);
$bildhoehe = trim($items->attributes()->height);
if(!class_exists('image'))include_once(__DIR__.'/../class.image.php');
$img = new image($this->app);
if($bildbreite > 0)
{
$breite = $bildbreite;
}else{
$breite = 30;
}
if($bildhoehe > 0)
{
$hoehe = $bildhoehe;
}else{
$hoehe = $breite;
}
$_breite = $breite;
$_hoehe = $hoehe;
list($width, $height) = getimagesize($filename.'1.jpg');
if($width > 0 && $height > 0)
{
$scalex = $breite / $width;
$scaley = $hoehe / $height;
if($scalex < $scaley)
{
$hoehe /= $scaley / $scalex;
$hoehe = ceil($hoehe);
}else{
$breite /= $scalex / $scaley;
$breite = ceil($breite);
}
$str = $content;
$manipulator = new ImageManipulator($str);
$manipulator->resample($_breite*10, $_hoehe*10, false,true, true);
$typ = IMAGETYPE_JPEG;
$manipulator->save($filename.'2.jpg', $typ);
$items[0] = $filename.'2.jpg';
}
}
}
$type = exif_imagetype ( trim($items[0]) );
switch($type)
{
case IMAGETYPE_GIF: $type="gif"; break;
case IMAGETYPE_JPEG: $type="jpg"; break;
case IMAGETYPE_PNG: $type="png"; break;
default: $type="";
}
if($type!="")
{
$this->Image(trim($items[0]),trim($items->attributes()->x),trim($items->attributes()->y),trim($items->attributes()->width),trim($items->attributes()->height),$type);
}
if($filename != '')
{
unlink($filename.'1.jpg');
unlink($filename.'2.jpg');
}
break;
case "barcode":
if((String)($items->attributes()->type)=="E30") {
$this->EAN13($items->attributes()->x,$items->attributes()->y, $items[0],$items->attributes()->size);
}
else if((String)($items->attributes()->type)=="Code128" || (String)($items->attributes()->type)=="1") {
$this->Code128($items->attributes()->x, $items->attributes()->y, $items[0], $items->attributes()->width, $items->attributes()->size);
}
else if((String)($items->attributes()->type)=="GS1-128" || (String)($items->attributes()->type)=="1") {
//$items[0] = "!FNC1!0104012345012345!FNC1!081231!FNC1!1012345";
$tmp =explode("!FNC1!",$items[0]);
$codewithfnc1 = implode(chr(206),$tmp);
//echo chr(206)."0104012345012345".chr(206)."081231".chr(206)."1012345";
//$this->Code128($items->attributes()->x, $items->attributes()->y, chr(206)."0104012345012345".chr(206)."081231".chr(206)."1012345", $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
$this->Code128($items->attributes()->x, $items->attributes()->y, $codewithfnc1, $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
//$this->Code128($items->attributes()->x, $items->attributes()->y, chr(206).$items[0], $items->attributes()->width, $items->attributes()->size); // 206 = FNC1
}
else { // standard auf 2 bzw default
$this->Code39($items->attributes()->x,$items->attributes()->y, $items[0], 0.5, $items->attributes()->size);//, $printText=false)
}
break;
case "qrcode":
/** @var BarcodeFactory $factory */
$factory = $this->app->Container->get('BarcodeFactory');
$ecLevel = 'M';
$type = 'png';
$filename = rtrim($this->app->erp->GetTMP(),'/').'/'.md5(microtime(true).$items[0]).'.' . $type;
$qrText = (string) $items[0];
$qrcode = $factory->createQrCode($qrText, $ecLevel);
$width = $items->attributes()->width ?? $items->attributes()->size;
$height = $items->attributes()->height ?? $items->attributes()->size;
$image = $qrcode->toPng(trim($width), trim($height));
if(file_put_contents($filename, $image) === false) {
throw new RuntimeException('qrcode image cannot be created. Perhaps due to missing write permission');
}
unset($image);
$this->Image(
trim($filename),
trim((int) $items->attributes()->x),
trim((int) $items->attributes()->y),
trim((int) $width),
trim((int) $height),
$type
);
unlink($filename);
break;
}
}
}
}

View File

@ -43,8 +43,13 @@ class GutschriftPDF extends BriefpapierCustom {
{
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
$check = $this->app->erp->SteuerAusBeleg($this->doctype,$id);
if(!empty($check)?count($check):0>1)$this->ust_spalteausblende=false;
else $this->ust_spalteausblende=true;
$this->ust_spalteausblende=false;
if(!empty($check)) {
if (count($check) == 1) {
$this->ust_spalteausblende=true;
}
}
}
$briefpapier_bearbeiter_ausblenden = $this->app->erp->Firmendaten('briefpapier_bearbeiter_ausblenden');

View File

@ -50,8 +50,13 @@ class RechnungPDF extends BriefpapierCustom {
{
// pruefe ob es mehr als ein steuersatz gibt // wenn ja dann darf man sie nicht ausblenden
$check = $this->app->erp->SteuerAusBeleg($this->doctype,$id);
if(!empty($check)?count($check):0>1)$this->ust_spalteausblende=false;
else $this->ust_spalteausblende=true;
$this->ust_spalteausblende=false;
if(!empty($check)) {
if (count($check) == 1) {
$this->ust_spalteausblende=true;
}
}
}
$lvl = null;
$briefpapier_bearbeiter_ausblenden = $this->app->erp->Firmendaten('briefpapier_bearbeiter_ausblenden');

View File

@ -229,7 +229,7 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
</table>
</div>
<div>
<input class="btnGreen" type="submit" value="{|Paketmarke drucken|}" name="drucken">&nbsp;
<input class="btnGreen" type="submit" value="{|Paketmarke drucken|}" name="drucken" :disabled="submitting">&nbsp;
<!--<input type="button" value="{|Andere Versandart auswählen|}" name="anders">&nbsp;-->
</div>
</div>
@ -239,6 +239,9 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
const createshipmentapp = new Vue({
el: '#createshipmentapp',
data: [JSON],
mounted() {
this.autoselectproduct();
},
computed: {
total_value() {
let sum = 0;
@ -258,12 +261,14 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
methods: {
submit: function () {
let app = this;
app.submitting = true;
let xhr = new XMLHttpRequest();
xhr.open('POST', location.href, true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onload = function () {
let json = JSON.parse(this.response);
app.messages = json.messages;
app.submitting = false;
}
xhr.send(JSON.stringify($.extend({submit:'print'}, this.form)));
},
@ -287,17 +292,20 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
},
customsRequired: function () {
return this.countries[this.form.country].eu == '0';
},
autoselectproduct: function () {
if (!this.productAvailable(this.products[this.form.product])) {
for (prod in this.products) {
if (!this.productAvailable(this.products[prod]))
continue;
this.form.product = prod;
break;
}
}
}
},
beforeUpdate: function () {
if (!this.productAvailable(this.products[this.form.product])) {
for (prod in this.products) {
if (!this.productAvailable(this.products[prod]))
continue;
this.form.product = prod;
break;
}
}
this.autoselectproduct();
}
})
</script>

File diff suppressed because it is too large Load Diff

View File

@ -3387,7 +3387,7 @@ function AdresseLieferadresse()
$this->app->Tpl->Set('ADRESSID',$id);
$adresstypen = $this->app->DB->SelectArr("SELECT type, bezeichnung FROM adresse_typ WHERE aktiv = 1 AND geloescht = 0".$this->app->erp->ProjektRechte());
$adresstypen = $this->app->DB->SelectArr("SELECT type, bezeichnung FROM adresse_typ WHERE aktiv = 1 AND geloescht = 0");
$laender = $this->app->erp->GetSelectLaenderliste();

View File

@ -3848,10 +3848,13 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
$term = str_replace(',','',$term);
}
$adresse = (int)$this->app->Secure->GetGET('adresse');
if (!empty($adresse)) {
$subwhere .= " AND a.id = ".$adresse;
}
$sql =
"SELECT CONCAT(v.id,
IF(IFNULL(v.belegnr, '') <> '' AND v.belegnr!=v.id,
CONCAT(' Nr. ',v.belegnr),''),
"SELECT CONCAT(v.belegnr,
' Betrag: ',".$this->app->erp->FormatPreis('v.betrag',2).",
if(v.skonto <> 0,CONCAT(' mit Skonto ',v.skonto,'% ',
".$this->app->erp->FormatPreis("v.betrag-((v.betrag/100.0)*v.skonto)",2)."),''),' ',
@ -3864,7 +3867,7 @@ select a.kundennummer, (SELECT name FROM adresse a2 WHERE a2.kundennummer = a.ku
a.name,' (Lieferant ',a.lieferantennummer,if(a.lieferantennummer_buchhaltung!='' AND a.lieferantennummer <> a.lieferantennummer_buchhaltung,CONCAT(' ',a.lieferantennummer_buchhaltung),''),') RE ',v.rechnung,' Rechnungsdatum ',DATE_FORMAT(v.rechnungsdatum,'%d.%m.%Y')) as bezeichnung
FROM verbindlichkeit AS v
LEFT JOIN adresse AS a ON a.id=v.adresse
WHERE ($subwhere) AND bezahlt!=1 AND status!='storniert'
WHERE ($subwhere) AND bezahlt!=1 AND status!='storniert' AND belegnr <> ''
ORDER by v.id DESC"; //AND v.status!='bezahlt' // heute wieder raus
$arr = $this->app->DB->SelectArr($sql);

View File

@ -307,21 +307,52 @@ class Angebot extends GenAngebot
{
$id = $this->app->Secure->GetGET('id');
if(!$this->app->DB->Select("SELECT deckungsbeitragcalc FROM angebot WHERE id='$id' LIMIT 1")) {
$this->app->erp->BerechneDeckungsbeitrag($id,'angebot');
// Deckungsbeitrag
if (!$this->app->erp->RechteVorhanden('angebot','einkaufspreise')) {
$this->app->Tpl->Set('DBHIDDEN','hidden');
} else {
$sql = "
SELECT
umsatz_netto_gesamt,
artikel,
menge,
einkaufspreis
FROM
`angebot_position`
WHERE
`angebot` = ".$id."
";
$positionen = $this->app->DB->SelectArr($sql);
$umsatz_gesamt = 0;
$kosten_gesamt = 0;
$db_gesamt = 0;
foreach ($positionen as $position) {
if (empty($position['einkaufspreis'])) {
$position['einkaufspreis'] = $this->app->erp->GetEinkaufspreis($position['artikel'],$position['menge']);
}
$kosten = ($position['einkaufspreis']*$position['menge']);
$db_gesamt += $position['umsatz_netto_gesamt']-$kosten;
$kosten_gesamt += $kosten;
$umsatz_gesamt += $position['umsatz_netto_gesamt'];
}
$this->app->Tpl->Set('NETTOGESAMT',$this->app->erp->number_format_variable($umsatz_gesamt,2));
$this->app->Tpl->Set('KOSTEN',$this->app->erp->number_format_variable($kosten_gesamt,2));
$this->app->Tpl->Set('DECKUNGSBEITRAG',$this->app->erp->number_format_variable($db_gesamt,2));
$this->app->Tpl->Set( 'DBPROZENT',
$umsatz_gesamt==0?
"-":
$this->app->erp->number_format_variable(
round(
$db_gesamt/$umsatz_gesamt*100,2
)
)."%"
);
}
$auftragArr = $this->app->DB->SelectArr("SELECT * FROM angebot WHERE id='$id' LIMIT 1");
$kundennummer = $this->app->DB->Select("SELECT kundennummer FROM adresse WHERE id='{$auftragArr[0]['adresse']}' LIMIT 1");
$projekt = $this->app->DB->Select("SELECT abkuerzung FROM projekt WHERE id='{$auftragArr[0]['projekt']}' LIMIT 1");
$kundenname = $this->app->DB->Select("SELECT name FROM adresse WHERE id='{$auftragArr[0]['adresse']}' LIMIT 1");
$this->app->Tpl->Set('KUNDE',"<a href=\"index.php?module=adresse&action=edit&id=".$auftragArr[0]['adresse']."\" target=\"_blank\">".$kundennummer."</a> ".$kundenname);
//$this->app->Tpl->Set('KUNDE',$kundennummer." ".$kundenname);
$this->app->Tpl->Set('DECKUNGSBEITRAG',0);
$this->app->Tpl->Set('DBPROZENT',0);
if($this->app->erp->RechteVorhanden('projekt','dashboard')){
$this->app->Tpl->Set('PROJEKT', "<a href=\"index.php?module=projekt&action=dashboard&id=" . $auftragArr[0]['projekt'] . "\" target=\"_blank\">$projekt</a>");
}
@ -1694,6 +1725,11 @@ class Angebot extends GenAngebot
$this->app->erp->AnsprechpartnerAlsLieferadresseButton($adresse);
$this->app->erp->AdresseAlsLieferadresseButton($adresse);
}
if ($schreibschutz != 1 AND $status != 'abgeschlossen') {
$this->app->erp->BerechneDeckungsbeitrag($id,'angebot');
}
if($nummer!="")
{

View File

@ -488,7 +488,7 @@ class Artikel extends GenArtikel {
$joins .= $joineig;
$menu = "<a href=\"#\" class=\"articlematrix-quickadd\" data-id=\"%value%\" data-insert-url=\"index.php?module=artikel&action=profisuche&id=%value%&cmd=$cmd&sid=$id&insert=true&fmodul=$fmodul\"><img src=\"themes/{$this->app->Conf->WFconf['defaulttheme']}/images/add.png\" border=\"0\"></a>";
// $menu = "<a href=\"#\" class=\"articlematrix-quickadd\" data-id=\"%value%\" data-insert-url=\"index.php?module=artikel&action=profisuche&id=%value%&cmd=$cmd&sid=$id&insert=true&fmodul=$fmodul\"><img src=\"themes/{$this->app->Conf->WFconf['defaulttheme']}/images/add.png\" border=\"0\"></a>";
$sql = "SELECT SQL_CALC_FOUND_ROWS a.id,
CONCAT('<input type=\"checkbox\" name=\"auswahl[', v.id, ']\" class=\"articlematrix-checkbox\" id=\"articlematrix-checkbox-', v.id, '\" data-id=\"', v.id, '\">') AS auswahlbox,
@ -1567,7 +1567,6 @@ class Artikel extends GenArtikel {
$sql .= $joinartikelbaum;
$groupby = ' GROUP BY a.id ';
}
}
if ($paramsArray) {
@ -1597,7 +1596,6 @@ class Artikel extends GenArtikel {
$fastcount .= $joinartikelbaum;
}
if($this->app->erp->Firmendaten('artikel_artikelnummer_suche') == '1'){
/*$maxEinkauf = $this->app->DB->Select(
@ -1809,22 +1807,35 @@ class Artikel extends GenArtikel {
// SQL statement
if (!empty($this->app->Conf->WFdbType) && $this->app->Conf->WFdbType == 'postgre') {
$sql = 'SELECT s.id, a.name_de as artikel,a.nummer as nummer, trim(s.menge)+0 as menge,
CASE WHEN (SELECT SUM(l.menge) FROM lager_platz_inhalt l WHERE l.artikel=a.id) > 0
THEN (SELECT SUM(l.menge) FROM lager_platz_inhalt l WHERE l.artikel=a.id)
ELSE 0
END as lager, s.artikel as menu
$sql = 'SELECT
s.id,
a.name_de as artikel,
a.nummer as nummer,
trim(SUM(s.menge))+0 as menge,
CASE
WHEN (SELECT SUM(l.menge) FROM lager_platz_inhalt l WHERE l.artikel=a.id) > 0
THEN (SELECT SUM(l.menge) FROM lager_platz_inhalt l WHERE l.artikel=a.id)
ELSE 0
END as lager,
s.artikel as menu
FROM stueckliste s LEFT JOIN artikel a ON s.artikel=a.id ';
} else {
$sql = 'SELECT SQL_CALC_FOUND_ROWS s.id, a.name_de as artikel,a.nummer as nummer, trim(s.menge)+0 as menge,
s.stuecklistevonartikel
as menu
FROM stueckliste s LEFT JOIN artikel a ON s.stuecklistevonartikel=a.id ';
$sql = ' SELECT SQL_CALC_FOUND_ROWS
s.id,
a.name_de as artikel,
a.nummer as nummer,
trim(SUM(s.menge))+0 as menge,
s.stuecklistevonartikel AS menu
FROM
stueckliste s
LEFT JOIN artikel a ON s.stuecklistevonartikel=a.id ';
}
// Fester filter
$where = "s.artikel='$id' ";
$groupby = " GROUP BY a.id";
// gesamt anzahl
$count = "SELECT COUNT(s.id) FROM stueckliste s WHERE s.stuecklistevonartikel='$id' ";
break;
@ -2795,8 +2806,8 @@ class Artikel extends GenArtikel {
if(isset($result[$nameofcolumn])) {
if(
($result[$nameofcolumn]!='' && !is_array($result[$nameofcolumn]))
|| $nameofcolumn==='lieferzeitmanuell' || $nameofcolumn==='pseudopreis'
){
// || $nameofcolumn==='lieferzeitmanuell' || $nameofcolumn==='pseudopreis'
){
$this->app->DB->Update(
"UPDATE artikel
SET " . $nameofcolumn . "='" . $this->app->DB->real_escape_string($result[$nameofcolumn]) . "'
@ -6933,6 +6944,8 @@ class Artikel extends GenArtikel {
$this->app->YUI->AutoComplete('lieferantname', 'lieferant', 1);
$this->app->YUI->AutoComplete('hersteller', 'hersteller');
$this->app->YUI->AutoComplete('typ', 'artikelkategorienfull');
$freifeld1bezeichnung = $this->app->erp->Firmendaten('freifeld1');
if($freifeld1bezeichnung == ''){
$freifeld1bezeichnung = 'Freifeld 1';

View File

@ -581,9 +581,9 @@ class Auftrag extends GenAuftrag
$allowed['auftraegeoffeneauto'] = array('list');
$heading = array('','', 'Auftrag', 'Vom', 'Kd-Nr.', 'Kunde','Lieferdatum', 'Land', 'Zahlung', 'Betrag (brutto)','Monitor','Men&uuml;');
$width = array('1%','1%','1%', '10%', '10%', '10%', '31%', '5%', '1%', '1%', '1%', '1%');
$findcols = array('open','a.belegnr', 'a.belegnr', 'a.datum', 'a.lieferantkdrnummer', 'a.name','a.tatsaechlicheslieferdatum', 'a.land', 'a.zahlungsweise', 'a.gesamtsumme');
$heading = array('','', 'Auftrag', 'Vom', 'Kd-Nr.', 'Kunde','Lieferdatum', 'Land','Projekt', 'Zahlung', 'Betrag (brutto)','Monitor','Men&uuml;');
$width = array('1%','1%','1%', '10%', '10%', '10%', '27%', '5%', '5%','1%', '1%', '1%', '1%');
$findcols = array('open','a.belegnr', 'a.belegnr', 'a.datum', 'a.lieferantkdrnummer', 'a.name','a.tatsaechlicheslieferdatum', 'a.land', 'p.abkuerzung', 'a.zahlungsweise', 'a.gesamtsumme');
$defaultorder = 1;
$defaultorderdesc = 0;
@ -596,16 +596,17 @@ class Auftrag extends GenAuftrag
CONCAT('<input type=\"checkbox\" name=\"auswahl[]\" value=\"',a.id,'\" />') AS `auswahl`,
IF(a.fastlane=1,CONCAT(a.belegnr,' (FL)'),a.belegnr) AS `belegnr`,
DATE_FORMAT(a.datum,'%d.%m.%Y') AS `datum`,
lieferantkdrnummer,
name,
a.lieferantkdrnummer,
a.name,
DATE_FORMAT(a.tatsaechlicheslieferdatum,'%d.%m.%Y') as `tatsaechlicheslieferdatum`,
land,
zahlungsweise,
gesamtsumme,
a.land,
p.abkuerzung,
a.zahlungsweise,
a.gesamtsumme,
(" . $this->app->YUI->IconsSQL() . ") AS icons,
a.id
FROM
auftrag a";
auftrag a LEFT JOIN projekt p ON a.projekt = p.id";
$where = "a.status = 'freigegeben' AND a.cronjobkommissionierung = 0 AND a.lager_ok=1 AND a.porto_ok=1 AND a.ust_ok=1 AND a.vorkasse_ok=1 AND a.nachnahme_ok=1 AND a.autoversand=1 AND a.check_ok=1 AND a.kreditlimit_ok=1 AND a.liefersperre_ok=1"; // liefertermin_ok special treatment
@ -670,9 +671,9 @@ class Auftrag extends GenAuftrag
// Show list for cronjob commissioning
$allowed['auftraegeoffeneautowartend'] = array('list');
$heading = array('','', 'Auftrag', 'Vom', 'Kd-Nr.', 'Kunde','Lieferdatum', 'Land', 'Zahlung', 'Betrag (brutto)','Monitor','Men&uuml;');
$width = array('1%','1%','1%', '10%', '10%', '10%', '31%', '5%', '1%', '1%', '1%', '1%', '1%','0%','0%');
$findcols = array('open','a.belegnr', 'a.belegnr', 'a.datum', 'a.lieferantkdrnummer', 'a.name','a.tatsaechlicheslieferdatum', 'a.land', 'a.zahlungsweise', 'a.gesamtsumme');
$heading = array('','', 'Auftrag', 'Vom', 'Kd-Nr.', 'Kunde','Lieferdatum', 'Land', 'Projekt', 'Zahlung', 'Betrag (brutto)','Monitor','Men&uuml;');
$width = array('1%','1%','1%', '10%', '10%', '10%', '27%', '5%', '5%', '1%', '1%', '1%', '1%', '1%','0%','0%');
$findcols = array('open','a.belegnr', 'a.belegnr', 'a.datum', 'a.lieferantkdrnummer', 'a.name','a.tatsaechlicheslieferdatum', 'a.land', 'p.abkuerzung', 'a.zahlungsweise', 'a.gesamtsumme');
$defaultorder = 1;
$defaultorderdesc = 0;
@ -685,16 +686,17 @@ class Auftrag extends GenAuftrag
CONCAT('<input type=\"checkbox\" name=\"auswahlcronjob[]\" value=\"',a.id,'\" />') AS `auswahl`,
IF(a.fastlane=1,CONCAT(a.belegnr,' (FL)'),a.belegnr) AS `belegnr`,
DATE_FORMAT(a.datum,'%d.%m.%Y') AS `datum`,
lieferantkdrnummer,
name,
a.lieferantkdrnummer,
a.name,
DATE_FORMAT(a.tatsaechlicheslieferdatum,'%d.%m.%Y') as `tatsaechlicheslieferdatum`,
land,
zahlungsweise,
gesamtsumme,
a.land,
p.abkuerzung,
a.zahlungsweise,
a.gesamtsumme,
(" . $this->app->YUI->IconsSQL() . ") AS icons,
a.id
FROM
auftrag a";
auftrag a LEFT JOIN projekt p ON a.projekt = p.id";
$status_where = 'a.cronjobkommissionierung > 0';

View File

@ -0,0 +1,238 @@
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
<?php
class Belegevorlagen
{
static function TableSearch(&$app, $name, $erlaubtevars)
{
switch($name)
{
case "belegevorlagen_list":
$heading = array('Bezeichnung','Belegtyp','Projekt','Men&uuml;');
$width = array('40%','20%','29%','1%');
$findcols = array('b.bezeichnung','b.belegtyp','pr.abkuerzung','b.id');
$searchsql = array('b.bezeichnung','b.belegtyp','pr.abkuerzung');
$menu = "<table><tr><td nowrap><a href=\"#\" onclick=\"deletevorlage(%value%);\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a></td></tr></table>";
$sql = "SELECT SQL_CALC_FOUND_ROWS b.id, b.bezeichnung,CONCAT(UCASE(LEFT(b.belegtyp, 1)), SUBSTRING(b.belegtyp, 2)), pr.abkuerzung, b.id FROM belegevorlagen b LEFT JOIN projekt pr ON b.projekt = pr.id";
$where = $app->erp->ProjektRechte('b.projekt');
break;
case "belegevorlagen_list2":
$belegtyp = $app->Secure->GetGET('smodule');
$heading = array('Bezeichnung','Projekt','Men&uuml;');
$width = array('50%','49%','1%');
$findcols = array('b.bezeichnung','pr.abkuerzung','b.id');
$searchsql = array('b.bezeichnung','pr.abkuerzung');
$menu = "<table><tr><td nowrap><a href=\"#\" onclick=\"loadbelegvorlage(%value%);\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/forward.svg\" border=\"0\"></a>&nbsp;<a href=\"#\" onclick=\"deletevorlage(%value%);\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/delete.svg\" border=\"0\"></a></td></tr></table>";
$sql = "SELECT SQL_CALC_FOUND_ROWS b.id, b.bezeichnung, pr.abkuerzung, b.id FROM belegevorlagen b LEFT JOIN projekt pr ON b.projekt = pr.id";
$where = "belegtyp = '$belegtyp' ".$app->erp->ProjektRechte('b.projekt');
break;
}
$erg = false;
foreach($erlaubtevars as $k => $v)
{
if(isset($$v))$erg[$v] = $$v;
}
return $erg;
}
function __construct(&$app, $intern = false)
{
$this->app=&$app;
$this->artikel = $this->app->erp->GetKonfiguration('gesamtrabatt_artikel');
if($intern)return;
$this->app->ActionHandlerInit($this);
$this->app->ActionHandler("list","BelegevorlagenList");
$this->app->ActionHandler("einstellungen","BelegevorlagenEinstellungen");
$this->app->DefaultActionHandler("list");
$this->app->ActionHandlerListen($app);
}
function BelegevorlagenMenu(){
$this->app->erp->MenuEintrag("index.php?module=belegevorlagen&action=list","&Uuml;bersicht");
$this->app->erp->MenuEintrag("index.php?module=belegevorlagen&action=einstellungen","Einstellungen");
}
function BelegevorlagenList()
{
if($this->app->Secure->GetGET('cmd') == 'delvorlage')
{
$id = (int)$this->app->Secure->GetPOST('lid');
$this->app->DB->Delete("DELETE FROM belegevorlagen WHERE id = '$id' LIMIT 1");
echo json_encode(array('status'=>1));
exit;
}
$this->BelegevorlagenMenu();
$this->app->YUI->TableSearch('TAB1', "belegevorlagen_list", "show","","",basename(__FILE__), __CLASS__);
$this->app->Tpl->Parse('PAGE','belegevorlagen_list.tpl');
}
function BelegevorlagenEinstellungen()
{
$this->BelegevorlagenMenu();
$this->app->Tpl->Set('PREISEAKTUALISIEREN',$this->app->erp->GetKonfiguration('belegevorlagen_preiseaktualisieren')=='on'?'checked':'');
$this->app->YUI->AutoSaveKonfiguration('preiseaktualisieren','belegevorlagen_preiseaktualisieren');
$this->app->Tpl->Parse('PAGE','belegevorlagen_einstellungen.tpl');
}
function Install()
{
$this->app->erp->CheckTable('belegevorlagen');
$this->app->erp->CheckColumn("id","int(11)","belegevorlagen","DEFAULT '0' NOT NULL AUTO_INCREMENT");
$this->app->erp->CheckColumn("belegtyp", "varchar(255)", "belegevorlagen", "DEFAULT '' NOT NULL");
$this->app->erp->CheckColumn("bezeichnung", "varchar(255)", "belegevorlagen", "DEFAULT '' NOT NULL");
$this->app->erp->CheckColumn("projekt", "int(11)", "belegevorlagen", "DEFAULT '0' NOT NULL");
$this->app->erp->CheckColumn("json", "MEDIUMTEXT", "belegevorlagen", "DEFAULT '' NOT NULL");
$this->app->erp->CheckColumn("bearbeiter", "varchar(255)", "belegevorlagen", "DEFAULT '' NOT NULL");
$this->app->erp->CheckColumn("zeitstempel", "timestamp", "belegevorlagen","DEFAULT CURRENT_TIMESTAMP NOT NULL");
$this->app->erp->RegisterHook('BelegPositionenButtons', 'belegevorlagen', 'BelegevorlagenBelegPositionenButtons');
$this->app->erp->RegisterHook('AARLGPositionen_cmds_end', 'belegevorlagen', 'BelegevorlagenAARLGPositionen_cmds_end');
$this->app->erp->RegisterHook('ajax_filter_hook1', 'belegevorlagen', 'Belegevorlagenajax_filter_hook1');
}
function Belegevorlagenajax_filter_hook1($filtername,&$newarr, $term, $term2, $term3)
{
if($filtername == 'belegvorlagen')
{
$arr = $this->app->DB->SelectArr("SELECT CONCAT(b.id,' ',b.bezeichnung) as bezeichnung FROM belegevorlagen b
WHERE (b.bezeichnung LIKE '%$term%') ".$this->app->erp->ProjektRechte('b.projekt'));
if($arr)
{
for($i=0;$i<count($arr);$i++)
$newarr[] = $arr[$i]['bezeichnung'];
}
}
}
function BelegevorlagenBelegPositionenButtons($target, $module, $id)
{
if($module=="angebot" || $module=="auftrag" || $module=="rechnung" || $module=="lieferschein" || $module=="gutschrift" || $module=="proformarechnung")
{
$this->app->Tpl->Set('ID', $id);
$this->app->Tpl->Set('MODULE', $module);
$this->app->YUI->AutoComplete('bestehendevorlage','belegvorlagen');
$this->app->YUI->TableSearch('BELEGEVORLAGENTABELLE', "belegevorlagen_list2", "show","","",basename(__FILE__), __CLASS__);
$this->app->Tpl->Add($target, "<input type=\"button\" id=\"belegevorlagen\" value=\"Belegevorlagen\">&nbsp;".$this->app->Tpl->Parse($target,'belegevorlagen_widget.tpl'));
}
}
function BelegevorlagenAARLGPositionen_cmds_end($id){
$module = $this->app->Secure->GetGET('module');
if(!$module)return;
$projekt = $this->app->DB->Select("SELECT projekt FROM $module WHERE id='$id' LIMIT 1");
if($projekt <=0) $projekt=0;
if($this->app->Secure->GetGET('cmd') == 'deletebelegvorlage')
{
$status = 1;
$lid = (int)$this->app->Secure->GetPOST('lid');
$this->app->DB->Delete("DELETE FROM belegevorlagen WHERE id = '$lid' AND belegtyp = '$module' LIMIT 1");
echo json_encode(array('status'=>$status));
exit;
}
if($this->app->Secure->GetGET('cmd') == 'loadbelegvorlage')
{
$status = 0;
$lid = (int)$this->app->Secure->GetPOST('lid');
$json = (String)$this->app->DB->Select("SELECT json FROM belegevorlagen WHERE id = '$lid' AND belegtyp = '$module' LIMIT 1");
if($json !== '')
{
$json = json_decode($json, true);
$maxsort = (int)$this->app->DB->Select("SELECT max(sort) FROM $module"."_position WHERE $module = '$id' LIMIT 1");
if(isset($json['positionen']))
{
foreach($json['positionen'] as $v)
{
$v[$module] = $id;
if($this->app->erp->GetKonfiguration('belegevorlagen_preiseaktualisieren')=='on'){
if($v['artikel'] != '0'){
$v['preis'] = $this->app->erp->GetVerkaufspreis($v['artikel'],$v['menge']);
}
}
$v['sort'] += $maxsort;
$this->app->DB->Insert("INSERT INTO $module"."_position (id) VALUES ('')");
$idnew = $this->app->DB->GetInsertID();
$oldtonew[$v['id']] = $idnew;
if($v['explodiert_parent'] && isset($oldtonew) && isset($oldtonew[$v['explodiert_parent']]))$v['explodiert_parent'] = $oldtonew[$v['explodiert_parent']];
unset($v['id']);
$this->app->DB->UpdateArr($module.'_position',$idnew,"id",$v, true);
if(is_null($v['steuersatz']))$this->app->DB->Update("UPDATE ".$module."_position SET steuersatz = NULL WHERE id = '$idnew' LIMIT 1");
}
}
if(isset($json['zwischenpositionen']))
{
$maxpos = $this->app->DB->SelectArr("SELECT id,sort FROM beleg_zwischenpositionen WHERE doctype = '$module' AND doctypeid = '$id' AND pos='$maxsort' ORDER BY sort DESC LIMIT 1");
if($maxpos)
{
$sortoffset = 1 + $maxpos[0]['sort'];
}else{
$sortoffset = 0;
}
foreach($json['zwischenpositionen'] as $v)
{
if($v['pos'] == 0)$v['sort'] += $sortoffset;
$v['doctypeid'] = $id;
$v['pos'] += $maxsort;
unset($v['id']);
$this->app->DB->Insert("INSERT INTO beleg_zwischenpositionen (id) VALUES ('')");
$idnew = $this->app->DB->GetInsertID();
$this->app->DB->UpdateArr('beleg_zwischenpositionen',$idnew,"id",$v, true);
}
}
$status = 1;
$this->app->erp->ANABREGSNeuberechnen($id,$module);
}
echo json_encode(array('status'=>$status));
exit;
}
if($this->app->Secure->GetGET('cmd') == 'savebelegevorlage')
{
$json = null;
$status = 0;
$bestehendevorlage = (int)reset(explode(' ',$this->app->Secure->GetPOST('bestehendevorlage')));
$bezeichnung = (String)$this->app->Secure->GetPOST('bezeichnung');
$vorlagetyp = $this->app->Secure->GetPOST('vorlagetyp');
$bearbeiter = $this->app->DB->real_escape_string($this->app->User->GetName());
$lid = null;
if($vorlagetyp == 'neu')
{
if($bezeichnung !== '')
{
$this->app->DB->Insert("INSERT INTO belegevorlagen (bezeichnung, belegtyp, bearbeiter, zeitstempel,projekt) VALUES ('$bezeichnung','$module','$bearbeiter',now(),'$projekt')");
$lid = $this->app->DB->GetInsertID();
}
}else{
$lid = $this->app->DB->Select("SELECT id FROM belegevorlagen WHERE id = '$bestehendevorlage' LIMIT 1");
if($lid && $bezeichnung !== '')$this->app->DB->Update("UPDATE belegevorlagen set bezeichnung = '$bezeichnung' WHERE id = '$bestehendevorlage' LIMIT 1");
}
if($lid)
{
$json['positionen'] = $this->app->DB->SelectArr("SELECT * FROM $module"."_position WHERE $module = '$id' ORDER BY sort");
$json['zwischenpositionen'] = $this->app->DB->SelectArr("SELECT * FROM beleg_zwischenpositionen WHERE doctype = '$module' AND doctypeid = '$id' ORDER BY pos, sort");
$json = $this->app->DB->real_escape_string(json_encode($json));
$this->app->DB->Update("UPDATE belegevorlagen set json = '$json', zeitstempel = now(), bearbeiter = '$bearbeiter' WHERE id = '$lid' LIMIT 1");
$status = 1;
}
echo json_encode(array('status'=>$status));
exit;
}
}
}
?>

View File

@ -45,7 +45,25 @@
</div>
</div>
<div style="background-color:white" [DBHIDDEN]>
<h2 class="greyh2">{|Deckungsbeitrag (netto)|}</h2>
<table width="100%">
<tbody>
<tr>
<td>Umsatz EUR</td>
<td>Kosten EUR</td>
<td>Deckungsbeitrag EUR</td>
<td>DB %</td>
</tr>
<tr>
<td class="greybox" width="25%">[NETTOGESAMT]</td>
<td class="greybox" width="25%">[KOSTEN]</td>
<td class="greybox" width="25%">[DECKUNGSBEITRAG]</td>
<td class="greybox" width="25%">[DBPROZENT]</td>
</tr>
</tbody>
</table>
</div>
<div style="background-color:white">
<h2 class="greyh2">Protokoll</h2>
@ -59,12 +77,6 @@
[PDFARCHIV]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">Deckungsbeitrag</h2>
<div style="padding:10px">
<div class="info">Dieses Modul ist erst ab Version Professional verfügbar</div>
</div>
</div>
</div>

View File

@ -0,0 +1,20 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"><!--[TABTEXT]--></a></li>
</ul>
<!-- ende gehort zu tabview -->
<!-- erstes tab -->
<div id="tabs-1">
[MESSAGE]
<fieldset>
<legend>Einstellungen</legend>
<input type="checkbox" name="preiseaktualisieren" id="preiseaktualisieren" [PREISEAKTUALISIEREN] /> <label for="preiseaktualisieren">Aktuelle Artikelpreise verwenden wenn Belegvorlage geladen wird.</label>
</fieldset>
[TAB1]
[TAB1NEXT]
</div>
<!-- tab view schließen -->
</div>

View File

@ -0,0 +1,38 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"><!--[TABTEXT]--></a></li>
</ul>
<!-- ende gehort zu tabview -->
<!-- erstes tab -->
<div id="tabs-1">
[MESSAGE]
[TAB1]
[TAB1NEXT]
</div>
<!-- tab view schließen -->
</div>
<script type="text/javascript">
function deletevorlage(belegid)
{
if(confirm('Vorlage wirklich löschen?'))
{
$('#belegevorlagendiv').dialog('close');
$.ajax({
url: 'index.php?module=belegevorlagen&action=list&cmd=delvorlage',
type: 'POST',
dataType: 'json',
data: {lid:belegid},
success: function(data) {
var oTable = $('#belegevorlagen_list').DataTable( );
oTable.ajax.reload();
},
beforeSend: function() {
}
});
}
}
</script>

View File

@ -27,6 +27,10 @@
<td>{|Verbindlichkeiten:|}</td>
<td><input type="checkbox" name="verbindlichkeit" value="1" [VBCHECKED] /></td>
</tr>
<tr>
<td>{|Lieferantengutschriften:|}</td>
<td><input type="checkbox" name="lieferantengutschrift" value="1" [LGCHECKED] /></td>
</tr>
<tr>
<td>Datum von:</td>
<td><input type="text" name="von" id="von" value="[VON]" /></td>

View File

@ -775,6 +775,10 @@
<td>Nächste Verbindlichkeitsnummer:</td><td><input type="text" name="next_verbindlichkeit" readonly value="[NEXT_VERBINDLICHKEIT]" size="40">
<input type="button" onclick="next_number('verbindlichkeit','[NEXT_VERBINDLICHKEIT]');" value="bearbeiten"></td>
</tr>
<tr>
<td>Nächste Lieferantengutschriftnummer:</td><td><input type="text" name="next_lieferantengutschrift" readonly value="[NEXT_LIEFERANTENGUTSCHRIFT]" size="40">
<input type="button" onclick="next_number('lieferantengutschrift','[NEXT_LIEFERANTENGUTSCHRIFT]');" value="bearbeiten"></td>
</tr>
<tr>
<td>N&auml;chste Kundennummer:</td><td><input type="text" name="next_kundennummer" readonly value="[NEXT_KUNDENNUMMER]" size="40">
<input type="button" onclick="next_number('kundennummer','[NEXT_KUNDENNUMMER]');" value="bearbeiten"></td>

View File

@ -0,0 +1,55 @@
[POSITIONENMESSAGE]
<form method="post" action="#tabs-2">
<div class="row" [POSITIONHINZUFUEGENHIDDEN]>
<div class="row-height">
<div class="col-xs-14 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend style="float:left">Artikel hinzuf&uuml;gen:</legend>
<div class="filter-box filter-usersave" style="float:right;">
<div class="filter-block filter-inline">
<div class="filter-title">{|Filter|}</div>
<ul class="filter-list">
<li class="filter-item">
<label for="passende" class="switch">
<input type="checkbox" id="passende">
<span class="slider round"></span>
</label>
<label for="passende">{|Nur passende (Bestellung/Rechnungsnummer)|}</label>
</li>
</ul>
</div>
</div>
[ARTIKELMANUELL]
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr [HINZUFUEGENHIDDEN]>
<td>
{|Multifilter|}:&nbsp;<img src="./themes/new/images/tooltip_grau.png" border="0" style="position: relative; left: 1px; top: 3px; z-index: 8;" class="wawitooltipicon" title="Auswahl mehrerer Artikel &uuml;ber Name oder Nummer">
</td>
</tr>
<tr>
<td><input type="checkbox" name="bruttoeingabe" value="1" />Bruttopreise eingeben</td>
</tr>
<tr [HINZUFUEGENHIDDEN]>
<td>
<input type="text" name="multifilter" id="multifilter" value="[MULTIFILTER]" size="20" style="width:98%;" form="">
</td>
</tr>
<tr>
<td><button [SAVEDISABLED] name="submit" value="artikel_manuell_hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzuf&uuml;gen</button></td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>

View File

@ -0,0 +1,219 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">Lieferantengutschrift</a></li>
<li [POSITIONENHIDDEN]><a href="#tabs-2">Positionen</a></li>
<li [POSITIONENHIDDEN]><a href="#tabs-4">Artikel manuell</a></li>
<li><a href="#tabs-3">Protokoll</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
<form action="" method="post">
[FORMHANDLEREVENT]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-6 col-md-height">
<div class="inside inside-full-height">
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-8 col-md-height">
<div class="inside inside-full-height">
<fieldset style="float: left;">
<legend>{|<b>Lieferantengutschrift <font color="blue">[BELEGNR]</font></b> Lf-Nr. <a href="index.php?module=adresse&action=edit&id=[ADRESSE_ID]">[LIEFERANTENNUMMER]|}</a></legend>
[STATUSICONS]
</fieldset>
<fieldset style="float: right;">
<button name="submit" value="speichern" class="ui-button-icon" style="width:100%;">Speichern</button>
</fieldset>
</div>
</div>
</div>
</div>
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-8 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Status|}:
</td>
<td>
<input type="text" value="[STATUS]" size="20" disabled>
</td>
</tr>
<tr>
<td>
{|Adresse|}:
</td>
<td>
<input type="text" name="adresse" id="adresse" value="[ADRESSE]" size="20" [ADRESSESAVEDISABLED] required>
</td>
</tr>
<tr>
<td>
{|Lieferantengutschrifts-Nr.|}:
</td>
<td>
<input type="text" name="rechnung" id="rechnung" value="[RECHNUNG]" size="20" [SAVEDISABLED] required>
</td>
</tr>
<tr>
<td>
{|Lieferantengutschriftsdatum|}:
</td>
<td>
<input type="text" name="rechnungsdatum" id="rechnungsdatum" value="[RECHNUNGSDATUM]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Eingangsdatum|}:
</td>
<td>
<input type="text" name="eingangsdatum" id="eingangsdatum" value="[EINGANGSDATUM]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Betrag brutto|}:
</td>
<td>
<input type="number" step="0.01" name="betrag" id="betrag" value="[BETRAG]" size="20" [SAVEDISABLED]>
<select name="waehrung" [SAVEDISABLED]>[WAEHRUNGSELECT]</select>
</td>
</tr>
<tr>
<td>
{|Betrag Positionen brutto|}:
</td>
<td>
<input type="number" step="0.01" name="betragbruttopos" id="betragbruttopos" value="[BETRAGBRUTTOPOS]" size="20" disabled><img class="wawitooltipicon" src="themes/new/images/tooltip_grau.png" title="Rundungsdifferenz [RUNDUNGSDIFFERENZ] wurde automatisch ber&uuml;cksichtigt" [RUNDUNGSDIFFERENZICONHIDDEN]>
</td>
</tr>
<tr>
<td>
{|Betrag Positionen netto|}:
</td>
<td>
<input type="number" step="0.01" name="betragnetto" id="betragnetto" value="[BETRAGNETTO]" size="20" disabled [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Zahlbar bis|}:
</td>
<td>
<input type="text" name="zahlbarbis" id="zahlbarbis" value="[ZAHLBARBIS]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Skonto %|}:
</td>
<td>
<input type="text" name="skonto" id="skonto" value="[SKONTO]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Skonto bis|}:
</td>
<td>
<input type="text" name="skontobis" id="skontobis" value="[SKONTOBIS]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Bestellung|}:
</td>
<td>
<input type="text" name="bestellung" id="bestellung" value="[BESTELLUNG]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Waren-/Leistungsprüfung (Einkauf)|}:
</td>
<td>
<input type="checkbox" id="wareneingang" value="1" [WARENEINGANGCHECKED] size="20" disabled>
<a href="index.php?module=lieferantengutschrift&action=freigabeeinkauf&id=[ID]" title="freigeben" [FREIGABEEINKAUFHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
<a href="index.php?module=lieferantengutschrift&action=ruecksetzeneinkauf&id=[ID]" title="r&uuml;cksetzen" [RUECKSETZENEINKAUFHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
<i [EINKAUFINFOHIDDEN]>Wird automatisch gesetzt wenn Positionen vollst&auml;ndig</a>
</td>
</tr>
<tr>
<td>
{|Lieferantengutschriftseingangsprüfung (Buchhaltung)|}:
</td>
<td>
<input type="checkbox" id="rechnungsfreigabe" [RECHNUNGSFREIGABECHECKED] size="20" disabled>
<a href="index.php?module=lieferantengutschrift&action=freigabebuchhaltung&id=[ID]" title="freigeben" [FREIGABEBUCHHALTUNGHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
<a href="index.php?module=lieferantengutschrift&action=ruecksetzenbuchhaltung&id=[ID]" title="r&uuml;cksetzen" [RUECKSETZENBUCHHALTUNGHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
</td>
</tr>
<tr>
<td>
{|Bezahlt|}:
</td>
<td>
<input type="checkbox" id="zahlungsstatus" [BEZAHLTCHECKED] size="20" disabled>
<a href="index.php?module=lieferantengutschrift&action=freigabebezahlt&id=[ID]" title="auf &apos;bezahlt&apos; setzen" [FREIGABEBEZAHLTHIDDEN]><img src="themes/new/images/forward.svg" border="0" class="textfeld_icon"></a>
<a href="index.php?module=lieferantengutschrift&action=ruecksetzenbezahlt&id=[ID]" title="r&uuml;cksetzen" [RUECKSETZENBEZAHLTHIDDEN]><img src="themes/new/images/delete.svg" border="0" class="textfeld_icon"></a>
</td>
</tr>
<tr>
<td>
{|Projekt|}:
</td>
<td>
<input type="text" name="projekt" id="projekt" value="[PROJEKT]" size="20">
</td>
</tr>
<tr>
<td>
{|Kostenstelle|}:
</td>
<td>
<input type="text" name="kostenstelle" id="kostenstelle" value="[KOSTENSTELLE]" size="20">
</td>
</tr>
<tr>
<td>
{|Internebemerkung|}:
</td>
<td>
<textarea name="internebemerkung" id="internebemerkung" rows="6" style="width:100%;">[INTERNEBEMERKUNG]</textarea>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Vorschau|}</legend>
[INLINEPDF]
</fieldset>
</div>
</div>
</div>
</div>
</form>
</div>
<div id="tabs-2">
[POSITIONENTAB]
</div>
<div id="tabs-4">
[POSITIONENMANUELLTAB]
</div>
<div id="tabs-3">
[MINIDETAIL]
</div>
</div>

View File

@ -0,0 +1,93 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1">[TABTEXT1]</a></li>
</ul>
<div id="tabs-1">
[MESSAGE]
<div class="filter-box filter-usersave">
<div class="filter-block filter-inline">
<div class="filter-title">{|Filter|}</div>
<ul class="filter-list">
<li class="filter-item">
<label for="anhang" class="switch">
<input type="checkbox" id="anhang">
<span class="slider round"></span>
</label>
<label for="anhang">{|Anhang fehlt|}</label>
</li>
<li class="filter-item">
<label for="wareneingang" class="switch">
<input type="checkbox" id="wareneingang">
<span class="slider round"></span>
</label>
<label for="wareneingang">{|Wareingang/Leistungspr&uuml;fung fehlt|}</label>
</li>
<li class="filter-item">
<label for="rechnungsfreigabe" class="switch">
<input type="checkbox" id="rechnungsfreigabe">
<span class="slider round"></span>
</label>
<label for="rechnungsfreigabe">{|Lieferantengutschriftseingangspr&uuml;fung fehlt|}</label>
</li>
<li class="filter-item">
<label for="nichtbezahlt" class="switch">
<input type="checkbox" id="nichtbezahlt">
<span class="slider round"></span>
</label>
<label for="nichtbezahlt">{|Nicht bezahlt|}</label>
</li>
<li class="filter-item">
<label for="stornierte" class="switch">
<input type="checkbox" id="stornierte">
<span class="slider round"></span>
</label>
<label for="stornierte">{|Inkl. stornierte|}</label>
</li>
<li class="filter-item">
<label for="abgeschlossen" class="switch">
<input type="checkbox" id="abgeschlossen">
<span class="slider round"></span>
</label>
<label for="abgeschlossen">{|Inkl. abgeschlossene|}</label>
</li>
<li class="filter-item">
<label for="zahlbarbis">{|Zahlbar bis|}:</label>
<input type="text" name="zahlbarbis" id="zahlbarbis" size="10">
</li>
<li class="filter-item">
<label for="skontobis">{|Skonto bis|}:</label>
<input type="text" name="skontobis" id="skontobis" size="10">
</li>
</ul>
<form method="post" action="#">
<button name="submit" value="status_berechnen" class="ui-button-icon">{|Status auffrischen|}</button>
</form>
</div>
</div>
<form method="post" action="#">
[TAB1]
<fieldset><legend>{|Stapelverarbeitung|}</legend>
<input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" />&nbsp;{|alle markieren|}&nbsp;
<select id="sel_aktion" name="sel_aktion">
<option value="">{|bitte w&auml;hlen|} ...</option>
[MANUELLFREIGABEEINKAUF]
[MANUELLFREIGABEBUCHHALTUNG]
[ALSBEZAHLTMARKIEREN]
</select>
<button name="submit" value="ausfuehren" class="ui-button-icon">{|Ausf&uuml;hren|}</button>
</fieldset>
</form>
[TAB1NEXT]
</div>
</div>
<script>
function alleauswaehlen()
{
var wert = $('#auswahlalle').prop('checked');
$('#lieferantengutschrift_list').find(':checkbox').prop('checked',wert);
}
</script>

View File

@ -0,0 +1,76 @@
[FORMHANDLEREVENT]
[MESSAGE]
<style>
.auftraginfo_cell {
color: #636363;border: 1px solid #ccc;padding: 5px;
}
.auftrag_cell {
color: #636363;border: 1px solid #fff;padding: 0px; margin:0px;
}
</style>
<div style="float:left; width:39%; padding-right:1%;">
<table width="100%" border="0">
<tr valign="top">
<td width="150">Lieferant:</td>
<td colspan="3">[ADRESSEAUTOSTART][ADRESSE][MSGADRESSE][ADRESSEAUTOEND]</td>
</tr>
<tr>
<td>Lieferantengutschrifts-Nr.:</td>
<td>[RECHNUNG][MSGRECHNUNG]</td>
</tr>
<tr>
<td>Lieferantengutschriftsdatum:</td>
<td width="250">[RECHNUNGSDATUM][MSGRECHNUNGSDATUM]</td>
<tr>
</tr>
</tr>
<td width="200">Zahlbar bis:</td>
<td>[ZAHLBARBIS][MSGZAHLBARBIS][DATUM_ZAHLBARBIS]</td>
</tr>
<td>Betrag/Total (Brutto):</td>
<td>[BETRAG][MSGBETRAG]&nbsp;[WAEHRUNG][MSGWAEHRUNG]</td>
<tr>
<td>Skonto in %:</td>
<td>[SKONTO][MSGSKONTO]</td>
</tr>
<tr>
<td>Skonto bis:</td>
<td>[SKONTOBIS][MSGSKONTOBIS][DATUM_SKONTOBIS]</td>
</tr>
<tr>
<td>Projekt:</td>
<td>[PROJEKT][MSGKOSTENSTELLE]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Kostenstelle:</td>
<td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>Interne Bemerkung:</td>
<td colspan="4">[INTERNEBEMERKUNG]</td>
</tr>
</table>
</div>
<div style="float:left; width:60%">
<div style="background-color:white">
<h2 class="greyh2">Artikel</h2>
<div style="padding:10px">
[ARTIKEL]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">Buchungen</h2>
<div style="padding:10px">
[ZAHLUNGEN]
</div>
</div>
<div style="background-color:white">
<h2 class="greyh2">Protokoll</h2>
<div style="padding:10px;">
[PROTOKOLL]
</div>
</div>
</div>

View File

@ -0,0 +1,64 @@
<div id="tabs">
<ul>
<li><a href="#tabs-1"></a></li>
</ul>
<!-- Example for multiple tabs
<ul hidden">
<li><a href="#tabs-1">First Tab</a></li>
<li><a href="#tabs-2">Second Tab</a></li>
</ul>
-->
<div id="tabs-1">
[MESSAGE]
<form action="" method="post">
[FORMHANDLEREVENT]
<div class="row">
<div class="row-height">
<div class="col-xs-12 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend>{|Position bearbeiten|}</legend><i></i>
<table width="100%" border="0" class="mkTableFormular">
<tr>
<td>
{|Menge|}:
</td>
<td>
<input type="number" name="menge" id="menge" value="[MENGE]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Preis|}:
</td>
<td>
<input type="number" name="preis" id="preis" step="0.00001" value="[PREIS]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Steuersatz %|}:
</td>
<td>
<input type="number" name="steuersatz" id="steuersatz" value="[STEUERSATZ]" size="20" [SAVEDISABLED]>
</td>
</tr>
<tr>
<td>
{|Sachkonto|}:
</td>
<td>
<input type="text" name="sachkonto" id="sachkonto" value="[SACHKONTO]" size="20" [SACHKONTOSAVEDISABLED]>
</td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<input type="submit" name="submit" value="Speichern" style="float:right"/>
</form>
</div>
</div>

View File

@ -0,0 +1,88 @@
[POSITIONENMESSAGE]
<form method="post" action="#tabs-2">
<div class="row" [POSITIONHINZUFUEGENHIDDEN]>
<div class="row-height">
<div class="col-xs-14 col-md-12 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<legend style="float:left">Artikel hinzuf&uuml;gen:</legend>
<div class="filter-box filter-usersave" style="float:right;">
<div class="filter-block filter-inline">
<div class="filter-title">{|Filter|}</div>
<ul class="filter-list">
<li class="filter-item">
<label for="passende" class="switch">
<input type="checkbox" id="passende">
<span class="slider round"></span>
</label>
<label for="passende">{|Nur passende (Bestellung/Rechnungsnummer)|}</label>
</li>
</ul>
</div>
</div>
[PAKETDISTRIBUTION]
</fieldset>
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr>
<td><input type="checkbox" id="auswahlallewareneingaenge" onchange="allewareneingaengeauswaehlen();" />{|alle markieren|}</td>
</tr>
<tr>
<td><button [SAVEDISABLED] name="submit" value="positionen_hinzufuegen" class="ui-button-icon" style="width:100%;">Hinzuf&uuml;gen</button></td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>
<form method="post" action="#tabs-2">
<div class="row">
<div class="row-height">
<div class="col-xs-14 col-md-12 col-md-height">
<div class="inside inside-full-height">
[POSITIONEN]
</div>
</div>
<div class="col-xs-14 col-md-2 col-md-height">
<div class="inside inside-full-height">
<fieldset>
<table width="100%" border="0" class="mkTableFormular">
<legend>{|Aktionen|}</legend>
<tr [SACHKONTOCHANGEHIDDEN]>
<td><input type="checkbox" id="auswahlalle" onchange="alleauswaehlen();" />{|alle markieren|}</td>
</tr>
<tr [POSITIONHINZUFUEGENHIDDEN]>
<td><button [SAVEDISABLED] name="submit" value="positionen_entfernen" class="ui-button-icon" style="width:100%;">Entfernen</button></td>
</tr>
<tr [SACHKONTOCHANGEHIDDEN]>
<td><input type="text" name="positionen_sachkonto" id="positionen_sachkonto" value="" size="20"></td>
</tr>
<tr [SACHKONTOCHANGEHIDDEN]>
<td><button name="submit" value="positionen_kontorahmen_setzen" class="ui-button-icon" style="width:100%;">Sachkonto setzen</button></td>
</tr>
</table>
</fieldset>
</div>
</div>
</div>
</div>
</form>
<script>
function allewareneingaengeauswaehlen()
{
var wert = $('#auswahlallewareneingaenge').prop('checked');
$('#verbindlichkeit_positionen').find(':checkbox').prop('checked',wert);
}
function alleauswaehlen()
{
var wert = $('#auswahlalle').prop('checked');
$('#lieferantengutschrift_positionen').find(':checkbox').prop('checked',wert);
}
</script>

View File

@ -172,6 +172,11 @@
<button name="submit" class="ui-button-icon" style="width:100%;" value="abschliessen">{|Abschlie&szlig;en|}</button>
</td>
</tr>
<tr [ABGESCHLOSSENHIDDEN]>
<td>
<button name="submit" class="ui-button-icon" style="width:100%;" value="oeffnen" form="oeffnen">{|&Ouml;ffnen|}</button>
</td>
</tr>
</table>
</fieldset>
</div>
@ -218,6 +223,9 @@
</div> [AFTERTAB2]
</form>
</div>
<form action="index.php?module=wareneingang&action=oeffnen" id="oeffnen" method="POST">
<input name="id" value="[ID]" hidden></input>
</form>
<script type="text/javascript">
$(document).ready(function() {
$("#tabs").tabs("option", "active", [TABINDEX]);

View File

@ -161,10 +161,7 @@ $width = array('10%'); // Fill out manually later
if (!empty($result)) {
$emailbackup = $result[0];
} else {
return;
}
}
foreach ($emailbackup as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);
}
@ -296,10 +293,10 @@ $width = array('10%'); // Fill out manually later
$this->app->erp->MailSend(
$result[0]['email'],
$result[0]['angezeigtername'],
$result[0]['email'],
$result[0]['angezeigtername'],
array($result[0]['email']),
array($result[0]['angezeigtername']),
'OpenXE ERP: Testmail',
utf8_encode('Dies ist eine Testmail für Account "'.$result[0]['email'].'".'),
'Dies ist eine Testmail für Account "'.$result[0]['email'].'".',
'',0,false,'','',
true
)

View File

@ -77,6 +77,7 @@ class Exportbuchhaltung
$rgchecked = $this->app->Secure->GetPOST("rechnung");
$gschecked = $this->app->Secure->GetPOST("gutschrift");
$vbchecked = $this->app->Secure->GetPOST("verbindlichkeit");
$lgchecked = $this->app->Secure->GetPOST("lieferantengutschrift");
$diffignore = $this->app->Secure->GetPOST("diffignore");
$sachkonto = $this->app->Secure->GetPOST('sachkonto');
@ -97,6 +98,7 @@ class Exportbuchhaltung
$rgchecked = true;
$gschecked = true;
$vbchecked = true;
$lgchecked = true;
}
$missing_obligatory = array();
@ -134,7 +136,8 @@ class Exportbuchhaltung
if (
!$rgchecked &&
!$gschecked &&
!$vbchecked
!$vbchecked &&
!$lgchecked
) {
$msg = "<div class=error>Bitte mindestens eine Belegart auswählen.</div>";
$dataok = false;
@ -159,7 +162,7 @@ class Exportbuchhaltung
if ($dataok) {
$filename = "EXTF_".date('Ymd') . "_Buchungsstapel_DATEV_export.csv";
try {
$csv = $this->DATEV_Buchuchungsstapel($rgchecked, $gschecked, $vbchecked, $buchhaltung_berater, $buchhaltung_mandant, $buchhaltung_wj_beginn, $buchhaltung_sachkontenlaenge, $von, $bis, $projekt, $filename, $diffignore, $sachkonto_kennung);
$csv = $this->DATEV_Buchuchungsstapel($rgchecked, $gschecked, $vbchecked, $lgchecked, $buchhaltung_berater, $buchhaltung_mandant, $buchhaltung_wj_beginn, $buchhaltung_sachkontenlaenge, $von, $bis, $projekt, $filename, $diffignore, $sachkonto_kennung);
header("Content-Disposition: attachment; filename=" . $filename);
header("Pragma: no-cache");
header("Expires: 0");
@ -198,6 +201,7 @@ class Exportbuchhaltung
$this->app->Tpl->SET('RGCHECKED',$rgchecked?'checked':'');
$this->app->Tpl->SET('GSCHECKED',$gschecked?'checked':'');
$this->app->Tpl->SET('VBCHECKED',$vbchecked?'checked':'');
$this->app->Tpl->SET('LGCHECKED',$lgchecked?'checked':'');
$this->app->Tpl->SET('DIFFIGNORE',$diffignore?'checked':'');
$this->app->Tpl->SET('VON', $von_form);
@ -212,7 +216,7 @@ class Exportbuchhaltung
* Create DATEV Buchhungsstapel
* @throws ConsistencyException with string (list of items) if consistency check fails and no sachkonto for differences is given
*/
function DATEV_Buchuchungsstapel(bool $rechnung, bool $gutschrift, bool $verbindlichkeit, string $berater, string $mandant, datetime $wj_beginn, int $sachkontenlaenge, datetime $von, datetime $bis, int $projekt = 0, string $filename = 'EXTF_Buchungsstapel_DATEV_export.csv', $diffignore = false, $sachkonto_differences) : string {
function DATEV_Buchuchungsstapel(bool $rechnung, bool $gutschrift, bool $verbindlichkeit, bool $lieferantengutschrift, string $berater, string $mandant, datetime $wj_beginn, int $sachkontenlaenge, datetime $von, datetime $bis, int $projekt = 0, string $filename = 'EXTF_Buchungsstapel_DATEV_export.csv', $diffignore = false, $sachkonto_differences) : string {
$datev_header_definition = array (
'1' => 'Kennzeichen',
@ -447,12 +451,12 @@ class Exportbuchhaltung
'field_belegnr' => 'b.belegnr',
'field_name' => 'b.name',
'field_date' => 'datum',
'field_auftrag' => 'b.auftrag',
'field_auftrag' => 'MAKE_SET(3,b.auftrag,(SELECT auftrag.internet FROM auftrag WHERE auftrag.id = auftragid))',
'field_zahlweise' => 'CONCAT(UCASE(LEFT(b.zahlungsweise, 1)),SUBSTRING(b.zahlungsweise, 2))',
'field_kontonummer' => 'a.kundennummer_buchhaltung',
'field_kundennummer' => 'b.kundennummer',
'field_betrag_gesamt' => 'b.soll',
'field_betrag' => 'p.umsatz_brutto_gesamt',
'field_gegenkonto' => '\'\'',
'condition_where' => ' AND b.status IN (\'freigegeben\',\'versendet\',\'storniert\')',
'Buchungstyp' => 'SR',
'do' => $rechnung
@ -466,54 +470,84 @@ class Exportbuchhaltung
'field_name' => 'b.name',
'field_date' => 'datum',
'field_auftrag' => '\'\'',
'field_zahlweise' => '\'\'',
'field_kontonummer' => 'a.kundennummer_buchhaltung',
'field_kundennummer' => 'b.kundennummer',
'field_betrag_gesamt' => 'b.soll',
'field_betrag' => 'p.umsatz_brutto_gesamt',
'field_gegenkonto' => '\'\'',
'condition_where' => ' AND b.status IN (\'freigegeben\',\'versendet\')',
'Buchungstyp' => '',
'do' => $gutschrift
),
array(
'typ' => 'verbindlichkeit',
'subtable' => 'verbindlichkeit_kontierung',
'subtable' => 'verbindlichkeit_position',
'kennzeichen' => 'H',
'kennzeichen_negativ' => 'S',
'field_belegnr' => 'b.rechnung',
'field_name' => 'a.name',
'field_date' => 'rechnungsdatum',
'field_auftrag' => 'b.auftrag',
'field_zahlweise' => '\'\'',
'field_kontonummer' => 'a.lieferantennummer_buchhaltung',
'field_kundennummer' => 'a.lieferantennummer',
'field_betrag_gesamt' => 'b.betrag',
'field_betrag' => 'p.betrag',
'field_gegenkonto' => 'gegenkonto',
'condition_where' => '',
'field_betrag' => 'p.preis*p.menge*((100+p.steuersatz)/100)',
'field_gegenkonto' => '(SELECT sachkonto FROM kontorahmen k WHERE k.id = p.kontorahmen)',
'condition_where' => ' AND b.status IN (\'freigegeben\')',
'Buchungstyp' => '',
'do' => $verbindlichkeit
),
array(
'typ' => 'lieferantengutschrift',
'subtable' => 'lieferantengutschrift_position',
'kennzeichen' => 'S',
'kennzeichen_negativ' => 'H',
'field_belegnr' => 'b.rechnung',
'field_name' => 'a.name',
'field_date' => 'rechnungsdatum',
'field_auftrag' => '\'\'',
'field_zahlweise' => '\'\'',
'field_kontonummer' => 'a.lieferantennummer_buchhaltung',
'field_kundennummer' => 'a.lieferantennummer',
'field_betrag_gesamt' => 'b.betrag',
'field_betrag' => 'p.preis*p.menge*((100+p.steuersatz)/100)',
'field_gegenkonto' => '(SELECT sachkonto FROM kontorahmen k WHERE k.id = p.kontorahmen)',
'condition_where' => ' AND b.status IN (\'freigegeben\')',
'Buchungstyp' => '',
'do' => $lieferantengutschrift
)
);
foreach ($typen as $typ) {
if (!$typ['do']) {
continue;
}
if (!empty($typ['field_gegenkonto'])) {
$sql_gegenkonto = $typ['field_gegenkonto'];
} else
{
$sql_gegenkonto = "NULL";
}
$sql = "SELECT
".$typ['typ']." id,
".$typ['field_belegnr']." as belegnr,
".$typ['field_auftrag']." as auftrag,
".$typ['field_zahlweise']." as zahlweise,
if(".$typ['field_kontonummer']." <> '',".$typ['field_kontonummer'].",".$typ['field_kundennummer'].") as kundennummer,
".$typ['field_name']." as name,
b.ustid,
a.ustid,
b.".$typ['field_date']." as datum,
p.id as pos_id,
".$typ['field_betrag_gesamt']." as betrag_gesamt,
b.waehrung,
ROUND(".$typ['field_betrag'].",2) as betrag,
".$typ['field_gegenkonto']." as gegenkonto,
p.waehrung as pos_waehrung
".$sql_gegenkonto." as gegenkonto,
b.waehrung as pos_waehrung
FROM
".$typ['typ']." b
LEFT JOIN
@ -531,6 +565,7 @@ class Exportbuchhaltung
FROM
(
SELECT
id,
belegnr,
datum,
betrag_gesamt,
@ -542,10 +577,10 @@ class Exportbuchhaltung
FROM
(".$sql.") posten
GROUP BY
belegnr
id
) summen
WHERE betrag_gesamt <> betrag_summe OR betrag_summe IS NULL";
$result = $this->app->DB->SelectArr($sql_check);
if (!empty($result)) {
@ -579,13 +614,14 @@ class Exportbuchhaltung
$data['Belegdatum'] = date_format(date_create($row['datum']),"dm"); // obligatory
$data['Buchungstext'] = "Differenz";
$data['EU-Mitgliedstaat u. UStID (Bestimmung)'] = $row['ustid'];
$data['Auftragsnummer'] = $row['auftrag'];
$data['Auftragsnummer'] = $row['auftrag'];
$data['Zahlweise'] = $row['zahlweise'];
$csv .= $this->create_line($datev_buchungsstapel_definition,$data);
}
}
}
} // diffignore
// Query position data
$arr = $this->app->DB->Query($sql);
while ($row = $this->app->DB->Fetch_Assoc($arr)) {
@ -614,7 +650,7 @@ class Exportbuchhaltung
$data['Belegfeld 1'] = mb_strimwidth($row['belegnr'],0,12);
$data['Konto'] = $row['kundennummer']; // obligatory
if ($typ['field_gegenkonto'] == 'gegenkonto') {
if (!empty($typ['field_gegenkonto'])) {
$data['Gegenkonto (ohne BU-Schlüssel)'] = $row['gegenkonto']; // obligatory
} else {
$data['Gegenkonto (ohne BU-Schlüssel)'] = $erloes; // obligatory
@ -625,6 +661,7 @@ class Exportbuchhaltung
$data['EU-Mitgliedstaat u. UStID (Bestimmung)'] = $row['ustid'];
$data['Auftragsnummer'] = ($row['auftrag']!=0)?$row['auftrag']:'';
$data['Zahlweise'] = $row['zahlweise'];
$csv .= $this->create_line($datev_buchungsstapel_definition,$data);
}

View File

@ -446,6 +446,7 @@ class Firmendaten {
'artikelnummer',
'preisanfrage',
'verbindlichkeit',
'lieferantengutschrift',
'receiptdocument',
];
if(in_array($cmd, $allowedNumbers)) {
@ -1703,6 +1704,7 @@ class Firmendaten {
$this->app->Tpl->Set('NEXT_ANFRAGE' , $data[0]['next_anfrage']);
$this->app->Tpl->Set('NEXT_PREISANFRAGE' , $data[0]['next_preisanfrage']);
$this->app->Tpl->Set('NEXT_VERBINDLICHKEIT', $data[0]['next_verbindlichkeit']);
$this->app->Tpl->Set('NEXT_LIEFERANTENGUTSCHRIFT', $data[0]['next_lieferantengutschrift']);
$this->app->Tpl->Set('NEXT_RECEIPTDOCUMENT', $data[0]['next_receiptdocument']);
//Briefpapier Hintergrund
@ -2060,6 +2062,7 @@ class Firmendaten {
$this->app->Tpl->Set('NEXT_ANFRAGE' , ($data['next_anfrage']));
$this->app->Tpl->Set('NEXT_PREISANFRAGE' , ($data['next_preisanfrage']));
$this->app->Tpl->Set('NEXT_VERBINDLICHKEIT', ($data['next_verbindlichkeit']));
$this->app->Tpl->Set('NEXT_LIEFERANTENGUTSCHRIFT', ($data['next_lieferantengutschrift']));
$this->app->Tpl->Set('NEXT_RECEIPTDOCUMENT', ($data['next_receiptdocument']));
//Briefpapier Hintergrund
@ -2283,6 +2286,7 @@ class Firmendaten {
$data['next_anfrage'] = ($this->app->Secure->POST["next_anfrage"]);
$data['next_preisanfrage'] = ($this->app->Secure->POST["next_preisanfrage"]);
$data['next_verbindlichkeit'] = ($this->app->Secure->POST["next_verbindlichkeit"]);
$data['next_lieferantengutschrift'] = ($this->app->Secure->POST["next_lieferantengutschrift"]);
$data['produktionsverhalten'] = $this->app->Secure->POST["produktionsverhalten"];
$data['sprachebevorzugen'] = ($this->app->Secure->POST["sprachebevorzugen"]);

File diff suppressed because it is too large Load Diff

View File

@ -304,7 +304,8 @@ class Mahnwesen {
$tmpfile = $Brief->displayTMP();
$fileid = $this->app->erp->CreateDatei($Brief->filename,$mahnung['betreff'],"","",$tmpfile,$this->app->User->GetName());
$this->app->erp->AddDateiStichwort($fileid,'mahnung','rechnung',$rechnung_id);
if ($mahnung['druck']) {
$this->app->printer->Drucken($drucker,$tmpfile);
$this->MahnungCRM('brief',$mahnung['rechnung'], $mahnung['betreff'], $mahnung['body'],$fileid,$Brief->filename);

View File

@ -462,11 +462,11 @@ class Rechnung extends GenRechnung
$this->app->erp->RunHook('Rechnung_Aktion_option',3, $id, $status, $hookoption);
$this->app->erp->RunHook('Rechnung_Aktion_case',3, $id, $status, $hookcase);
/*
//TODO das muss dann später in den Hook
$RechnungzuVerbindlichkeitOption = "<option value=\"rechnungzuverbindlichkeit\">Rechnung zu Verbindlichkeit</option>";
$RechnungzuVerbindlichkeitCase = "case 'rechnungzuverbindlichkeit': if(!confirm('Wirklich Verbindlichkeit anlegen?')) return document.getElementById('aktion$prefix').selectedIndex = 0; else window.location.href='index.php?module=rechnungzuverbindlichkeit&action=create&id=%value%'; break;";
*/
if($this->app->erp->RechteVorhanden('zertifikatgenerator','list'))
{

View File

@ -6,12 +6,15 @@
* SPDX-License-Identifier: LicenseRef-EGPL-3.1
*/
use Xentral\Modules\Onlineshop\Data\OrderStatus;
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
class Shopimporter_Presta extends ShopimporterBase
{
private $app;
private $intern;
private $shopid;
private $data;
var $data;
private $protocol;
private $apiKey;
private $shopUrl;
@ -161,18 +164,21 @@ class Shopimporter_Presta extends ShopimporterBase
public function ImportUpdateAuftrag()
{
$auftrag = $this->data['auftrag'];
/** @var OrderStatusUpdateRequest $data */
$data = $this->CatchRemoteCommand('data');
if ($data->orderStatus !== OrderStatus::Completed)
return;
$obj = $this->prestaRequest('GET', 'order_histories?schema=blank');
$obj->order_history->id_order = $auftrag;
$obj->order_history->id_order = $data->shopOrderId;
$obj->order_history->id_order_state = $this->idabgeschlossen;
$this->prestaRequest('POST', 'order_histories', $obj->asXML());
$req = $this->prestaRequest('GET', "order_carriers?filter[id_order]=$auftrag&display=[id]");
$req = $this->prestaRequest('GET', "order_carriers?filter[id_order]=$data->shopOrderId&display=[id]");
$orderCarrierId = strval($req->order_carriers->order_carrier[0]->id);
$req = $this->prestaRequest('GET', "order_carriers/$orderCarrierId");
$req->order_carrier->tracking_number = $this->data['tracking'];
$req->order_carrier->tracking_number = join(',', $data->getTrackingNumberList());
$this->prestaRequest('PUT', "order_carriers/$orderCarrierId", $req->asXML());
}

View File

@ -14,6 +14,8 @@
?>
<?php
use Xentral\Components\Http\JsonResponse;
use Xentral\Modules\Onlineshop\Data\OrderStatus;
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
include_once 'Shopimporter_Shopify_Adapter.php';
@ -3381,17 +3383,21 @@ class Shopimporter_Shopify extends ShopimporterBase
public function ImportUpdateAuftrag()
{
$tmp = $this->CatchRemoteCommand('data');
/** @var OrderStatusUpdateRequest $req */
$req = $this->CatchRemoteCommand('data');
if ($req->orderStatus !== OrderStatus::Completed)
return;
// pruefe ob $tmp[datei] vorhanden wenn nicht lege an sonst update [inhalt] und [checksum]
$auftrag = $tmp['auftrag'];
$auftrag = $req->shopOrderId;
if(!empty($auftrag)){
$zahlungok = $tmp['zahlung'];
$versandok = $tmp['versand'];
$tracking = $tmp['tracking'];
$versandart = $tmp['versandart'];
$data = array();
$data['fulfillment'] = array('tracking_number' => $tracking, 'tracking_company' => $versandart, 'notify_customer' => false);
$data['fulfillment'] = [
'tracking_numbers' => $req->getTrackingNumberList(),
'tracking_company' => $req->shipments[0]?->shippingMethod,
'notify_customer' => false,
'tracking_urls' => $req->getTrackingUrlList()
];
if(!empty($this->location)){
$data['fulfillment']['location_id'] = $this->location;
}
@ -3410,16 +3416,10 @@ class Shopimporter_Shopify extends ShopimporterBase
if($this->shopifytracking){
$data['fulfillment']['notify_customer'] = true;
}
if(!empty($tmp['trackinglinkraw'])) {
$data['fulfillment']['tracking_urls'] = [$tmp['trackinglinkraw']];
}
elseif(!empty($tmp['trackinglink'])){
$data['fulfillment']['tracking_urls'] = [$tmp['trackinglink']];
}
$result = $this->adapter->call('orders/' . $auftrag . '/fulfillments.json', 'POST', $data);
if($this->logging){
$this->app->erp->LogFile(array($tmp, $auftrag, $data, $result['data']));
$this->app->erp->LogFile(array($data, $auftrag, $data, $result['data']));
}
$this->adapter->call('orders/' . $auftrag . '/metafields.json', 'POST', array('metafield' => [
'key' => 'sync_status',
@ -3429,7 +3429,7 @@ class Shopimporter_Shopify extends ShopimporterBase
]));
}else{
if($this->logging){
$this->app->erp->LogFile(array($tmp, $auftrag,'Kein Auftrag'));
$this->app->erp->LogFile(array($data, $auftrag,'Kein Auftrag'));
}
}
return 'OK';

View File

@ -1,4 +1,4 @@
<?php
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
@ -10,10 +10,12 @@
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
*/
?>
<?php
use Xentral\Components\Http\JsonResponse;
use Xentral\Modules\Onlineshop\Data\OrderStatus;
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
class Shopimporter_Shopware extends ShopimporterBase
{
@ -2520,38 +2522,19 @@ class Shopimporter_Shopware extends ShopimporterBase
//TODO fuer AuftragImport
public function ImportUpdateAuftrag()
{
$tmp = $this->CatchRemoteCommand('data');
/** @var OrderStatusUpdateRequest $data */
$data = $this->CatchRemoteCommand('data');
if ($data->orderStatus !== OrderStatus::Completed)
return;
// pruefe ob $tmp[datei] vorhanden wenn nicht lege an sonst update [inhalt] und [checksum]
$auftrag = $tmp['auftrag'];
$zahlungok = $tmp['zahlung'];
$versandok = $tmp['versand'];
$tracking = $tmp['tracking'];
$auftrag = $data->shopOrderId;
/*if($zahlungok=='ok' || $zahlungok=='1')
$status_zahlung=12;
else
$status_zahlung=1;
if($versandok=='ok' || $versandok=='1')
$status_versand=7;
else
$status_versand=1;*/
/*
$date = new DateTime();
$date->modify('+10 days');
$date = $date->format(DateTime::ISO8601);
*/
$result = $this->adapter->put('orders/'.$auftrag, array(
// 'paymentStatusId' => $status_zahlung,
'orderStatusId' => $this->abgeschlossenStatusId,//$status_versand,
'trackingCode' => $tracking
//'comment' => 'Neuer Kommentar',
//'transactionId' => '0',
// 'clearedDate' => $date,
'orderStatusId' => $this->abgeschlossenStatusId,
'trackingCode' => join(',', $data->getTrackingNumberList())
));
$this->ShopwareLog("Abschlussstatusrückmeldung für Auftrag: $auftrag", print_r($result,true));
//$this->app->DB->Delete("DELETE FROM auftraege WHERE id='$auftrag' LIMIT 1");
return 'ok';
}

View File

@ -15,6 +15,8 @@
<?php
use Xentral\Components\Http\JsonResponse;
use Xentral\Modules\Onlineshop\Data\OrderStatus;
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
use Xentral\Modules\Shopware6\Client\Shopware6Client;
use Xentral\Modules\Shopware6\Data\PriceData;
@ -38,6 +40,9 @@ class Shopimporter_Shopware6 extends ShopimporterBase
public $propertyOption;
public $shopwareDefaultSalesChannel;
public $shopwareMediaFolder;
private $normalTaxId;
private $reducedTaxId;
public $protocol;
/** @var bool */
@ -586,6 +591,8 @@ class Shopimporter_Shopware6 extends ShopimporterBase
$this->propertyOption = $einstellungen['felder']['shopwarePropertyOption'];
$this->shopwareDefaultSalesChannel = $einstellungen['felder']['shopwareDefaultSalesChannel'];
$this->shopwareMediaFolder = $einstellungen['felder']['shopwareMediaFolder'];
$this->normalTaxId = $einstellungen['felder']['normalTaxId'];
$this->reducedTaxId = $einstellungen['felder']['reducedTaxId'];
$query = sprintf('SELECT `steuerfreilieferlandexport` FROM `shopexport` WHERE `id` = %d', $this->shopid);
$this->taxationByDestinationCountry = !empty($this->app->DB->Select($query));
@ -669,6 +676,16 @@ class Shopimporter_Shopware6 extends ShopimporterBase
'size' => 40,
'default' => 'Product Media'
],
'normalTaxId' => [
'typ' => 'text',
'bezeichnung' => '{|TaxId für Steuersatz "normal"|}',
'size' => 40,
],
'reducedTaxId' => [
'typ' => 'text',
'bezeichnung' => '{|TaxId für Steuersatz "ermäßigt"|}',
'size' => 40,
],
'statesToFetch' => [
'typ' => 'text',
'bezeichnung' => '{|Abzuholender Bestellstatus|}:',
@ -927,7 +944,12 @@ class Shopimporter_Shopware6 extends ShopimporterBase
$quantity = $this->getCorrectedStockFromAvailable($active, (int)$quantity, $articleInfo);
$taxRate = (float)$article['steuersatz'];
$taxId = $this->getTaxIdByRate($taxRate);
if (!empty($this->normalTaxId) && $article['umsatzsteuer'] == 'normal')
$taxId = $this->normalTaxId;
else if (!empty($this->reducedTaxId) && $article['umsatzsteuer'] == 'ermaessigt')
$taxId = $this->reducedTaxId;
else
$taxId = $this->getTaxIdByRate($taxRate);
$mediaToAdd = $this->mediaToExport($article, $articleIdShopware);
@ -1034,6 +1056,10 @@ class Shopimporter_Shopware6 extends ShopimporterBase
'deliveryTimeId' => $deliveryTimeId
];
if (!$article['texteuebertragen']) {
unset($data['description']);
}
$data = array_merge($data, $systemFieldsToAdd);
if(empty($data['customFields'])
|| empty($data['customFields']['wawision_shopimporter_syncstate'])){
@ -1057,7 +1083,7 @@ class Shopimporter_Shopware6 extends ShopimporterBase
sprintf('product/%s?_response=true', $articleIdShopware), $data, $headerInformation);
}
if(!empty($articleIdShopware)){
if(!empty($articleIdShopware) && $article['texteuebertragen']) {
$this->exportTranslationsForArticle($article, $articleIdShopware);
}
@ -1352,8 +1378,7 @@ class Shopimporter_Shopware6 extends ShopimporterBase
*/
protected function mediaToExport($internalArticleData, $articleIdShopware)
{
$mediaToAdd = [
];
$mediaToAdd = [];
if (empty($internalArticleData['Dateien'])) {
return $mediaToAdd;
@ -1826,7 +1851,6 @@ class Shopimporter_Shopware6 extends ShopimporterBase
protected function createPropertyOption($propertyGroupId, $propertyOptionName): ?string
{
$propertyOptionData = [
'id' => '',
'name' => $propertyOptionName
];
$createdPropertyOption = $this->shopwareRequest(
@ -1881,13 +1905,7 @@ class Shopimporter_Shopware6 extends ShopimporterBase
if (empty($countryIsoToPropertyTranslation['DE'])) {
continue;
}
$propertyGroupId = '';
if (array_key_exists($propertyDefaultName, $this->knownPropertyGroupIds)) {
$propertyGroupId = $this->knownPropertyGroupIds[$propertyDefaultName];
}
if (empty($propertyGroupId)) {
$propertyGroupId = $this->getPropertyGroupId($propertyDefaultName);
}
$propertyGroupId = $this->getPropertyGroupId($propertyDefaultName);
if (empty($propertyGroupId)) {
$propertyGroupId = $this->createPropertyGroup($propertyDefaultName);
}
@ -2664,15 +2682,10 @@ class Shopimporter_Shopware6 extends ShopimporterBase
if (empty($article['matrix_varianten']) || empty($articleIdShopware)) {
return false;
}
$headerInformation = ['sw-language-id: ' . $languageId];
$internalGroupPropertiesToShopwareId = [];
foreach ($article['matrix_varianten']['gruppen'] as $propertyGroupName => $internalPropertyGroupValues) {
$propertyGroupId = '';
if (array_key_exists($propertyGroupName, $this->knownPropertyGroupIds)) {
$propertyGroupId = $this->knownPropertyGroupIds[$propertyGroupName];
}
if (empty($propertyGroupId)) {
$propertyGroupId = $this->getPropertyGroupId($propertyGroupName);
}
$propertyGroupId = $this->getPropertyGroupId($propertyGroupName);
if (empty($propertyGroupId)) {
$propertyGroupId = $this->createPropertyGroup($propertyGroupName);
}
@ -2693,8 +2706,6 @@ class Shopimporter_Shopware6 extends ShopimporterBase
}
}
$languageId = $this->getLanguageIdByCountryIso('DE');
$headerInformation = ['sw-language-id: ' . $languageId];
$shopwarePropertyGroupOptions = $this->shopwareRequest(
'GET',
'property-group/' . $propertyGroupId . '/options?limit=100',
@ -2705,7 +2716,7 @@ class Shopimporter_Shopware6 extends ShopimporterBase
}
foreach ($internalPropertyGroupValues as $internalPropertyGroupValue => $valueNotNeeded) {
if (!array_key_exists($internalPropertyGroupValue, $internalGroupPropertiesToShopwareId[$propertyGroupName])) {
if (!array_key_exists($internalPropertyGroupValue, $internalGroupPropertiesToShopwareId[$propertyGroupName] ?? [])) {
$newOptionData = [
'name' => (string)$internalPropertyGroupValue
];
@ -2778,6 +2789,13 @@ class Shopimporter_Shopware6 extends ShopimporterBase
$isCloseOut = true;
}
if ($variant['umsatzsteuer'] == 'normal' && !empty($this->normalTaxId))
$taxId = $this->normalTaxId;
else if ($variant['umsatzsteuer'] == 'ermaessigt' && !empty($this->reducedTaxId))
$taxId = $this->reducedTaxId;
else
$taxId = $this->getTaxIdByRate($variant['steuersatz']);
$variantProductData = [
'active' => $active,
'isCloseout' => $isCloseOut,
@ -2800,7 +2818,7 @@ class Shopimporter_Shopware6 extends ShopimporterBase
],
'stock' => (int)$stock,
'ean' => null,
'taxId' => $this->getTaxIdByRate($variant['steuersatz']),
'taxId' => $taxId,
];
if(!empty($weight)){
$variantProductData['weight'] = $weight;
@ -2817,7 +2835,7 @@ class Shopimporter_Shopware6 extends ShopimporterBase
foreach ($internalVariantMatrixData as $expression) {
if (!in_array(
$internalGroupPropertiesToShopwareId[$expression['name']][$expression['values']],
$existingCombinationsByNumber[$productNumber]['options'],
$existingCombinationsByNumber[$productNumber]['options'] ?? [],
false)) {
$renewVariant = true;
} else {
@ -2960,14 +2978,21 @@ class Shopimporter_Shopware6 extends ShopimporterBase
* @return PriceData[]
*/
protected function getPricesFromArray($priceArray): array{
return array_map(static function($price){
return new PriceData(
(int)$price['ab_menge'],
(float)$price['preis'],
(float)$price['bruttopreis'],
$price['waehrung'],
$price['gruppeextern'] ?? '') ;
},$priceArray);
$c = count($priceArray);
$result = [];
for ($i = 0; $i < $c; $i++) {
$end = null;
if ($i+1 < $c && ($priceArray[$i+1]['gruppeextern'] ?? '') == ($priceArray[$i]['gruppeextern'] ?? ''))
$end = (int)$priceArray[$i+1]['ab_menge'] - 1;
$result[] = new PriceData(
(int)$priceArray[$i]['ab_menge'],
(float)$priceArray[$i]['preis'],
(float)$priceArray[$i]['bruttopreis'],
$priceArray[$i]['waehrung'],
$priceArray[$i]['gruppeextern'] ?? '',
$end);
}
return $result;
}
/**
@ -3349,6 +3374,7 @@ class Shopimporter_Shopware6 extends ShopimporterBase
$productPriceType => $lineItem['attributes']['price']['unitPrice'],
'steuersatz' => $lineItem['attributes']['price']['calculatedTaxes'][0]['taxRate'],
];
$this->parseBogxData($lineItem, $product);
$cart['articlelist'][] = $product;
}
@ -3385,9 +3411,12 @@ class Shopimporter_Shopware6 extends ShopimporterBase
*/
public function ImportUpdateAuftrag()
{
$tmp = $this->CatchRemoteCommand('data');
$auftrag = $tmp['auftrag'];
$tracking = $tmp['tracking'];
/** @var OrderStatusUpdateRequest $data */
$data = $this->CatchRemoteCommand('data');
if ($data->orderStatus !== OrderStatus::Completed)
return;
$auftrag = $data->shopOrderId;
$this->shopwareRequest('POST', '_action/order/'.$auftrag.'/state/complete');
@ -3398,17 +3427,17 @@ class Shopimporter_Shopware6 extends ShopimporterBase
$this->shopwareRequest('POST', '_action/order_delivery/'.$deliveryId.'/state/ship');
$deliveryData = [
'trackingCodes' => [$tracking]
'trackingCodes' => [$data->getTrackingNumberList()]
];
$this->shopwareRequest('PATCH', 'order-delivery/'.$deliveryId,$deliveryData);
}
$this->sendInvoce($auftrag);
$this->addCustomFieldToOrder((string)$auftrag);
if(empty($tmp['orderId'])) {
$this->addCustomFieldToOrder($auftrag);
if(empty($data->orderId)) {
return;
}
$this->updateStorageForOrderIntId((int)$tmp['orderId']);
$this->updateStorageForOrderIntId($data->orderId);
}
public function ImportStorniereAuftrag()
@ -3817,4 +3846,48 @@ class Shopimporter_Shopware6 extends ShopimporterBase
$this->updateArticleCacheToSync($articleIds);
}
protected function parseBogxData(array $lineItem, array &$product) : void
{
if (!isset($lineItem['attributes']['payload']['bogxProductConfigurator']))
return;
$bogxdata = $lineItem['attributes']['payload']['bogxProductConfigurator'];
$textlines = [];
if (isset($bogxdata['ordercode']))
$textlines[] = "Order-Code: ${bogxdata['ordercode']}";
foreach ($bogxdata['optionsGroups'] as $bogxposition) {
$dt = $bogxposition['datatype'];
if ($dt == 'quantity_total')
continue;
if (is_array($bogxposition['valueID']) && is_array($bogxposition['title']))
{
foreach ($bogxposition['valueID'] as $valueID) {
$bogxTitle = $bogxposition['title'][$valueID];
if ($dt == 'checkbox_quantity')
$bogxTitle = $bogxposition['label'][$valueID]." ".$bogxTitle;
$textlines[] = sprintf("%s: %s", $bogxposition['groupname'], $bogxTitle);
}
}
else
{
if (is_array($bogxposition['title']))
$bogxTitle = join(' ', $bogxposition['title']);
else
$bogxTitle = $bogxposition['title'];
$textlines[] = sprintf("%s: %s", $bogxposition['groupname'], $bogxTitle);
}
}
if (!empty($bogxdata['shippingtime'])) {
$textlines[] = $bogxdata['shippingtime'];
}
$product['options'] .= join("\n", $textlines);
$product['price'] = $bogxdata['unitySurcharge'];
$product['price_netto'] = $bogxdata['unitySurchargeNetto'];
$product['quantity'] = $bogxdata['totalQuantity'];
}
}

View File

@ -1,4 +1,4 @@
<?php
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
@ -10,10 +10,12 @@
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
*/
?>
<?php
use Xentral\Components\Http\JsonResponse;
use Xentral\Modules\Onlineshop\Data\OrderStatus;
use Xentral\Modules\Onlineshop\Data\OrderStatusUpdateRequest;
class Shopimporter_Woocommerce extends ShopimporterBase
{
@ -442,47 +444,35 @@ class Shopimporter_Woocommerce extends ShopimporterBase
*/
public function ImportUpdateAuftrag()
{
$tmp = $this->CatchRemoteCommand('data');
/** @var OrderStatusUpdateRequest $data */
$data = $this->CatchRemoteCommand('data');
if ($data->orderStatus !== OrderStatus::Completed)
return;
$orderId = $tmp['auftrag'];
$paymentOk = $tmp['zahlung'];
$shippingOk = $tmp['versand'];
$trackingCode = $tmp['tracking'];
$carrier = $tmp['versandart'];
if ($paymentOk === 'ok' || $paymentOk === '1'){
$paymentOk = true;
}
if ($shippingOk === 'ok' || $shippingOk === '1'){
$shippingOk = true;
}
$trackingCode = $data->shipments[0]?->trackingNumber;
if (!empty($trackingCode)) {
$this->client->post('orders/'.$orderId.'/notes', [
$this->client->post('orders/'.$data->orderId.'/notes', [
'note' => 'Tracking Code: ' . $trackingCode
]);
$this->WooCommerceLog("Tracking Code Rückmeldung für Auftrag: $orderId", $trackingCode);
$this->WooCommerceLog("Tracking Code Rückmeldung für Auftrag: $data->orderId", $trackingCode);
}
if ($paymentOk && $shippingOk) {
$updateData = [
'status' => $this->statusCompleted,
'meta_data' => [
[
'key' => 'tracking_code',
'value' => $trackingCode
],
[
'key' => 'shipping_carrier',
'value' => $carrier
]
$updateData = [
'status' => $this->statusCompleted,
'meta_data' => [
[
'key' => 'tracking_code',
'value' => $data->shipments[0]?->trackingNumber
],
];
$this->client->put('orders/'.$orderId, $updateData);
$this->WooCommerceLog("Statusrückmeldung 'completed' für Auftrag: $orderId",$this->statusCompleted );
}
[
'key' => 'shipping_carrier',
'value' => $data->shipments[0]?->shippingMethod
]
],
];
$this->client->put('orders/'.$data->orderId, $updateData);
$this->WooCommerceLog("Statusrückmeldung 'completed' für Auftrag: $data->orderId", $this->statusCompleted );
return 'ok';
}

View File

@ -716,7 +716,7 @@ class Ticket {
$ticket_from_db = $this->app->DB->SelectArr($sql)[0];
$ticket_from_db['betreff'] = htmlentities(strip_tags($ticket_from_db['betreff'])); //+ #20230916 XSS
$ticket_from_db['betreff'] = strip_tags($ticket_from_db['betreff']);
foreach ($ticket_from_db as $key => $value) {
$this->app->Tpl->Set(strtoupper($key), $value);

View File

@ -57,7 +57,8 @@ class upgrade {
do_db: false,
force: $force,
connection: false,
origin: false
origin: false,
drop_keys: false
);
break;
case 'do_upgrade':
@ -72,7 +73,8 @@ class upgrade {
do_db: true,
force: $force,
connection: false,
origin: false
origin: false,
drop_keys: false
);
break;
case 'check_db':
@ -88,7 +90,8 @@ class upgrade {
do_db: false,
force: $force,
connection: false,
origin: false
origin: false,
drop_keys: false
);
break;
case 'do_db_upgrade':
@ -104,7 +107,8 @@ class upgrade {
do_db: true,
force: $force,
connection: false,
origin: false
origin: false,
drop_keys: false
);
break;
case 'refresh':

View File

@ -244,16 +244,16 @@ class Verbindlichkeit {
'<input type="number" name="werte[]" value="',
['sql' => $offen_menge],
'" min="0"',
'" max="',
' max="',
['sql' => $offen_menge],
'"/>'
);
$preise = array (
'<input type="number" name="preise[]" step="0.00001" value="',
['sql' => $this->app->erp->FormatMenge("COALESCE(bp.preis,0)",5)],
['sql' => "TRIM(COALESCE(bp.preis,0))+0"],
'" min="0"',
'"/>'
'/>'
);
$artikellink = array (

View File

@ -158,30 +158,15 @@ class Verkaufszahlen {
}else{
$this->app->Tpl->Set('BELEGTYP', 'Auftr&auml;ge');
}
$pkgsubwhere = "DATE(v.datum)=CURDATE()";
if($subwherea)
{
$pakete = $this->getPackages(
" v.versendet_am=DATE_FORMAT(NOW(),'%Y-%m-%d')
AND l.projekt in (".implode(', ', $subwherea).") ".$this->app->erp->ProjektRechte('l.projekt')
);
$this->app->Tpl->Set(
'PAKETE',
$pakete
//$this->app->DB->Select("SELECT COUNT(v.id) FROM versand v INNER JOIN lieferschein l ON v.lieferschein = l.id WHERE v.versendet_am=DATE_FORMAT(NOW(),'%Y-%m-%d') AND l.projekt in (".implode(', ', $subwherea).") ".$this->app->erp->ProjektRechte('l.projekt')."")
);
}else{
$pakete = $this->getPackages(
" v.versendet_am=DATE_FORMAT(NOW(),'%Y-%m-%d')
".$this->app->erp->ProjektRechte('l.projekt')
);
$this->app->Tpl->Set(
'PAKETE',
$pakete
//$this->app->DB->Select("SELECT COUNT(v.id) FROM versand INNER JOIN lieferschein l ON v.lieferschein = l.id WHERE v.versendet_am=DATE_FORMAT(NOW(),'%Y-%m-%d') ".$this->app->erp->ProjektRechte('l.projekt')."")
);
$projectIds = implode(',', $subwherea);
$pkgsubwhere .= " AND l.projekt in ($projectIds)";
}
$this->app->Tpl->Set('PAKETE', $this->getPackages($pkgsubwhere));
if($daten['regs'])
{
if($subwherea)
@ -226,29 +211,14 @@ class Verkaufszahlen {
$this->app->Tpl->Parse('STATISTIKHEUTE','verkaufszahlen_statistik.tpl');
//gestern
$pkgsubwhere = "DATE(v.datum)=CURDATE()-1";
if($subwherea)
{
$pakete = $this->getPackages(
" v.versendet_am=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 day),'%Y-%m-%d')
AND l.projekt in (".implode(', ', $subwherea).") ".$this->app->erp->ProjektRechte('l.projekt')
);
$this->app->Tpl->Set(
'PAKETE',
$pakete
//$this->app->DB->Select("SELECT COUNT(v.id) FROM versand v INNER JOIN lieferschein l ON v.lieferschein = l.id WHERE v.versendet_am=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 day),'%Y-%m-%d') AND l.projekt in (".implode(', ', $subwherea).") ".$this->app->erp->ProjektRechte('l.projekt')."")
);
}else{
$pakete = $this->getPackages(
" v.versendet_am=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 day),'%Y-%m-%d')
AND l.projekt in (".implode(', ', $subwherea).") ".$this->app->erp->ProjektRechte('l.projekt')
);
$this->app->Tpl->Set(
'PAKETE',
$pakete
//$this->app->DB->Select("SELECT COUNT(v.id) FROM versand v INNER JOIN lieferschein l ON v.lieferschein = l.id WHERE v.versendet_am=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 day),'%Y-%m-%d') ".$this->app->erp->ProjektRechte('l.projekt')."")
);
$projectIds = implode(',', $subwherea);
$pkgsubwhere .= " AND l.projekt in ($projectIds)";
}
$this->app->Tpl->Set('PAKETE', $this->getPackages($pkgsubwhere));
if($daten['regs'])
{
if($subwherea)
@ -343,21 +313,19 @@ class Verkaufszahlen {
return [(float)$einnahmen_auftrag, (float)$deckungsbeitrag, (float)$deckungsbeitragprozent];
}
/**
* @param string $subwhere
* @param string $join
*
* @return int
*/
public function getPackages($subwhere, $join = '')
public function getPackages(string $subwhere, string $join = '', bool $applyProjectRights = true) : int
{
return (int)$this->app->DB->Select(
"SELECT COUNT(v.id)
FROM versand v
INNER JOIN lieferschein l ON v.lieferschein = l.id
$join
WHERE ".$subwhere
);
$sqlpackages = "
SELECT count(distinct v.id)
FROM versandpakete v
LEFT JOIN versandpaket_lieferschein_position vlp ON vlp.versandpaket = v.id
LEFT JOIN lieferschein_position lp ON vlp.lieferschein_position = lp.id
INNER JOIN lieferschein l ON l.id IN (lp.lieferschein, v.lieferschein_ohne_pos)
$join
WHERE $subwhere ";
if ($applyProjectRights)
$sqlpackages .= $this->app->erp->ProjektRechte('l.projekt');
return $this->app->DB->Select($sqlpackages);
}
/**
@ -634,23 +602,28 @@ class Verkaufszahlen {
$summe30_gs = $this->app->DB->Select("SELECT SUM(ap.preis*ap.menge*(IF(ap.rabatt > 0, (100-ap.rabatt)/100, 1))) FROM gutschrift_position ap INNER JOIN gutschrift a ON ap.gutschrift=a.id
WHERE a.datum > date_add(NOW(), interval -30 day) AND (a.status!='storniert' and a.status!='angelegt') ".$this->app->erp->ProjektRechte('a.projekt')."");
$summemenge = count($this->app->DB->SelectArr("SELECT
$summemenge = $this->app->DB->SelectArr("SELECT
COUNT(a.datum) FROM auftrag_position ap INNER JOIN auftrag a ON ap.auftrag=a.id WHERE (a.status!='storniert' and a.status!='angelegt') ".$this->app->erp->ProjektRechte('a.projekt')."
GROUP by a.datum, a.projekt "));
GROUP by a.datum, a.projekt ");
if($summemenge < 30)
{
$summe_gutschriften = $summe_gs;
$summe_auftrag = $summe;
$durchschnitt = ($summe-$summe_gs) / $summemenge;
$summe= number_format(($summe-$summe_gs),2);
$tage = $summemenge;
} else {
$summe_gutschriften = $summe30_gs;
$summe_auftrag = $summe30;
$durchschnitt = ($summe30-$summe30_gs) / 30; // wenn mehr als 30 tage
$summe= number_format(($summe30-$summe30_gs),2);
$tage = 30;
if (!empty($summemenge)) {
$summemenge = count($summemenge);
if($summemenge < 30)
{
$summe_gutschriften = $summe_gs;
$summe_auftrag = $summe;
$durchschnitt = ($summe-$summe_gs) / $summemenge;
$summe= number_format(($summe-$summe_gs),2);
$tage = $summemenge;
} else {
$summe_gutschriften = $summe30_gs;
$summe_auftrag = $summe30;
$durchschnitt = ($summe30-$summe30_gs) / 30; // wenn mehr als 30 tage
$summe= number_format(($summe30-$summe30_gs),2);
$tage = 30;
}
}
$summe_gutschriften = number_format($summe_gutschriften,2);
@ -669,7 +642,7 @@ class Verkaufszahlen {
"SELECT
DATE_FORMAT(a.datum,'%d.%m.%Y') as datum,p.abkuerzung as projekt, ".$this->app->erp->FormatPreis("SUM(ap.preis*ap.menge*(IF(ap.rabatt > 0, (100-ap.rabatt)/100, 1)))")." as Auftragseingang, COUNT(ap.id) as positionen,
CONCAT('<a href=\"index.php?module=verkaufszahlen&action=details&frame=false&id=',DATE_FORMAT(a.datum,'%Y-%m-%d'),'-',a.projekt,'\" onclick=\"makeRequest(this); return false;\">Details</a>') as id FROM auftrag_position ap INNER JOIN auftrag a ON ap.auftrag=a.id
LEFT JOIN projekt p ON p.id=a.projekt WHERE a.status!='storniert' ".$this->app->erp->ProjektRechte('a.projekt')." GROUP by a.datum DESC, a.projekt LIMIT 14";
LEFT JOIN projekt p ON p.id=a.projekt WHERE a.status!='storniert' ".$this->app->erp->ProjektRechte('a.projekt')." GROUP by a.datum, a.projekt ORDER by a.datum DESC LIMIT 14";
$table->Query($tmp);
@ -684,8 +657,7 @@ class Verkaufszahlen {
}
//heute
$this->app->Tpl->Set('PAKETE',$this->app->DB->Select("SELECT COUNT(v.id) FROM versand v INNER JOIN lieferschein l ON v.lieferschein = l.id WHERE v.versendet_am=DATE_FORMAT(NOW(),'%Y-%m-%d') ".$this->app->erp->ProjektRechte('l.projekt').""));
$this->app->Tpl->Set('PAKETE',$this->getPackages("DATE(v.datum)=CURDATE()"));
$data = $this->app->DB->SelectArr("SELECT ifnull(SUM(umsatz_netto),0) as umsatz_netto2,ifnull(SUM(erloes_netto),0) as erloes_netto2 FROM `auftrag`
WHERE datum=DATE_FORMAT(NOW(),'%Y-%m-%d') AND ( status='abgeschlossen' OR status='freigegeben') ".
$this->app->erp->ProjektRechte('projekt').
@ -711,7 +683,7 @@ class Verkaufszahlen {
//gestern
$this->app->Tpl->Set('PAKETE',$this->app->DB->Select("SELECT COUNT(v.id) FROM versand v INNER JOIN lieferschein l ON v.lieferschein = l.id WHERE v.versendet_am=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 day),'%Y-%m-%d') ".$this->app->erp->ProjektRechte('l.projekt').""));
$this->app->Tpl->Set('PAKETE',$this->getPackages("DATE(v.datum)=CURDATE()-1"));
$data = $this->app->DB->SelectArr("SELECT
ifnull(SUM(umsatz_netto),0) as umsatz_netto2,ifnull(SUM(erloes_netto),0) as erloes_netto2 FROM `auftrag`
@ -767,11 +739,13 @@ class Verkaufszahlen {
{
switch(strtoupper($type)) {
case 'TAGESUEBERSICHTPAKETE':
return $this->app->DB->SelectArrCache("SELECT DATE_FORMAT(v.versendet_am,'%d.%m.%Y') as datum,
count(v.id) as pakete
from versand v
INNER JOIN lieferschein l ON v.lieferschein = l.id
WHERE 1 ".$this->app->erp->ProjektRechte('l.projekt').' group by v.versendet_am',
return $this->app->DB->SelectArrCache("SELECT DATE_FORMAT(v.datum,'%d.%m.%Y') as datum,
count(distinct v.id) as pakete
FROM versandpakete v
LEFT JOIN versandpaket_lieferschein_position vlp ON vlp.versandpaket = v.id
LEFT JOIN lieferschein_position lp ON vlp.lieferschein_position = lp.id
INNER JOIN lieferschein l ON l.id IN (lp.lieferschein, v.lieferschein_ohne_pos)
WHERE 1 ".$this->app->erp->ProjektRechte('l.projekt').' group by DATE(v.datum)',
$seconds, 'verkaufszahlen'
);
break;

View File

@ -283,13 +283,13 @@ class Versandpakete {
$allowed['versandpakete_lieferscheine'] = array('lieferscheine');
$heading = array('', '', 'Lieferschein', 'Adresse','Menge','Menge in Versandpaketen','Monitor','Pakete','Paket hinzuf&uuml;gen');
$width = array( '1%','1%', '10%', '10%', '10%', '10%', '1%', '1%', '1%'); // Fill out manually later
$heading = array('', '', 'Lieferschein', 'Adresse','Menge','Menge in Versandpaketen','Projekt','Monitor','Pakete','Paket hinzuf&uuml;gen');
$width = array( '1%','1%', '10%', '10%', '10%', '10%', '5%', '1%', '1%', '1%'); // Fill out manually later
// columns that are aligned right (numbers etc)
// $alignright = array(4,5,6,7,8);
$findcols = array('id','id','belegnr','name','lmenge','vmenge','(alle_versendet+alle_abgeschlossen*2)','id','id');
$findcols = array('id','id','belegnr','name','lmenge','vmenge','projekt','(alle_versendet+alle_abgeschlossen*2)','id','id');
$searchsql = array('belegnr','name');
$defaultorder = 1;
@ -1199,6 +1199,7 @@ class Versandpakete {
$sql_lieferschein_position = "
SELECT
l.id,
p.abkuerzung AS projekt,
l.belegnr,
l.name,
lp.menge lmenge,
@ -1214,6 +1215,7 @@ class Versandpakete {
LEFT JOIN versandpaket_lieferschein_position vlp ON vlp.lieferschein_position = lp.id
LEFT JOIN versandpakete v ON vlp.versandpaket = v.id
LEFT JOIN versandpakete vop ON vop.lieferschein_ohne_pos = l.id
LEFT JOIN projekt p ON p.id = l.projekt
WHERE
l.versand_status <> 0 AND
l.belegnr <> '' AND
@ -1224,6 +1226,7 @@ class Versandpakete {
$sql_lieferschein = "
SELECT
id,
projekt,
belegnr,
name,
SUM(lmenge) lmenge,
@ -1247,6 +1250,7 @@ class Versandpakete {
name,
".$app->erp->FormatMenge("lmenge").",
".$app->erp->FormatMenge("vmenge").",
projekt,
".$app->YUI->IconsSQL_lieferung().",
if(vmenge > 0 OR vop IS NOT NULL,CONCAT('<a href=\"index.php?module=versandpakete&action=lieferung&id=',id,'\"><img src=\"themes/{$app->Conf->WFconf['defaulttheme']}/images/forward.svg\" title=\"Pakete anzeigen\" border=\"0\"></a>'),''),
id,

View File

@ -1474,6 +1474,7 @@ class Wareneingang {
$this->app->ActionHandler("settings", "WareneingangSettings");
$this->app->ActionHandler("deletepos", "WareneingangPositionLoeschen");
$this->app->ActionHandler("oeffnen", "WareneingangOeffnen");
$this->app->DefaultActionHandler("list");
$this->app->erp->Headlines('Wareneingang');
@ -1598,6 +1599,15 @@ class Wareneingang {
$this->app->Location->execute('Location: index.php?module=wareneingang&action=distribution');
}
public function WareneingangOeffnen() {
$id = $this->app->Secure->GetPOST('id');
if ($id > 0 && is_numeric($id)) {
$this->app->DB->Delete("UPDATE paketannahme set status = 'angelegt' WHERE id='$id' LIMIT 1");
}
$this->app->Location->execute('Location: index.php?module=wareneingang&action=distriinhalt&id='.$id);
}
public function WareneingangMenu() {
$action = $this->app->Secure->GetGET('action');
$this->app->Tpl->Add('KURZUEBERSCHRIFT', ' Wareneingang');

View File

@ -1,320 +1,325 @@
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
<?php
class WidgetGenangebot_position
{
private $app; //application object
public $form; //store form object
protected $parsetarget; //target for content
public function __construct($app,$parsetarget)
{
$this->app = $app;
$this->parsetarget = $parsetarget;
$this->Form();
}
public function angebot_positionDelete()
{
$this->form->Execute("angebot_position","delete");
$this->angebot_positionList();
}
function Edit()
{
$this->form->Edit();
}
function Copy()
{
$this->form->Copy();
}
public function Create()
{
$this->form->Create();
}
public function Search()
{
$this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE");
}
public function Summary()
{
$this->app->Tpl->Set($this->parsetarget,"grosse Tabelle");
}
function Form()
{
$this->form = $this->app->FormHandler->CreateNew("angebot_position");
$this->form->UseTable("angebot_position");
$this->form->UseTemplate("angebot_position.tpl",$this->parsetarget);
$field = new HTMLInput("nummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG");
$field = new HTMLTextarea("beschreibung",8,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("menge","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE");
$field = new HTMLInput("preis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("formelmenge",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLTextarea("formelpreis",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("optional","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ohnepreis","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("textalternativpreis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("berechnen_aus_teile","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ausblenden_im_pdf","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("explodiert_parent","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("waehrung","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0");
$field->AddOption('{|Standard|}','');
$field->AddOption('Erm&auml;&szlig;igt','ermaessigt');
$field->AddOption('Befreit','befreit');
$this->form->NewField($field);
$field = new HTMLCheckbox("anderersteuersatz","","","","0","0");
$this->form->NewField($field);
$field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("steuertext",3,50,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("grundrabatt","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt1","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt2","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt3","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt4","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt5","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("keinrabatterlaubt","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("rabatt","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("einheit","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("vpe","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("lieferdatum","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("lieferdatumkw","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("artikelnummerkunde","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("zolltarifnummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("herkunftsland","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld1","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld2","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld3","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld4","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld5","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld6","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld7","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld8","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld9","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld10","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld11","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld12","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld13","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld14","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld15","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld16","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld17","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld18","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld19","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld20","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld21","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld22","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld23","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld24","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld25","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld26","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld27","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld28","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld29","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld30","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld31","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld32","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld33","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld34","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld35","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld36","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld37","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld38","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld39","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld40","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("punkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bonuspunkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("mlmdirektpraemie","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("kostenstelle","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("erloese","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("erloesefestschreiben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLTextarea("bemerkung",3,40,"","","","","0");
$this->form->NewField($field);
}
}
?>
<?php
class WidgetGenangebot_position
{
private $app; //application object
public $form; //store form object
protected $parsetarget; //target for content
public function __construct($app,$parsetarget)
{
$this->app = $app;
$this->parsetarget = $parsetarget;
$this->Form();
}
public function angebot_positionDelete()
{
$this->form->Execute("angebot_position","delete");
$this->angebot_positionList();
}
function Edit()
{
$this->form->Edit();
}
function Copy()
{
$this->form->Copy();
}
public function Create()
{
$this->form->Create();
}
public function Search()
{
$this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE");
}
public function Summary()
{
$this->app->Tpl->Set($this->parsetarget,"grosse Tabelle");
}
function Form()
{
$this->form = $this->app->FormHandler->CreateNew("angebot_position");
$this->form->UseTable("angebot_position");
$this->form->UseTemplate("angebot_position.tpl",$this->parsetarget);
$field = new HTMLInput("nummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bezeichnung","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("bezeichnung","notempty","Pflichtfeld!","MSGBEZEICHNUNG");
$field = new HTMLTextarea("beschreibung",8,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("menge","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$this->form->AddMandatory("menge","notempty","Pflichtfeld!","MSGMENGE");
$field = new HTMLInput("preis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("formelmenge",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLTextarea("formelpreis",2,48,"","","","","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("optional","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ohnepreis","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("textalternativpreis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("berechnen_aus_teile","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ausblenden_im_pdf","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("explodiert_parent","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("waehrung","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLSelect("umsatzsteuer",0,"umsatzsteuer","","","0");
$field->AddOption('{|Standard|}','');
$field->AddOption('Erm&auml;&szlig;igt','ermaessigt');
$field->AddOption('Befreit','befreit');
$this->form->NewField($field);
$field = new HTMLCheckbox("anderersteuersatz","","","","0","0");
$this->form->NewField($field);
$field = new HTMLInput("steuersatz","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLTextarea("steuertext",3,50,"","","","","0");
$this->form->NewField($field);
$field = new HTMLInput("grundrabatt","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt1","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt2","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt3","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt4","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("rabatt5","text","","5","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("keinrabatterlaubt","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("rabatt","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("einheit","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("vpe","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("lieferdatum","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("lieferdatumkw","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("artikelnummerkunde","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("zolltarifnummer","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("herkunftsland","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld1","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld2","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld3","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld4","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld5","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld6","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld7","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld8","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld9","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld10","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld11","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld12","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld13","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld14","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld15","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld16","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld17","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld18","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld19","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld20","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld21","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld22","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld23","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld24","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld25","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld26","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld27","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld28","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld29","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld30","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld31","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld32","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld33","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld34","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld35","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld36","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld37","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld38","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld39","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("freifeld40","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("punkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bonuspunkte","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("mlmdirektpraemie","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("kostenstelle","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("erloese","text","","15","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("erloesefestschreiben","","","1","0","0");
$this->form->NewField($field);
if ($this->app->erp->RechteVorhanden('angebot','einkaufspreise')) {
$field = new HTMLInput("einkaufspreis","text","","50","","","","","","","","0","","");
$this->form->NewField($field);
}
$field = new HTMLTextarea("bemerkung",3,40,"","","","","0");
$this->form->NewField($field);
}
}
?>

View File

@ -400,6 +400,9 @@ class WidgetGenprojekt
$field = new HTMLInput("next_verbindlichkeit","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("next_lieferantengutschrift","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("next_goodspostingdocument","text","","40","","","","","","","","0","","");
$this->form->NewField($field);

View File

@ -1,334 +1,337 @@
<?php
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
/*
**** COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*
* Xentral (c) Xentral ERP Sorftware GmbH, Fuggerstrasse 11, D-86150 Augsburg, * Germany 2019
*
* This file is licensed under the Embedded Projects General Public License *Version 3.1.
*
* You should have received a copy of this license from your vendor and/or *along with this file; If not, please visit www.wawision.de/Lizenzhinweis
* to obtain the text of the corresponding license version.
*
**** END OF COPYRIGHT & LICENSE NOTICE *** DO NOT REMOVE ****
*/
?>
<?php
class WidgetGenshopexport
{
private $app; //application object
public $form; //store form object
protected $parsetarget; //target for content
public function __construct($app,$parsetarget)
{
$this->app = $app;
$this->parsetarget = $parsetarget;
$this->Form();
}
public function shopexportDelete()
{
$this->form->Execute("shopexport","delete");
$this->shopexportList();
}
function Edit()
{
$this->form->Edit();
}
function Copy()
{
$this->form->Copy();
}
public function Create()
{
$this->form->Create();
}
public function Search()
{
$this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE");
}
public function Summary()
{
$this->app->Tpl->Set($this->parsetarget,"grosse Tabelle");
}
function Form()
{
$this->form = $this->app->FormHandler->CreateNew("shopexport");
$this->form->UseTable("shopexport");
$this->form->UseTemplate("shopexport.tpl",$this->parsetarget);
$field = new HTMLInput("pruefen","hidden","1","","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("auftragabholen","hidden","1","","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bezeichnung","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("aktiv","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("einzelsync","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("projekt","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("maxmanuell","text","","6","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("vondatum","text","","12","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("vonzeit","text","","10","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("startdate","text","","12","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("ab_nummer","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("nummersyncstatusaendern","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("nurfehler","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("auftraege","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("aenderungen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("zahlungsweisenmapping","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("versandartenmapping","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("vorabbezahltmarkieren_ohnevorkasse_bar","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("utf8codierung","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("multiprojekt","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ust_ok","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("artikelporto","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("artikelportoermaessigt","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("portoartikelanlegen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelnachnahme_extraartikel","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("artikelnachnahme","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("auftragabgleich","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("sendonlywithtracking","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("holeallestati","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLSelect("freitext",0,"freitext","","","0");
$field->AddOption('','');
$field->AddOption('{|in Feld Freitext laden|}','freitext');
$field->AddOption('{|in Feld Interne Bemerkung laden|}','internebemerkung');
$this->form->NewField($field);
$field = new HTMLSelect("autoversandoption",0,"autoversandoption","","","0");
$field->AddOption('{|Einstellung aus Schnittstelle übernehmen (Standard)|}','standard');
$field->AddOption('{|Rechnung und Lieferschein erstellen|}','rechnungundlieferschein');
$field->AddOption('{|nur Lieferschein erstellen|}','nurlieferschein');
$field->AddOption('{|nur Rechnung erstellen|}','nurrechnung');
$this->form->NewField($field);
$field = new HTMLCheckbox("angeboteanlegen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("autoversandbeikommentardeaktivieren","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("stornoabgleich","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("steuerfreilieferlandexport","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("gesamtbetragfestsetzen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("gesamtbetragfestsetzendifferenz","text","","6","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("lastschriftdatenueberschreiben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelimport","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("rabatteportofestschreiben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikeltexteuebernehmen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelnummernummerkreis","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelimporteinzeln","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelnummeruebernehmen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelbezeichnungauswawision","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelbeschreibungauswawision","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelbeschreibungenuebernehmen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("stuecklisteergaenzen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("positionsteuersaetzeerlauben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("lagerexport","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLSelect("lagergrundlage",0,"lagergrundlage","","","0");
$field->AddOption('{|Artikel verkaufbare|}','0');
$field->AddOption('{|Lagerbestand minus Reservierungen|}','1');
$this->form->NewField($field);
$field = new HTMLCheckbox("ueberschreibe_lagerkorrekturwert","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("lagerkorrekturwert","text","1","6","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelexport","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("autosendarticle","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("shopbilderuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("eigenschaftenuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("kategorienuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("variantenuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("crosssellingartikeluebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("staffelpreiseuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("gutscheineuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("nurpreise","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("nurneueartikel","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelnummerbeimanlegenausshop","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("kundenurvonprojekt","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("adressennichtueberschreiben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("adressupdate","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("vertrieb","text","","","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("artikelrabatt","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("artikelrabattsteuer","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("preisgruppe","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("url","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("passwort","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("token","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("datumvon","text","","","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("cronjobaktiv","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("demomodus","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("direktimport","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("holealle","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("anzgleichzeitig","text","","","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLSelect("modulename",0,"modulename","","","0");
$field->AddOption('{|extern|}','');
$this->form->NewField($field);
}
}
?>
<?php
class WidgetGenshopexport
{
private $app; //application object
public $form; //store form object
protected $parsetarget; //target for content
public function __construct($app,$parsetarget)
{
$this->app = $app;
$this->parsetarget = $parsetarget;
$this->Form();
}
public function shopexportDelete()
{
$this->form->Execute("shopexport","delete");
$this->shopexportList();
}
function Edit()
{
$this->form->Edit();
}
function Copy()
{
$this->form->Copy();
}
public function Create()
{
$this->form->Create();
}
public function Search()
{
$this->app->Tpl->Set($this->parsetarget,"SUUUCHEEE");
}
public function Summary()
{
$this->app->Tpl->Set($this->parsetarget,"grosse Tabelle");
}
function Form()
{
$this->form = $this->app->FormHandler->CreateNew("shopexport");
$this->form->UseTable("shopexport");
$this->form->UseTemplate("shopexport.tpl",$this->parsetarget);
$field = new HTMLInput("pruefen","hidden","1","","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("auftragabholen","hidden","1","","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("bezeichnung","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("aktiv","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("einzelsync","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("projekt","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("maxmanuell","text","","6","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("vondatum","text","","12","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("vonzeit","text","","10","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("startdate","text","","12","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("ab_nummer","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("nummersyncstatusaendern","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("nurfehler","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("auftraege","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("aenderungen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("zahlungsweisenmapping","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("versandartenmapping","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("vorabbezahltmarkieren_ohnevorkasse_bar","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("utf8codierung","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("multiprojekt","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("ust_ok","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("artikelporto","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("artikelportoermaessigt","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("portoartikelanlegen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelnachnahme_extraartikel","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("artikelnachnahme","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("auftragabgleich","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("sendonlywithtracking","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("holeallestati","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLSelect("freitext",0,"freitext","","","0");
$field->AddOption('','');
$field->AddOption('{|in Feld Freitext laden|}','freitext');
$field->AddOption('{|in Feld Interne Bemerkung laden|}','internebemerkung');
$this->form->NewField($field);
$field = new HTMLSelect("autoversandoption",0,"autoversandoption","","","0");
$field->AddOption('{|Einstellung aus Schnittstelle übernehmen (Standard)|}','standard');
$field->AddOption('{|Rechnung und Lieferschein erstellen|}','rechnungundlieferschein');
$field->AddOption('{|nur Lieferschein erstellen|}','nurlieferschein');
$field->AddOption('{|nur Rechnung erstellen|}','nurrechnung');
$this->form->NewField($field);
$field = new HTMLCheckbox("angeboteanlegen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("autoversandbeikommentardeaktivieren","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("stornoabgleich","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("steuerfreilieferlandexport","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("gesamtbetragfestsetzen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("gesamtbetragfestsetzendifferenz","text","","6","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("lastschriftdatenueberschreiben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelimport","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("rabatteportofestschreiben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikeltexteuebernehmen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelnummernummerkreis","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelimporteinzeln","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelnummeruebernehmen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelbezeichnungauswawision","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelbeschreibungauswawision","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelbeschreibungenuebernehmen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("stuecklisteergaenzen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("positionsteuersaetzeerlauben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("lagerexport","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLSelect("lagergrundlage",0,"lagergrundlage","","","0");
$field->AddOption('{|Artikel verkaufbare|}','0');
$field->AddOption('{|Lagerbestand minus Reservierungen|}','1');
$this->form->NewField($field);
$field = new HTMLCheckbox("ueberschreibe_lagerkorrekturwert","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("lagerkorrekturwert","text","1","6","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelexport","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("autosendarticle","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("texteuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("shopbilderuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("eigenschaftenuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("kategorienuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("variantenuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("crosssellingartikeluebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("staffelpreiseuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("gutscheineuebertragen","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("nurpreise","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("nurneueartikel","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("artikelnummerbeimanlegenausshop","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("kundenurvonprojekt","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("adressennichtueberschreiben","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("adressupdate","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("vertrieb","text","","","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("artikelrabatt","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("artikelrabattsteuer","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("preisgruppe","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("url","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("passwort","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("token","text","","40","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLInput("datumvon","text","","","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLCheckbox("cronjobaktiv","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("demomodus","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("direktimport","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLCheckbox("holealle","","","1","0","0");
$this->form->NewField($field);
$field = new HTMLInput("anzgleichzeitig","text","","","","","","","","","","0","","");
$this->form->NewField($field);
$field = new HTMLSelect("modulename",0,"modulename","","","0");
$field->AddOption('{|extern|}','');
$this->form->NewField($field);
}
}
?>

View File

@ -215,36 +215,48 @@ $('#anderersteuersatz').click(function() { if (!$(this).is(':checked')) {
</tbody>
</table>
</td>
<td width="30%">
<table width="100%"><tr><td align="right"><input type="submit" value="Speichern" ></td></tr></table>
<div id="positionaccordion">
[ANZEIGEEINKAUFLAGER]
<h3>{|Steuer|}</h3>
<div class="table-responsive">
<table>
<tbody>
[VORSTEUER]
<tr><td>{|Kostenstelle|}:</td><td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td></tr>
<tr><td>{|Erl&ouml;se|}:</td><td>[ERLOESE][MSGERLOESE]</td></tr>
<tr><td>{|festschreiben|}:</td><td>[ERLOESEFESTSCHREIBEN][MSGERLOESEFESTSCHREIBEN]</td></tr>
[NACHSTEUER]
</tbody>
</table>
<td width="30%" [STYLERECHTS]>
<table width="100%"><tr><td align="right"><input type="submit" value="Speichern" ></td></tr></table>
<div id="positionaccordion"> [ANZEIGEEINKAUFLAGER]
<h3>{|Steuer|}</h3>
<div class="table-responsive">
<table>
<tbody> [VORSTEUER]
<tr>
<td>{|Kostenstelle|}:</td>
<td>[KOSTENSTELLE][MSGKOSTENSTELLE]</td>
</tr>
<tr>
<td>{|Erl&ouml;se|}:</td>
<td>[ERLOESE][MSGERLOESE]</td>
</tr>
<tr>
<td>{|festschreiben|}:</td>
<td>[ERLOESEFESTSCHREIBEN][MSGERLOESEFESTSCHREIBEN]</td>
</tr> [NACHSTEUER] </tbody>
</table>
</div>
<h3>{|Einkaufspreis f&uuml;r Deckungsbeitrag|}</h3>
<div class="table-responsive">
<table>
<tbody>
<tr>
<td>[EINKAUFSPREIS][MSGEINKAUFSPREIS]</td>
</tr>
</tbody>
</table>
</div>
<h3>{|Bemerkung|}</h3>
<div class="table-responsive">
<table>
<tbody>
<tr>
<td> [BEMERKUNG][MSGBEMERKUNG] </td>
</tr>
</tbody>
</table>
</div>
</div>
<h3>{|Bemerkung|}</h3>
<div class="table-responsive">
<table>
<tbody>
<tr><td>
[BEMERKUNG][MSGBEMERKUNG]
</td></tr>
</tbody>
</table>
</div>
</div>
</td>
</tr>
</tbody>

View File

@ -292,6 +292,7 @@
<tr><td>N&auml;chste Anfragenummer:</td><td>[NEXT_ANFRAGE][MSGNEXT_ANFRAGE]&nbsp;</td></tr>
<tr><td>N&auml;chste Proformarechnungsnummer:</td><td>[NEXT_PROFORMARECHNUNG][MSGNEXT_PROFORMARECHNUNG]&nbsp;</td></tr>
<tr><td>Nächste Verbindlichkeitsnummer:</td><td>[NEXT_VERBINDLICHKEIT][MSGNEXT_VERBINDLICHKEIT] </td></tr>
<tr><td>Nächste Lieferantengutschriftsnummer:</td><td>[NEXT_LIEFERANTENGUTSCHRIFT][MSGNEXT_LIEFERANTENGUTSCHRIFT] </td></tr>
<tr><td>Nächste Warenbuchungsbelegnummer:</td><td>[NEXT_GOODSPOSTINGDOCUMENT][MSGNEXT_GOODSPOSTINGDOCUMENT] </td></tr>
<tr><td>N&auml;chste Kundennummer:</td><td>[NEXT_KUNDENNUMMER][MSGNEXT_KUNDENNUMMER]&nbsp;</td></tr>
<tr><td>N&auml;chste Lieferantenummer:</td><td>[NEXT_LIEFERANTENNUMMER][MSGNEXT_LIEFERANTENNUMMER]&nbsp;</td></tr>

View File

@ -209,9 +209,9 @@
<tr><td>{|Nachnahmegeb&uuml;hr als extra Position|}:</td><td>[ARTIKELNACHNAHME_EXTRAARTIKEL][MSGARTIKELNACHNAHME_EXTRAARTIKEL]</td></tr>
<tr><td>{|Nachnahmegeb&uuml;hr|}:</td><td>[ARTIKELNACHNAHMEAUTOSTART][ARTIKELNACHNAHME][MSGARTIKELNACHNAHME][ARTIKELNACHNAHMEAUTOEND]&nbsp;<i>{|Artikel-Nr. f&uuml;r die Nachnahme Geb&uuml;hr.|}</i></td></tr>
<tr><td><u>{|Auftragsstatus r&uuml;ckmelden|}:</u></td><td>[AUFTRAGABGLEICH][MSGAUFTRAGABGLEICH]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td><u>{|Auftragsstatus r&uuml;ckmelden|}:</u></td><td>[AUFTRAGABGLEICH][MSGAUFTRAGABGLEICH]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td><label for="sendonlywithtracking">{|Automatische Rückmeldung deaktivieren|}:</label></td><td>[SENDONLYWITHTRACKING][MSGSENDONLYWITHTRACKING]</td></tr>
<tr class="ab_nummerzeitraum ab_nummer"><td>{|Hole jeden Status|}:</td><td>[HOLEALLESTATI][MSGHOLEALLESTATI]&nbsp;<i>{|Es werden alle Auftr&auml;ge &uuml;bertragen von Shop auf Xentral unabh&auml;ngig vom Status.|}</i></td></tr>
<tr class="ab_nummerzeitraum ab_nummer"><td>{|Hole jeden Status|}:</td><td>[HOLEALLESTATI][MSGHOLEALLESTATI]&nbsp;<i>{|Es werden alle Auftr&auml;ge &uuml;bertragen von Shop auf OpenXE unabh&auml;ngig vom Status.|}</i></td></tr>
<tr><td><u>{|Freitext aus Shopschnittstelle|}:</u></td><td>
[FREITEXT][MSGFREITEXT]
</td></tr>
@ -221,7 +221,7 @@
<tr><td>{|Angebote statt Auftr&auml;ge anlegen|}:</td><td>[ANGEBOTEANLEGEN][MSGANGEBOTEANLEGEN]</td></tr>
<tr><td>{|Autoversand bei Kommentar in Warenkorb deaktivieren|}:</td><td>[AUTOVERSANDBEIKOMMENTARDEAKTIVIEREN][MSGAUTOVERSANDBEIKOMMENTARDEAKTIVIEREN]</td></tr>
<tr><td><br><strong>{|ab hier importerspezifische Einstellungen|}:</strong><br><br></td></tr>
<tr><td>{|Stornierung r&uuml;ckmelden|}:</td><td>[STORNOABGLEICH][MSGSTORNOABGLEICH]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td>{|Stornierung r&uuml;ckmelden|}:</td><td>[STORNOABGLEICH][MSGSTORNOABGLEICH]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td>{|Besteuerung im Drittland abh&auml;ngig von Lieferadresse machen|}:</td><td>[STEUERFREILIEFERLANDEXPORT][MSGSTEUERFREILIEFERLANDEXPORT]</td></tr>
<tr><td>{|Gesamtbetrag festsetzen|}:</td><td>[GESAMTBETRAGFESTSETZEN][MSGGESAMTBETRAGFESTSETZEN]</td></tr>
<tr><td>{|Maximale Differenz zur berechneten Summe|}:</td><td>[GESAMTBETRAGFESTSETZENDIFFERENZ][MSGGESAMTBETRAGFESTSETZENDIFFERENZ]</td></tr>
@ -240,8 +240,8 @@
<tr><td>{|Artikelnummern aus Nummernkreis|}:</td><td>[ARTIKELNUMMERNUMMERKREIS][MSGARTIKELNUMMERNUMMERKREIS]</td></tr>
<tr><td></td><td>[ARTIKELIMPORTEINZELN][MSGARTIKELIMPORTEINZELN]&nbsp;einzeln&nbsp;<!--<i>(Nur bei Artikeln mit Option: Artikel->Online-Shop Optionen->Online Shop Abgleich)</i>--></td></tr>
<tr><td>{|Artikelnummern aus Shop|}:</td><td>[ARTIKELNUMMERUEBERNEHMEN][MSGARTIKELNUMMERUEBERNEHMEN]</td></tr>
<tr><td>{|Artikelbezeichnung aus Xentral|}:</td><td>[ARTIKELBEZEICHNUNGAUSWAWISION][MSGARTIKELBEZEICHNUNGAUSWAWISION]</td></tr>
<tr><td>{|Artikelbeschreibungen aus Xentral|}:</td><td>[ARTIKELBESCHREIBUNGAUSWAWISION][MSGARTIKELBESCHREIBUNGAUSWAWISION]</td></tr>
<tr><td>{|Artikelbezeichnung aus OpenXE|}:</td><td>[ARTIKELBEZEICHNUNGAUSWAWISION][MSGARTIKELBEZEICHNUNGAUSWAWISION]</td></tr>
<tr><td>{|Artikelbeschreibungen aus OpenXE|}:</td><td>[ARTIKELBESCHREIBUNGAUSWAWISION][MSGARTIKELBESCHREIBUNGAUSWAWISION]</td></tr>
<tr><td>{|Artikelbeschreibungen aus Shop|}:</td><td>[ARTIKELBESCHREIBUNGENUEBERNEHMEN][MSGARTIKELBESCHREIBUNGENUEBERNEHMEN]</td></tr>
<tr><td>{|St&uuml;cklisten erg&auml;nzen|}:</td><td>[STUECKLISTEERGAENZEN][MSGSTUECKLISTEERGAENZEN]</td></tr>
<tr><td>{|Spezielle Steuers&auml;tze pro Positionen|}:</td><td>[POSITIONSTEUERSAETZEERLAUBEN][MSGPOSITIONSTEUERSAETZEERLAUBEN]</td></tr>
@ -258,24 +258,25 @@
<div class="inside inside-full-height">
<fieldset><legend>{|Artikel Import / Export|}</legend>
<table width="100%">
<tr><td width="300"><u>{|Lagerzahlen &Uuml;bertragung erlauben|}:</u></td><td>[LAGEREXPORT][MSGLAGEREXPORT]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td width="300"><u>{|Lagerzahlen &Uuml;bertragung erlauben|}:</u></td><td>[LAGEREXPORT][MSGLAGEREXPORT]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td>{|Lager Grundlage|}:</u></td><td>[LAGERGRUNDLAGE][MSGLAGERGRUNDLAGE]</td></tr>
<tr><td>{|Lagerkorrektur überschreiben|}:</td><td>[UEBERSCHREIBE_LAGERKORREKTURWERT][MSGUEBERSCHREIBE_LAGERKORREKTURWERT]</td></tr>
<tr class="lagerkorrektur"><td>{|Lagerkorrektur|}:</td><td>[LAGERKORREKTURWERT][MSGLAGERKORREKTURWERT]</td></tr>
[HOOK_STORAGE]
<tr><td><u>{|Artikel &Uuml;bertragung erlauben|}:</u></td><td>[ARTIKELEXPORT][MSGARTIKELEXPORT]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td>{|Alle geänderten Artikel automatisch übertragen|}:</td><td>[AUTOSENDARTICLE][MSGAUTOSENDARTICLE]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td><u>{|Artikel &Uuml;bertragung erlauben|}:</u></td><td>[ARTIKELEXPORT][MSGARTIKELEXPORT]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td>{|Alle geänderten Artikel automatisch übertragen|}:</td><td>[AUTOSENDARTICLE][MSGAUTOSENDARTICLE]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td><br><strong>{|Ab hier importerspezifische Einstellungen|}:</strong><br><br></td></tr>
<tr><td>{|Bilder &uuml;bertragen|}:</td><td>[SHOPBILDERUEBERTRAGEN][MSGSHOPBILDERUEBERTRAGEN]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td>{|Eigenschaften &uuml;bertragen|}:</td><td>[EIGENSCHAFTENUEBERTRAGEN][MSGEIGENSCHAFTENUEBERTRAGEN]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td>{|Kategorien &uuml;bertragen|}:</td><td>[KATEGORIENUEBERTRAGEN][MSGKATEGORIENUEBERTRAGEN]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td>{|Varianten &uuml;bertragen|}:</td><td>[VARIANTENUEBERTRAGEN][MSGVARIANTENUEBERTRAGEN]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td>{|Crossselling &uuml;bertragen|}:</td><td>[CROSSSELLINGARTIKELUEBERTRAGEN][MSGCROSSSELLINGARTIKELUEBERTRAGEN]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td>{|Staffelpreise &uuml;bertragen|}:</td><td>[STAFFELPREISEUEBERTRAGEN][MSGSTAFFELPREISEUEBERTRAGEN]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr><td>{|Texte &uuml;bertragen|}:</td><td>[TEXTEUEBERTRAGEN][MSGTEXTEUEBERTRAGEN]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td>{|Bilder &uuml;bertragen|}:</td><td>[SHOPBILDERUEBERTRAGEN][MSGSHOPBILDERUEBERTRAGEN]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td>{|Eigenschaften &uuml;bertragen|}:</td><td>[EIGENSCHAFTENUEBERTRAGEN][MSGEIGENSCHAFTENUEBERTRAGEN]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td>{|Kategorien &uuml;bertragen|}:</td><td>[KATEGORIENUEBERTRAGEN][MSGKATEGORIENUEBERTRAGEN]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td>{|Varianten &uuml;bertragen|}:</td><td>[VARIANTENUEBERTRAGEN][MSGVARIANTENUEBERTRAGEN]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td>{|Crossselling &uuml;bertragen|}:</td><td>[CROSSSELLINGARTIKELUEBERTRAGEN][MSGCROSSSELLINGARTIKELUEBERTRAGEN]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td>{|Staffelpreise &uuml;bertragen|}:</td><td>[STAFFELPREISEUEBERTRAGEN][MSGSTAFFELPREISEUEBERTRAGEN]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr><td>{|Gutscheine &uuml;bertragen|}:</td><td>[GUTSCHEINEUEBERTRAGEN][MSGGUTSCHEINEUEBERTRAGEN]&nbsp;<i>({|Via Prozessstarter|})</i></td></tr>
<tr [NURPREISESTYLE]><td>{|Artikeltext &Uuml;bertragung unterdr&uuml;cken|}:</td><td>[NURPREISE][MSGNURPREISE]&nbsp;<i>({|Von Xentral zu Shop|})</i></td></tr>
<tr [NURARTIKELLISTESTYLE]><td>{|Artikelliste abholen nur neue Artikel anlegen|}:</td><td>[NURNEUEARTIKEL][MSGNURNEUEARTIKEL]&nbsp;<i>({|Von Shop zu Xentral|})</i></td></tr>
<tr [NURARTIKELLISTESTYLE]><td>{|Artikelnummer beim Anlegen aus Shop &uuml;bernehmen|}:</td><td>[ARTIKELNUMMERBEIMANLEGENAUSSHOP][MSGARTIKELNUMMERBEIMANLEGENAUSSHOP]&nbsp;<i>({|Von Shop zu Xentral|})</i></td></tr>
<tr [NURPREISESTYLE]><td>{|Artikeltext &Uuml;bertragung unterdr&uuml;cken|}:</td><td>[NURPREISE][MSGNURPREISE]&nbsp;<i>({|Von OpenXE zu Shop|})</i></td></tr>
<tr [NURARTIKELLISTESTYLE]><td>{|Artikelliste abholen nur neue Artikel anlegen|}:</td><td>[NURNEUEARTIKEL][MSGNURNEUEARTIKEL]&nbsp;<i>({|Von Shop zu OpenXE|})</i></td></tr>
<tr [NURARTIKELLISTESTYLE]><td>{|Artikelnummer beim Anlegen aus Shop &uuml;bernehmen|}:</td><td>[ARTIKELNUMMERBEIMANLEGENAUSSHOP][MSGARTIKELNUMMERBEIMANLEGENAUSSHOP]&nbsp;<i>({|Von Shop zu OpenXE|})</i></td></tr>
</table>
</fieldset>
@ -324,7 +325,7 @@
<div class="row-height">
<div class="col-xs-12 col-md-8 col-md-height">
<div class="inside inside-full-height">
<fieldset><legend>Zugangsdaten f&uuml;r Xentral Import Plugin</legend>
<fieldset><legend>Zugangsdaten f&uuml;r OpenXE Import Plugin</legend>
<table width="100%">
<tr><td>{|URL|}:</td><td>[URL][MSGURL]&nbsp;<i>URL zur externen Importer</i></td><td></tr>
<tr><td width="300">{|ImportKey|}:</td><td>[PASSWORT][MSGPASSWORT]&nbsp;<i>32 Zeichen langes Sicherheitspasswort</i></td><td></tr>
@ -997,7 +998,7 @@ function kundengruppenEditSave() {
url: 'index.php?module=onlineshops&action=kundengruppeneditsave',
data: {
id: $('#k_id').val(),
kundengruppexentral: $('#k_kundengruppe').val(),
kundengruppeOpenXE: $('#k_kundengruppe').val(),
projekt: $('#k_projekt').val(),
aktiv: c_aktiv,
kundengruppeneukundenzuweisen: c_neukundenzuweisen,

View File

@ -35,6 +35,7 @@ class WidgetAngebot_position extends WidgetGenAngebot_position
$this->app->YUI->AutoComplete("kostenstelle","kostenstelle",1);
$this->app->YUI->AutoComplete("explodiert_parent","angebot_position",0,"&angebotposition=".$id."&angebot=".$this->app->DB->Select("SELECT angebot FROM angebot_position WHERE id = '$id' LIMIT 1"));
$this->form->ReplaceFunction("preis",$this,"ReplaceMengeBetrag");
$this->form->ReplaceFunction("einkaufspreis",$this,"ReplaceMengeBetrag");
$this->form->ReplaceFunction("steuersatz",$this,"ReplaceSteuersatz");
$this->form->ReplaceFunction("menge",$this,"ReplaceMenge");
$this->form->ReplaceFunction("grundrabatt",$this,"ReplaceDecimal");

View File

@ -235,6 +235,9 @@ class WidgetProjekt extends WidgetGenProjekt
$field = new HTMLInput("next_verbindlichkeit","text","",40);
$field->readonly="readonly";
$this->form->NewField($field);
$field = new HTMLInput("next_lieferantengutschrift","text","",40);
$field->readonly="readonly";
$this->form->NewField($field);
$field = new HTMLInput("next_kundennummer","text","",40);
$field->readonly="readonly";
$this->form->NewField($field);

View File

@ -513,6 +513,10 @@ class WidgetShopexport extends WidgetGenShopexport
{
$this->app->Tpl->Add('MSGEIGENSCHAFTENUEBERTRAGEN','&nbsp;<b style="color:red;">wird von diesem Importer nicht unterst&uuml;tzt</b>&nbsp;');
}
if(isset($json['erlaubtefunktionen']['texte']) && !$json['erlaubtefunktionen']['texte'])
{
$this->app->Tpl->Add('MSGTEXTEUEBERTRAGEN','&nbsp;<b style="color:red;">wird von diesem Importer nicht unterst&uuml;tzt</b>&nbsp;');
}
if(isset($json['erlaubtefunktionen']['artikelbilder']) && !$json['erlaubtefunktionen']['artikelbilder'])
{
$this->app->Tpl->Add('MSGSHOPBILDERUEBERTRAGEN','&nbsp;<b style="color:red;">wird von diesem Importer nicht unterst&uuml;tzt</b>&nbsp;');