Stored proc: Updates & fixes to warranty management