
104 Ill. App.3d 852 (1982)
433 N.E.2d 726
DIVERSIFIED COMPUTER SERVICES, INC., Plaintiff-Appellee,
v.
THE TOWN OF YORK, Defendant-Appellant.
No. 81-2.
Illinois Appellate Court  Second District.
Opinion filed March 22, 1982.
Barry E. Garley, of Oak Brook, J. Edward Vertovec, of Elmhurst, and Jack M. Siegel, of Chicago, for appellant.
John P. Scotellaro, Larry L. Thompson, and Robert Radasevich, all of Bell, Boyd, Lloyd, Haddad & Burns, of Chicago, for appellee.
Reversed and remanded.
JUSTICE NASH delivered the opinion of the court:
Defendant, Town of York (the Township), appeals from a judgment of the circuit court of Du Page County entered upon the verdict of a jury *853 finding it to be in breach of contract and awarding damages to plaintiff, Diversified Computer Services, Inc. (DCS), of $165,500, together with attorney fees of $80,000 and $19,315.89 for prejudgment interest. The primary issue presented is whether the township was authorized to enter into a contract for the purchase of computer components, programs and maintenance services, to be paid for over a five-year period, where no full, prior appropriation had been made for that purpose. We conclude the township was not so authorized and accordingly reverse.
Lester Swailes, the York Township assessor, sought to improve the operation of his office by installation of a computer system. He entered into negotiations with DCS, which is in the business of selling and leasing computer systems, and, because of budgeting considerations, he expressed interest in a multiyear lease arrangement with an option to purchase. The town board was kept apprised of the progress of these discussions, and the proposed system was demonstrated before it. The assessor advised the town board his office needed the system and that it would be more economical than using the Du Page County computer services as it had in the past.
On March 8, 1977, Swailes and representatives of DCS appeared before the town board of auditors and requested that it approve contracts for the lease-purchase of a computer system from DCS. The minutes of the board meeting reflect that the contracts between Assessor Swailes and DCS were presented to the board, voted upon and approved by it. The necessary documents were thereafter executed by Swailes on behalf of the "York Township Assessor's Office"; they provided for the payment to DCS of $3,900 each month commencing in March 1977 and continuing for a period of 60 months, with the payments to be applied toward the total purchase price of $175,250 for the computer system at the expiration of the lease. DCS was authorized by the terms of the agreement, on default of the township, to terminate the lease and declare all unpaid installments immediately due and payable. The contract also provided for the recovery of costs and attorney fees incurred by DCS in enforcing its terms.
Because of space limitations in the assessor's office, it was agreed between Swailes and DCS that the computer equipment would be maintained in DCS's office and a terminal installed in Swailes' office linked to it. They apparently further agreed that DCS would also apply its own equipment to the services as a backup, if necessary, until such time as space for it became available in the assessor's office.
This arrangement between DCS, the township and the assessor operated without incident for several months. Funds for the initial monthly payments due under the lease were included in the annual budget and appropriation ordinances adopted for the years 1977 and 1978 by the town board of auditors, as reconstituted after the April 1977 town election, *854 and 15 monthly payments of $3,900 each were made to DCS through May 1978 pursuant to the terms of the agreement. The town board, however, thereafter expressed dissatisfaction with the equipment, believing it to be of greater capacity than was required for the assessor's needs and also questioning whether other agencies were making use of it in addition to the assessor. The town board declined to approve the June 1978 payment to DCS, and no further payments were made thereafter under the lease-purchase agreement. DCS served notice the township was in default and then brought this action for breach of contract to recover the remaining payments due under its 60-month term, together with its attorney fees and costs. The township counterclaimed for recovery of the payments it had made under the agreement on the grounds it was invalid and, alternately, alleged that the agreement was breached by DCS by its failure to make prompt delivery and provide exclusive use of the equipment to the assessor's office.
At the close of all the evidence, the trial court directed findings that a valid contract existed between the parties and that the township had waived its rights relating to the delivery and exclusive use of the equipment. The sole issue submitted to the jury was whether the assessor had been induced to waive the delivery and exclusive use provisions of the agreement by fraudulent representations attributable to DCS, and the question of damages, if any. The jury returned a verdict in favor of DCS for damages and attorney fees after which the court entered judgment thereon and also awarded prejudgment interest.
Initially, we consider DCS's argument that the issue of whether the township had the power to enter into a contract for which no full, prior appropriation had been made has been presented for the first time on appeal and is thereby waived.
 1, 2 It is true this issue, as now framed, was not raised in the trial court; while the township did attack the validity of the agreement, it did not do so in the present terms. Nevertheless, it has been held that a claim of illegality of an agreement can properly be considered although raised for the first time on review, as the courts may not be called upon to adjudicate rights growing out of an agreement which is void as against public policy or in violation of the public law. (Lind v. Spannuth (1956), 9 Ill.2d 311, 316, 137 N.E.2d 360, 362; Pietsch v. Pietsch (1910), 245 Ill. 454, 459, 92 N.E. 325, 327; see Lasko v. Meier (1946), 394 Ill. 71, 67 N.E.2d 162.) Also, while this specific issue was not included in a post-trial motion, the question of the validity of the contract was one of law for the trial court and it directed a finding adverse to the township thereby excusing its failure to raise that issue in a post-trial motion. (See Robbins v. Professional Construction Co. (1978), 72 Ill.2d 215, 380 N.E.2d 786; Keen v. Davis (1967), 38 Ill.2d 280, 230 N.E.2d 859; E.M. Melahn Construction Co. v. Village of *855 Carpentersville (1981), 100 Ill. App.3d 544, 427 N.E.2d 181, appeal denied (1982), ___ Ill.2d ___.) Moreover, it must be recognized that while the litigants are bound by rules of waiver the courts are not similarly barred when it may be proper to override them to achieve a just result or maintain a uniform body of precedent in a case of public importance. (Wozniak v. Segal (1974), 56 Ill.2d 457, 460-61, 308 N.E.2d 611, 612-13; Hux v. Raben (1967), 38 Ill.2d 223, 225, 230 N.E.2d 831, 832.) We choose to consider the merits of the issue of whether a township has authority to enter into a multiyear contract for which funds have not been fully appropriated.
