Coder Social home page Coder Social logo

angularjs-invoice's Introduction

README

AngularJS Invoice

Live Demo

Google Chrome highly recommended.

Original inspiration

This is a re-usable invoice template that uses AngularJS and Angular xeditable to allow for the adding and removing of line items and notes, and the editing of almost all the content just by clicking the text. It is meant for use on a full computer in order to save out as PDF.

Hover over the bottom of the window to reveal the content-adder.

Use the save button in the top right to open the print dialog and save as a PDF or go to File > Print. Legal paper size recommended for more than two line items.

Things this could still use:

  • Currently removing items is not as efficient as it should be. Ideally there would be a little X button to the right of a line item or note that would remove the html.

A directive like so would be great:

#!javascript

invoicer.directive('removeOnClick', function() {
    return {
        link: function(scope, elt, attrs) {
            scope.remove = function() {
                elt.html('');
            };
        }
    }
});

Then in the HTML

#!html

<tr remove-on-click ng-repeat="item in invoice.line_items" ng-hide="(item.price == 0)">
    <td>
        <p>
            <span editable-text="invoice.line_items[$index].title" e-style="width: 350px">{{item.title}}</span>
        </p>
     </td>
     <td><p editable-text="invoice.line_items[$index].milestone" e-style="width: 87px">{{item.milestone}}</p></td>
     <td><p editable-text="invoice.line_items[$index].price" e-style="width: 87px">{{item.price | number}}</p></td>
</tr>

BUT one would also have to recalculate the total at the same time, or else the line item will go away but the total stay the same.

###########################

Of course it would be cool to have a backend on this too...

angularjs-invoice's People

Watchers

James Cloos avatar Ashley Lopez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.