Revision af9aae09
Von Holger Lindemann vor fast 16 Jahren hinzugefügt
xtcom/confedit.php | ||
---|---|---|
87 | 87 |
return 0; |
88 | 88 |
} |
89 | 89 |
} |
90 |
|
|
90 |
function getBugru() { |
|
91 |
global $dbP; |
|
92 |
if (!$dbP) return; |
|
93 |
$sql ="select BG.id as bugru,(T.rate * 100) as rate,TK.startdate from buchungsgruppen BG "; |
|
94 |
$sql.="left join chart C on BG.income_accno_id_0=C.id left join taxkeys TK "; |
|
95 |
$sql.="on TK.chart_id=C.id left join tax T on T.id=TK.tax_id where "; |
|
96 |
$sql.="TK.startdate <= now() order by BG.id, TK.startdate"; |
|
97 |
$rs=$dbP->getAll($sql,DB_FETCHMODE_ASSOC); |
|
98 |
if ($rs) foreach ($rs as $row) { |
|
99 |
$bugru[$row["bugru"]]=$row["rate"]; |
|
100 |
} |
|
101 |
return $bugru; |
|
102 |
} |
|
91 | 103 |
if ($_POST["ok"]=="sichern") { |
92 | 104 |
$ok=true; |
93 | 105 |
$dsnP = array( |
... | ... | |
105 | 117 |
echo $dbP->userinfo; |
106 | 118 |
$dbP=false; |
107 | 119 |
} else { |
108 |
$sql="SELECT P.id,P.description,(t.rate * 100) as rate FROM "; |
|
109 |
$sql.="parts P left join chart c on c.id=P.income_accno_id left join tax t on c.taxkey_id=t.taxkey "; |
|
110 |
$sql.="where P.partnumber = '%s'"; |
|
120 |
$bugru=getBugru(); |
|
121 |
$sql="SELECT id,description,buchungsgruppen_id FROM parts where partnumber = '%s'"; |
|
111 | 122 |
$rs=$dbP->getall(sprintf($sql,$_POST["div16NR"])); |
112 | 123 |
$_POST["div16ID"]=$rs[0][0]; |
113 | 124 |
$div16txt=addslashes($rs[0][1]); |
114 |
$_POST["div16TAX"]=$rs[0][2];
|
|
125 |
$_POST["div16TAX"]=$bugru[$rs[0][2]];
|
|
115 | 126 |
$rs=$dbP->getall(sprintf($sql,$_POST["div07NR"])); |
116 | 127 |
$_POST["div07ID"]=$rs[0][0]; |
117 |
$_POST["div07TAX"]=$rs[0][2];
|
|
128 |
$_POST["div07TAX"]=$bugru[$rs[0][2]];
|
|
118 | 129 |
$div07txt=addslashes($rs[0][1]); |
119 | 130 |
$rs=$dbP->getall(sprintf($sql,$_POST["versandNR"])); |
120 | 131 |
$_POST["versandID"]=$rs[0][0]; |
121 |
$_POST["versandTAX"]=$rs[0][2];
|
|
132 |
$_POST["versandTAX"]=$bugru[$rs[0][2]];
|
|
122 | 133 |
$versandtxt=addslashes($rs[0][1]); |
123 | 134 |
$rs=$dbP->getall(sprintf($sql,$_POST["nachnNR"])); |
124 | 135 |
$_POST["nachnID"]=$rs[0][0]; |
125 |
$_POST["nachnTAX"]=$rs[0][2];
|
|
136 |
$_POST["nachnTAX"]=$bugru[$rs[0][2]];
|
|
126 | 137 |
$nachntxt=addslashes($rs[0][1]); |
127 | 138 |
$rs=$dbP->getall(sprintf($sql,$_POST["minderNR"])); |
128 | 139 |
$_POST["minderID"]=$rs[0][0]; |
129 |
$_POST["minderTAX"]=$rs[0][2];
|
|
140 |
$_POST["minderTAX"]=$bugru[$rs[0][2]];
|
|
130 | 141 |
$mindertxt=addslashes($rs[0][1]); |
131 | 142 |
$rs=$dbP->getall(sprintf($sql,$_POST["paypalNR"])); |
132 | 143 |
$_POST["paypalID"]=$rs[0][0]; |
133 |
$_POST["paypalTAX"]=$rs[0][2];
|
|
144 |
$_POST["paypalTAX"]=$bugru[$rs[0][2]];
|
|
134 | 145 |
$paypaltxt=addslashes($rs[0][1]); |
135 | 146 |
$rs=$dbP->getall("select id from employee where login = '".$_POST["ERPusrN"]."'"); |
136 | 147 |
$_POST["ERPusrID"]=$rs[0][0]; |
... | ... | |
145 | 156 |
); |
146 | 157 |
$dbM=@DB::connect($dsnM); |
147 | 158 |
if (DB::isError($dbM)||!$dbM) { |
148 |
$ok=false; |
|
159 |
//$ok=false;
|
|
149 | 160 |
echo "Keine Verbindung zum Shop<br>"; |
150 | 161 |
echo $dbM->userinfo; |
151 | 162 |
$dbM=false; |
... | ... | |
233 | 244 |
fputs($f,"\$SpracheAlle=\"".$_POST["SpracheAlle"]."\";\n"); |
234 | 245 |
fputs($f,"?>"); |
235 | 246 |
fclose($f); |
247 |
echo "<br>'conf.php' geschriebeni!<br>"; |
|
236 | 248 |
if (file_exists ("conf$login.php")) { |
237 | 249 |
require "conf$login.php"; |
238 | 250 |
} else { |
... | ... | |
416 | 428 |
<td><input type="text" name="SHOPftppwd" size="15" value="<?= $SHOPftppwd ?>"></td> |
417 | 429 |
</tr> |
418 | 430 |
<tr> |
419 |
<td>ID Diverse 16%</td>
|
|
431 |
<td>ID Diverse 19%</td>
|
|
420 | 432 |
<td><input type="text" name="div16NR" size="10" value="<?= $div16["NR"] ?>"> |
421 | 433 |
<input type="checkbox" name="a1" <?= (empty($div16["ID"])?"":"checked") ?>></td> |
422 | 434 |
<td>ID Diverse 7%</td> |
Auch abrufbar als: Unified diff
Steuer aus Buchungsgruppen, Textapassung