Bernd Wurst commited on 2012-05-16 08:54:22
              Zeige 3 geänderte Dateien mit 6 Einfügungen und 4 Löschungen.
            
| ... | ... | 
                      @@ -58,10 +58,11 @@ foreach($items AS $item)  | 
                  
| 58 | 58 | 
                        $epreis = $item['betrag'];  | 
                    
| 59 | 59 | 
                        if ($item['brutto'] == 0)  | 
                    
| 60 | 60 | 
                        $epreis = $epreis * (1 + ($item['mwst'] / 100));  | 
                    
| 61 | 
                        + $einheit = ($item['einheit'] ? $item['einheit'] : '');  | 
                    |
| 61 | 62 | 
                        $gesamt = round($epreis * $item['anzahl'], 2);  | 
                    
| 62 | 63 | 
                        $epreis = round($epreis, 2);  | 
                    
| 63 | 64 | 
                        $summe += $gesamt;  | 
                    
| 64 | 
                        -	output("<tr><td>{$anzahl}</td>");
                       | 
                    |
| 65 | 
                        +	output("<tr><td>{$anzahl} {$einheit}</td>");
                       | 
                    |
| 65 | 66 | 
                         	output("<td>{$desc}</td>");
                       | 
                    
| 66 | 67 | 
                         	output("<td>{$epreis} €</td><td>{$gesamt} €</td></tr>\n");
                       | 
                    
| 67 | 68 | 
                        }  | 
                    
| ... | ... | 
                      @@ -54,7 +54,7 @@ function invoice_items($id)  | 
                  
| 54 | 54 | 
                         {
                       | 
                    
| 55 | 55 | 
                        $c = (int) $_SESSION['customerinfo']['customerno'];  | 
                    
| 56 | 56 | 
                        $id = (int) $id;  | 
                    
| 57 | 
                        -  $result = db_query("SELECT id, beschreibung, datum, enddatum, betrag, brutto, mwst, anzahl FROM kundendaten.rechnungsposten WHERE rechnungsnummer={$id} AND kunde={$c}");
                       | 
                    |
| 57 | 
                        +  $result = db_query("SELECT id, beschreibung, datum, enddatum, betrag, einheit, brutto, mwst, anzahl FROM kundendaten.rechnungsposten WHERE rechnungsnummer={$id} AND kunde={$c}");
                       | 
                    |
| 58 | 58 | 
                        if (mysql_num_rows($result) == 0)  | 
                    
| 59 | 59 | 
                         	system_failure('Ungültige Rechnungsnummer oder nicht eingeloggt');
                       | 
                    
| 60 | 60 | 
                        $ret = array();  | 
                    
| ... | ... | 
                      @@ -67,7 +67,7 @@ function invoice_items($id)  | 
                  
| 67 | 67 | 
                        function upcoming_items()  | 
                    
| 68 | 68 | 
                         {
                       | 
                    
| 69 | 69 | 
                        $c = (int) $_SESSION['customerinfo']['customerno'];  | 
                    
| 70 | 
                        -  $result = db_query("SELECT anzahl, beschreibung, startdatum, enddatum, betrag, brutto, mwst FROM kundendaten.upcoming_items WHERE kunde={$c} ORDER BY startdatum ASC");
                       | 
                    |
| 70 | 
                        +  $result = db_query("SELECT anzahl, beschreibung, startdatum, enddatum, betrag, einheit, brutto, mwst FROM kundendaten.upcoming_items WHERE kunde={$c} ORDER BY startdatum ASC");
                       | 
                    |
| 71 | 71 | 
                        $ret = array();  | 
                    
| 72 | 72 | 
                        while($line = mysql_fetch_assoc($result))  | 
                    
| 73 | 73 | 
                        array_push($ret, $line);  | 
                    
| ... | ... | 
                      @@ -54,7 +54,8 @@ foreach($items AS $item)  | 
                  
| 54 | 54 | 
                        $gesamt = round($epreis * $item['anzahl'], 2);  | 
                    
| 55 | 55 | 
                        $epreis = round($epreis, 2);  | 
                    
| 56 | 56 | 
                        $summe += $gesamt;  | 
                    
| 57 | 
                        -	output("<tr><td>{$item['anzahl']}</td>");
                       | 
                    |
| 57 | 
                        + $einheit = ($item['einheit'] ? $item['einheit'] : '');  | 
                    |
| 58 | 
                        +	output("<tr><td>{$item['anzahl']} {$einheit}</td>");
                       | 
                    |
| 58 | 59 | 
                         	output("<td>{$item['beschreibung']}</td><td>{$desc}</td>");
                       | 
                    
| 59 | 60 | 
                         	output("<td>{$epreis} €</td><td>{$gesamt} €</td></tr>\n");
                       | 
                    
| 60 | 61 | 
                        }  | 
                    
| 61 | 62 |