@_nikhilpalli not sure if this would work but you could try a scheduled workflow with a transform action. just have the saved search be sales orders pending billing with customer deposits applied. if you wanted it to apply immediately you'd probably need a script but the scheduled workflow can do it every half hour