All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
  Print view

dispatch_url calling another node how to remove addfilters
Author Message
PostPosted: Wed Apr 17, 2019 3:47 am 
Regular
User avatar
Offline

Joined: Thu Aug 25, 2011 9:31 pm
Posts: 308
Location: Mumbai, India
Topic : dispatch_url calling another node how to remove addfilters
from one node (Node-A) i am calling another node (Node-B) specific record in view mode thru a button using dispatch url like below ...... Node-B has no of addfilters in it .... but i wish to remove all those addfilters dynamically in this call. Is there any way?

Code:
            $pparams = array();
            $atkselector = "gen_favou.id = '$this_vou_id'";
            $pparams["atkselector"] = $atkselector;
            $pparams["atknodetype"] = $node;
            $pparams["atkprevlevel"] = -1 ; //admin //does NOT work
            $pparams["atklevel"] = 1 ;     //edit
            $pparams["atkstackid"] = atkStackID();
            //Sat.06.Apr.2019 remove addfilt so that admin when in Mumbai store can c Trp V-vou if New w/o error
//--            $pparams["atkfilter"] = "1=1"; //DOES NOT WORK

  $nodeLaunch = dispatch_url( $node, "view",$pparams, 'dispatch.php');
        $url = session_url($nodeLaunch); //Thu.03.Mar.2016  this change done otherwise hangs
          $content = "javascript:NewWindow('".$url."','printWindow', 1200, 400, 'yes', 'no','no','yes' )";
        $temp = '<input type="button" value="V" onClick="' . $content .'" />';
   return $temp;





Full code
Code:

      :
      $ref_doc =&$this->add(new atkDummyAttribute("ref_doc","Voucher",0));//AF_READONLY
      $ref_doc->setLabel('Voucher');
      :


   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

//introduced here on Wed.17.Apr.2019 from class.gen_ledger_screen_dtl.inc
//      $ref_doc =&$this->add(new atkDummyAttribute("ref_doc","Voucher",0));//AF_READONLY
//      $ref_doc->setLabel('Voucher');
function ref_doc_display($record,$mode="list")
   //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  {
    $page = &$this->getPage();
    $page->register_script(atkconfig("atkroot")."atk/javascript/newwindow.js");

    global $ATK_VARS;   //NOT used - in case reqd
    $session = &atkSessionManager::getSession();  //NOT used - in case reqd
     $user = getuser();
        $db = &atkGetDb();
        $this_vou_id = $this->m_postvars['id'];

        //$pparams[$this->primary_field] = $record[$this->primary_field];
        //$pparams["atkselector"] = $this->node.".".$this->primary_field."='".$record[$this->primary_field]."'";
        //$pparams["atkfilter"] = $this->primary_field."=".$record[$this->primary_field]."";
            $pparams = array();
            $atkselector = "gen_favou.id = '$this_vou_id'";
            $pparams["atkselector"] = $atkselector;
            $pparams["atknodetype"] = $node;
            $pparams["atkprevlevel"] = -1 ; //admin //does NOT work
            $pparams["atklevel"] = 1 ;     //edit
            $pparams["atkstackid"] = atkStackID();
            //Sat.06.Apr.2019 remove addfilt so that admin when in Mumbai store can c Trp V-vou if New w/o error
//--            $pparams["atkfilter"] = "1=1"; //DOES NOT WORK

  $nodeLaunch = dispatch_url( $node, "view",$pparams, 'dispatch.php');


        $url = session_url($nodeLaunch); //Thu.03.Mar.2016  this change done otherwise hangs

          $content = "javascript:NewWindow('".$url."','printWindow', 1200, 400, 'yes', 'no','no','yes' )";



        $temp = '<input type="button" value="V" onClick="' . $content .'" />';
   return $temp;
  }
 
 


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group