Jump to content

Due date on Order


tatadano

Recommended Posts

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.

Link to comment
Share on other sites

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.

????

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.