- /* search for buchungsgruppe */
- $bg = getBuchungsgruppe($db, $income_accno, $expense_accno);
- }
- /* nothing found? user must create one */
- if ($bg == "") {
- if ($maske["bugrufix"]==2) {
+ if ($income_accno<>"" and $expense_accno<>"") {
+ /* search for buchungsgruppe */
+ $bg = getBuchungsgruppe($db, $income_accno, $expense_accno);
+ if ($bg == "" and $maske["bugrufix"]==2 and $maske["bugru"]<>"") {
+ $bg = $maske["bugru"];
+ }
+ } else if ($maske["bugru"]<>"" and $maske["bugrufix"]==2) {