- fix quantità corretta sulla email e dimensione dell'immagine
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
DATABASE=test_FreePlanet
|
||||
DATABASE=test_PiuCheBuono
|
||||
UDB=paofreeplanet
|
||||
PDB=mypassword@1A
|
||||
SEND_EMAIL=0
|
||||
SEND_EMAIL_ORDERS=1
|
||||
PORT=3000
|
||||
appTelegram_TEST=["1","13"]
|
||||
appTelegram=["1","13"]
|
||||
appTelegram_TEST=["1","17"]
|
||||
appTelegram=["1","17"]
|
||||
DOMAIN=mongodb://localhost:27017/
|
||||
AUTH_MONGODB=true
|
||||
MONGODB_USER=admin
|
||||
|
||||
@@ -76,9 +76,9 @@ html
|
||||
- var qty = rec.order.quantity
|
||||
- var qtypreordered = rec.order.quantitypreordered
|
||||
if (rec.order.product.productInfo.sfuso && rec.order.product.productInfo.weight)
|
||||
qtypreordered = (qtypreordered * rec.order.product.productInfo.weight);
|
||||
else
|
||||
qtypreordered = qtypreordered + ' x ' + rec.order.product.productInfo.weight;
|
||||
- qtypreordered = qtypreordered * rec.order.product.productInfo.weight
|
||||
else if (rec.order.product.productInfo.weight)
|
||||
- qtypreordered = qtypreordered + ' x ' + rec.order.product.productInfo.weight
|
||||
|
||||
- var unit = rec.order.product.productInfo.unitstr
|
||||
- index = index + 1
|
||||
@@ -92,7 +92,7 @@ html
|
||||
table(cellpadding="0", cellspacing="0", summary="", border="0")
|
||||
tr
|
||||
td
|
||||
img(src=baseimg + img, alt="", width="150" height="150")
|
||||
img(src=baseimg + img, alt="", width="150")
|
||||
td(class="column", valign="top")
|
||||
|
||||
table(cellpadding="0", cellspacing="0", summary="", border="0")
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
title Ordine n. #{ordernumber} Consegnato
|
||||
|
||||
//- import css/scss stylesheets
|
||||
//- these file names will be replace by gulp with proper css file paths
|
||||
link(rel="stylesheet", href="../sass/basic.scss")
|
||||
link(rel="stylesheet", href="../sass/one/styles.scss")
|
||||
|
||||
//- embdedded css allowed, but not sass
|
||||
style.
|
||||
.red {
|
||||
background-color: #E84C50;
|
||||
}
|
||||
|
||||
.full-width {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body(yahoofix, style="background: #ffffff")
|
||||
- var baseimg = baseurl + '/';
|
||||
span(id='body_style', style='display:block')
|
||||
table(cellpadding="10", cellspacing="0", width="600", align="center")
|
||||
tr
|
||||
td(class="whitespace", height="10")
|
||||
p
|
||||
|
||||
if (orders.items && orders.items.length > 0)
|
||||
- var mystorehouse = orders.items[0].order.storehouse
|
||||
else
|
||||
- var mystorehouse = null
|
||||
|
||||
tr
|
||||
td(class="emailContainer", valign="top")
|
||||
|
||||
- var mioheader = mystorehouse.email_html_header
|
||||
if (mioheader)
|
||||
p!= mioheader
|
||||
else
|
||||
p Ciao #{name},
|
||||
|
||||
p L'ordine n. #{ordernumber} è stato Consegnato correttamente !
|
||||
|
||||
if (orders.items[0].order.quantitypreordered > 0)
|
||||
- var miomakeorder = mystorehouse.email_html_GAS_order_consegnato
|
||||
else
|
||||
- var miomakeorder = mystorehouse.email_html_order_consegnato
|
||||
|
||||
if (miomakeorder)
|
||||
p!= miomakeorder
|
||||
|
||||
- var totalPrice = orders.totalPrice
|
||||
- var note = orders.note
|
||||
- var index = 0
|
||||
|
||||
each rec in orders.items
|
||||
- var descr = rec.order.product.productInfo.name
|
||||
- var img = rec.order.product.productInfo.img
|
||||
- var price = rec.order.product.price
|
||||
- var after_price = rec.order.product.after_price
|
||||
if (rec.order.gasordine)
|
||||
- var gasordine = rec.order.gasordine.name
|
||||
else
|
||||
- var gasordine = ''
|
||||
- var qty = rec.order.product.quantity
|
||||
- var qtypreordered = rec.order.quantitypreordered
|
||||
- var TotalPriceProduct = rec.order.TotalPriceProductstr
|
||||
- index = index + 1
|
||||
|
||||
table(cellpadding="0", cellspacing="0", width="100%", summary="", border="0", align="center")
|
||||
tr
|
||||
td(class="column", valign="center" width="40")
|
||||
p.boldhigh #{index}.
|
||||
|
||||
td(class="column sectionArticleImage", valign="top" width="150")
|
||||
table(cellpadding="0", cellspacing="0", summary="", border="0")
|
||||
tr
|
||||
td
|
||||
img(src=baseimg + img, alt="", width="150" height="150")
|
||||
td(class="column", valign="top")
|
||||
|
||||
table(cellpadding="0", cellspacing="0", summary="", border="0")
|
||||
if (qtypreordered > 0)
|
||||
tr
|
||||
td(class="sectionContent", valign="top")
|
||||
p Gas Ordine: #{gasordine}
|
||||
p
|
||||
tr
|
||||
td(class="sectionContentTitle boldhigh", valign="top")
|
||||
p #{descr}
|
||||
tr
|
||||
td(class="sectionContent", valign="top")
|
||||
p Prezzo: #{price} € #{after_price}
|
||||
if (qty > 0)
|
||||
tr
|
||||
td(class="sectionContent", valign="top")
|
||||
p Quantità: #{qty}
|
||||
if (qtypreordered > 0)
|
||||
tr
|
||||
td(class="sectionContent", valign="top")
|
||||
p Quantità Prenotata: #{qtypreordered}
|
||||
tr
|
||||
td(class="sectionContent", valign="top")
|
||||
p Totale: #{TotalPriceProduct} €
|
||||
|
||||
if (note)
|
||||
p Note Aggiuntive: #{note}
|
||||
|
||||
p.sectionContentTitle.boldhigh.sectionTotal Totale Ordine: #{totalPrice} €
|
||||
tr
|
||||
td(class="whitespace", height="10")
|
||||
|
||||
tr
|
||||
td
|
||||
- var miofooter = mystorehouse.email_html_footer
|
||||
if (miofooter)
|
||||
p!= miofooter
|
||||
else
|
||||
p Grazie Mille
|
||||
|
||||
table.footer(cellpadding="0", cellspacing="0", width="100%", summary="", border="0", align="center")
|
||||
tr
|
||||
td(class="whitespace", height="10")
|
||||
p
|
||||
tr
|
||||
td.firma
|
||||
p!= dataemail.firma
|
||||
|
||||
tr
|
||||
td.disclaimer
|
||||
p!= dataemail.disclaimer_out
|
||||
|
||||
tr
|
||||
td.bottom
|
||||
p!= dataemail.disc_bottom_out
|
||||
|
||||
tr
|
||||
td(class="whitespace", height="10")
|
||||
p
|
||||
|
||||
style(type="text/css").
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
|
||||
.divbtn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
padding: 5px;
|
||||
margin: 5px;
|
||||
font-size: 26px;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
background: #027be3 !important;
|
||||
border-radius: 28px;
|
||||
|
||||
}
|
||||
@@ -71,6 +71,11 @@ html
|
||||
- var gasordine = ''
|
||||
- var qty = rec.order.product.quantity
|
||||
- var qtypreordered = rec.order.quantitypreordered
|
||||
if (rec.order.product.productInfo.sfuso && rec.order.product.productInfo.weight)
|
||||
- qtypreordered = qtypreordered * rec.order.product.productInfo.weight
|
||||
else if (rec.order.product.productInfo.weight)
|
||||
- qtypreordered = qtypreordered + ' x ' + rec.order.product.productInfo.weight
|
||||
|
||||
- var unit = rec.order.product.productInfo.unitstr
|
||||
- var TotalPriceProduct = rec.order.TotalPriceProductstr
|
||||
- index = index + 1
|
||||
@@ -84,7 +89,7 @@ html
|
||||
table(cellpadding="0", cellspacing="0", summary="", border="0")
|
||||
tr
|
||||
td
|
||||
img(src=baseimg + img, alt="", width="150" height="150")
|
||||
img(src=baseimg + img, alt="", width="150")
|
||||
td(class="column", valign="top")
|
||||
|
||||
table(cellpadding="0", cellspacing="0", summary="", border="0")
|
||||
|
||||
@@ -70,6 +70,11 @@ html
|
||||
- var gasordine = ''
|
||||
- var qty = rec.order.product.quantity
|
||||
- var qtypreordered = rec.order.quantitypreordered
|
||||
if (rec.order.product.productInfo.sfuso && rec.order.product.productInfo.weight)
|
||||
- qtypreordered = qtypreordered * rec.order.product.productInfo.weight
|
||||
else if (rec.order.product.productInfo.weight)
|
||||
- qtypreordered = qtypreordered + ' x ' + rec.order.product.productInfo.weight
|
||||
|
||||
- var unit = rec.order.product.productInfo.unitstr
|
||||
- var TotalPriceProduct = rec.order.TotalPriceProductstr
|
||||
- index = index + 1
|
||||
@@ -83,7 +88,7 @@ html
|
||||
table(cellpadding="0", cellspacing="0", summary="", border="0")
|
||||
tr
|
||||
td
|
||||
img(src=baseimg + img, alt="", width="150" height="150")
|
||||
img(src=baseimg + img, alt="", width="150")
|
||||
td(class="column", valign="top")
|
||||
|
||||
table(cellpadding="0", cellspacing="0", summary="", border="0")
|
||||
|
||||
12
logtrans.txt
12
logtrans.txt
@@ -165,3 +165,15 @@ Sab 17/02 ORE 15:03: [<b>Circuito RIS Bologna</b>]: Inviate Monete da paoloar77
|
||||
Saldi:
|
||||
paoloar77: 20 RIS]
|
||||
SuryaArena: 16 RIS]
|
||||
Gio 11/04 ORE 16:54: [<b>Euro</b>]: Inviate Monete da paoloar77 a piuchebuono 110 € [causale: Pagato Ordine n.236]
|
||||
Saldi:
|
||||
paoloar77: -246.8 €]
|
||||
piuchebuono: 2181.0999999999985 €]
|
||||
Gio 11/04 ORE 16:55: [<b>Euro</b>]: Inviate Monete da paoloar77 a piuchebuono 110 € [causale: Pagato Ordine n.235]
|
||||
Saldi:
|
||||
paoloar77: -356.8 €]
|
||||
piuchebuono: 2291.0999999999985 €]
|
||||
Gio 11/04 ORE 16:57: [<b>Euro</b>]: Inviate Monete da paoloar77 a piuchebuono 110 € [causale: Pagato Ordine n.234]
|
||||
Saldi:
|
||||
paoloar77: -466.8 €]
|
||||
piuchebuono: 2401.0999999999985 €]
|
||||
@@ -1661,6 +1661,15 @@ UserSchema.methods.removeToken = function (token) {
|
||||
});
|
||||
};
|
||||
|
||||
// # Rimuove tutti i tokens di tutti gli utenti con idapp
|
||||
UserSchema.statics.SvuotaTuttiGliAccessiOnlineConToken = async function (idapp) {
|
||||
const User = this;
|
||||
|
||||
return await User.updateMany({ idapp },
|
||||
{ $set: { tokens: [] } });
|
||||
};
|
||||
|
||||
|
||||
UserSchema.statics.getEmailByUsername = async function (idapp, username) {
|
||||
const User = this;
|
||||
|
||||
|
||||
@@ -1359,6 +1359,8 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
|
||||
{ $set: { news_on: true } },
|
||||
{ new: false });
|
||||
|
||||
} else if (mydata.dbop === 'SvuotaTuttiGliAccessiOnlineConToken') {
|
||||
await User.SvuotaTuttiGliAccessiOnlineConToken(idapp);
|
||||
} else if (mydata.dbop === 'removeRegulations') {
|
||||
await Circuit.updateMany({}, { $set: { regulation: '' } });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user