In response to this question, DCS argues that as neither "An Act to revise the law in relation to township organization" (the Township Act) (Ill. Rev. Stat. 1979, ch. 139, par. 1 et seq.), nor any other statute, restricts the power of a town board of auditors to bind a township to the type of contract here considered that it is enforceable, citing 9 Ill. L. & Prac. Cities & Villages § 663 (1954); City of Rock Island v. Central Union Telephone Co. (1907), 132 Ill. App. 248; Illinois Power & Light Corp. v. City of Centralia (E.D. Ill. 1935), 11 F. Supp. 874, remanded (7th Cir.1937), 89 F.2d 985. Each of these cases, however, was concerned with public utility franchises for telephone and electrical services, and they were limited in their application to contracts permitting the long-term arrangements necessary to provide such services. Neither case involved an appropriation of funds by a municipality or any obligation to expend public funds; they therefore do not assist in the resolution of the present issue.
The township contends the lease-purchase agreement was ultra vires and void as it constituted a promise to expend public funds which had not yet been appropriated for that purpose. The township refers to the Illinois Municipal Budget Law (Ill. Rev. Stat. 1979, ch. 85, pars. 801-805), which requires a township to adopt an annual budget and appropriation ordinance in the first quarter of each fiscal year specifying the objects and purposes of which such appropriations are being made and the amount appropriated for each such object or purpose; it also generally prohibits any additional appropriation and provides for notice to the taxpayers and a public hearing prior to passage of the appropriation ordinance. The township argues that the Illinois Municipal Budget Law may be considered on the same basis as the more specific, but similar, statute regulating appropriations and expenditures of those governmental bodies which are subject to the Illinois Municipal Code (Ill. Rev. Stat. 1979, ch. 24, par. 1-1-1 et seq.). Section 8-1-7 of the Code provides that "[n]o contract shall be made by the corporate authorities * * * unless an appropriation has been previously made concerning that contract" and that a contract not supported by a prior appropriation is "null and void as to the municipality." It is apparent DCS would be barred from recovery under its *856 lease-purchase agreement if townships were governed by the Municipal Code. (See Chicago Patrolmen's Association v. City of Chicago (1974), 56 Ill.2d 503, 309 N.E.2d 3, cert. denied (1974), 419 U.S. 839, 42 L.Ed.2d 66, 95 S.Ct. 68; Koudelka v. Village of Woodridge (1980), 91 Ill. App.3d 884, 413 N.E.2d 1381; Guerine v. City of Northlake (1971), 1 Ill. App.3d 603, 274 N.E.2d 625; Collins v. Village of Glen Ellyn (1959), 21 Ill. App.2d 373, 158 N.E.2d 89; Beling v. City of East Moline (1957), 14 Ill. App.2d 263, 144 N.E.2d 865, appeal denied (1958), 12 Ill.2d 635.) However, townships are not included as municipalities subject to the proscriptions of the Illinois Municipal Code (see Ill. Rev. Stat. 1979, ch. 24, par. 1-1-2(1); People ex rel. Stoffel v. Town of Cicero (1949), 404 Ill. 432, 89 N.E.2d 350), and section 8-1-7 may not therefore be considered dispositive of this issue.
Nevertheless, the same considerations prompting the legislature to declare void municipal contracts for which prior appropriations were not made have long formed the basis for application of that principle to other governmental entities. This court noted in Mathew v. Town of Algonquin (1972), 3 Ill. App.3d 429, 434, 279 N.E.2d 91, 94:
"A highway commissioner has been held without power to incur debt against a township for road construction except to the extent of tax funds on hand or tax levies made (Austin-Western Rd. Machinery Co. v. Wetzel (1931), 264 Ill. App. 254) and a person furnishing labor or materials to the highway commissioner of a town has no right to expect payment except from funds on hand or tax levies made (Challacombe v. Anderson (1912), 173 Ill. App. 144)."
See also Coles County v. Messer (1901), 195 Ill. 540, 63 N.E. 391; West Chicago Park Commissioners v. Kincade (1896), 64 Ill. App. 113; E. McQuillin, Municipal Corporations § 29.20, at 274-79 (3d ed. 1981); Ancel, Municipal Contracts, 1961 U. Ill. L.F. 357, 360-65.
In Deyo v. Commissioner of Highways (1930), 256 Ill. App.3d, appeal denied the plaintiff entered into a contract on September 14, 1927, with the commissioner of highways of a township who sought to purchase a tractor by paying one-half of the $3,900 purchase price in May 1928 and the other half in May 1929. The levy ordinance in effect, however, provided only $1,000 for the purchase of machinery for the fiscal year ending in September 1928. The reviewing court held that the purchase agreement was unenforceable for lack of a full, prior appropriation for that purpose, stating:
"In the case of Commissioners of Highways v. Newell, 80 Ill. 587, the court said: `With quasi corporations of this character the rule obtains that their power to impose taxes or incur indebtedness will be strictly construed.' In this case it was further held: `It, then, *857 follows that they have no power to legally incur an indebtedness for road and bridge purposes beyond the amount of the taxes already levied for that year. In other words, they can in no one year expend, lawfully, more than the amount levied for that year.' So by analogy the commissioner of highways in the case at bar could not lawfully contract an indebtedness for machinery beyond the amount which had been levied therefor." (256 Ill. App. 3, 7.)
As we have said, this court also recognized these principles in Mathew v. Town of Algonquin, when it held that the defense of ultra vires is available to a township in an action for engineering services rendered to it, a purpose for which it had no specific or general corporate power to incur an obligation.
 3 DCS essentially contends that it is the Township Act (Ill. Rev. Stat. 1979, ch. 139, par. 1 et seq.) which governs the Town of York and the Act contains no restriction on the power of the town board to bind it by the contract in issue. This argument overlooks the fact that townships, like all other non-home-rule units, have no inherent powers, but only those granted to them by the constitution or authorized by statute. (See Ill. Const. 1970, art. VII, §§ 1, 8; Ill. Rev. Stat. 1979, ch. 139, par. 38; Town of the City of Peoria v. O'Connor (1980), 85 Ill. App.3d 427, 433-34, 408 N.E.2d 11, 15, aff'd in part, rev'd in part on other grounds (1981), 85 Ill.2d 195, 421 N.E.2d 912.) A review of the Township Act discloses townships have been granted the power to acquire property by purchase and to make contracts necessary to carry out their express powers. (Ill. Rev. Stat. 1979, ch. 139, par. 38.) The Act also specifically authorizes townships to lease property they own to others for terms up to 10 years (Ill. Rev. Stat. 1979, ch. 139, par. 39.01), and, if approved by referendum, they may enter into garbage collection contracts for terms not exceeding 15 years, subject to the duty of appropriating annually the sums due under the terms of the contracts (Ill. Rev. Stat. 1979, ch. 139, pars. 333-336). We find no corresponding provision in the Township Act, however, authorizing a multi-year contract for computer acquisition purposes for which a prior appropriation has not been made as in this case. Furthermore, although DCS argues section 3 of the Municipal Budget Law, to which townships must conform, was enacted solely to guarantee uniform accounting procedures, it has also been said that one of its purposes is to require governmental bodies to budget in advance the funds to be expended for each purpose and, once a budget and appropriation ordinance is adopted, that only expenditures for those purposes and in the sums therein set forth are permissible. See People ex rel. Manifold v. Chicago, Burlington & Quincy R.R. Co. (1944), 386 Ill. 56, 61, 54 N.E.2d 389, 391; People ex rel. Larson v. Thompson (1941), 377 Ill. 104, 117, 35 N.E.2d 355, 361.
 4 We conclude the town board of auditors lacked authority to approve *858 the contract in question, in the absence of a full, prior appropriation of funds for that purpose, and the agreement is therefore unenforceable against the Town of York.
DCS notes that after entering into the contract the town board provided for the payment of a portion of the amount due under its terms in the 1977 and 1978 budget and appropriation ordinances. It argues the township should be estopped from asserting the defense of ultra vires. This argument finds little support in the decisions of our reviewing courts where a distinction has generally been drawn between the lack of power in a municipality to act and the improper exercise of authority. (See, e.g., Avery v. City of Chicago (1931), 345 Ill. 640, 178 N.E. 351; Mathew v. Town of Algonquin (1972), 3 Ill. App.3d 429, 279 N.E.2d 91.) As this court stated in Stahelin v. Board of Education (1967), 87 Ill. App.2d 28, 41-42, 230 N.E.2d 465, 472:
"Contracts entered into by a municipality which are expressly prohibited by law, and which under no circumstances can be entered into, are void and ultra vires. They may not be rendered valid thereafter by estoppel or ratification on the part of the municipality. However, there is another class of municipal contracts, distinct from the void type heretofore referred to, wherein the municipality has the power to enter into the contract, but where a portion thereof may be beyond its power, or its power may have been irregularly exercised. As to this class of contracts, a municipality may not assert its want of authority or power, or the irregular exercise thereof, where to do so would give it an unconscionable advantage over the other party."
In our view, the requirement of a prior appropriation imposed upon the township by the Illinois Municipal Budget Law (Ill. Rev. Stat. 1979, ch. 85, par. 803) is not simply a precatory bookkeeping procedure suggested by the legislature for guidance in fiscal matters, but, instead, is a condition precedent to the expenditure of town funds and therefore to the validity of the contract in issue. (See DeKam v. City of Streator (1925), 316 Ill. 123, 146 N.E. 550; Guerine v. City of Northlake (1971), 1 Ill. App.3d 603, 274 N.E.2d 625; Collins v. Village of Glen Ellyn (1959), 21 Ill. App.2d 373, 158 N.E.2d 89; Greene v. City of Danville (1953), 350 Ill. App. 440, 113 N.E.2d 348, appeal denied (1953), 415 Ill. 631; Deyo v. Commissioner of Highways (1930), 256 Ill. App. 3, appeal denied.) The township was not estopped from asserting ultra vires as a defense to enforcement of the lease-purchase agreement against it in this case.
In conclusion we note that in a context similar to that seen in the present case, the court in May v. City of Chicago (1906), 222 Ill. 595, 599-600, 78 N.E. 912, 913, stated:

*859 "A person dealing with a municipal corporation is charged with the knowledge of the limitations of the power of that corporation for any contract attempted to be entered into by any of its officials."
As the issue we have discussed is dispositive, we need not consider the other claims of error asserted by the township.
Accordingly, the judgment of the circuit court of Du Page County is reversed and this cause is remanded for such further proceedings as may be necessary on the township's counterclaim.
Reversed and remanded.
SEIDENFELD, P.J., and REINHARD, J., concur.
