MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-$page_security = 2;
+$page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ?
+ 'SA_SALESTRANSVIEW' : 'SA_SALESBULKREP';
// ----------------------------------------------------------------
// $ Revision: 2.0 $
// Creator: Janusz Dobrwolski
//----------------------------------------------------------------------------------------------------
-// trial_inquiry_controls();
print_deliveries();
//----------------------------------------------------------------------------------------------------
if ($email == 0)
{
- $rep = new FrontReport(_('DELIVERY'), "DeliveryNoteBulk.pdf", user_pagesize());
+ $rep = new FrontReport(_('DELIVERY'), "DeliveryNoteBulk", user_pagesize());
$rep->currency = $cur;
$rep->Font();
$rep->Info($params, $cols, null, $aligns);
for ($i = $fno[0]; $i <= $tno[0]; $i++)
{
- if (!exists_customer_trans(13, $i))
+ if (!exists_customer_trans(ST_CUSTDELIVERY, $i))
continue;
- $myrow = get_customer_trans($i, 13);
+ $myrow = get_customer_trans($i, ST_CUSTDELIVERY);
$branch = get_branch($myrow["branch_code"]);
- $sales_order = get_sales_order_header($myrow["order_"]); // ?
+ $sales_order = get_sales_order_header($myrow["order_"], ST_SALESORDER); // ?
if ($email == 1)
{
$rep = new FrontReport("", "", user_pagesize());
$rep->Header2($myrow, $branch, $sales_order,'',13);
}
- $comments = get_comments(13, $i);
+ $comments = get_comments(ST_CUSTDELIVERY, $i);
if ($comments && db_num_rows($comments))
{
$rep->NewLine();