Opinion by
Judge Rogers,The Department of Public Welfare (DPW) has appealed from an ¡order of the Board of Claims (board) awarding Dauphin County Social 'Services for Children and Youth (county) the sum ¡of $27,951.00 as reimbursement of expenditures for day care services purchased by the county.
In April, 1978, DPW and the county entered into a written contract in which DPW agreed to reimburse *297the county for day care services provided toy the county to children from low income' families in the HarrisburgnSteelton area. The contract was for the term July 1, 1978 through June 30, 1979. The estimated total costs of $928,439.00 were allocated among eight accounts or budget categories, one of which was for the purchase of slots1 at day care centers.
In pursuance of its obligations under the agreement, the county entered into a service purchase subcontract with Neighborhood Day iCare Center, Inc. (NDC'C) for the latter to provide the day care slots. NDGC submitted monthly invoices or bills for its services to the county. After verifying the accuracy of the bills, the county paid NDCC and then billed DPW.
The county’s contract with DPW expired on June 30, 1979 and on August 1, 1979, the county submitted what it described as a final invoice to DPW. On August 13, 1979, a county employee discovered that due to a clerical error the county did not include in its final invoice sent to DPW the sum of $27,951.00 which the county had paid NDC'C for services rendered in June, 1979. The county immediately notified DPW of its error by telephone and, by letter dated August 23, 1979, requested that it be permitted to amend or supplement its final invoice of August 1, 1979 so as to include' the $27,951.00. At the time of this request, there were $43,437.73 of unexpended funds under the contract; however, only $6,618.75 of this 'amount remained in the day care account or budget category.
DPW refused the county’s request to amend or supplement its final invoice or to pay $27,951.00 which the county had paid out on the grounds that the invoice of August 1, 1979 was sent and received as a final invoice and that the contract expressly prohibited the reallocation of funds among accounts or budget *298categories after the end of the third quarter of the contract.
The pertinent provisions of the contract are as follows:
20. There shall be no Provider requested budget amendments .after the last day of the third quarter of the contract period.
25. This Agreement contains all the terms and conditions agreed on by the parties. Any alterations, variations, modifications, or waivers of this Agreement shall only be' valid when they have been reduced to writing, duly signed and attached to the original of this Agreement. ... No other agreements, oral or otherwise, regarding the subject matter of this Agreement, shall be deemed to exist or to bind any of the parties hereto.
Additionally, attached to and made a part of the contract was ¡a document entitled Payment Provisions, relevant portions of which are:
(B)(4) Provider shall' submit the last monthly actual invoice no later than sixty days after the ending date of this Agreement. . . . No reimbursement or payment will be made for any invoice not submitted in accordance with this provision.
(B)(7) . . . All reallocation of funds between budget categories require [isic] prior written approval by the Department.
(B)(8) For program funded contracts, the provider has the option to reallocate funds among budget categories after six or nine months for a fiscal year contract. . . . All re-allocations ¡among budget categories shall be approved by and filed with the Department.
*299The Board of -Claims, after a hearing, awarded the oonnty the $27,951.00 it sought -based -on Section 25 of the contract which allows alterations, variations, modifications and waivers of its terms 'and -conditions. The board concluded that “it would be unreasonable to accept the technical arguments of [DPW] in denying the [county] the relief [to which] it was entitled” because the DPW would be “unjustly enriched,” citing Zvonik v. Zvonik, 291 Pa. Superior Ct. 309, 435 A.2d 1236 (1981) (a suit on an oral promise) and, curiously, Roman Mosiac & Tile Co., Inc. v. Vollrath, 226 Pa. Superior Ct. 215, 313 A.2d 305 (1973), which held that the doctrine of unjust enrichment is inapplicable when the relationship between the parties is founded on a written contract.
DPW properly contends that since the contract with the county was written, the board’-s award cannot be sustained on the -principle of unjust enrichment. Where the parties have entered into a written contract, the court may not relieve one of them of his contractual obligations on the ground that its enforcement works a hardship. Schott v. Westinghouse Electric Corp., 436 Pa. 279, 259 A.2d 443 (1969); Harnish v. Shannon, 392 Pa. 419, 141 A.2d 347 (1958); Third National Bank & Trust Company of Scranton v. Lehigh Valley Coal Co., 353 Pa. 185, 44 A.2d 571 (1945). The board therefore erred in basing its award on the theory of unjust enrichment. This conclusion, however, does not require us to reverse the board. A reviewing court may affirm an order if it is correct for any reason, regardless of the reasons given by the tribunal whose order is under review. Gwinn v. Kane, 465 Pa. 269, 348 A.2d 900 (1975).
The county contends, as it did before the board, that it should be reimbursed for its last payment for day care slots because it substantially, indeed fully, *300performed the services required of it under the contract. We agree that the doctrine of .substantial performance requires the affirmance of the board’s order.
“The equitable doctrine of substantial performance is intended for the protection and relief of those who have faithfully and honestly endeavored to perform their contracts in all material and substantial particulars, so that their right to compensation may not be forfeited by reason of mere technical, inadvertent, or unimportant omissions or defects.” Morgan v. Gamble, 230 Pa. 165, 175, 79 A. 410, 414 (1911) (quoting Gillespie Tool Co. v. Wilson, 123 Pa. 19, 26, 16 A. 36, 37-38 (1888)). As noted by then Judge Cardozo in Jacob & Young v. Kent, 230 N.Y. 239, 241, 129 N.E. 889, 891 (1921), “[t]he courts never say that one who. makes a contract fills the measure of his duty by less than full performance. They do say, however, that an omission, both trivial and innocent, will sometimes be atoned for by allowance of the resulting-damage, and will not always be the breach of a condition to. be followed by a forfeiture. . . . We must weigh the purpose to be served, the desire to be gratified, the excuse for deviation from the letter, the cruelty of enforced adherence. Then only can we tell whether literal fulfillment is to be implied by law as a condition. ’ ’
The county’s failure to request a budget reallocation not later than the last day of the third quarter of the contract was trivial and innocent. DPW does not dispute that the county fully performed the services and that it has not been reimbursed the $27,951.00 sued upon. When the omission was discovered, the county immediately notified DPW. The county furnished a revised final invoice well within the sixty-day period following the expiration of the contract *301as required by Paragraph (B)(4) of the Payment Provisions. There is no evidence that DPW was injured or even ineovenienced by the county’s failure to submit a timely request for reallocation. The balance of money encumbered on account of this contract was “disencumbered” by DPW, it says, sometime between August 13, 1979 and August 20, 1979, that is, after it knew of the county’s unpaid bill. Moreover, we are not told if or how the disencumbered balance was used by DPW or when it finally lapsed, if it did. We agree with the Board of .Claims that DPW’s case does not extend beyond reliance upon a deviation by the county from the literal terms of the contract entirely without harmful consequences.
Order affirmed.
Order
And Now, this 26th day of June, 1985, the order of the Board of Claims in the above-captioned matter is affirmed.
A slot is a space for a child in a day care program,