mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-18 07:22:17 +00:00
Bestellschein, Liefertermin und Kundennummer hinzugefügt
This commit is contained in:
+38
-1
@@ -25,6 +25,7 @@
|
||||
* @create 18-12-2006
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
require_once(dirname(__FILE__).'/organisationseinheit.class.php');
|
||||
|
||||
class firma extends basis_db
|
||||
{
|
||||
@@ -560,6 +561,42 @@ class firma extends basis_db
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert die Kundennummer einer Firma zu einer Organisationseinheit
|
||||
* Wenn fuer diese Organisationseinheit kein Eintrag vorhanden ist, wird
|
||||
* in den uebergeordneten OEs gesucht
|
||||
*
|
||||
* @param firma_id
|
||||
* @param oe_kurzbz
|
||||
* @return kundennummer oder false wenn nicht vorhanden
|
||||
*/
|
||||
public function get_kundennummer($firma_id, $oe_kurzbz)
|
||||
{
|
||||
$qry = "SELECT kundennummer FROM public.tbl_firma_organisationseinheit
|
||||
WHERE firma_id='".addslashes($firma_id)."' AND oe_kurzbz='".addslashes($oe_kurzbz)."';";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
{
|
||||
return $row->kundennummer;
|
||||
}
|
||||
else
|
||||
{
|
||||
$oe = new organisationseinheit();
|
||||
if($oe->load($oe_kurzbz))
|
||||
{
|
||||
if($oe->oe_parent_kurzbz!='')
|
||||
return $this->get_kundennummer($firma_id, $oe->oe_parent_kurzbz);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt alle Firmen - Organisationseinheiten nach Firmen ID und/oder OE Kurzbz
|
||||
* @param $firma_id ID die gelesen werden soll
|
||||
@@ -777,4 +814,4 @@ class firma extends basis_db
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -66,7 +66,8 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
|
||||
$firma = new firma();
|
||||
$firma->load($bestellung->firma_id);
|
||||
|
||||
$kundennummer = $firma->get_kundennummer($bestellung->firma_id, $kostenstelle->oe_kurzbz);
|
||||
|
||||
$standort = new standort();
|
||||
$standort->load_firma($firma->firma_id);
|
||||
if(isset($standort->result[0]))
|
||||
@@ -80,12 +81,15 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
$kontakt = new kontakt();
|
||||
$kontakt->loadFirmaKontakttyp($standort->standort_id, 'fax');
|
||||
$fax = $kontakt->kontakt;
|
||||
|
||||
header("Content-type: application/xhtml+xml");
|
||||
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
|
||||
echo "\n<bestellungen><bestellung>\n";
|
||||
echo " <bestell_nr><![CDATA[$bestellung->bestell_nr]]></bestell_nr>\n";
|
||||
echo " <titel><![CDATA[$bestellung->titel]]></titel>\n";
|
||||
echo " <liefertermin><![CDATA[$bestellung->liefertermin]]></liefertermin>\n";
|
||||
echo " <kundennummer><![CDATA[$kundennummer]]></kundennummer>\n";
|
||||
echo " <kontaktperson>\n";
|
||||
echo " <titelpre><![CDATA[$besteller->titelpre]]></titelpre>\n";
|
||||
echo " <vorname><![CDATA[$besteller->vorname]]></vorname>\n";
|
||||
|
||||
@@ -71,8 +71,8 @@
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-width="0.2mm" border-style="solid" display-align="center">
|
||||
<fo:block font-size="10pt" content-width="50mm">
|
||||
!! fehlt noch in xml !!
|
||||
<fo:block font-size="10pt" content-width="50mm" padding-left="1mm">
|
||||
<xsl:value-of select="kundennummer" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
@@ -83,8 +83,8 @@
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-width="0.2mm" border-style="solid" display-align="center">
|
||||
<fo:block font-size="10pt" content-width="50mm">
|
||||
!! gibts nicht mehr? !!
|
||||
<fo:block font-size="10pt" content-width="50mm" padding-left="1mm">
|
||||
<xsl:value-of select="liefertermin" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
@@ -96,7 +96,7 @@
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-width="0.2mm" border-style="solid" display-align="center">
|
||||
<fo:block font-size="10pt" content-width="50mm">
|
||||
<fo:block font-size="10pt" content-width="50mm" padding-left="1mm">
|
||||
<xsl:value-of select="konto" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
@@ -109,7 +109,7 @@
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell border-width="0.2mm" border-style="solid" display-align="center">
|
||||
<fo:block font-size="10pt" content-width="50mm">
|
||||
<fo:block font-size="10pt" content-width="50mm" padding-left="1mm">
|
||||
<xsl:value-of select="kostenstelle" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
@@ -559,7 +559,7 @@
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
<fo:table-cell display-align="center">
|
||||
<fo:block font-size="8pt" content-width="100mm">
|
||||
<fo:block font-size="8pt" content-width="99mm" padding-left="1mm">
|
||||
<xsl:value-of select="beschreibung" />
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
|
||||
Reference in New Issue
Block a user