Our Vet told us to feed pumpkin or squash, or get Laxare, hair ball remedy. Even giving a bit of Vaseline, wipe it on its paw.
Try playing with the kitty, staying a few minutes more and leave a TV on for a few hours of day, even a radio on a talk show or low key like that.
I have kitties that will not poop if I'm gone more then over night. At several points to the vets we would go, fluids and enema.
Its a snow ball situation when they are depressed.
Even talking to its owner on speaker phone, not right up close to panic the cat, but let it know "Momma" is still alive and coming home.
Also, does kitty have wet food? Add a bit of tuna juice or sardine to the food, mix it in- often kitties love it.
Try sitting with the cat while its eating its wet food, or try a bit of raw hamburg or slivers of steak- tiny tiny.
I have changed our cats over to the natural diet of INNOVA- you cannot really do this to someone else's cat, but it really brought Teddy to a new life, he can use the box easily.
Good luck and often playing with a string will bring up appetite and it will look forward to seeing you.
Sorry, I thought you was taking care of it, if its piddling everywhere a vet may be in order or at least a sample taken into the vet.
Also, it could be a sign of Urinary Crystals- when Teddy begins to show signs of them, he forces urine and it will be outside the box.