Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3b3ef5ba

Von Sven Schöling vor mehr als 15 Jahren hinzugefügt

  • ID 3b3ef5ba0b9d0d6fb45e082cbfafa524243ae6f7
  • Vorgänger 594f0e99
  • Nachfolger 875f08f3

Anzeige von Kundendaten in der Verkaufsrechnungssuche.

Unterschiede anzeigen:

SL/AR.pm
419 419
    qq|  a.marge_total, a.marge_percent, | .
420 420
    qq|  a.transaction_description, | .
421 421
    qq|  pr.projectnumber AS globalprojectnumber, | .
422
    qq|  c.name, | .
422
    qq|  c.name, c.customernumber, c.country, c.ustid, | .
423 423
    qq|  e.name AS employee, | .
424
    qq|  e2.name AS salesman | .
424
    qq|  e2.name AS salesman, | .
425
    qq|  tz.description AS taxzone, | .
426
    qq|  pt.description AS payment_terms | .
425 427
    qq|FROM ar a | .
426 428
    qq|JOIN customer c ON (a.customer_id = c.id) | .
427 429
    qq|LEFT JOIN employee e ON (a.employee_id = e.id) | .
428 430
    qq|LEFT JOIN employee e2 ON (a.salesman_id = e2.id) | .
429
    qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id)|;
431
    qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id)| .
432
    qq|LEFT JOIN tax_zones tz ON (tz.id = c.taxzone_id)| .
433
    qq|LEFT JOIN payment_terms pt ON (pt.id = c.payment_id)|;
430 434

  
431 435
  my $where = "1 = 1";
432 436
  if ($form->{customer_id}) {
......
470 474
    }
471 475
  }
472 476

  
473
  my @a = (transdate, invnumber, name);
477
  my @a = qw(transdate invnumber name);
474 478
  push @a, "employee" if $form->{l_employee};
475 479
  my $sortdir   = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC';
476 480
  my $sortorder = join(', ', map { "$_ $sortdir" } @a);
......
652 656

  
653 657
  # now copy acc_trans entries
654 658
  $query = qq|SELECT a.*, c.link FROM acc_trans a LEFT JOIN chart c ON a.chart_id = c.id WHERE a.trans_id = ? ORDER BY a.acc_trans_id|;
655
  my $rowref = selectall_hashref_query($form, $dbh, $query, $id); 
659
  my $rowref = selectall_hashref_query($form, $dbh, $query, $id);
656 660

  
657 661
  # kill all entries containing payments, which are the last 2n rows, of which the last has link =~ /paid/
658 662
  while ($rowref->[-1]{link} =~ /paid/) {
bin/mozilla/ar.pl
96 96
  	$form->{addition} = "ADDED";
97 97
  	$form->save_history($form->dbconnect(\%myconfig));
98 98
  }
99
  # /saving the history 
100
  
99
  # /saving the history
100

  
101 101
  $form->{title}    = "Add";
102 102
  $form->{callback} = "ar.pl?action=add" unless $form->{callback};
103 103

  
......
318 318

  
319 319
  my $n = ($form->{creditremaining} =~ /-/) ? "0" : "1";
320 320

  
321
  $customer = ($form->{selectcustomer}) 
322
    ? qq|<select name="customer" onchange="document.getElementById('update_button').click();">$form->{selectcustomer}</select>| 
321
  $customer = ($form->{selectcustomer})
322
    ? qq|<select name="customer" onchange="document.getElementById('update_button').click();">$form->{selectcustomer}</select>|
323 323
    : qq|<input name=customer value="$form->{customer}" size=35>|;
324 324

  
325 325
  $employee = qq|
......
685 685
  $column_data{exchangerate} = "<th>" . $locale->text('Exch') . "</th>";
686 686
  $column_data{AR_paid}      = "<th>" . $locale->text('Account') . "</th>";
687 687
  $column_data{source}       = "<th>" . $locale->text('Source') . "</th>";
688
  $column_data{memo}         = "<th>" . $locale->text('Memo') . "</th>"; 
689
  $column_data{paid_project_id} = "<th>" . $locale->text('Project Number') . "</th>"; 
688
  $column_data{memo}         = "<th>" . $locale->text('Memo') . "</th>";
689
  $column_data{paid_project_id} = "<th>" . $locale->text('Project Number') . "</th>";
