-
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a40b51f
commit 0eb9385
Showing
3 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
Copyright (C) 2016-Today KMEE (https://kmee.com.br) | ||
@author: Felipe Zago <[email protected]> | ||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
*/ | ||
odoo.define("l10n_br_pos_cfe.Printer", function (require) { | ||
"use strict"; | ||
|
||
var Printer = require("point_of_sale.Printer").Printer; | ||
|
||
Printer = Printer.include({ | ||
htmlToImg: function (receipt) { | ||
const self = this; | ||
$('.pos-receipt-print').html(receipt); | ||
return new Promise(function (resolve, reject) { | ||
self.receipt = $('.pos-receipt-print>.pos-receipt'); | ||
html2canvas(self.receipt[0]).then(canvas => { | ||
$('.pos-receipt-print').empty(); | ||
resolve(self.process_canvas(canvas)); | ||
}); | ||
}); | ||
}, | ||
}); | ||
|
||
return Printer; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters