WHMCS One Invoice Billable Time Entries Without Sending Email

If you’ve used the WHMCS software billable time feature you know the invoice is created, sends email, and sets the same day as due date after generating the invoice from billable time entries.

The problem with this is it provides a negative user experience because it will be jarring to a customer receiving an invoice with no explanation AND due the same day received.

I looked numerous times for a solution or work around and finally found one that worked.

  1. Mark all your time entries to invoice on next cron.
  2. Visit the clients’ profile and click “Generate due invoices”
    1. WHMCS  will ask if you want to send emails right now or no.
    2. Choose no and visit the invoices tab.
    3. Each billable time entry will be it’s own invoice.
  3. Visit the invoices tab for the client. Fortunately invoices can be merged.
  4. If you have a lot of time entries filter by invoice status unpaid.
  5. Select all invoices that should be merged
  6. Click the merge invoices button.
  7. This will have pulled all the items in to a single invoice.
  8. Change the due date to something more appropriate before sending the invoice to the client.

I hope this helps someone who had the same issues for me.

Source: WHMCS Forum

Ubuntu 14.04 Hangs After Login With Virtualbox VDI

I fell into the trap while installing Ubuntu in virtual box to only give Ubuntu 8gb for the hard drive because it was recommended. I quickly realized that this wasn’t big enough. While searching on the internet I found the commands for virtualbox to increase the VDI size. I ran the command and started Ubuntu. Everything appeared normal until after logging in. Ubuntu just sat and didn’t do anything. After realized that the resize likely caused this issue I searched online and found a great article  Growing a hard drive partition in a VirtualBox ubuntu guest. The article mentions resizing Ubuntu’s partition after resizing the VDI. I resized the partition and everything is working as expected!

Steps to resize VDI

  1. Run VBoxManage modifyhd <absolute path to file> –resize <size in MB>
  2. Boot the VM to either gparted cd or Ubuntu live CD
  3. Resize Ubuntu’s main partition (You might need to delete the swap partition and readd to move main parititon)
  4. Restart
  5. Enjoy 🙂

Laravel 4 Project On Shared Hosting

Laravel 4 is capable of running on a shared hosting environment. It’s a lot easier than you probably think.

  1. Login to your host and go to your home directory. This does not mean your public home directory, they are separate.
  2. Upload all the contents Laravel project EXCEPT the public folder to your home directory.
  3. Upload the contents of your Laravel public directory to your public directory on your host. The public directory is sometimes called public_html.
  4. Edit file paths.php located in the bootstrap folder so the public path matches the path to your public directory on your host.

After completing each of those steps you should now have a working Laravel 4 project on a shared hosting environment. This assumes the shared host has all the PHPmodules required to run Laravel as well. I was able to accomplish this on HostGator.

If you have any questions feel free to ask.

PHP Pages Displaying Code And Not Rendering Code

For some reason my server started displaying code instead of actually processing or rendering the code.

After playing around with the server I noticed the php5 module was missing from Apache.

If your code is displaying and not rendering you may have the same issue.

To install and enable it run the following command.

sudo apt-get install libapache2-mod-php5
sudo a2enmod php5

Then restart your apache. The restart command is different depending on the distro you’re using.
A simple Google search will help you.

 

This is the forum post that helped me fix my issue.

http://ubuntuforums.org/showthread.php?t=1546116&p=9681081#post9681081

Git Force Push Branch

I had a problem where I want to push my branch and overwrite what was the on the server.

I kept receiving an error telling me to merge. I did not want to merge and found a way to force push a branch.

In general you don’t want to do this unless you absolutely have to.

git push -f origin <branch>

This Stackoverflow question and answers helped me.

http://stackoverflow.com/questions/10298291/cannot-push-to-github-keeps-saying-need-merge

Mod Rewrite Enabled But Not Working

If you find that your mod rewrite is enabled, but doesn’t seem to be working you may need to add this little bit of code to your httpd.conf file.

AllowOverride All

It’s possible your file might have the following:

AllowOverride None

If your AllowOverride was set to none then your .htaccess files in your project directory are not able to set their own settings including url rewriting.

Make sure to restart Apache after applying this change to your httpd.conf file.

 

The following link helped me solve my problem.

http://stackoverflow.com/questions/17772962/laravel-4-simple-route-not-working-using-mod-rewrite-and-htaccess

How-To's

How To Fix Plex Media Server Not Recognizing Files On Separate Hard Drive

If Plex Media Server can’t find your files which are located on a separate hard drive other than the hard drive Linux is on chances are it needs to be mounted.

This how to will be focused on Ubuntu, but I believe will work on other Linux versions as well.

Most likely if you want to use the other hard drive you’ll want it to auto mount.
Auto mount will mount the hard drive on boot.

But first we need to get the Universal Unique Identifier of the drive.
In the terminal type

sudo blkid

Take note of the UUID and the Type. We’ll use this to mount the drive.
Let’s pretend my UUID is abcdefghi and type is NTFS

Next create a folder located on the same hard drive as your Linux installation.
This folder will be used as a mount point for the other hard drive.
In the terminal type

sudo mkdir /media/data

Replace data with the desire folder name to create.

Make a back up and then modify the fstab file.
This file is in charge of auto mounting
In the terminal type

sudo cp /etc/fstab /etc/fstab.old
sudo gedit /etc/fstab

The last command should launch an editor.
In the editor add a new line

UUID=abcdefghi /media/data ntfs-3g defaults,windows_names,locale=en_US.utf8 0 0

NOTE: the second and third parameters will change depending on the type we found earlier.
Visit this fstab Ubuntu link for more details and look for file system specific examples.

This mounting windows partitions from Ubuntu link helped solve my specific problem which was plex not recognizing my files which are located on a separate hard drive from my Linux installation.

How-To's, Tech

How To Fix Android Studio Not Opening

Google recently released an Android Studio. Developers have been wanting this for sometime now.

I was super excited to try it out and after installing it wouldn’t open. I did some searching and some people are having problems with it detecting the JDK installation path and the system environment path.

It’s a real easy fix.

First, make sure you have the JDK installed on your machine.

Secondly make sure you have a system variable JDK_HOME set to your JDK install folder

After those two steps have been completed Android Studio should launch.

This post on XDA developer forums help me fix my issue.

How-To's, Interesting, Tech

How To Watch Netflix Outside The U.S.

First you’ll need a Netflix account. If you don’t have a Netflix account and want to sign up, but can’t because you’re overseas this is where Spotflux also comes in.

Secondly you’ll need to install and run Spotflux. Your internet connection might drop for a minute after installing. Spotflux needs to makes some changes to the internet connection which temporarily disrupts the connection.

Spotflux routes all of your traffic through it’s servers in the U.S. tricking Netflix into thinking you’re in the U.S..
Allowing you to watch Netflix overseas for free, assuming you have a Netflix account.

Your connection might be slow for two reasons.
One, geologically the distance between you and Spotflux servers is great.
Two, your connection is already slow.

Not only does Spotflux encrypt your traffic to keep it safe from prying eyes, but it also removes ads, tracking cookies, and other malware.
According to their site:

The location and identity of your devices are concealed. Your connection to the internet is safe, more private, and unrestricted.

Spotflux is also useful if you’re using public WiFi because if your traffic isn’t encrypted anyone on the network can see what sites your browsing and potentially username/passwords.

 

You can download Spotflux here.