From: Joe Hunt Date: Tue, 2 Jun 2009 11:28:32 +0000 (+0000) Subject: Don't delete templates X-Git-Tag: v2.4.2~19^2~1365 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=a39265e56d8242281a694fb619804c67388b13c5;p=fa-stable.git Don't delete templates --- 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)) {