Giter Site home page Giter Site logo

rimiti / invoice-it Goto Github PK

View Code? Open in Web Editor NEW
91.0 4.0 33.0 1.56 MB

:page_with_curl: Generate your orders or your invoices and export them in html, pdf or buffer easily.

Home Page: https://dimsolution.com/blog/2018-05-29/how-to-easily-generate-order-invoice-pdf-file/

License: MIT License

JavaScript 68.08% Pug 31.92%
invoice order node generator module pdf html invoice-template order-template

invoice-it's Introduction

Hi, I'm Dimitri, a Compulsive Developer and Entrepreneur from France ๐Ÿ‡ซ๐Ÿ‡ท ๐Ÿฅ–

Dimitri DO BAIRRO - Website Dimitri DO BAIRRO - LinkedIn Dimitri DO BAIRRO - Twitter Dimitri DO BAIRRO - StackOverflow Dimitri DO BAIRRO - Instagram Abhishek's Reddit


Visitors


$ whoami

> I'm a Freelance full stack developer & DevOps | Serial entrepreneur 
                                                โ”‚ Typescript, Javascript, Golang, Kubernetes enthusiast
                                                โ”‚ Open Source addict & Compulsive coder 
                                                | Founder of @DimSolution, @Wefloc, @ScalingInvestment, @Yostly
                                                | CTO @Tictactrip
                                                | Lรฉo & Roma's dad

GIF


Talking about Personal Stuffs:

  • ๐Ÿ‘จ๐Ÿฝโ€๐Ÿ’ป Iโ€™m currently working on something cool ๐Ÿ˜‰;
  • ๐ŸŒฑ Iโ€™m currently learning something;
  • ๐Ÿ’ฌ Ask me about anything, I am happy to help;
  • ๐Ÿ“ซ How to reach me: @dimitridobairro;

Languages and Tools:

...


Languages:

  • ๐Ÿ‡ซ๐Ÿ‡ท French
  • ๐Ÿ‡ฌ๐Ÿ‡ง English
  • ๐Ÿ‡ต๐Ÿ‡น Portuguese

๐Ÿ“ˆ My GitHub Stats

Dimitri DO BAIRRO

invoice-it's People

Contributors

aareksio avatar dependabot[bot] avatar diffusi-on avatar greenkeeper[bot] avatar kjanikcc avatar rimiti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

invoice-it's Issues

The currency option should be generic.

@tgensol thanks for building this amazing product. It would be really great if you provide generic currency support currently it has only support for Euros, please find attached screenshot.
invoiceit

undefined for invoice.getInvoice().toPDF().toBuffer()

unable to create buffer

`const invoiceIt = require('@rimiti/invoice-it').default;

const recipient = {
company_name: 'Receiver company',
first_name: 'Will',
last_name: 'Jameson',
street_number: '20',
street_name: 'Rue Victor Hugo',
zip_code: '77340',
city: 'Pontault-Combault',
country: 'France',
phone: '06 00 00 00 00',
mail: '[email protected]'
};

const emitter = {
name: 'Dim Solution',
street_number: '15',
street_name: 'Rue Jean Jaures',
zip_code: '75012',
city: 'Paris',
country: 'France',
phone: '01 00 00 00 00',
mail: '[email protected]',
website: 'www.dimsolution.com'
};

const invoice = invoiceIt.create(recipient, emitter);
const pdf = invoice.getInvoice().toPDF().toBuffer()
const pdf = invoice.getInvoice().toPDF()
// .toFile('./invoice.pdf')
// .then((r) => {
// console.log('PDF file created.',r);
// });
console.log(pdf)`

Adding custom field does not affect output.

Using the below code from instructions:

const paymentId = {
  key: 'invoice_header_paymentId_value',
  value: '123 - test value'
};
const phrases = ['invoice_header_payment_reference', paymentId];
invoice.getInvoice(phrases).toPDF()

produces no changes in output. Am I missing something?

Thanks.

TypeError: fs.existsSync is not a function

webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2305 TypeError: fs.existsSync is not a function
at read (webpack-internal:///./node_modules/i18n-factory/i18n.js:670)
at eval (webpack-internal:///./node_modules/i18n-factory/i18n.js:76)
at Array.forEach ()
at Object.i18nConfigure [as configure] (webpack-internal:///./node_modules/i18n-factory/i18n.js:75)
at Object.eval (webpack-internal:///./node_modules/@rimiti/invoice-it/dist/lib/i18n.js:14)
at eval (webpack-internal:///./node_modules/@rimiti/invoice-it/dist/lib/i18n.js:30)
at Object../node_modules/@rimiti/invoice-it/dist/lib/i18n.js (5.js:1090)
at webpack_require (app.js:854)
at fn (app.js:151)
at eval (webpack-internal:///./node_modules/@rimiti/invoice-it/dist/classes/generator.js:24)
abort @ webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2305

Not compatible with React

Hi, I am having this issue when using it on React:
Module not found: Can't resolve 'fs' in '/home/angeligareta/Desktop/Atecresa/ecommerce/node_modules/@rimiti/invoice-it/dist/classes'

This module does not have an option to be compatible with browser?

Regards

Customization from setters does not work.

trying this code:

invoice.global.invoice_reference_pattern = '$prefix{INVOICE}$date{YYMM}$separator{_}$id{00000}';
invoice.global.invoice_note = 'It\'s my custom node!';
invoice.global.date_format = 'YYYY-MM-DD';

from the instructions produces a TypeError:

TypeError: Cannot set property 'invoice_reference_pattern' of undefined

Make phantomjs dependency optional

Hi!

Is there a chance you could make phantomjs (html-to-pdf) dependency optional? I'd like to use your library just to generate HTML invoices and PhantomJS is too big of a dependency for such use case (not to mention it is deprecated).

Regards

Invoice date in Docker problem

Hi,
last time I found strange bug. When I ran my service using this package in latest version and lunching it in docker image on kubernetes, date on invoice was always the same. Date was from container start. Only workaround that I found is to pass date to invoice invoice.date = new Date() inside my service, and then it's works.

This bug could be related to this line because before it was working well, please check this if you can, there is something wrong going on

date: new Date(),

Upgrade all dependencies

Hi,
Deps to upgrade:

moment                    ^2.20.1  โ†’  ^2.21.0
 pug                   ^2.0.0-rc.4  โ†’   ^2.0.1
 babel-jest                ~22.4.0  โ†’  ~22.4.1
 eslint                    ^4.18.0  โ†’  ^4.18.2
 eslint-plugin-import       ^2.8.0  โ†’   ^2.9.0
 jest                      ^22.4.0  โ†’  ^22.4.2

Regards,

How to change the reference of invoice

Hi,
First of all, thank you for this package. It helped me a lot !

Could you please show me how to change the reference of invoice ? I saved the information
of transaction in database and now I want to put the key of transaction in this place. Is this possible ?
Thank you.
image

customizing footer information and emitter first and last name

Hey, I'm dying to customize the footer information but I don't know how. Until now I got Dim Solution at the bottom (footer). And I can't explain why I can not add any person's name to the emitter name. All I got is 'your company' and Dim Solution at the footer. Please help

Multi lang doesnt work

Hello,

I try to change the language but it's not working.

const invoiceIt  	= require('@rimiti/invoice-it');

invoiceIt.configure({
  language: {
    locales: ['fr', 'en'],
    directory: `${__dirname}/locales`,
    defaultLocale: 'fr'
  }
});

and within my route :

		const invoice = invoiceIt.create(recipient, emitter);

		invoice.getInvoice().toPDF().toFile(pdfPathfile).then(() => {
			console.log('PDF file created.');
			return res.json({});
		});

I did a log within your generator.js
and it's always showing 'en' as default language

version package npm: "@rimiti/invoice-it": "^3.1.0",

HTML-PDF Number of pages

Finding that even though the html output is a single page, html-pdf seems to always generate 2 pages. Have tried looking there and playing around w the pug template.

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.