tatadano Posted April 2, 2012 Share Posted April 2, 2012 Greetings! I am really stock on this situation. 1. I have a variable $uc_order_created. 2. I have a code like this: <b><?php echo t('Due Date:'); ?></b> </td> <td width="98%"> <?php $duedate = mktime(0,0,0,date("m"),date("d")+30,date("Y")); echo "".date("F jS Y", $duedate);?> 3. How do I code if I want the result of $uc_order_created get displayed as Due Date using the code above? Or other modifications? 4. The situation now, the code is working when printing the invoice but its not based on $uc_order_created. So, every time I will edit the Order because of the change of items among others the Due Date will also update. All I want that when Order is edited the value of Due Date will still remain based on the $uc_order_created. Thank you so much in advance for your help. Quote Link to comment https://forums.phpfreaks.com/topic/260178-due-date-on-order/ Share on other sites More sharing options...
ocpaul20 Posted April 2, 2012 Share Posted April 2, 2012 You are going to need to store the create date somewhere and not touch it afterwards. Then it will be the same as when you created the record. Or... you could just store the due date since you know that it will always be 30 days from the create date. You need to plan (write a spec) for your system or program. ???? Quote Link to comment https://forums.phpfreaks.com/topic/260178-due-date-on-order/#findComment-1333543 Share on other sites More sharing options...
tatadano Posted April 2, 2012 Author Share Posted April 2, 2012 Ah ok..so how do I translate it as a code. I am clueless at the moment what to do. Perhaps can you give an example how it works? If its ok. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/260178-due-date-on-order/#findComment-1333553 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.