690 690

  
691 691
  print "
692 692
        <tr>
......
883 883
    print qq| <input type=button class=submit onclick=set_history_window($form->{id}); name=history id=history value=| . $locale->text('history') . qq|> |;
884 884
  }
885 885
  # /button for saving history
886
  # mark_as_paid button 
887
  if($form->{id} ne "") {  
888
    print qq|<input type="submit" class="submit" name="action" value="| 
886
  # mark_as_paid button
887
  if($form->{id} ne "") {
888
    print qq|<input type="submit" class="submit" name="action" value="|
889 889
          . $locale->text('mark as paid') . qq|">|;
890 890
  }
891 891
  # /mark_as_paid button
......
905 905

  
906 906
  $auth->assert('general_ledger');
907 907

  
908
  &mark_as_paid_common(\%myconfig,"ar");  
908
  &mark_as_paid_common(\%myconfig,"ar");
909 909

  
910 910
  $lxdebug->leave_sub();
911 911
}
......
1064 1064
  my $transdate = $form->datetonum($form->{transdate}, \%myconfig);
1065 1065
  $form->error($locale->text('Cannot post transaction for a closed period!')) if ($form->date_closed($form->{"transdate"}, \%myconfig));
1066 1066

  
1067
  $form->error($locale->text('Zero amount posting!')) 
1067
  $form->error($locale->text('Zero amount posting!'))
1068 1068
    unless grep $_*1, map $form->parse_amount(\%myconfig, $form->{"amount_$_"}), 1..$form->{rowcount};
1069 1069

  
1070 1070
  $form->isblank("exchangerate", $locale->text('Exchangerate missing!'))
......
1108 1108
    $form->{addition} = "POSTED";
1109 1109
    $form->save_history($form->dbconnect(\%myconfig));
1110 1110
  }
1111
  # /saving the history 
1111
  # /saving the history
1112 1112
  remove_draft() if $form->{remove_draft};
1113 1113

  
1114 1114
  $form->redirect($locale->text('Transaction posted!')) unless $inline;
......
1128 1128
  	$form->{addition} = "POSTED AS NEW";
1129 1129
  	$form->save_history($form->dbconnect(\%myconfig));
1130 1130
  }
1131
  # /saving the history 
1131
  # /saving the history
1132 1132
  &post;
1133 1133

  
1134 1134
  $lxdebug->leave_sub();
......
1201 1201
  	  $form->{addition} = "DELETED";
1202 1202
  	  $form->save_history($form->dbconnect(\%myconfig));
1203 1203
    }
1204
    # /saving the history 
1204
    # /saving the history
1205 1205
    $form->redirect($locale->text('Transaction deleted!'));
1206 1206
  }
1207 1207
  $form->error($locale->text('Cannot delete transaction!'));
......
1246 1246
| if $form->{selectdepartment};
1247 1247

  
1248 1248
  $form->{title} = $locale->text('AR Transactions');
1249
  
1249

  
1250 1250
  $form->{javascript} .= qq|<script type="text/javascript" src="js/common.js"></script>|;
1251
  
1251

  
1252 1252
  # use JavaScript Calendar or not
1253 1253
  $form->{jsscript} = 1;
1254 1254
  $jsscript = "";
......
1412 1412
		<td align=right><input name="l_transaction_description" class=checkbox type=checkbox value=Y></td>
1413 1413
		<td nowrap>| . $locale->text('Transaction description') . qq|</td>
1414 1414
	      </tr>
1415
          <tr>
1416
        <td colspan=4 align=left><b>| . $locale->text('Customer') . qq| </td>
1417
          </tr>
1418
          <tr>
1419
		<td align=right><input name="l_customernumber" class=checkbox type=checkbox value=Y></td>
1420
		<td nowrap>| . $locale->text('Customer Number') . qq|</td>
1421
		<td align=right><input name="l_country" class=checkbox type=checkbox value=Y></td>
1422
		<td nowrap>| . $locale->text('Country') . qq|</td>
1423
		<td align=right><input name="l_ustid" class=checkbox type=checkbox value=Y></td>
1424
		<td nowrap>| . $locale->text('USt-IdNr.') . qq|</td>
1425
		<td align=right><input name="l_taxzone" class=checkbox type=checkbox value=Y></td>
