Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,16 +28,16 @@ def create_pdf(data, filename):
|
|
28 |
bold_style = ParagraphStyle(name='Bold', fontSize=12, fontName='Helvetica-Bold', spaceAfter=8)
|
29 |
|
30 |
# Header
|
31 |
-
elements.append(Paragraph("
|
32 |
-
elements.append(Paragraph("PT.
|
33 |
-
elements.append(Paragraph("Jl.
|
34 |
elements.append(Spacer(1, 0.5*cm))
|
35 |
|
36 |
# Kepada Yth.
|
37 |
elements.append(Paragraph(f"Kepada Yth.", normal_style))
|
38 |
elements.append(Paragraph(f"{data['nama_prospek']}", bold_style))
|
39 |
elements.append(Paragraph(f"{data['alamat_prospek']}", normal_style))
|
40 |
-
elements.append(Paragraph(f"Jenis Prospek: {data['jenis_prospek']}", normal_style))
|
41 |
elements.append(Spacer(1, 0.5*cm))
|
42 |
|
43 |
# Tanggal
|
@@ -189,10 +189,6 @@ if (annyang) {
|
|
189 |
document.getElementById('alamat_prospek').querySelector('textarea').value = value;
|
190 |
const inputEvent = new Event('input', { bubbles: true, cancelable: true });
|
191 |
document.getElementById('alamat_prospek').querySelector('textarea').dispatchEvent(inputEvent);
|
192 |
-
|
193 |
-
document.getElementById('alamat_prospek').querySelector('textarea').innerHTML = value;
|
194 |
-
document.getElementById('alamat_prospek').querySelector('textarea').innerText = value;
|
195 |
-
document.getElementById('speechStatus').innerText = 'Alamat prospek diisi: ' + value;
|
196 |
},
|
197 |
'jenis individu': function() {
|
198 |
document.getElementById('jenis_prospek').querySelector('input').value = 'Individu';
|
@@ -222,18 +218,26 @@ if (annyang) {
|
|
222 |
'jumlah *value': function(value) {
|
223 |
document.getElementById('jumlah_produk').querySelector('textarea').value = value;
|
224 |
document.getElementById('speechStatus').innerText = 'Jumlah produk diisi: ' + value;
|
|
|
|
|
225 |
},
|
226 |
'harga *value': function(value) {
|
227 |
document.getElementById('harga_produk').querySelector('textarea').value = value;
|
228 |
document.getElementById('speechStatus').innerText = 'Harga produk diisi: ' + value;
|
|
|
|
|
229 |
},
|
230 |
'diskon *value': function(value) {
|
231 |
document.getElementById('diskon').querySelector('textarea').value = value;
|
232 |
document.getElementById('speechStatus').innerText = 'Diskon diisi: ' + value;
|
|
|
|
|
233 |
},
|
234 |
'syarat *value': function(value) {
|
235 |
document.getElementById('syarat').querySelector('textarea').value = value;
|
236 |
document.getElementById('speechStatus').innerText = 'Syarat dan ketentuan diisi: ' + value;
|
|
|
|
|
237 |
}
|
238 |
};
|
239 |
|
|
|
28 |
bold_style = ParagraphStyle(name='Bold', fontSize=12, fontName='Helvetica-Bold', spaceAfter=8)
|
29 |
|
30 |
# Header
|
31 |
+
elements.append(Paragraph("Quotation", title_style))
|
32 |
+
elements.append(Paragraph("PT.Arafa Asia", normal_style))
|
33 |
+
elements.append(Paragraph("Jl.Griya Cigadung Baru E2, Bandung 40191", normal_style))
|
34 |
elements.append(Spacer(1, 0.5*cm))
|
35 |
|
36 |
# Kepada Yth.
|
37 |
elements.append(Paragraph(f"Kepada Yth.", normal_style))
|
38 |
elements.append(Paragraph(f"{data['nama_prospek']}", bold_style))
|
39 |
elements.append(Paragraph(f"{data['alamat_prospek']}", normal_style))
|
40 |
+
#elements.append(Paragraph(f"Jenis Prospek: {data['jenis_prospek']}", normal_style))
|
41 |
elements.append(Spacer(1, 0.5*cm))
|
42 |
|
43 |
# Tanggal
|
|
|
189 |
document.getElementById('alamat_prospek').querySelector('textarea').value = value;
|
190 |
const inputEvent = new Event('input', { bubbles: true, cancelable: true });
|
191 |
document.getElementById('alamat_prospek').querySelector('textarea').dispatchEvent(inputEvent);
|
|
|
|
|
|
|
|
|
192 |
},
|
193 |
'jenis individu': function() {
|
194 |
document.getElementById('jenis_prospek').querySelector('input').value = 'Individu';
|
|
|
218 |
'jumlah *value': function(value) {
|
219 |
document.getElementById('jumlah_produk').querySelector('textarea').value = value;
|
220 |
document.getElementById('speechStatus').innerText = 'Jumlah produk diisi: ' + value;
|
221 |
+
const inputEvent = new Event('input', { bubbles: true, cancelable: true });
|
222 |
+
document.getElementById('jumlah_produk').querySelector('textarea').dispatchEvent(inputEvent);
|
223 |
},
|
224 |
'harga *value': function(value) {
|
225 |
document.getElementById('harga_produk').querySelector('textarea').value = value;
|
226 |
document.getElementById('speechStatus').innerText = 'Harga produk diisi: ' + value;
|
227 |
+
const inputEvent = new Event('input', { bubbles: true, cancelable: true });
|
228 |
+
document.getElementById('harga_produk').querySelector('textarea').dispatchEvent(inputEvent);
|
229 |
},
|
230 |
'diskon *value': function(value) {
|
231 |
document.getElementById('diskon').querySelector('textarea').value = value;
|
232 |
document.getElementById('speechStatus').innerText = 'Diskon diisi: ' + value;
|
233 |
+
const inputEvent = new Event('input', { bubbles: true, cancelable: true });
|
234 |
+
document.getElementById('diskon').querySelector('textarea').dispatchEvent(inputEvent);
|
235 |
},
|
236 |
'syarat *value': function(value) {
|
237 |
document.getElementById('syarat').querySelector('textarea').value = value;
|
238 |
document.getElementById('speechStatus').innerText = 'Syarat dan ketentuan diisi: ' + value;
|
239 |
+
const inputEvent = new Event('input', { bubbles: true, cancelable: true });
|
240 |
+
document.getElementById('syarat').querySelector('textarea').dispatchEvent(inputEvent);
|
241 |
}
|
242 |
};
|
243 |
|