Delivery contact on ZS realization list
This commit is contained in:
@@ -1059,6 +1059,16 @@ class EcmSale extends SugarBean
|
||||
$result_array[$i]['total_invoice'] = $total_invoice;
|
||||
$result_array[$i]['percent'] = $percent;
|
||||
$result_array[$i]['currency'] = $r['currency_id'];
|
||||
$result_array[$i]['delivery_name'] = null;
|
||||
|
||||
if (strlen($r['shipping_address_name']) > 0) {
|
||||
$result_array[$i]['delivery_name'] = $r['shipping_address_name'];
|
||||
$d = $db->fetchByAssoc($db->query(sprintf("SELECT id, TRIM(name) FROM accounts WHERE name LIKE '%s' AND deleted=0", strtolower(trim($r['shipping_address_name'])))));
|
||||
if ($d && $d['id']) {
|
||||
$result_array[$i]['delivery_id'] = $d['id'];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$i++;
|
||||
$sum_total_qty += $total_qty;
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
<script type="text/javascript"
|
||||
src="include/ECM/EcmMultiPdf/EcmMultiPdf.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="include/jQuery/jquery.blockUI.js"></script>
|
||||
<script type="text/javascript" src="include/ECM/EcmMultiPdf/EcmMultiPdf.js"></script>
|
||||
<script type="text/javascript" src="include/jQuery/jquery.blockUI.js"></script>
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><img src="themes/Sugar/images/EcmProducts.gif"
|
||||
style="margin-top: 3px; margin-right: 3px;" alt="EcmProducts"
|
||||
<td><img src="themes/Sugar/images/EcmProducts.gif" style="margin-top: 3px; margin-right: 3px;" alt="EcmProducts"
|
||||
width="16" border="0" height="16"></td>
|
||||
<td><h2>{$MOD.LBL_LISTNEWSALES_NAME}</h2></td>
|
||||
<td>
|
||||
<h2>{$MOD.LBL_LISTNEWSALES_NAME}</h2>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/>
|
||||
<br />
|
||||
<form action="index.php?module=EcmSales&action=ListNewSales" method="get" name="SearchFormListNewSales">
|
||||
<ul class="tablist" style="width:100%;">
|
||||
<input type="hidden" name="module" value="EcmSales">
|
||||
@@ -27,8 +26,8 @@
|
||||
</td>
|
||||
<td nowrap="">
|
||||
<input type="text" maxlength="10" size="11" tabindex="" title=""
|
||||
value="{if $POST.date_send_from!=''}{$POST.date_send_from}{else}{$smarty.now|date_format:"%d.%m.%Y"}{/if}" id="date_send_from"
|
||||
name="date_send_from" autocomplete="off">
|
||||
value="{if $POST.date_send_from!=''}{$POST.date_send_from}{else}{$smarty.now|date_format:"%d.%m.%Y"}{/if}"
|
||||
id="date_send_from" name="date_send_from" autocomplete="off">
|
||||
<img align="absmiddle" border="0" id="date_send_from_trigger" name="date_send_from_trigger"
|
||||
alt="Enter Date" src="themes/default/images/jscalendar.gif">
|
||||
<script type="text/javascript">
|
||||
@@ -42,16 +41,15 @@
|
||||
dateStr: "",
|
||||
step: 1,
|
||||
weekNumbers: false
|
||||
}
|
||||
);
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
{$MOD.LBL_LISTNEWSALES_DATE_END}:
|
||||
|
||||
<input type="text" maxlength="10" size="11" tabindex="" title=""
|
||||
value="{if $POST.date_send_to!=''}{$POST.date_send_to}{else}{$smarty.now|date_format:"%d.%m.%Y"}{/if}" id="date_send_to"
|
||||
name="date_send_to" autocomplete="off">
|
||||
value="{if $POST.date_send_to!=''}{$POST.date_send_to}{else}{$smarty.now|date_format:"%d.%m.%Y"}{/if}"
|
||||
id="date_send_to" name="date_send_to" autocomplete="off">
|
||||
<img align="absmiddle" border="0" id="date_send_to_trigger" name="date_send_to_trigger" alt="Enter Date"
|
||||
src="themes/default/images/jscalendar.gif">
|
||||
<script type="text/javascript">
|
||||
@@ -65,8 +63,7 @@
|
||||
dateStr: "",
|
||||
step: 1,
|
||||
weekNumbers: false
|
||||
}
|
||||
);
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
</td>
|
||||
@@ -74,7 +71,8 @@
|
||||
<td rowspan="2">
|
||||
<select id="sale_type" name="sale_type[]" multiple="true">
|
||||
{foreach from=$SALE_TYPES key="key" item="value" name="sale_types"}
|
||||
<option {if in_array($key, $SELECTED_TYPES)}selected="selected" {/if} value="{$key}">{$value}</option>
|
||||
<option {if in_array($key, $SELECTED_TYPES)}selected="selected" {/if} value="{$key}">{$value}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
@@ -82,7 +80,8 @@
|
||||
<td rowspan="2">
|
||||
<select id="sale_status" name="sale_status[]" multiple="true">
|
||||
{foreach from=$SALE_STATUSES key="key" item="value" name="sale_statuses"}
|
||||
<option {if in_array($key, $SELECTED_STATUSES)}selected="selected" {/if} value="{$key}">{$value}</option>
|
||||
<option {if in_array($key, $SELECTED_STATUSES)}selected="selected" {/if} value="{$key}">{$value}
|
||||
</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
@@ -118,8 +117,8 @@
|
||||
</td>
|
||||
<td nowrap="">
|
||||
<input type="text" maxlength="10" size="11" tabindex="" title=""
|
||||
value="{if $POST.date_from!=''}{$POST.date_from}{/if}"
|
||||
id="date_from" name="date_from" autocomplete="off">
|
||||
value="{if $POST.date_from!=''}{$POST.date_from}{/if}" id="date_from" name="date_from"
|
||||
autocomplete="off">
|
||||
<img align="absmiddle" border="0" id="date_from_trigger" name="date_from_trigger" alt="Enter Date"
|
||||
src="themes/default/images/jscalendar.gif">
|
||||
<script type="text/javascript">
|
||||
@@ -133,14 +132,12 @@
|
||||
dateStr: "",
|
||||
step: 1,
|
||||
weekNumbers: false
|
||||
}
|
||||
);
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
do:
|
||||
<input type="text" maxlength="10" size="11" tabindex="" title=""
|
||||
value="{if $POST.date_to!=''}{$POST.date_to}{/if}"
|
||||
id="date_to" name="date_to" autocomplete="off">
|
||||
value="{if $POST.date_to!=''}{$POST.date_to}{/if}" id="date_to" name="date_to" autocomplete="off">
|
||||
<img align="absmiddle" border="0" id="date_to_trigger" name="date_to_trigger" alt="Enter Date"
|
||||
src="themes/default/images/jscalendar.gif">
|
||||
<script type="text/javascript">
|
||||
@@ -154,8 +151,7 @@
|
||||
dateStr: "",
|
||||
step: 1,
|
||||
weekNumbers: false
|
||||
}
|
||||
);
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
</td>
|
||||
@@ -170,7 +166,8 @@
|
||||
|
||||
</table>
|
||||
|
||||
<h3 style="color:red">{if $POST.date_send_from!='' && $POST.date_from!=''}Proszę wybrać date dostawy lub datę wysyłki{/if}</h3>
|
||||
<h3 style="color:red">{if $POST.date_send_from!='' && $POST.date_from!=''}Proszę wybrać date dostawy lub datę
|
||||
wysyłki{/if}</h3>
|
||||
<input type="hidden" id="idss" value="">
|
||||
<input type="submit" value="{$MOD.LBL_LISTNEWSALES_POST}" name="submit" class="button">
|
||||
<input type="button" onclick="location.href='index.php?module=EcmSales&action=ListNewSales';"
|
||||
@@ -219,21 +216,30 @@
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<a href="index.php?module=Accounts&action=DetailView&record={$item.parent_id}">{$item.parent_name}</a>
|
||||
<a
|
||||
href="index.php?module=Accounts&action=DetailView&record={$item.parent_id}">{$item.parent_name}</a>
|
||||
{if $item.delivery_name}
|
||||
{if $item.delivery_id}
|
||||
(<a
|
||||
href="index.php?module=Accounts&action=DetailView&record={$item.delivery_id}">{$item.delivery_name}</a>)
|
||||
{else}
|
||||
({$item.delivery_name})
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$item.delivery_date}</td>
|
||||
<td><input type="checkbox" {if $item.send_accepted==true}checked="checked" {/if}
|
||||
disabled="disabled"></td>
|
||||
<td><input type="checkbox" {if $item.send_accepted==true}checked="checked" {/if} disabled="disabled">
|
||||
</td>
|
||||
<td>{$item.send_date} </td>
|
||||
<td style="text-align: right">{$item.quantity}</td>
|
||||
<td data-total="{$item.total_netto}"
|
||||
style="text-align: right">{$item.total_netto|number_format:2:".":","}</td>
|
||||
<td data-total="{$item.total_vat}"
|
||||
style="text-align: right">{$item.total_vat|number_format:2:".":","}</td>
|
||||
<td data-total="{$item.total_brutto}"
|
||||
style="text-align: right">{$item.total_brutto|number_format:2:".":","}</td>
|
||||
<td data-total="{$item.total_invoice}"
|
||||
style="text-align: right">{$item.total_invoice|number_format:2:".":","}</td>
|
||||
<td data-total="{$item.total_netto}" style="text-align: right">
|
||||
{$item.total_netto|number_format:2:".":","}</td>
|
||||
<td data-total="{$item.total_vat}" style="text-align: right">{$item.total_vat|number_format:2:".":","}
|
||||
</td>
|
||||
<td data-total="{$item.total_brutto}" style="text-align: right">
|
||||
{$item.total_brutto|number_format:2:".":","}</td>
|
||||
<td data-total="{$item.total_invoice}" style="text-align: right">
|
||||
{$item.total_invoice|number_format:2:".":","}</td>
|
||||
<td style="text-align: right">{$item.percent}<a style="cursor:pointer;"
|
||||
onclick="{literal}if(document.getElementById('div{/literal}{$item.id}{literal}').style.display=='none'){document.getElementById('div{/literal}{$item.id}{literal}').style.display='block';}else{document.getElementById('{/literal}div{$item.id}{literal}').style.display='none';}{/literal} "><img
|
||||
border="0" src="modules/EcmQuotes/images/search.gif"></a>
|
||||
@@ -274,14 +280,16 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<span style="color:red;font-weight:bold">{$item.products.minus|number_format:2:".":","}</span>
|
||||
<span
|
||||
style="color:red;font-weight:bold">{$item.products.minus|number_format:2:".":","}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<span style="color:green;font-weight:bold">{$item.products.plus|number_format:2:".":","}</span>
|
||||
<span
|
||||
style="color:green;font-weight:bold">{$item.products.plus|number_format:2:".":","}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -293,12 +301,11 @@
|
||||
<td>
|
||||
{if $item.type!='gratis'}
|
||||
{if $item.fv_switch=='yes'}<img border="0" id="convert_to_invoice_{$item.id}"
|
||||
src="modules/EcmSales/images/convert_disabled.gif"
|
||||
title="{$item.fv_name}" style="cursor:pointer;"
|
||||
src="modules/EcmSales/images/convert_disabled.gif" title="{$item.fv_name}"
|
||||
style="cursor:pointer;"
|
||||
onClick="{literal}javascript:window.open('index.php?module=EcmInvoiceOuts&action=DetailView&record={/literal}{$item.fv_id}{literal}','_newtab');{/literal} " />'{/if}
|
||||
{if $item.fv_switch=='no'}<img border="0" id="convert_to_invoice_{$item.id}"
|
||||
src="modules/EcmSales/images/convert_enabled.gif"
|
||||
title="Create Invoice"
|
||||
src="modules/EcmSales/images/convert_enabled.gif" title="Create Invoice"
|
||||
onClick="{literal}javascript:window.open('index.php?module=EcmInvoiceOuts&action=EditView&isWZ=true&wz_record={/literal}{$item.fv_id}{literal}','_newtab');{/literal}"
|
||||
style="cursor:pointer;" />{/if}
|
||||
{if $item.wz_switch=='disabled'}<img src="modules/EcmSales/images/create_wz_disabled.gif"
|
||||
@@ -381,14 +388,16 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<span style="color:red;font-weight:bold">{$POSITION_LIST.total_product.minus|number_format:2:".":","}</span>
|
||||
<span
|
||||
style="color:red;font-weight:bold">{$POSITION_LIST.total_product.minus|number_format:2:".":","}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>
|
||||
<span style="color:green;font-weight:bold">{$POSITION_LIST.total_product.plus|number_format:2:".":","}</span>
|
||||
<span
|
||||
style="color:green;font-weight:bold">{$POSITION_LIST.total_product.plus|number_format:2:".":","}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user