1426
		<td nowrap>| . $locale->text('Steuersatz') . qq|</td>
1427
          </tr>
1428
          <tr>
1429
		<td align=right><input name="l_payment" class=checkbox type=checkbox value=Y></td>
1430
		<td nowrap>| . $locale->text('Payment Terms') . qq|</td>
1431
          </tr>
1432

  
1415 1433
	    </table>
1416 1434
	  </td>
1417 1435
	</tr>
......
1480 1498
  @columns =
1481 1499
    qw(transdate id type invnumber ordnumber name netamount tax amount paid
1482 1500
       datepaid due duedate transaction_description notes salesman employee shippingpoint shipvia
1483
       marge_total marge_percent globalprojectnumber);
1501
       marge_total marge_percent globalprojectnumber customernumber country ustid taxzone payment_terms);
1484 1502

  
1485 1503
  my @hidden_variables = map { "l_${_}" } @columns;
1486 1504
  push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber transaction_description notes project_id transdatefrom transdateto);
......
1510 1528
    'globalprojectnumber'     => { 'text' => $locale->text('Project Number'), },
1511 1529
    'marge_total'             => { 'text' => $locale->text('Ertrag'), },
1512 1530
    'marge_percent'           => { 'text' => $locale->text('Ertrag prozentual'), },
1531
    'customernumber'          => { 'text' => $locale->text('Customer Number'), },
1532
    'country'                 => { 'text' => $locale->text('Country'), },
1533
    'ustid'                   => { 'text' => $locale->text('USt-IdNr.'), },
1534
    'taxzone'                 => { 'text' => $locale->text('Steuersatz'), },
1535
    'payment_terms'           => { 'text' => $locale->text('Payment Terms'), },
1513 1536
  );
1514 1537

  
1515 1538
  foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description)) {
......
1657 1680
    $form->{addition} = "STORNO";
1658 1681
    $form->save_history($form->dbconnect(\%myconfig));
1659 1682
  }
1660
  # /saving the history 
1683
  # /saving the history
1661 1684

  
1662
  $form->redirect(sprintf $locale->text("Transaction %d cancelled."), $form->{storno_id}); 
1685
  $form->redirect(sprintf $locale->text("Transaction %d cancelled."), $form->{storno_id});
1663 1686

  
1664 1687
  $lxdebug->leave_sub();
1665 1688
}
locale/de/ar
58 58
  'Contact'                     => 'Kontakt',
59 59
  'Continue'                    => 'Weiter',
60 60
  'Could not spawn the printer command.' => 'Die Druckanwendung konnte nicht gestartet werden.',
61
  'Country'                     => 'Land',
61 62
  'Create and edit RFQs'        => 'Lieferantenanfragen erfassen und bearbeiten',
62 63
  'Create and edit customers and vendors' => 'Kunden und Lieferanten erfassen und bearbeiten',
63 64
  'Create and edit dunnings'    => 'Mahnungen erfassen und bearbeiten',
......
183 184
  'Paid'                        => 'bezahlt',
184 185
  'Part Number'                 => 'Artikelnummer',
185 186
  'Part description'            => 'Artikelbeschreibung',
187
  'Payment Terms'               => 'Zahlungskonditionen',
186 188
  'Payment date missing!'       => 'Tag der Zahlung fehlt!',
187 189
  'Payment posted!'             => 'Zahlung gebucht!',
188 190
  'Pick List'                   => 'Sammelliste',
......
222 224
  'Shipping Point'              => 'Versandort',
223 225
  'Skip'                        => '?berspringen',
224 226
  'Source'                      => 'Beleg',
227
  'Steuersatz'                  => 'Steuersatz',
225 228
  'Storno'                      => 'Storno',
226 229
  'Storno (one letter abbreviation)' => 'S',
227 230
  'Storno Invoice'              => 'Stornorechnung',
......
251 254
  'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen',
252 255
  'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.',
253 256
  'Type'                        => 'Typ',
257
  'USt-IdNr.'                   => 'USt-IdNr.',
254 258
  'Unit'                        => 'Einheit',
255 259
  'Unknown dependency \'%s\'.'  => 'Unbekannte Abh&auml;ngigkeit \'%s\'.',
256 260
  'Update'                      => 'Erneuern',

Auch abrufbar als: Unified diff