Commit e637546f authored by Wilson JALLET's avatar Wilson JALLET 💸

Merge branch 'appro-ooshop' into 'master'

Auto appro ooshop

See merge request !2
parents 3e7a3a40 5f89e0ed
Pipeline #416 failed with stage
in 60 minutes
......@@ -11,6 +11,6 @@
<button type="submit" class="btn btn-success" ng-class="parsing_receipt && 'disabled' || ''">Valider</button>
</div>
</form>
<p ng-show="parsing_receipt">Analyse du PDF en cours</p>
<p ng-show="parsing_receipt">Analyse du PDF en cours...</p>
</div>
</div>
......@@ -237,11 +237,11 @@ angular.module('bars.admin.food', [
* https://stackoverflow.com/questions/1554280/extract-text-from-pdf-in-javascript#29111164
*/
function pdfToText(data) {
PDFJS.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js';
PDFJS.cMapUrl = 'js/vendor/pdfjs/cmaps/';
PDFJS.cMapPacked = true;
pdfjsLib.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js';
pdfjsLib.cMapUrl = 'js/vendor/pdfjs/cmaps/';
pdfjsLib.cMapPacked = true;
return PDFJS.getDocument(data).then(function(pdf) {
return pdfjsLib.getDocument(data).then(function(pdf) {
var pages = [];
for (var i = 0; i < pdf.numPages; i++) {
pages.push(i);
......@@ -284,7 +284,7 @@ angular.module('bars.admin.food', [
} else {
addItemToAutoAppro(qte_livree, montant_ttc, ean13, name);
step = 0;
--i; // Relire la ligne car c’est sûrement le code barre de l’aliment suivant
--i; // Relire la ligne car c'est surement le code barre de l'aliment suivant
ean13 = '';
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment