Quotes: a line can have a picture beside its name on the quote, guest link, portal and PDF, uploaded or pulled from a link to a picture or a product page's main picture, fetched only from public addresses and kept as ITFlow's own resized copy in uploads/quote_images; products keep a picture that a quote line added from them copies, Copy Quote copies them, and deleting a line, quote, client or product removes the files; Admin Settings Quotes can switch pictures off; database 3.8.8 adds quote_items.item_image, products.product_image and config_quote_show_images; 26.11.9 changelog entries

This commit is contained in:
johnnyq
2026-11-17 21:25:57 -05:00
parent bd62f4af22
commit 475f27fc7f
27 changed files with 619 additions and 15 deletions

View File

@@ -58,7 +58,7 @@ ob_start();
<h5 class="modal-title"><i class="fas fa-fw fa-edit me-2"></i>Edit Line <span class="fw-normal text-white-50 ms-1"><?= escapeHtml(billingNumber($type, $doc)) ?></span></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<form action="post.php" method="post" autocomplete="off" data-billing-line-form>
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off" data-billing-line-form>
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<input type="hidden" name="billing_item_save" value="1">
<input type="hidden" name="type" value="<?= escapeHtml($type) ?>">
@@ -259,6 +259,9 @@ ob_start();
<?php if ($type === 'quote') { // what it costs you and how its price comes from that (functions/quote_pricing.php) ?>
<?= quotePricingFields($item, $currency) ?>
<?php } ?>
<?php if ($type === 'quote' && quoteImagesShown()) { // its picture (functions/quote_images.php) ?>
<?= quoteImageField('item_image', $item['item_image'] ?? '', 'Shown beside the line, on the quote and its PDF.') ?>
<?php } ?>
<div class="col-sm-4">
<label class="form-label">Quantity <strong class="text-danger">*</strong></label>
<div class="input-group">

View File

@@ -19,7 +19,7 @@ ob_start();
<h5 class="modal-title"><i class="fas fa-fw fa-box-open me-2"></i>New Product or Service</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<form action="post.php" method="post" autocomplete="off">
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<div class="modal-body">

View File

@@ -22,7 +22,7 @@ ob_start();
<h5 class="modal-title"><i class="fas fa-fw fa-edit me-2"></i>Edit <span class="fw-normal text-white-50 ms-1"><?= escapeHtml($form_product['product_name']) ?></span></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<form action="post.php" method="post" autocomplete="off">
<form action="post.php" method="post" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<input type="hidden" name="product_id" value="<?= $product_id ?>">

View File

@@ -252,6 +252,9 @@ if ($form_vendor_id && !isset($form_vendors[$form_vendor_id]) && $form_value('ve
<textarea class="form-control" name="description" rows="3" placeholder="What the client sees under the line - what it covers, per user per month, what is included"><?= escapeHtml($form_value('product_description')) ?></textarea>
</div>
</div>
<?php if (quoteImagesReady()) { // a quote line added from it takes a copy (functions/quote_images.php) ?>
<?= quoteImageField('product_image', $form_edit ? ($form_product['product_image'] ?? '') : '', 'A quote line added from it takes a copy.') ?>
<?php } ?>
<div class="col-12">
<label class="form-label">Notes <span class="text-body-secondary fw-normal small">for agents only</span></label>
<div class="input-group">