X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=admin%2Ffiscalyears.php;h=29d6d306d131c5b7c9e599705aef899220dff7bc;hb=a39265e56d8242281a694fb619804c67388b13c5;hp=f3968458f1e0f2cf4bf2e28f89195522c9d05c9d;hpb=9f2ede887db250a31f9c64c24e2813d81dce0af2;p=fa-stable.git diff --git a/admin/fiscalyears.php b/admin/fiscalyears.php index f3968458..29d6d306 100644 --- a/admin/fiscalyears.php +++ b/admin/fiscalyears.php @@ -204,7 +204,7 @@ function delete_this_fiscalyear($selected_id) $ref = _("Open Balance"); $myrow = get_fiscalyear($selected_id); $to = $myrow['end']; - $sql = "SELECT order_no FROM ".TB_PREF."sales_orders WHERE ord_date <= '$to'"; + $sql = "SELECT order_no FROM ".TB_PREF."sales_orders WHERE ord_date <= '$to' AND type <> 1"; // don't take the templates $result = db_query($sql, "Could not retrieve sales orders"); while ($row = db_fetch($result)) {