wrproject Posted May 13, 2008 Report Share Posted May 13, 2008 Boas pessoal,preciso aqui duma ajudinha vossa. Imaginem que um cliente aluga um filme e tem 120 segundos para entregalo. mas esse cliente passa o prazo de entrega e entrega o filme 120 segundos. a multa é incrementada de 60 em 60 segundos. ajudem-mde plz, e urgente. thnks. Link to comment Share on other sites More sharing options...
wrproject Posted May 13, 2008 Author Report Share Posted May 13, 2008 ja encontrei a solução. Link to comment Share on other sites More sharing options...
Battousai Posted May 13, 2008 Report Share Posted May 13, 2008 Se o gajo leva o filme e demora 140 segundos, então $tempoEntrega = 140; $tempo = 120; $entrega = $tempoEntrega - $tempo; $multa60segundos = 2; if( $entrega > 0 ) echo 'Multa: ' . ( ceil( $entrega / 60 ) * $multa60segundos ) . ' €'; penso q é isso 😁 ? PS: ups, n tinha visto a resposta Link to comment Share on other sites More sharing options...
softklin Posted May 13, 2008 Report Share Posted May 13, 2008 Fizeste bem Battousai, uma vez que ele não deixou resposta (ou se calhar até deixará mais tarde), assim quem encontrar e tiver uma duvida parecida, já sabe uma possivel solução 😁 Nick antigo: softclean | Tens um projeto? | Wiki P@P Ajuda a comunidade! Se encontrares algo de errado, usa a opção "Denunciar" por baixo de cada post. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now