If, upon a trial, the judgment shall be for the plaintiff, he shall retain possession of the property delivered to him under the writ of replevin, or if said property has not been found, then the plaintiff shall have a judgment for its value as determined by such hearing, or the value of the plaintiff’s interest therein. Upon the entry of a judgment for the plaintiff in such replevin action, the plaintiff and the sureties on his bond shall be fully and finally discharged and said bond cancelled. If the defendant shall have bonded the property after seizure and the judgment shall be for the plaintiff, then such judgment shall be that the defendant shall immediately deliver up said property to the plaintiff, with the defendant and the sureties on his bond to be liable to the plaintiff for any damage to or depreciation in the value of such property from the date of its surrender to the defendant under his bond until the date of its surrender by the defendant in obedience to the judgment of the court, in addition to any other damage the plaintiff may have sustained by reason of the wrongful taking or detention of such property by the defendant, all as determined upon writ of inquiry; or that the plaintiff recover from the defendant and his sureties the value of said property at the date of its return to the defendant under bond.